From 414e0c509f6cd8700da194d1695532e299a7a5cd Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Wed, 4 Dec 2002 17:48:10 +0000 Subject: [PATCH] Cleanup. Added some missing quotes. Better structure and comments. Tried to keep similar tests in one group. Moved more complicated tests to acinclude.m4. Added explicit test for build and host system type. When checking for programs, used $EXEEXT (hopefully fixes OS/2 gettext misdetection). Removed obsolete macros. Removed PTAL check. Used autoconf for asm/io.h check. Shortened --enable-foo output and formatted it correctly. Translations were installed even if --disable-translations was set. Don't test for msgcat anymore. Tell why translations aren't installed. Used autoconf 2.5 syntax for AC_OUTPUT and AC_CONFIG_FILES. Make sane-config executable. Print flags and installation directories near the end of configure output. --- ChangeLog | 13 + acinclude.m4 | 198 +- aclocal.m4 | 286 +- configure | 5556 ++++++++++++++++++-------------------- configure.in | 381 +-- include/sane/config.h.in | 13 +- 6 files changed, 3119 insertions(+), 3328 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce9ac5855..e28d22422 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,19 @@ * backend/epson_scsi.c backend/sm3600.c: Move config.h include to the top of the include list to avoid compilation errors on platforms not defining u_char. Added AIX lalloca check. + * aclocal.m4 acinclude.m4 configure configure.in + include/sane/config.h.in: Cleanup. Added some missing quotes. Better + structure and comments. Tried to keep similar tests in one group. + Moved more complicated tests to acinclude.m4. Added explicit test for + build and host system type. When checking for programs, used $EXEEXT + (hopefully fixes OS/2 gettext misdetection). Removed obsolete + macros. Removed PTAL check. Used autoconf for asm/io.h check. + Shortened --enable-foo output and formatted it correctly. Trans- + lations were installed even if --disable-translations was set. Don't + test for msgcat anymore. Tell why translations aren't installed. Used + autoconf 2.5 syntax for AC_OUTPUT and AC_CONFIG_FILES. Make + sane-config executable. Print flags and installation directories + near the end of configure output. 2002-12-04 Matthew Duggan * backend/canon_pp-dev.c: Don't compare firmware version numbers - diff --git a/acinclude.m4 b/acinclude.m4 index 5ac4a4a33..5f2eeb8c6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,8 +1,11 @@ dnl dnl Contains the following macros +dnl SANE_SET_CFLAGS(is_release) +dnl SANE_CHECK_MISSING_HEADERS +dnl SANE_SET_LDFLAGS +dnl SANE_CHECK_DLL_LIB dnl SANE_EXTRACT_LDFLAGS(LDFLAGS, LIBS) dnl SANE_V4L_VERSION -dnl SANE_CHECK_PTAL dnl SANE_CHECK_JPEG dnl SANE_CHECK_IEEE1284 dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) @@ -12,13 +15,149 @@ dnl SANE_CHECK_GPHOTO2 dnl AC_PROG_LIBTOOL dnl +# SANE_SET_CFLAGS(is_release) +# Set CFLAGS. Enable/disable compilation warnings if we gcc is used. +# Warnings are enabled by default when in development cycle but disabled +# when a release is made. The argument is_release is either yes or no. +AC_DEFUN([SANE_SET_CFLAGS], +[ +if test "${ac_cv_c_compiler_gnu}" = "yes"; then + NORMAL_CFLAGS="\ + -W \ + -Wall" + WARN_CFLAGS="\ + -W \ + -Wall \ + -Wcast-align \ + -Wcast-qual \ + -Wmissing-declarations \ + -Wmissing-prototypes \ + -Wpointer-arith \ + -Wreturn-type \ + -Wstrict-prototypes \ + -pedantic" + + # OS/2 and others don't include some headers with -ansi enabled + ANSI_FLAG=-ansi + case "${host_os}" in + solaris* | hpux* | os2* ) + ANSI_FLAG= + ;; + esac + WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" + + AC_ARG_ENABLE(warnings, + AC_HELP_STRING([--enable-warnings], + [turn on tons of compiler warnings (GCC only)]), + [ + if eval "test x$enable_warnings = xyes"; then + for flag in $WARN_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + else + for flag in $NORMAL_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + fi + ], + [if test x$1 = xno; then + # Warnings enabled by default (development) + for flag in $WARN_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + else + # Warnings disabled by default (release) + for flag in $NORMAL_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + fi]) +fi # ac_cv_c_compiler_gnu +]) + +dnl SANE_CHECK_MISSING_HEADERS +dnl Do some sanity checks. It doesn't make sense to proceed if those headers +dnl aren't present. +AC_DEFUN([SANE_CHECK_MISSING_HEADERS], +[ + MISSING_HEADERS= + if test "${ac_cv_header_fcntl_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" " + fi + if test "${ac_cv_header_sys_time_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" " + fi + if test "${ac_cv_header_unistd_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" " + fi + if test "${ac_cv_header_stdc}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" " + fi + if test "${MISSING_HEADERS}" != "" ; then + echo "*** The following essential header files couldn't be found:" + echo "*** ${MISSING_HEADERS}" + echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?" + echo "*** For details on what went wrong see config.log." + AC_MSG_ERROR([Exiting now.]) + fi +]) + +# SANE_SET_LDFLAGS +# Add special LDFLAGS +AC_DEFUN([SANE_SET_LDFLAGS], +[ + case "${host_os}" in + aix*) #enable .so libraries, disable archives + LDFLAGS="$LDFLAGS -Wl,-brtl" + ;; + esac +]) + +# SANE_CHECK_DLL_LIB +# Find dll library +AC_DEFUN([SANE_CHECK_DLL_LIB], +[ + dnl Checks for dll libraries: dl + if test "${enable_dynamic}" != "no"; then + AC_CHECK_HEADERS(dlfcn.h, + [AC_CHECK_LIB(dl,dlopen, DL_LIB=-ldl) + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" + AC_CHECK_FUNCS(dlopen, enable_dynamic=yes,) + LIBS="${saved_LIBS}" + ],) + + # HP/UX DLL handling + AC_CHECK_HEADERS(dl.h, + [AC_CHECK_LIB(dld,shl_load, DL_LIB=-ldld) + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" + AC_CHECK_FUNCS(shl_load, enable_dynamic=yes,) + LIBS="${saved_LIBS}" + ],) + + #Mac OS X/Darwin + AC_CHECK_HEADERS(mach-o/dyld.h, + [AC_CHECK_FUNCS(NSLinkModule, enable_dynamic=yes,) + LDFLAGS="$LDFLAGS -module" + DL_LIB="" + ],) + fi + AC_SUBST(DL_LIB) + + DYNAMIC_FLAG= + if test "${enable_dynamic}" = yes ; then + DYNAMIC_FLAG=-module + fi + AC_SUBST(DYNAMIC_FLAG) +]) + # # Separate LIBS from LDFLAGS to link correctly on HP/UX (and other # platforms who care about the order of params to ld. It removes all # non '-l..'-params from $2(LIBS), and appends them to $1(LDFLAGS) # # Use like this: SANE_EXTRACT_LDFLAGS(LDFLAGS, LIBS) -AC_DEFUN(SANE_EXTRACT_LDFLAGS, +AC_DEFUN([SANE_EXTRACT_LDFLAGS], [tmp_LIBS="" for param in ${$2}; do case "${param}" in @@ -41,7 +180,7 @@ unset param # depending on the detected version. # Test by Petter Reinholdtsen , 2000-07-07 # -AC_DEFUN(SANE_V4L_VERSION, +AC_DEFUN([SANE_V4L_VERSION], [ AC_CHECK_HEADER(linux/videodev.h) if test "${ac_cv_header_linux_videodev_h}" = "yes" @@ -59,47 +198,9 @@ AC_DEFUN(SANE_V4L_VERSION, fi ]) -# -# Checks for PTAL, needed for MFP support in HP backend. -AC_DEFUN(SANE_CHECK_PTAL, -[ - PTAL_TMP_HAVE_PTAL=no - AC_ARG_WITH(ptal, - [ --with-ptal[=DIR] specify the top-level PTAL directory - [default=/usr/local]]) - if test "$with_ptal" = "no" ; then - echo disabling PTAL - else - PTAL_OLD_CPPFLAGS=${CPPFLAGS} - PTAL_OLD_LDFLAGS=${LDFLAGS} - - if test "$with_ptal" = "yes" ; then - with_ptal=/usr/local - fi - CPPFLAGS="${CPPFLAGS} -I$with_ptal/include" - LDFLAGS="${LDFLAGS} -L$with_ptal/lib" - - AC_CHECK_HEADERS(ptal.h, - AC_CHECK_LIB(ptal,ptalInit, - AC_DEFINE(HAVE_PTAL, 1, [Is PTAL available?]) - LDFLAGS="${LDFLAGS} -lptal" - PTAL_TMP_HAVE_PTAL=yes)) - - if test "${PTAL_TMP_HAVE_PTAL}" != "yes" ; then - CPPFLAGS=${PTAL_OLD_CPPFLAGS} - LDFLAGS=${PTAL_OLD_LDFLAGS} - fi - fi - - unset PTAL_TMP_HAVE_PTAL - unset PTAL_OLD_CPPFLAGS - unset PTAL_OLD_LDFLAGS -]) - - # # Checks for ieee1284 library, needed for canon_pp backend. -AC_DEFUN(SANE_CHECK_IEEE1284, +AC_DEFUN([SANE_CHECK_IEEE1284], [ AC_CHECK_HEADER(ieee1284.h, [ AC_CACHE_CHECK([for libieee1284 >= 0.1.5], sane_cv_use_libieee1284, [ @@ -117,7 +218,7 @@ AC_DEFUN(SANE_CHECK_IEEE1284, # # Checks for jpeg library >= v6B (61), needed for DC210, DC240, and # GPHOTO2 backends. -AC_DEFUN(SANE_CHECK_JPEG, +AC_DEFUN([SANE_CHECK_JPEG], [ AC_CHECK_LIB(jpeg,jpeg_start_decompress, [ @@ -141,7 +242,7 @@ dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) dnl dnl From Japhar. Report changes to japhar@hungry.com dnl -AC_DEFUN(JAPHAR_GREP_CFLAGS, +AC_DEFUN([JAPHAR_GREP_CFLAGS], [case "$CFLAGS" in "$1" | "$1 "* | *" $1" | *" $1 "* ) ifelse($#, 3, [$3], [:]) @@ -160,7 +261,7 @@ dnl LINKER_RPATH. Typical content will be '-Wl,-rpath,' or '-R '. If dnl set, add '${LINKER_RPATH}${libdir}' to $LDFLAGS dnl -AC_DEFUN(SANE_LINKER_RPATH, +AC_DEFUN([SANE_LINKER_RPATH], [dnl AC_REQUIRE([AC_SUBST])dnl This line resulted in an empty AC_SUBST() !! AC_CACHE_CHECK([linker parameter to set runtime link path], LINKER_RPATH, [LINKER_RPATH= @@ -184,7 +285,7 @@ dnl Some of the following types seem to be defined only in sys/bitypes.h on dnl some systems (e.g. Tru64 Unix). This is a problem for files that include dnl sys/bitypes.h indirectly (e.g. net.c). If this is true, we add dnl sys/bitypes.h to CPPFLAGS. -AC_DEFUN(SANE_CHECK_U_TYPES, +AC_DEFUN([SANE_CHECK_U_TYPES], [if test "$ac_cv_header_sys_bitypes_h" = "yes" ; then AC_MSG_CHECKING([for u_int8_t only in sys/bitypes.h]) AC_EGREP_CPP(u_int8_t, @@ -216,10 +317,11 @@ AC_CHECK_TYPE(u_long, unsigned long) # # Checks for gphoto2 libs, needed by gphoto2 backend -AC_DEFUN(SANE_CHECK_GPHOTO2, +AC_DEFUN([SANE_CHECK_GPHOTO2], [ AC_ARG_WITH(gphoto2, - [ --with-gphoto2 Include the gphoto2 backend], + AC_HELP_STRING([--with-gphoto2], + [include the gphoto2 backend]), [ if test "$with_gphoto2" = "no" ; then diff --git a/aclocal.m4 b/aclocal.m4 index 4dadef5a3..c442d33d5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -12,9 +12,12 @@ dnl PARTICULAR PURPOSE. dnl dnl Contains the following macros +dnl SANE_SET_CFLAGS(is_release) +dnl SANE_CHECK_MISSING_HEADERS +dnl SANE_SET_LDFLAGS +dnl SANE_CHECK_DLL_LIB dnl SANE_EXTRACT_LDFLAGS(LDFLAGS, LIBS) dnl SANE_V4L_VERSION -dnl SANE_CHECK_PTAL dnl SANE_CHECK_JPEG dnl SANE_CHECK_IEEE1284 dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) @@ -24,13 +27,149 @@ dnl SANE_CHECK_GPHOTO2 dnl AC_PROG_LIBTOOL dnl +# SANE_SET_CFLAGS(is_release) +# Set CFLAGS. Enable/disable compilation warnings if we gcc is used. +# Warnings are enabled by default when in development cycle but disabled +# when a release is made. The argument is_release is either yes or no. +AC_DEFUN([SANE_SET_CFLAGS], +[ +if test "${ac_cv_c_compiler_gnu}" = "yes"; then + NORMAL_CFLAGS="\ + -W \ + -Wall" + WARN_CFLAGS="\ + -W \ + -Wall \ + -Wcast-align \ + -Wcast-qual \ + -Wmissing-declarations \ + -Wmissing-prototypes \ + -Wpointer-arith \ + -Wreturn-type \ + -Wstrict-prototypes \ + -pedantic" + + # OS/2 and others don't include some headers with -ansi enabled + ANSI_FLAG=-ansi + case "${host_os}" in + solaris* | hpux* | os2* ) + ANSI_FLAG= + ;; + esac + WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" + + AC_ARG_ENABLE(warnings, + AC_HELP_STRING([--enable-warnings], + [turn on tons of compiler warnings (GCC only)]), + [ + if eval "test x$enable_warnings = xyes"; then + for flag in $WARN_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + else + for flag in $NORMAL_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + fi + ], + [if test x$1 = xno; then + # Warnings enabled by default (development) + for flag in $WARN_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + else + # Warnings disabled by default (release) + for flag in $NORMAL_CFLAGS; do + JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + done + fi]) +fi # ac_cv_c_compiler_gnu +]) + +dnl SANE_CHECK_MISSING_HEADERS +dnl Do some sanity checks. It doesn't make sense to proceed if those headers +dnl aren't present. +AC_DEFUN([SANE_CHECK_MISSING_HEADERS], +[ + MISSING_HEADERS= + if test "${ac_cv_header_fcntl_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" " + fi + if test "${ac_cv_header_sys_time_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" " + fi + if test "${ac_cv_header_unistd_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" " + fi + if test "${ac_cv_header_stdc}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" " + fi + if test "${MISSING_HEADERS}" != "" ; then + echo "*** The following essential header files couldn't be found:" + echo "*** ${MISSING_HEADERS}" + echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?" + echo "*** For details on what went wrong see config.log." + AC_MSG_ERROR([Exiting now.]) + fi +]) + +# SANE_SET_LDFLAGS +# Add special LDFLAGS +AC_DEFUN([SANE_SET_LDFLAGS], +[ + case "${host_os}" in + aix*) #enable .so libraries, disable archives + LDFLAGS="$LDFLAGS -Wl,-brtl" + ;; + esac +]) + +# SANE_CHECK_DLL_LIB +# Find dll library +AC_DEFUN([SANE_CHECK_DLL_LIB], +[ + dnl Checks for dll libraries: dl + if test "${enable_dynamic}" != "no"; then + AC_CHECK_HEADERS(dlfcn.h, + [AC_CHECK_LIB(dl,dlopen, DL_LIB=-ldl) + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" + AC_CHECK_FUNCS(dlopen, enable_dynamic=yes,) + LIBS="${saved_LIBS}" + ],) + + # HP/UX DLL handling + AC_CHECK_HEADERS(dl.h, + [AC_CHECK_LIB(dld,shl_load, DL_LIB=-ldld) + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" + AC_CHECK_FUNCS(shl_load, enable_dynamic=yes,) + LIBS="${saved_LIBS}" + ],) + + #Mac OS X/Darwin + AC_CHECK_HEADERS(mach-o/dyld.h, + [AC_CHECK_FUNCS(NSLinkModule, enable_dynamic=yes,) + LDFLAGS="$LDFLAGS -module" + DL_LIB="" + ],) + fi + AC_SUBST(DL_LIB) + + DYNAMIC_FLAG= + if test "${enable_dynamic}" = yes ; then + DYNAMIC_FLAG=-module + fi + AC_SUBST(DYNAMIC_FLAG) +]) + # # Separate LIBS from LDFLAGS to link correctly on HP/UX (and other # platforms who care about the order of params to ld. It removes all # non '-l..'-params from $2(LIBS), and appends them to $1(LDFLAGS) # # Use like this: SANE_EXTRACT_LDFLAGS(LDFLAGS, LIBS) -AC_DEFUN(SANE_EXTRACT_LDFLAGS, +AC_DEFUN([SANE_EXTRACT_LDFLAGS], [tmp_LIBS="" for param in ${$2}; do case "${param}" in @@ -53,7 +192,7 @@ unset param # depending on the detected version. # Test by Petter Reinholdtsen , 2000-07-07 # -AC_DEFUN(SANE_V4L_VERSION, +AC_DEFUN([SANE_V4L_VERSION], [ AC_CHECK_HEADER(linux/videodev.h) if test "${ac_cv_header_linux_videodev_h}" = "yes" @@ -71,47 +210,9 @@ AC_DEFUN(SANE_V4L_VERSION, fi ]) -# -# Checks for PTAL, needed for MFP support in HP backend. -AC_DEFUN(SANE_CHECK_PTAL, -[ - PTAL_TMP_HAVE_PTAL=no - AC_ARG_WITH(ptal, - [ --with-ptal[=DIR] specify the top-level PTAL directory - [default=/usr/local]]) - if test "$with_ptal" = "no" ; then - echo disabling PTAL - else - PTAL_OLD_CPPFLAGS=${CPPFLAGS} - PTAL_OLD_LDFLAGS=${LDFLAGS} - - if test "$with_ptal" = "yes" ; then - with_ptal=/usr/local - fi - CPPFLAGS="${CPPFLAGS} -I$with_ptal/include" - LDFLAGS="${LDFLAGS} -L$with_ptal/lib" - - AC_CHECK_HEADERS(ptal.h, - AC_CHECK_LIB(ptal,ptalInit, - AC_DEFINE(HAVE_PTAL, 1, [Is PTAL available?]) - LDFLAGS="${LDFLAGS} -lptal" - PTAL_TMP_HAVE_PTAL=yes)) - - if test "${PTAL_TMP_HAVE_PTAL}" != "yes" ; then - CPPFLAGS=${PTAL_OLD_CPPFLAGS} - LDFLAGS=${PTAL_OLD_LDFLAGS} - fi - fi - - unset PTAL_TMP_HAVE_PTAL - unset PTAL_OLD_CPPFLAGS - unset PTAL_OLD_LDFLAGS -]) - - # # Checks for ieee1284 library, needed for canon_pp backend. -AC_DEFUN(SANE_CHECK_IEEE1284, +AC_DEFUN([SANE_CHECK_IEEE1284], [ AC_CHECK_HEADER(ieee1284.h, [ AC_CACHE_CHECK([for libieee1284 >= 0.1.5], sane_cv_use_libieee1284, [ @@ -129,7 +230,7 @@ AC_DEFUN(SANE_CHECK_IEEE1284, # # Checks for jpeg library >= v6B (61), needed for DC210, DC240, and # GPHOTO2 backends. -AC_DEFUN(SANE_CHECK_JPEG, +AC_DEFUN([SANE_CHECK_JPEG], [ AC_CHECK_LIB(jpeg,jpeg_start_decompress, [ @@ -153,7 +254,7 @@ dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) dnl dnl From Japhar. Report changes to japhar@hungry.com dnl -AC_DEFUN(JAPHAR_GREP_CFLAGS, +AC_DEFUN([JAPHAR_GREP_CFLAGS], [case "$CFLAGS" in "$1" | "$1 "* | *" $1" | *" $1 "* ) ifelse($#, 3, [$3], [:]) @@ -172,7 +273,7 @@ dnl LINKER_RPATH. Typical content will be '-Wl,-rpath,' or '-R '. If dnl set, add '${LINKER_RPATH}${libdir}' to $LDFLAGS dnl -AC_DEFUN(SANE_LINKER_RPATH, +AC_DEFUN([SANE_LINKER_RPATH], [dnl AC_REQUIRE([AC_SUBST])dnl This line resulted in an empty AC_SUBST() !! AC_CACHE_CHECK([linker parameter to set runtime link path], LINKER_RPATH, [LINKER_RPATH= @@ -196,7 +297,7 @@ dnl Some of the following types seem to be defined only in sys/bitypes.h on dnl some systems (e.g. Tru64 Unix). This is a problem for files that include dnl sys/bitypes.h indirectly (e.g. net.c). If this is true, we add dnl sys/bitypes.h to CPPFLAGS. -AC_DEFUN(SANE_CHECK_U_TYPES, +AC_DEFUN([SANE_CHECK_U_TYPES], [if test "$ac_cv_header_sys_bitypes_h" = "yes" ; then AC_MSG_CHECKING([for u_int8_t only in sys/bitypes.h]) AC_EGREP_CPP(u_int8_t, @@ -228,10 +329,11 @@ AC_CHECK_TYPE(u_long, unsigned long) # # Checks for gphoto2 libs, needed by gphoto2 backend -AC_DEFUN(SANE_CHECK_GPHOTO2, +AC_DEFUN([SANE_CHECK_GPHOTO2], [ AC_ARG_WITH(gphoto2, - [ --with-gphoto2 Include the gphoto2 backend], + AC_HELP_STRING([--with-gphoto2], + [include the gphoto2 backend]), [ if test "$with_gphoto2" = "no" ; then @@ -3767,91 +3869,3 @@ AC_DEFUN([AC_ISC_POSIX], ] ) - -# serial 1 - -# @defmac AC_PROG_CC_STDC -# @maindex PROG_CC_STDC -# @ovindex CC -# If the C compiler in not in ANSI C mode by default, try to add an option -# to output variable @code{CC} to make it so. This macro tries various -# options that select ANSI C on some system or another. It considers the -# compiler to be in ANSI C mode if it handles function prototypes correctly. -# -# If you use this macro, you should check after calling it whether the C -# compiler has been set to accept ANSI C; if not, the shell variable -# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source -# code in ANSI C, you can make an un-ANSIfied copy of it by using the -# program @code{ansi2knr}, which comes with Ghostscript. -# @end defmac - -AC_DEFUN([AM_PROG_CC_STDC], -[AC_REQUIRE([AC_PROG_CC]) -AC_BEFORE([$0], [AC_C_INLINE]) -AC_BEFORE([$0], [AC_C_CONST]) -dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require -dnl a magic option to avoid problems with ANSI preprocessor commands -dnl like #elif. -dnl FIXME: can't do this because then AC_AIX won't work due to a -dnl circular dependency. -dnl AC_BEFORE([$0], [AC_PROG_CPP]) -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) -AC_CACHE_VAL(am_cv_prog_cc_stdc, -[am_cv_prog_cc_stdc=no -ac_save_CC="$CC" -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - AC_TRY_COMPILE( -[#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -], [ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; -], -[am_cv_prog_cc_stdc="$ac_arg"; break]) -done -CC="$ac_save_CC" -]) -if test -z "$am_cv_prog_cc_stdc"; then - AC_MSG_RESULT([none needed]) -else - AC_MSG_RESULT($am_cv_prog_cc_stdc) -fi -case "x$am_cv_prog_cc_stdc" in - x|xno) ;; - *) CC="$CC $am_cv_prog_cc_stdc" ;; -esac -]) - diff --git a/configure b/configure index d27285dd8..e4338ae80 100755 --- a/configure +++ b/configure @@ -465,7 +465,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP DL_LIB DYNAMIC_FLAG HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LINKER_RPATH LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL INCLUDES DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SM3600 SNAPSCAN DLL_PRELOAD PNM INSTALL_TRANSLATIONS MSGFMT XGETTEXT MSGMERGE MSGCAT SELECTED_BACKENDS SANE_CONFIG_PATH DISTCLEAN_FILES LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP SANE_CONFIG_PATH MSGFMT XGETTEXT MSGMERGE INCLUDES LINKER_RPATH DL_LIB DYNAMIC_FLAG HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LN_S ECHO STRIP ac_ct_STRIP LIBTOOL DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SM3600 SNAPSCAN DLL_PRELOAD PNM INSTALL_TRANSLATIONS SELECTED_BACKENDS DISTCLEAN_FILES LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1008,34 +1008,29 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-warnings turn on tons of compiler warnings (GCC only) - default=yes --enable-static=PKGS build static libraries default=no --enable-shared=PKGS build shared libraries default=yes --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) - --enable-pnm-backend enable the pnm backend for testing frontends. Warning: - This will be a security risk if used together with - saned. See PROBLEMS file for details. default=no - --enable-scsibuffersize=N specify the default size (in bytes) of the buffer - for SCSI commands default=131072 - --enable-scsi-directio enable SCSI direct IO (Linux only; can lead to crashes - with backends using shared memory). default=no - This option is in no way related to - --enable-parport-directio. See README.linux for more - information. - --enable-parport-directio enable parallel port direct IO, the backend will - do direct hardware access to use parallel port, so - frontends will require special permission level. - default=no This option is in no way related to - --enable-scsi-directio + --enable-pnm-backend enable the pnm backend for testing frontends + (possible security risk, see PROBLEMS file) + --enable-scsibuffersize=N + specify the default size in bytes of the buffer for + SCSI commands [default=131072] + --enable-scsi-directio enable SCSI direct IO (Linux only, dangerous, see + README.linux) + --enable-parport-directio + enable direct hardware access to the parallel port, + so frontends will require special permission level --disable-translations don't install translations of backend options - --disable-local-backends turns off compilation of all backends but net + --disable-local-backends + turn off compilation of all backends but net Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gphoto2 include the gphoto2 backend --with-gnu-ld assume the C compiler uses GNU ld default=no - --with-gphoto2 Include the gphoto2 backend --with-pic try to use only PIC/non-PIC objects default=use both Some influential environment variables: @@ -1433,6 +1428,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +V_MAJOR=1 +V_MINOR=0 +V_REV=9 +is_release=no ac_config_headers="$ac_config_headers include/sane/config.h" @@ -1450,12 +1450,6 @@ program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed -V_MAJOR=1 -V_MINOR=0 -V_REV=9 - - - PACKAGE=sane-backends VERSION=1.0.9-cvs NUMBER_VERSION=${V_MAJOR}.${V_MINOR}.${V_REV} @@ -1488,6 +1482,88 @@ _ACEOF + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2301,195 +2377,85 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } +done fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -# Find the correct PATH separator. Usually this is `:', but -# DJGPP uses `;' like DOS. -if test "X${PATH_SEPARATOR+set}" != Xset; then - UNAME=${UNAME-`uname 2>/dev/null`} - case X$UNAME in - *-DOS) lt_cv_sys_path_separator=';' ;; - *) lt_cv_sys_path_separator=':' ;; - esac - PATH_SEPARATOR=$lt_cv_sys_path_separator -fi - - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$lt_cv_path_LD" -if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - lt_cv_prog_gnu_ld=yes + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - lt_cv_prog_gnu_ld=no -fi -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2858,6 +2824,296 @@ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 fi fi +# Extract the first word of "sane-config", so it can be a program name with args. +set dummy sane-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SANE_CONFIG_PATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SANE_CONFIG_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_SANE_CONFIG_PATH="$SANE_CONFIG_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SANE_CONFIG_PATH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SANE_CONFIG_PATH" && ac_cv_path_SANE_CONFIG_PATH="no" + ;; +esac +fi +SANE_CONFIG_PATH=$ac_cv_path_SANE_CONFIG_PATH + +if test -n "$SANE_CONFIG_PATH"; then + echo "$as_me:$LINENO: result: $SANE_CONFIG_PATH" >&5 +echo "${ECHO_T}$SANE_CONFIG_PATH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "msgfmt$EXEEXT", so it can be a program name with args. +set dummy msgfmt$EXEEXT; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT=$ac_cv_path_MSGFMT + +if test -n "$MSGFMT"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "xgettext$EXEEXT", so it can be a program name with args. +set dummy xgettext$EXEEXT; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XGETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="no" + ;; +esac +fi +XGETTEXT=$ac_cv_path_XGETTEXT + +if test -n "$XGETTEXT"; then + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "msgmerge$EXEEXT", so it can be a program name with args. +set dummy msgmerge$EXEEXT; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MSGMERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="no" + ;; +esac +fi +MSGMERGE=$ac_cv_path_MSGMERGE + +if test -n "$MSGMERGE"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + + +INCLUDES="${INCLUDES} -I/usr/local/include" + + +if test "${ac_cv_c_compiler_gnu}" = "yes"; then + NORMAL_CFLAGS="\ + -W \ + -Wall" + WARN_CFLAGS="\ + -W \ + -Wall \ + -Wcast-align \ + -Wcast-qual \ + -Wmissing-declarations \ + -Wmissing-prototypes \ + -Wpointer-arith \ + -Wreturn-type \ + -Wstrict-prototypes \ + -pedantic" + + # OS/2 and others don't include some headers with -ansi enabled + ANSI_FLAG=-ansi + case "${host_os}" in + solaris* | hpux* | os2* ) + ANSI_FLAG= + ;; + esac + WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" + + # Check whether --enable-warnings or --disable-warnings was given. +if test "${enable_warnings+set}" = set; then + enableval="$enable_warnings" + + if eval "test x$enable_warnings = xyes"; then + for flag in $WARN_CFLAGS; do + case "$CFLAGS" in +"$flag" | "$flag "* | *" $flag" | *" $flag "* ) + : + ;; +*) + CFLAGS="$CFLAGS $flag" + ;; +esac + + done + else + for flag in $NORMAL_CFLAGS; do + case "$CFLAGS" in +"$flag" | "$flag "* | *" $flag" | *" $flag "* ) + : + ;; +*) + CFLAGS="$CFLAGS $flag" + ;; +esac + + done + fi + +else + if test x$is_release = xno; then + # Warnings enabled by default (development) + for flag in $WARN_CFLAGS; do + case "$CFLAGS" in +"$flag" | "$flag "* | *" $flag" | *" $flag "* ) + : + ;; +*) + CFLAGS="$CFLAGS $flag" + ;; +esac + + done + else + # Warnings disabled by default (release) + for flag in $NORMAL_CFLAGS; do + case "$CFLAGS" in +"$flag" | "$flag "* | *" $flag" | *" $flag "* ) + : + ;; +*) + CFLAGS="$CFLAGS $flag" + ;; +esac + + done + fi +fi; +fi # ac_cv_c_compiler_gnu + + + case "${host_os}" in + aix*) #enable .so libraries, disable archives + LDFLAGS="$LDFLAGS -Wl,-brtl" + ;; + esac + + echo "$as_me:$LINENO: checking linker parameter to set runtime link path" >&5 +echo $ECHO_N "checking linker parameter to set runtime link path... $ECHO_C" >&6 +if test "${LINKER_RPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + LINKER_RPATH= + case "$host_os" in + linux* | freebsd* | netbsd* | openbsd* | irix*) + # I believe this only works with GNU ld [pere 2001-04-16] + LINKER_RPATH="-Wl,-rpath," + ;; + solaris*) + LINKER_RPATH="-R " + ;; + esac + +fi +echo "$as_me:$LINENO: result: $LINKER_RPATH" >&5 +echo "${ECHO_T}$LINKER_RPATH" >&6 + +CPPFLAGS="${CPPFLAGS} -DPATH_SANE_CONFIG_DIR=\$(configdir) \ + -DPATH_SANE_DATA_DIR=\$(datadir) \ + -DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}" + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 @@ -3265,323 +3521,28 @@ fi + if test "${enable_dynamic}" != "no"; then -echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 -echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 -if test "${am_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - am_cv_prog_cc_stdc=no -ac_save_CC="$CC" -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_header in dlfcn.h do - CC="$ac_save_CC $ac_arg" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; - -int -main () -{ - -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - am_cv_prog_cc_stdc="$ac_arg"; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -CC="$ac_save_CC" - -fi - -if test -z "$am_cv_prog_cc_stdc"; then - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 -else - echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 -fi -case "x$am_cv_prog_cc_stdc" in - x|xno) ;; - *) CC="$CC $am_cv_prog_cc_stdc" ;; -esac - -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include - -int -main () -{ -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_c_bigendian=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -# It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -int -main () -{ - _ascii (); _ebcdic (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -int -main () -{ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - - -INCLUDES="${INCLUDES} -I/usr/local/include" -CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" - -if test "${ac_cv_c_compiler_gnu}" = "yes"; then - NORMAL_CFLAGS="\ - -W \ - -Wall" - WARN_CFLAGS="\ - -W \ - -Wall \ - -Wcast-align \ - -Wcast-qual \ - -Wmissing-declarations \ - -Wmissing-prototypes \ - -Wpointer-arith \ - -Wreturn-type \ - -Wstrict-prototypes \ - -pedantic" - - # OS/2 and others don't include some headers with -ansi enabled - ANSI_FLAG=-ansi - if test "${ac_cv_header_os2_h+set}" = set; then - echo "$as_me:$LINENO: checking for os2.h" >&5 -echo $ECHO_N "checking for os2.h... $ECHO_C" >&6 -if test "${ac_cv_header_os2_h+set}" = set; then +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_os2_h" >&5 -echo "${ECHO_T}$ac_cv_header_os2_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -echo "$as_me:$LINENO: checking os2.h usability" >&5 -echo $ECHO_N "checking os2.h usability... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -3606,12 +3567,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -echo "$as_me:$LINENO: checking os2.h presence" >&5 -echo $ECHO_N "checking os2.h presence... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include +#include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -3643,108 +3604,1471 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) - { echo "$as_me:$LINENO: WARNING: os2.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: os2.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: os2.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: os2.h: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) - { echo "$as_me:$LINENO: WARNING: os2.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: os2.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: os2.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: os2.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: os2.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: os2.h: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac -echo "$as_me:$LINENO: checking for os2.h" >&5 -echo $ECHO_N "checking for os2.h... $ECHO_C" >&6 -if test "${ac_cv_header_os2_h+set}" = set; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_os2_h=$ac_header_preproc + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:$LINENO: result: $ac_cv_header_os2_h" >&5 -echo "${ECHO_T}$ac_cv_header_os2_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -if test $ac_cv_header_os2_h = yes; then - ANSI_FLAG= +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + DL_LIB=-ldl fi + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" - case "${host_os}" in - solaris* | hpux*) - ANSI_FLAG= - ;; - esac - WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" +for ac_func in dlopen +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); - # Warnings enabled by default (development) - # Check whether --enable-warnings or --disable-warnings was given. -if test "${enable_warnings+set}" = set; then - enableval="$enable_warnings" +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif - if eval "test x$enable_warnings = xyes"; then - for flag in $WARN_CFLAGS; do - case "$CFLAGS" in -"$flag" | "$flag "* | *" $flag" | *" $flag "* ) - : - ;; -*) - CFLAGS="$CFLAGS $flag" - ;; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + enable_dynamic=yes +fi +done + + LIBS="${saved_LIBS}" + +fi + +done + + + # HP/UX DLL handling + +for ac_header in dl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - done - else - for flag in $NORMAL_CFLAGS; do - case "$CFLAGS" in -"$flag" | "$flag "* | *" $flag" | *" $flag "* ) - : - ;; -*) - CFLAGS="$CFLAGS $flag" - ;; +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + DL_LIB=-ldld +fi + + saved_LIBS="${LIBS}" + LIBS="${LIBS} ${DL_LIB}" + +for ac_func in shl_load +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + enable_dynamic=yes +fi +done + + LIBS="${saved_LIBS}" + +fi + +done + + + #Mac OS X/Darwin + +for ac_header in mach-o/dyld.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - done - fi +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +for ac_func in NSLinkModule +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + enable_dynamic=yes +fi +done + + LDFLAGS="$LDFLAGS -module" + DL_LIB="" + +fi + +done + + fi + + + DYNAMIC_FLAG= + if test "${enable_dynamic}" = yes ; then + DYNAMIC_FLAG=-module + fi + + + +echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 +echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_sqrt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqrt (); +int +main () +{ +sqrt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_sqrt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_m_sqrt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 +if test $ac_cv_lib_m_sqrt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for scsireq_enter in -lscsi" >&5 +echo $ECHO_N "checking for scsireq_enter in -lscsi... $ECHO_C" >&6 +if test "${ac_cv_lib_scsi_scsireq_enter+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lscsi $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char scsireq_enter (); +int +main () +{ +scsireq_enter (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_scsi_scsireq_enter=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_scsi_scsireq_enter=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_scsi_scsireq_enter" >&5 +echo "${ECHO_T}$ac_cv_lib_scsi_scsireq_enter" >&6 +if test $ac_cv_lib_scsi_scsireq_enter = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSCSI 1 +_ACEOF + + LIBS="-lscsi $LIBS" + +fi + # FreeBSD needs this + +echo "$as_me:$LINENO: checking for cam_open_device in -lcam" >&5 +echo $ECHO_N "checking for cam_open_device in -lcam... $ECHO_C" >&6 +if test "${ac_cv_lib_cam_cam_open_device+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcam $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char cam_open_device (); +int +main () +{ +cam_open_device (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_cam_cam_open_device=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_cam_cam_open_device=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_cam_cam_open_device" >&5 +echo "${ECHO_T}$ac_cv_lib_cam_cam_open_device" >&6 +if test $ac_cv_lib_cam_cam_open_device = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCAM 1 +_ACEOF + + LIBS="-lcam $LIBS" + +fi + # FreeBSD 3+ needs this +if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then + +echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyaddr in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyaddr (); +int +main () +{ +gethostbyaddr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyaddr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_gethostbyaddr=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr" >&6 +if test $ac_cv_lib_nsl_gethostbyaddr = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_socket=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_socket=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for syslog in -lsyslog" >&5 +echo $ECHO_N "checking for syslog in -lsyslog... $ECHO_C" >&6 +if test "${ac_cv_lib_syslog_syslog+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsyslog $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char syslog (); +int +main () +{ +syslog (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_syslog_syslog=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_syslog_syslog=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_syslog_syslog" >&5 +echo "${ECHO_T}$ac_cv_lib_syslog_syslog" >&6 +if test $ac_cv_lib_syslog_syslog = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSYSLOG 1 +_ACEOF + + LIBS="-lsyslog $LIBS" + +fi + # OS/2 needs this +fi + + echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5 +echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6 +if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char jpeg_start_decompress (); +int +main () +{ +jpeg_start_decompress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_jpeg_jpeg_start_decompress=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_jpeg_jpeg_start_decompress=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6 +if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then + + if test "${ac_cv_header_jconfig_h+set}" = set; then + echo "$as_me:$LINENO: checking for jconfig.h" >&5 +echo $ECHO_N "checking for jconfig.h... $ECHO_C" >&6 +if test "${ac_cv_header_jconfig_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jconfig_h" >&5 +echo "${ECHO_T}$ac_cv_header_jconfig_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking jconfig.h usability" >&5 +echo $ECHO_N "checking jconfig.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking jconfig.h presence" >&5 +echo $ECHO_N "checking jconfig.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: jconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jconfig.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jconfig.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: jconfig.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jconfig.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jconfig.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jconfig.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jconfig.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jconfig.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for jconfig.h" >&5 +echo $ECHO_N "checking for jconfig.h... $ECHO_C" >&6 +if test "${ac_cv_header_jconfig_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jconfig_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jconfig_h" >&5 +echo "${ECHO_T}$ac_cv_header_jconfig_h" >&6 + +fi +if test $ac_cv_header_jconfig_h = yes; then + + echo "$as_me:$LINENO: checking for jpeglib - version >= 61 (6a)" >&5 +echo $ECHO_N "checking for jpeglib - version >= 61 (6a)... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + + #include + #if JPEG_LIB_VERSION >= 61 + sane_correct_jpeg_lib_version_found + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sane_correct_jpeg_lib_version_found" >/dev/null 2>&1; then + sane_cv_use_libjpeg="yes"; LIBS="${LIBS} -ljpeg"; + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + + +fi + + + +fi + + + + if test "${ac_cv_header_ieee1284_h+set}" = set; then + echo "$as_me:$LINENO: checking for ieee1284.h" >&5 +echo $ECHO_N "checking for ieee1284.h... $ECHO_C" >&6 +if test "${ac_cv_header_ieee1284_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ieee1284_h" >&5 +echo "${ECHO_T}$ac_cv_header_ieee1284_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking ieee1284.h usability" >&5 +echo $ECHO_N "checking ieee1284.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking ieee1284.h presence" >&5 +echo $ECHO_N "checking ieee1284.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: ieee1284.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ieee1284.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: ieee1284.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ieee1284.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ieee1284.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ieee1284.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for ieee1284.h" >&5 +echo $ECHO_N "checking for ieee1284.h... $ECHO_C" >&6 +if test "${ac_cv_header_ieee1284_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ieee1284_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ieee1284_h" >&5 +echo "${ECHO_T}$ac_cv_header_ieee1284_h" >&6 + +fi +if test $ac_cv_header_ieee1284_h = yes; then + + echo "$as_me:$LINENO: checking for libieee1284 >= 0.1.5" >&5 +echo $ECHO_N "checking for libieee1284 >= 0.1.5... $ECHO_C" >&6 +if test "${sane_cv_use_libieee1284+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +int +main () +{ + + struct parport p; char *buf; + ieee1284_nibble_read(&p, 0, buf, 1); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + sane_cv_use_libieee1284="yes"; LIBS="${LIBS} -lieee1284" else - if true; then # release (false) or development (true) - # Warnings enabled by default (development) - for flag in $WARN_CFLAGS; do - case "$CFLAGS" in -"$flag" | "$flag "* | *" $flag" | *" $flag "* ) - : - ;; -*) - CFLAGS="$CFLAGS $flag" - ;; -esac + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +sane_cv_use_libieee1284="no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext - done - else - # Warnings disabled by default (release) - for flag in $NORMAL_CFLAGS; do - case "$CFLAGS" in -"$flag" | "$flag "* | *" $flag" | *" $flag "* ) - : - ;; -*) - CFLAGS="$CFLAGS $flag" - ;; -esac +fi +echo "$as_me:$LINENO: result: $sane_cv_use_libieee1284" >&5 +echo "${ECHO_T}$sane_cv_use_libieee1284" >&6 - done - fi -fi; -fi # ac_cv_prog_gcc +fi + + + + + +# Check whether --with-gphoto2 or --without-gphoto2 was given. +if test "${with_gphoto2+set}" = set; then + withval="$with_gphoto2" + + + if test "$with_gphoto2" = "no" ; then + echo disabling GPHOTO2 + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gphoto2-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}gphoto2-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_HAVE_GPHOTO2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_GPHOTO2"; then + ac_cv_prog_HAVE_GPHOTO2="$HAVE_GPHOTO2" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_GPHOTO2="${ac_tool_prefix}gphoto2-config" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +HAVE_GPHOTO2=$ac_cv_prog_HAVE_GPHOTO2 +if test -n "$HAVE_GPHOTO2"; then + echo "$as_me:$LINENO: result: $HAVE_GPHOTO2" >&5 +echo "${ECHO_T}$HAVE_GPHOTO2" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_HAVE_GPHOTO2"; then + ac_ct_HAVE_GPHOTO2=$HAVE_GPHOTO2 + # Extract the first word of "gphoto2-config", so it can be a program name with args. +set dummy gphoto2-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_HAVE_GPHOTO2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_HAVE_GPHOTO2"; then + ac_cv_prog_ac_ct_HAVE_GPHOTO2="$ac_ct_HAVE_GPHOTO2" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_HAVE_GPHOTO2="gphoto2-config" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_HAVE_GPHOTO2" && ac_cv_prog_ac_ct_HAVE_GPHOTO2="false" +fi +fi +ac_ct_HAVE_GPHOTO2=$ac_cv_prog_ac_ct_HAVE_GPHOTO2 +if test -n "$ac_ct_HAVE_GPHOTO2"; then + echo "$as_me:$LINENO: result: $ac_ct_HAVE_GPHOTO2" >&5 +echo "${ECHO_T}$ac_ct_HAVE_GPHOTO2" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + HAVE_GPHOTO2=$ac_ct_HAVE_GPHOTO2 +else + HAVE_GPHOTO2="$ac_cv_prog_HAVE_GPHOTO2" +fi + + + if test $HAVE_GPHOTO2 != "" + then + if test "$with_gphoto2" = "yes" ; then + with_gphoto2=`gphoto2-config --prefix` + fi + + CPPFLAGS="${CPPFLAGS} `gphoto2-config --cflags`" + GPHOTO2_LIBS="`gphoto2-config --libs`" + tmp_LIBS="" +for param in ${GPHOTO2_LIBS}; do + case "${param}" in + -l*) + tmp_LIBS="${tmp_LIBS} ${param}" + ;; + *) + LDFLAGS="${LDFLAGS} ${param}" + ;; + esac +done +GPHOTO2_LIBS="${tmp_LIBS}" +unset tmp_LIBS +unset param + + LIBS="${LIBS} ${GPHOTO2_LIBS}" + fi + +fi; fi + +echo "$as_me:$LINENO: checking for sane_init in -lsane" >&5 +echo $ECHO_N "checking for sane_init in -lsane... $ECHO_C" >&6 +if test "${ac_cv_lib_sane_sane_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsane $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sane_init (); +int +main () +{ +sane_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sane_sane_init=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sane_sane_init=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_sane_sane_init" >&5 +echo "${ECHO_T}$ac_cv_lib_sane_sane_init" >&6 +if test $ac_cv_lib_sane_sane_init = yes; then + LIBSANE_EXISTS="yes" +fi -case "${host_os}" in - aix*) #enable .so libraries, disable archives - LDFLAGS="$LDFLAGS -Wl,-brtl" - ;; -esac echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 @@ -4039,91 +5363,20 @@ fi done -MISSING_HEADERS= -if test "${ac_cv_header_fcntl_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" " -fi -if test "${ac_cv_header_sys_time_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" " -fi -if test "${ac_cv_header_unistd_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" " -fi -if test "${ac_cv_header_stdc}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" " -fi -if test "${MISSING_HEADERS}" != "" ; then - echo "*** The following essential header files couldn't be found:" - echo "*** ${MISSING_HEADERS}" - echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?" - echo "*** For details on what went wrong see config.log." - { { echo "$as_me:$LINENO: error: Exiting now." >&5 -echo "$as_me: error: Exiting now." >&2;} - { (exit 1); exit 1; }; } -fi - -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then +for ac_header in asm/io.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" +#include -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4137,76 +5390,183 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_const=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_const=no +eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext done + + MISSING_HEADERS= + if test "${ac_cv_header_fcntl_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" " + fi + if test "${ac_cv_header_sys_time_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" " + fi + if test "${ac_cv_header_unistd_h}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" " + fi + if test "${ac_cv_header_stdc}" != "yes" ; then + MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" " + fi + if test "${MISSING_HEADERS}" != "" ; then + echo "*** The following essential header files couldn't be found:" + echo "*** ${MISSING_HEADERS}" + echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?" + echo "*** For details on what went wrong see config.log." + { { echo "$as_me:$LINENO: error: Exiting now." >&5 +echo "$as_me: error: Exiting now." >&2;} + { (exit 1); exit 1; }; } + fi + + + if test "${ac_cv_header_linux_videodev_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 +echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_videodev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 -case $ac_cv_c_inline in - inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline +echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/videodev.h usability" >&5 +echo $ECHO_N "checking linux/videodev.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include _ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking linux/videodev.h presence" >&5 +echo $ECHO_N "checking linux/videodev.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include _ACEOF - ;; +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/videodev.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;};; esac +echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 +echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_videodev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_videodev_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6 + +fi + + + if test "${ac_cv_header_linux_videodev_h}" = "yes" + then + echo "$as_me:$LINENO: checking Video4Linux version 1 or 2" >&5 +echo $ECHO_N "checking Video4Linux version 1 or 2... $ECHO_C" >&6 +if test "${sane_v4l_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef V4L2_MAJOR_VERSION + v4l2_yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "v4l2_yes" >/dev/null 2>&1; then + sane_v4l_version=v4l2 +else + sane_v4l_version=v4l + +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $sane_v4l_version" >&5 +echo "${ECHO_T}$sane_v4l_version" >&6 + fi + echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 @@ -4821,179 +6181,6 @@ rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $have_long_long" >&5 echo "${ECHO_T}$have_long_long" >&6 -if test "${ac_cv_header_asm_io_h+set}" = set; then - echo "$as_me:$LINENO: checking for asm/io.h" >&5 -echo $ECHO_N "checking for asm/io.h... $ECHO_C" >&6 -if test "${ac_cv_header_asm_io_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_asm_io_h" >&5 -echo "${ECHO_T}$ac_cv_header_asm_io_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking asm/io.h usability" >&5 -echo $ECHO_N "checking asm/io.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking asm/io.h presence" >&5 -echo $ECHO_N "checking asm/io.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: asm/io.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: asm/io.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: asm/io.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: asm/io.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: asm/io.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: asm/io.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: asm/io.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: asm/io.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: asm/io.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: asm/io.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for asm/io.h" >&5 -echo $ECHO_N "checking for asm/io.h... $ECHO_C" >&6 -if test "${ac_cv_header_asm_io_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_asm_io_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_asm_io_h" >&5 -echo "${ECHO_T}$ac_cv_header_asm_io_h" >&6 - -fi -if test $ac_cv_header_asm_io_h = yes; then - - echo "$as_me:$LINENO: checking whether asm/io.h can be included" >&5 -echo $ECHO_N "checking whether asm/io.h can be included... $ECHO_C" >&6; - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - - #include - #include - -int -main () -{ -outb (0, 0l) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ASM_IO_H 1 -_ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi - - - -echo "$as_me:$LINENO: checking for struct flock in fcntl.h" >&5 -echo $ECHO_N "checking for struct flock in fcntl.h... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "struct flock" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_FLOCK 1 -_ACEOF - -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - if test "$ac_cv_header_sys_scsiio_h" = "yes" \ -a "$ac_cv_header_scsi_h" = "yes"; then @@ -5172,1715 +6359,361 @@ echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext - - if test "${ac_cv_header_linux_videodev_h+set}" = set; then - echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 -echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_videodev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking linux/videodev.h usability" >&5 -echo $ECHO_N "checking linux/videodev.h usability... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for struct flock in fcntl.h" >&5 +echo $ECHO_N "checking for struct flock in fcntl.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking linux/videodev.h presence" >&5 -echo $ECHO_N "checking linux/videodev.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: linux/videodev.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/videodev.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 -echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_videodev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_linux_videodev_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6 - -fi - - - if test "${ac_cv_header_linux_videodev_h}" = "yes" - then - echo "$as_me:$LINENO: checking Video4Linux version 1 or 2" >&5 -echo $ECHO_N "checking Video4Linux version 1 or 2... $ECHO_C" >&6 -if test "${sane_v4l_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#ifdef V4L2_MAJOR_VERSION - v4l2_yes -#endif +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "v4l2_yes" >/dev/null 2>&1; then - sane_v4l_version=v4l2 -else - sane_v4l_version=v4l - -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $sane_v4l_version" >&5 -echo "${ECHO_T}$sane_v4l_version" >&6 - fi - - -if test "${enable_dynamic}" != "no"; then - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - DL_LIB=-ldl -fi - - saved_LIBS="${LIBS}" - LIBS="${LIBS} ${DL_LIB}" - -for ac_func in dlopen -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - enable_dynamic=yes -fi -done - - LIBS="${saved_LIBS}" - -fi - -done - - - # HP/UX DLL handling - -for ac_header in dl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - DL_LIB=-ldld -fi - - saved_LIBS="${LIBS}" - LIBS="${LIBS} ${DL_LIB}" - -for ac_func in shl_load -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - enable_dynamic=yes -fi -done - - LIBS="${saved_LIBS}" - -fi - -done - - - #Mac OS X/Darwin - -for ac_header in mach-o/dyld.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -for ac_func in NSLinkModule -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - enable_dynamic=yes -fi -done - - LDFLAGS="$LDFLAGS -module" - DL_LIB="" - -fi - -done - -fi - - -DYNAMIC_FLAG= -if test "${enable_dynamic}" = yes ; then - DYNAMIC_FLAG=-module -fi - - - -echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 -echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 -if test "${ac_cv_lib_m_sqrt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sqrt (); -int -main () -{ -sqrt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_m_sqrt=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_m_sqrt=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 -echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 -if test $ac_cv_lib_m_sqrt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for scsireq_enter in -lscsi" >&5 -echo $ECHO_N "checking for scsireq_enter in -lscsi... $ECHO_C" >&6 -if test "${ac_cv_lib_scsi_scsireq_enter+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lscsi $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char scsireq_enter (); -int -main () -{ -scsireq_enter (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_scsi_scsireq_enter=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_scsi_scsireq_enter=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_scsi_scsireq_enter" >&5 -echo "${ECHO_T}$ac_cv_lib_scsi_scsireq_enter" >&6 -if test $ac_cv_lib_scsi_scsireq_enter = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSCSI 1 -_ACEOF - - LIBS="-lscsi $LIBS" - -fi - # FreeBSD needs this - -echo "$as_me:$LINENO: checking for cam_open_device in -lcam" >&5 -echo $ECHO_N "checking for cam_open_device in -lcam... $ECHO_C" >&6 -if test "${ac_cv_lib_cam_cam_open_device+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcam $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char cam_open_device (); -int -main () -{ -cam_open_device (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_cam_cam_open_device=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_cam_cam_open_device=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cam_cam_open_device" >&5 -echo "${ECHO_T}$ac_cv_lib_cam_cam_open_device" >&6 -if test $ac_cv_lib_cam_cam_open_device = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCAM 1 -_ACEOF - - LIBS="-lcam $LIBS" - -fi - # FreeBSD 3+ needs this - -if test "${ac_cv_header_usb_h}" = "yes" ; then - -echo "$as_me:$LINENO: checking for usb_get_busses in -lusb" >&5 -echo $ECHO_N "checking for usb_get_busses in -lusb... $ECHO_C" >&6 -if test "${ac_cv_lib_usb_usb_get_busses+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lusb $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char usb_get_busses (); -int -main () -{ -usb_get_busses (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_usb_usb_get_busses=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_usb_usb_get_busses=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_get_busses" >&5 -echo "${ECHO_T}$ac_cv_lib_usb_usb_get_busses" >&6 -if test $ac_cv_lib_usb_usb_get_busses = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB 1 -_ACEOF - - LIBS="-lusb $LIBS" - -fi - - if test "${ac_cv_lib_usb_usb_get_busses}" = "yes" ; then - HAVE_LIBUSB="yes" - fi -fi - - - echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5 -echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6 -if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljpeg $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char jpeg_start_decompress (); -int -main () -{ -jpeg_start_decompress (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_jpeg_jpeg_start_decompress=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_jpeg_jpeg_start_decompress=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5 -echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6 -if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then - - if test "${ac_cv_header_jconfig_h+set}" = set; then - echo "$as_me:$LINENO: checking for jconfig.h" >&5 -echo $ECHO_N "checking for jconfig.h... $ECHO_C" >&6 -if test "${ac_cv_header_jconfig_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_jconfig_h" >&5 -echo "${ECHO_T}$ac_cv_header_jconfig_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking jconfig.h usability" >&5 -echo $ECHO_N "checking jconfig.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking jconfig.h presence" >&5 -echo $ECHO_N "checking jconfig.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: jconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jconfig.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jconfig.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: jconfig.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jconfig.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jconfig.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jconfig.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jconfig.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jconfig.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for jconfig.h" >&5 -echo $ECHO_N "checking for jconfig.h... $ECHO_C" >&6 -if test "${ac_cv_header_jconfig_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_jconfig_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_jconfig_h" >&5 -echo "${ECHO_T}$ac_cv_header_jconfig_h" >&6 - -fi -if test $ac_cv_header_jconfig_h = yes; then - - echo "$as_me:$LINENO: checking for jpeglib - version >= 61 (6a)" >&5 -echo $ECHO_N "checking for jpeglib - version >= 61 (6a)... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - - #include - #if JPEG_LIB_VERSION >= 61 - sane_correct_jpeg_lib_version_found - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sane_correct_jpeg_lib_version_found" >/dev/null 2>&1; then - sane_cv_use_libjpeg="yes"; LIBS="${LIBS} -ljpeg"; - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - -fi - - - -fi - - - - - if test "${ac_cv_header_ieee1284_h+set}" = set; then - echo "$as_me:$LINENO: checking for ieee1284.h" >&5 -echo $ECHO_N "checking for ieee1284.h... $ECHO_C" >&6 -if test "${ac_cv_header_ieee1284_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_ieee1284_h" >&5 -echo "${ECHO_T}$ac_cv_header_ieee1284_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking ieee1284.h usability" >&5 -echo $ECHO_N "checking ieee1284.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking ieee1284.h presence" >&5 -echo $ECHO_N "checking ieee1284.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: ieee1284.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ieee1284.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: ieee1284.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ieee1284.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ieee1284.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ieee1284.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ieee1284.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for ieee1284.h" >&5 -echo $ECHO_N "checking for ieee1284.h... $ECHO_C" >&6 -if test "${ac_cv_header_ieee1284_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_ieee1284_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_ieee1284_h" >&5 -echo "${ECHO_T}$ac_cv_header_ieee1284_h" >&6 - -fi -if test $ac_cv_header_ieee1284_h = yes; then - - echo "$as_me:$LINENO: checking for libieee1284 >= 0.1.5" >&5 -echo $ECHO_N "checking for libieee1284 >= 0.1.5... $ECHO_C" >&6 -if test "${sane_cv_use_libieee1284+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -int -main () -{ - - struct parport p; char *buf; - ieee1284_nibble_read(&p, 0, buf, 1); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - sane_cv_use_libieee1284="yes"; LIBS="${LIBS} -lieee1284" - -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -sane_cv_use_libieee1284="no" -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $sane_cv_use_libieee1284" >&5 -echo "${ECHO_T}$sane_cv_use_libieee1284" >&6 - -fi - - - - - - -# Check whether --with-gphoto2 or --without-gphoto2 was given. -if test "${with_gphoto2+set}" = set; then - withval="$with_gphoto2" - - - if test "$with_gphoto2" = "no" ; then - echo disabling GPHOTO2 - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gphoto2-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}gphoto2-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_GPHOTO2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_GPHOTO2"; then - ac_cv_prog_HAVE_GPHOTO2="$HAVE_GPHOTO2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_GPHOTO2="${ac_tool_prefix}gphoto2-config" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -HAVE_GPHOTO2=$ac_cv_prog_HAVE_GPHOTO2 -if test -n "$HAVE_GPHOTO2"; then - echo "$as_me:$LINENO: result: $HAVE_GPHOTO2" >&5 -echo "${ECHO_T}$HAVE_GPHOTO2" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_HAVE_GPHOTO2"; then - ac_ct_HAVE_GPHOTO2=$HAVE_GPHOTO2 - # Extract the first word of "gphoto2-config", so it can be a program name with args. -set dummy gphoto2-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_HAVE_GPHOTO2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_HAVE_GPHOTO2"; then - ac_cv_prog_ac_ct_HAVE_GPHOTO2="$ac_ct_HAVE_GPHOTO2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_HAVE_GPHOTO2="gphoto2-config" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_HAVE_GPHOTO2" && ac_cv_prog_ac_ct_HAVE_GPHOTO2="false" -fi -fi -ac_ct_HAVE_GPHOTO2=$ac_cv_prog_ac_ct_HAVE_GPHOTO2 -if test -n "$ac_ct_HAVE_GPHOTO2"; then - echo "$as_me:$LINENO: result: $ac_ct_HAVE_GPHOTO2" >&5 -echo "${ECHO_T}$ac_ct_HAVE_GPHOTO2" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - HAVE_GPHOTO2=$ac_ct_HAVE_GPHOTO2 -else - HAVE_GPHOTO2="$ac_cv_prog_HAVE_GPHOTO2" -fi - - - if test $HAVE_GPHOTO2 != "" - then - if test "$with_gphoto2" = "yes" ; then - with_gphoto2=`gphoto2-config --prefix` - fi - - CPPFLAGS="${CPPFLAGS} `gphoto2-config --cflags`" - GPHOTO2_LIBS="`gphoto2-config --libs`" - tmp_LIBS="" -for param in ${GPHOTO2_LIBS}; do - case "${param}" in - -l*) - tmp_LIBS="${tmp_LIBS} ${param}" - ;; - *) - LDFLAGS="${LDFLAGS} ${param}" - ;; - esac -done -GPHOTO2_LIBS="${tmp_LIBS}" -unset tmp_LIBS -unset param - - LIBS="${LIBS} ${GPHOTO2_LIBS}" - fi - -fi; fi - - -if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then - -echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyaddr in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyaddr (); -int -main () -{ -gethostbyaddr (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostbyaddr=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyaddr=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr" >&6 -if test $ac_cv_lib_nsl_gethostbyaddr = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket (); -int -main () -{ -socket (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_socket_socket=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_socket_socket=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 -if test $ac_cv_lib_socket_socket = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for syslog in -lsyslog" >&5 -echo $ECHO_N "checking for syslog in -lsyslog... $ECHO_C" >&6 -if test "${ac_cv_lib_syslog_syslog+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsyslog $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char syslog (); -int -main () -{ -syslog (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_syslog_syslog=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_syslog_syslog=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_syslog_syslog" >&5 -echo "${ECHO_T}$ac_cv_lib_syslog_syslog" >&6 -if test $ac_cv_lib_syslog_syslog = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSYSLOG 1 -_ACEOF - - LIBS="-lsyslog $LIBS" - -fi - # OS/2 needs this -fi - - -if test -c /dev/urandom ; then + $EGREP "struct flock" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<\_ACEOF -#define HAVE_DEV_URANDOM 1 +#define HAVE_STRUCT_FLOCK 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + + +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_const=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const _ACEOF fi +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 @@ -7624,7 +7457,6 @@ done - for ac_func in getenv inet_ntop inet_pton isfdtype sigprocmask snprintf \ strdup strndup strsep usleep vsyslog do @@ -7698,7 +7530,6 @@ fi done - if test "$ac_cv_header_os2_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -7712,26 +7543,77 @@ _ACEOF fi - echo "$as_me:$LINENO: checking linker parameter to set runtime link path" >&5 -echo $ECHO_N "checking linker parameter to set runtime link path... $ECHO_C" >&6 -if test "${LINKER_RPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - LINKER_RPATH= - case "$host_os" in - linux* | freebsd* | netbsd* | openbsd* | irix*) - # I believe this only works with GNU ld [pere 2001-04-16] - LINKER_RPATH="-Wl,-rpath," - ;; - solaris*) - LINKER_RPATH="-R " - ;; - esac +if test -c /dev/urandom ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEV_URANDOM 1 +_ACEOF fi -echo "$as_me:$LINENO: result: $LINKER_RPATH" >&5 -echo "${ECHO_T}$LINKER_RPATH" >&6 +if test "${ac_cv_header_usb_h}" = "yes" ; then +echo "$as_me:$LINENO: checking for usb_get_busses in -lusb" >&5 +echo $ECHO_N "checking for usb_get_busses in -lusb... $ECHO_C" >&6 +if test "${ac_cv_lib_usb_usb_get_busses+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lusb $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char usb_get_busses (); +int +main () +{ +usb_get_busses (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_usb_usb_get_busses=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_usb_usb_get_busses=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_get_busses" >&5 +echo "${ECHO_T}$ac_cv_lib_usb_usb_get_busses" >&6 +if test $ac_cv_lib_usb_usb_get_busses = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUSB 1 +_ACEOF + + LIBS="-lusb $LIBS" + +fi + + if test "${ac_cv_lib_usb_usb_get_busses}" = "yes" ; then + HAVE_LIBUSB="yes" + fi +fi # Check whether --enable-static or --disable-static was given. @@ -7800,6 +7682,117 @@ esac else enable_fast_install=yes fi; +# Find the correct PATH separator. Usually this is `:', but +# DJGPP uses `;' like DOS. +if test "X${PATH_SEPARATOR+set}" != Xset; then + UNAME=${UNAME-`uname 2>/dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator +fi + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + lt_cv_prog_gnu_ld=yes +else + lt_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then @@ -8673,7 +8666,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 8676 "configure"' > conftest.$ac_ext + echo '#line 8669 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9191,7 +9184,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:9187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -10941,7 +10934,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" - ;; -esac -fi -MSGFMT=$ac_cv_path_MSGFMT - -if test -n "$MSGFMT"; then - echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - # Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_XGETTEXT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $XGETTEXT in - [\\/]* | ?:[\\/]*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="no" - ;; -esac -fi -XGETTEXT=$ac_cv_path_XGETTEXT - -if test -n "$XGETTEXT"; then - echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - # Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSGMERGE in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="no" - ;; -esac -fi -MSGMERGE=$ac_cv_path_MSGMERGE - -if test -n "$MSGMERGE"; then - echo "$as_me:$LINENO: result: $MSGMERGE" >&5 -echo "${ECHO_T}$MSGMERGE" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - # Extract the first word of "msgcat", so it can be a program name with args. -set dummy msgcat; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGCAT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSGCAT in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGCAT="$MSGCAT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MSGCAT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_MSGCAT" && ac_cv_path_MSGCAT="no" - ;; -esac -fi -MSGCAT=$ac_cv_path_MSGCAT - -if test -n "$MSGCAT"; then - echo "$as_me:$LINENO: result: $MSGCAT" >&5 -echo "${ECHO_T}$MSGCAT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - - - if test x$MSGFMT = xno || test x$XGETTEXT = xno || test $MSGMERGE = no ; then INSTALL_TRANSLATIONS= - echo "disabling translations" + echo "disabling translations (missing msgfmt, xgettext or msgmerge)" else echo "enabling translations" fi @@ -12116,120 +11938,29 @@ else fi + # Check whether --enable-local-backends or --disable-local-backends was given. if test "${enable_local_backends+set}" = set; then enableval="$enable_local_backends" - if eval "test x$enable_local_backends = xno"; then - SELECTED_BACKENDS="net" - fi + if eval "test x$enable_local_backends = xno"; then + SELECTED_BACKENDS="net" + fi fi; -# Extract the first word of "sane-config", so it can be a program name with args. -set dummy sane-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SANE_CONFIG_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $SANE_CONFIG_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_SANE_CONFIG_PATH="$SANE_CONFIG_PATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_SANE_CONFIG_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_SANE_CONFIG_PATH" && ac_cv_path_SANE_CONFIG_PATH="no" - ;; -esac -fi -SANE_CONFIG_PATH=$ac_cv_path_SANE_CONFIG_PATH - -if test -n "$SANE_CONFIG_PATH"; then - echo "$as_me:$LINENO: result: $SANE_CONFIG_PATH" >&5 -echo "${ECHO_T}$SANE_CONFIG_PATH" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -echo "$as_me:$LINENO: checking for sane_init in -lsane" >&5 -echo $ECHO_N "checking for sane_init in -lsane... $ECHO_C" >&6 -if test "${ac_cv_lib_sane_sane_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsane $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sane_init (); -int -main () -{ -sane_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_sane_sane_init=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_sane_sane_init=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_sane_sane_init" >&5 -echo "${ECHO_T}$ac_cv_lib_sane_sane_init" >&6 -if test $ac_cv_lib_sane_sane_init = yes; then - LIBSANE_EXISTS="yes" -fi DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#\"* \".\\#\"*" -echo using CPPFLAGS=\"${CPPFLAGS}\" -echo using CFLAGS=\"${CFLAGS}\" -echo using LDFLAGS=\"${LDFLAGS}\" -echo using LIBS=\"${LIBS}\" + ac_config_files="$ac_config_files Makefile lib/Makefile sanei/Makefile frontend/Makefile japi/Makefile backend/Makefile include/Makefile doc/Makefile po/Makefile testsuite/Makefile tools/Makefile" + + ac_config_files="$ac_config_files tools/sane-desc.el" + + ac_config_files="$ac_config_files tools/sane-config" - ac_config_files="$ac_config_files Makefile lib/Makefile sanei/Makefile frontend/Makefile japi/Makefile backend/Makefile include/Makefile doc/Makefile po/Makefile testsuite/Makefile tools/sane-desc.el tools/Makefile tools/sane-config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -12744,8 +12475,8 @@ do "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; - "tools/sane-desc.el" ) CONFIG_FILES="$CONFIG_FILES tools/sane-desc.el" ;; "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "tools/sane-desc.el" ) CONFIG_FILES="$CONFIG_FILES tools/sane-desc.el" ;; "tools/sane-config" ) CONFIG_FILES="$CONFIG_FILES tools/sane-config" ;; "include/sane/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/sane/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -12835,13 +12566,6 @@ s,@V_REV@,$V_REV,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@NUMBER_VERSION@,$NUMBER_VERSION,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t @@ -12850,27 +12574,38 @@ s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t +s,@SANE_CONFIG_PATH@,$SANE_CONFIG_PATH,;t t +s,@MSGFMT@,$MSGFMT,;t t +s,@XGETTEXT@,$XGETTEXT,;t t +s,@MSGMERGE@,$MSGMERGE,;t t +s,@INCLUDES@,$INCLUDES,;t t +s,@LINKER_RPATH@,$LINKER_RPATH,;t t s,@DL_LIB@,$DL_LIB,;t t s,@DYNAMIC_FLAG@,$DYNAMIC_FLAG,;t t s,@HAVE_GPHOTO2@,$HAVE_GPHOTO2,;t t s,@ac_ct_HAVE_GPHOTO2@,$ac_ct_HAVE_GPHOTO2,;t t s,@ALLOCA@,$ALLOCA,;t t s,@LIBOBJS@,$LIBOBJS,;t t -s,@LINKER_RPATH@,$LINKER_RPATH,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@LIBTOOL@,$LIBTOOL,;t t -s,@INCLUDES@,$INCLUDES,;t t s,@DC210@,$DC210,;t t s,@DC240@,$DC240,;t t s,@DJPEG@,$DJPEG,;t t @@ -12887,12 +12622,7 @@ s,@SNAPSCAN@,$SNAPSCAN,;t t s,@DLL_PRELOAD@,$DLL_PRELOAD,;t t s,@PNM@,$PNM,;t t s,@INSTALL_TRANSLATIONS@,$INSTALL_TRANSLATIONS,;t t -s,@MSGFMT@,$MSGFMT,;t t -s,@XGETTEXT@,$XGETTEXT,;t t -s,@MSGMERGE@,$MSGMERGE,;t t -s,@MSGCAT@,$MSGCAT,;t t s,@SELECTED_BACKENDS@,$SELECTED_BACKENDS,;t t -s,@SANE_CONFIG_PATH@,$SANE_CONFIG_PATH,;t t s,@DISTCLEAN_FILES@,$DISTCLEAN_FILES,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -13098,6 +12828,10 @@ s,@INSTALL@,$ac_INSTALL,;t t rm -f $tmp/out fi + # Run the commands associated with the file. + case $ac_file in + tools/sane-config ) chmod a+x tools/sane-config ;; + esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -13350,6 +13084,12 @@ if test "$no_create" != yes; then fi + +echo "Variables used for compilation/linking:" +echo using CPPFLAGS=\"${CPPFLAGS}\" +echo using CFLAGS=\"${CFLAGS}\" +echo using LDFLAGS=\"${LDFLAGS}\" +echo using LIBS=\"${LIBS}\" echo "Installation directories:" echo "Configuration: `eval eval echo ${sysconfdir}`" echo "Libraries: `eval eval echo ${libdir}`" diff --git a/configure.in b/configure.in index 8fbf3415a..211962b40 100644 --- a/configure.in +++ b/configure.in @@ -1,15 +1,19 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*- -AC_INIT(sane-backends, 1.0.9-cvs, sane-devel@mostang.com) -AC_CONFIG_HEADER(include/sane/config.h) -AC_PREREQ(2.50)dnl dnl Minimum Autoconf version required. -AC_ARG_PROGRAM +dnl *********************************************************************** +dnl When preparing a release, increase the numeric and string version numbers, +dnl remove the "-cvs" suffix, and set is_release=yes +AC_INIT([sane-backends],[1.0.9-cvs],[sane-devel@mostang.com]) V_MAJOR=1 V_MINOR=0 V_REV=9 -AC_SUBST(V_MAJOR) -AC_SUBST(V_MINOR) -AC_SUBST(V_REV) +is_release=no +dnl *********************************************************************** + +AC_CONFIG_HEADERS([include/sane/config.h]) +AC_PREREQ(2.50)dnl dnl Minimum Autoconf version required. +AC_ARG_PROGRAM + PACKAGE=AC_PACKAGE_NAME VERSION=AC_PACKAGE_VERSION NUMBER_VERSION=${V_MAJOR}.${V_MINOR}.${V_REV} @@ -20,88 +24,76 @@ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", AC_DEFINE_UNQUOTED(SANE_DLL_V_MAJOR, $V_MAJOR, [SANE DLL major number]) AC_DEFINE_UNQUOTED(SANE_DLL_V_MINOR, $V_MINOR, [SANE DLL minor number]) AC_DEFINE_UNQUOTED(SANE_DLL_V_BUILD, $V_REV, [SANE DLL revision number]) +AC_SUBST(V_MAJOR) +AC_SUBST(V_MINOR) +AC_SUBST(V_REV) AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(NUMBER_VERSION) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +dnl *********************************************************************** dnl Checks for programs. +dnl *********************************************************************** AC_PROG_CC -AC_PROG_LD +AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_CPP AC_PROG_GCC_TRADITIONAL +AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no) +AC_PATH_PROG(MSGFMT, msgfmt$EXEEXT, no) +AC_PATH_PROG(XGETTEXT, xgettext$EXEEXT, no) +AC_PATH_PROG(MSGMERGE, msgmerge$EXEEXT, no) +AC_SUBST(MSGFMT) +AC_SUBST(XGETTEXT) +AC_SUBST(MSGMERGE) + +dnl *********************************************************************** +dnl set compiler/linker flags +dnl *********************************************************************** +INCLUDES="${INCLUDES} -I/usr/local/include" +AC_SUBST(INCLUDES) +SANE_SET_CFLAGS([$is_release]) +SANE_SET_LDFLAGS +SANE_LINKER_RPATH +CPPFLAGS="${CPPFLAGS} -DPATH_SANE_CONFIG_DIR=\$(configdir) \ + -DPATH_SANE_DATA_DIR=\$(datadir) \ + -DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}" + +dnl *********************************************************************** +dnl Checks for unix variants +dnl *********************************************************************** +AC_GNU_SOURCE AC_AIX AC_MINIX AC_ISC_POSIX -AM_PROG_CC_STDC -AC_C_BIGENDIAN -INCLUDES="${INCLUDES} -I/usr/local/include" -CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" - -if test "${ac_cv_prog_gcc}" = "yes"; then - NORMAL_CFLAGS="\ - -W \ - -Wall" - WARN_CFLAGS="\ - -W \ - -Wall \ - -Wcast-align \ - -Wcast-qual \ - -Wmissing-declarations \ - -Wmissing-prototypes \ - -Wpointer-arith \ - -Wreturn-type \ - -Wstrict-prototypes \ - -pedantic" - - # OS/2 and others don't include some headers with -ansi enabled - ANSI_FLAG=-ansi - AC_CHECK_HEADER(os2.h,[ANSI_FLAG=],) - case "${host_os}" in - solaris* | hpux*) - ANSI_FLAG= - ;; - esac - WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" - - # Warnings enabled by default (development) - AC_ARG_ENABLE(warnings, - [ --enable-warnings turn on tons of compiler warnings (GCC only) - [default=yes]], - [ - if eval "test x$enable_warnings = xyes"; then - for flag in $WARN_CFLAGS; do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) - done - else - for flag in $NORMAL_CFLAGS; do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) - done - fi - ], - [if true; then # release (false) or development (true) - # Warnings enabled by default (development) - for flag in $WARN_CFLAGS; do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) - done - else - # Warnings disabled by default (release) - for flag in $NORMAL_CFLAGS; do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) - done - fi]) -fi # ac_cv_prog_gcc - -dnl special LDFLAGS -case "${host_os}" in - aix*) #enable .so libraries, disable archives - LDFLAGS="$LDFLAGS -Wl,-brtl" - ;; -esac +dnl *********************************************************************** +dnl Checks for libraries +dnl *********************************************************************** +SANE_CHECK_DLL_LIB +dnl Checks for Backend libraries. +AC_CHECK_LIB(m,sqrt) +AC_CHECK_LIB(scsi, scsireq_enter) # FreeBSD needs this +AC_CHECK_LIB(cam, cam_open_device) # FreeBSD 3+ needs this +dnl IRIX sometimes has SYSVR3/4 network DSOs, but we do not need or want +dnl to use them! +if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then + AC_CHECK_LIB(nsl, gethostbyaddr) + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(syslog, syslog) # OS/2 needs this +fi +SANE_CHECK_JPEG +SANE_CHECK_IEEE1284 +SANE_CHECK_GPHOTO2 +dnl check sane to make sure we don't have two installations +AC_CHECK_LIB(sane, sane_init, LIBSANE_EXISTS="yes") +dnl *********************************************************************** dnl Checks for header files. +dnl *********************************************************************** AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \ sys/time.h sys/shm.h \ @@ -111,33 +103,13 @@ AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \ sys/types.h sys/scsi/scsi.h sys/scsi/sgdefs.h sys/scsi/targets/scgio.h \ apollo/scsi.h sys/sdi_comm.h sys/passthrudef.h linux/ppdev.h usb.h \ sys/bitypes.h sys/sem.h) +AC_CHECK_HEADERS([asm/io.h],,,[#include ]) +SANE_CHECK_MISSING_HEADERS +SANE_V4L_VERSION -dnl Do some sanity checks. It doesn't make sense to proceed if those headers -dnl aren't present. -MISSING_HEADERS= -if test "${ac_cv_header_fcntl_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" " -fi -if test "${ac_cv_header_sys_time_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" " -fi -if test "${ac_cv_header_unistd_h}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" " -fi -if test "${ac_cv_header_stdc}" != "yes" ; then - MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" " -fi -if test "${MISSING_HEADERS}" != "" ; then - echo "*** The following essential header files couldn't be found:" - echo "*** ${MISSING_HEADERS}" - echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?" - echo "*** For details on what went wrong see config.log." - AC_MSG_ERROR([Exiting now.]) -fi - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE +dnl *********************************************************************** +dnl Checks for types and structures +dnl *********************************************************************** AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_TYPE_PID_T @@ -150,19 +122,6 @@ have_long_long=no AC_TRY_COMPILE([], [long long x; x = (long long)0;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the long long type is available.]) have_long_long=yes) AC_MSG_RESULT($have_long_long) -AC_CHECK_HEADER([asm/io.h],[ - AC_MSG_CHECKING([whether asm/io.h can be included]); - AC_TRY_COMPILE([ - #include - #include - ],[outb (0, 0l)], - [AC_DEFINE(HAVE_ASM_IO_H, 1, [Define if you have the header file.]) AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))],) - -AC_MSG_CHECKING([for struct flock in fcntl.h]) -AC_EGREP_HEADER([struct flock], fcntl.h, [AC_MSG_RESULT(yes) ; - AC_DEFINE(HAVE_STRUCT_FLOCK, 1, - [Define if struct flock is available.])], AC_MSG_RESULT(no)) - if test "$ac_cv_header_sys_scsiio_h" = "yes" \ -a "$ac_cv_header_scsi_h" = "yes"; then @@ -203,47 +162,40 @@ AC_DEFINE(HAVE_SG_TARGET_STATUS,1,[Define if sg_header.target_status is available.])], AC_MSG_RESULT(no)) -SANE_V4L_VERSION +AC_MSG_CHECKING([for struct flock in fcntl.h]) +AC_EGREP_HEADER([struct flock], fcntl.h, [AC_MSG_RESULT(yes) ; + AC_DEFINE(HAVE_STRUCT_FLOCK, 1, + [Define if struct flock is available.])], AC_MSG_RESULT(no)) -dnl Checks for dll libraries: dl -if test "${enable_dynamic}" != "no"; then - AC_CHECK_HEADERS(dlfcn.h, - [AC_CHECK_LIB(dl,dlopen, DL_LIB=-ldl) - saved_LIBS="${LIBS}" - LIBS="${LIBS} ${DL_LIB}" - AC_CHECK_FUNCS(dlopen, enable_dynamic=yes,) - LIBS="${saved_LIBS}" - ],) +dnl *********************************************************************** +dnl Checks for compiler characteristics +dnl *********************************************************************** +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE - # HP/UX DLL handling - AC_CHECK_HEADERS(dl.h, - [AC_CHECK_LIB(dld,shl_load, DL_LIB=-ldld) - saved_LIBS="${LIBS}" - LIBS="${LIBS} ${DL_LIB}" - AC_CHECK_FUNCS(shl_load, enable_dynamic=yes,) - LIBS="${saved_LIBS}" - ],) - - #Mac OS X/Darwin - AC_CHECK_HEADERS(mach-o/dyld.h, - [AC_CHECK_FUNCS(NSLinkModule, enable_dynamic=yes,) - LDFLAGS="$LDFLAGS -module" - DL_LIB="" - ],) +dnl *********************************************************************** +dnl Checks for library functions +dnl *********************************************************************** +AC_FUNC_ALLOCA +AC_FUNC_MMAP +AC_CHECK_FUNCS(atexit inet_addr inet_aton inet_ntoa ioperm mkdir \ + scsireq_enter strftime strstr strtod \ + cfmakeraw tcsendbreak strcasecmp strncasecmp _portaccess) +AC_REPLACE_FUNCS(getenv inet_ntop inet_pton isfdtype sigprocmask snprintf \ + strdup strndup strsep usleep vsyslog) +if test "$ac_cv_header_os2_h" = "yes" ; then + AC_DEFINE(strncasecmp, strnicmp, [Define for OS/2 only]) + AC_DEFINE(strcasecmp, stricmp, [Define for OS/2 only]) fi -AC_SUBST(DL_LIB) -DYNAMIC_FLAG= -if test "${enable_dynamic}" = yes ; then - DYNAMIC_FLAG=-module +dnl *********************************************************************** +dnl checks for system services +dnl *********************************************************************** +if test -c /dev/urandom ; then + AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?]) fi -AC_SUBST(DYNAMIC_FLAG) - -dnl Checks for Backend libraries. -AC_CHECK_LIB(m,sqrt) -AC_CHECK_LIB(scsi, scsireq_enter) # FreeBSD needs this -AC_CHECK_LIB(cam, cam_open_device) # FreeBSD 3+ needs this - +dnl we need both libusb header and a libusb providing usb_get_busses if test "${ac_cv_header_usb_h}" = "yes" ; then AC_CHECK_LIB(usb, usb_get_busses) if test "${ac_cv_lib_usb_usb_get_busses}" = "yes" ; then @@ -251,56 +203,17 @@ if test "${ac_cv_header_usb_h}" = "yes" ; then fi fi -SANE_CHECK_JPEG - -SANE_CHECK_IEEE1284 - -SANE_CHECK_GPHOTO2 - -dnl IRIX sometimes has SYSVR3/4 network DSOs, but we do not need or want -dnl to use them! -if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then - AC_CHECK_LIB(nsl,gethostbyaddr) - AC_CHECK_LIB(socket,socket) - AC_CHECK_LIB(syslog, syslog) # OS/2 needs this -fi - -dnl Don't check for PTAL library anymore. -dnl Support for HP OfficeJets is now in the external "hpoj" backend. -dnl SANE_CHECK_PTAL - -dnl look for /dev/urandom -if test -c /dev/urandom ; then - AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?]) -fi - -dnl Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_MMAP -AC_CHECK_FUNCS(atexit inet_addr inet_aton inet_ntoa ioperm mkdir \ - scsireq_enter strftime strstr strtod \ - cfmakeraw tcsendbreak strcasecmp strncasecmp _portaccess) - -AC_REPLACE_FUNCS(getenv inet_ntop inet_pton isfdtype sigprocmask snprintf \ - strdup strndup strsep usleep vsyslog) - -if test "$ac_cv_header_os2_h" = "yes" ; then - AC_DEFINE(strncasecmp,strnicmp,[Define for OS/2 only]) - AC_DEFINE(strcasecmp,stricmp,[Define for OS/2 only]) -fi - -SANE_LINKER_RPATH - +dnl *********************************************************************** dnl initialize libtool +dnl *********************************************************************** AC_LIBTOOL_WIN32_DLL AC_DISABLE_STATIC AC_PROG_LIBTOOL - -AC_SUBST(INCLUDES) -CPPFLAGS="${CPPFLAGS} -DPATH_SANE_CONFIG_DIR=\$(configdir) \ - -DPATH_SANE_DATA_DIR=\$(datadir) \ - -DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}" +dnl *********************************************************************** +dnl enable/disable backends and features based on previous tests and user's +dnl choice +dnl *********************************************************************** if test "${sane_cv_use_libjpeg}" != "yes"; then echo "disabling DC210/DC240 backends (failed to find JPEG library)" @@ -414,26 +327,25 @@ fi AC_SUBST(DLL_PRELOAD) AC_ARG_ENABLE(pnm-backend, - [ --enable-pnm-backend enable the pnm backend for testing frontends. Warning: - This will be a security risk if used together with - saned. See PROBLEMS file for details. [default=no]], + AC_HELP_STRING([--enable-pnm-backend], + [enable the pnm backend for testing frontends (possible + security risk, see PROBLEMS file)]), [PNM="pnm"], [PNM=""]) AC_SUBST(PNM) AC_ARG_ENABLE(scsibuffersize, - [ --enable-scsibuffersize=N specify the default size (in bytes) of the buffer - for SCSI commands [default=131072]], + AC_HELP_STRING([--enable-scsibuffersize=N], + [specify the default size in bytes of the buffer for SCSI + commands [[default=131072]]]), [set_scsibuffersize="$enableval"], [set_scsibuffersize=131072]) AC_DEFINE_UNQUOTED(SCSIBUFFERSIZE, $set_scsibuffersize, [SCSI command buffer size]) echo "scsi buffersize: $set_scsibuffersize" AC_ARG_ENABLE(scsi-directio, - [ --enable-scsi-directio enable SCSI direct IO (Linux only; can lead to crashes - with backends using shared memory). [default=no] - This option is in no way related to - --enable-parport-directio. See README.linux for more - information.], + AC_HELP_STRING([--enable-scsi-directio], + [enable SCSI direct IO (Linux only, dangerous, see + README.linux)]), [ if eval "test x$enable_scsi_directio = xyes"; then CFLAGS="$CFLAGS -DENABLE_SCSI_DIRECTIO" @@ -441,11 +353,9 @@ AC_ARG_ENABLE(scsi-directio, ]) AC_ARG_ENABLE(parport-directio, - [ --enable-parport-directio enable parallel port direct IO, the backend will - do direct hardware access to use parallel port, so - frontends will require special permission level. - [default=no] This option is in no way related to - --enable-scsi-directio], + AC_HELP_STRING([--enable-parport-directio], + [enable direct hardware access to the parallel port, so + frontends will require special permission level]), [ if eval "test x$enable_parport_directio = xyes"; then CFLAGS="$CFLAGS -DENABLE_PARPORT_DIRECTIO" @@ -453,9 +363,10 @@ AC_ARG_ENABLE(parport-directio, ]) AC_ARG_ENABLE(translations, - [ --disable-translations don't install translations of backend options], + AC_HELP_STRING([--disable-translations], + [don't install translations of backend options]), [ - if eval "test x$enable_translation = xno"; then + if eval "test x$enable_translations = xno"; then INSTALL_TRANSLATIONS= else INSTALL_TRANSLATIONS=install-translations @@ -463,55 +374,55 @@ AC_ARG_ENABLE(translations, ], INSTALL_TRANSLATIONS=install-translations ) -AC_SUBST(INSTALL_TRANSLATIONS) - if eval "test x$INSTALL_TRANSLATIONS = xinstall-translations" ; then - AC_PATH_PROG(MSGFMT, msgfmt, no) - AC_PATH_PROG(XGETTEXT, xgettext, no) - AC_PATH_PROG(MSGMERGE, msgmerge, no) - AC_PATH_PROG(MSGCAT, msgcat, no) - AC_SUBST(MSGFMT) - AC_SUBST(XGETTEXT) - AC_SUBST(MSGMERGE) - AC_SUBST(MSGCAT) if test x$MSGFMT = xno || test x$XGETTEXT = xno || test $MSGMERGE = no ; then INSTALL_TRANSLATIONS= - echo "disabling translations" + echo "disabling translations (missing msgfmt, xgettext or msgmerge)" else echo "enabling translations" fi else echo "disabling translations" fi +AC_SUBST(INSTALL_TRANSLATIONS) AC_ARG_ENABLE(local-backends, - [ --disable-local-backends turns off compilation of all backends but net], - [ - if eval "test x$enable_local_backends = xno"; then - SELECTED_BACKENDS="net" - fi - ], + AC_HELP_STRING([--disable-local-backends], + [turn off compilation of all backends but net]), + [ + if eval "test x$enable_local_backends = xno"; then + SELECTED_BACKENDS="net" + fi + ], , ) AC_SUBST(SELECTED_BACKENDS) -AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no) -AC_CHECK_LIB(sane, sane_init, LIBSANE_EXISTS="yes") + +dnl *********************************************************************** +dnl Write output files +dnl *********************************************************************** DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#\"* \".\\#\"*" AC_SUBST(DISTCLEAN_FILES) +AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile + japi/Makefile backend/Makefile include/Makefile doc/Makefile + po/Makefile testsuite/Makefile tools/Makefile]) +AC_CONFIG_FILES([tools/sane-desc.el]) +AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config]) +AC_OUTPUT + +dnl *********************************************************************** +dnl print configuration information +dnl *********************************************************************** + +echo "Variables used for compilation/linking:" echo using CPPFLAGS=\"${CPPFLAGS}\" echo using CFLAGS=\"${CFLAGS}\" echo using LDFLAGS=\"${LDFLAGS}\" echo using LIBS=\"${LIBS}\" - -AC_OUTPUT([Makefile lib/Makefile sanei/Makefile frontend/Makefile - japi/Makefile backend/Makefile include/Makefile doc/Makefile - po/Makefile testsuite/Makefile - tools/sane-desc.el tools/Makefile tools/sane-config],) - echo "Installation directories:" echo "Configuration: `eval eval echo ${sysconfdir}`" echo "Libraries: `eval eval echo ${libdir}`" diff --git a/include/sane/config.h.in b/include/sane/config.h.in index 90f4c22d6..47819035d 100644 --- a/include/sane/config.h.in +++ b/include/sane/config.h.in @@ -18,7 +18,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_APOLLO_SCSI_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_ASM_IO_H /* Define to 1 if you have the `atexit' function. */ @@ -114,6 +114,9 @@ /* Define if the long long type is available. */ #undef HAVE_LONG_LONG +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_O_DYLD_H + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -123,6 +126,9 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define to 1 if you have the `NSLinkModule' function. */ +#undef HAVE_NSLINKMODULE + /* Define to 1 if you have the header file. */ #undef HAVE_OS2_H @@ -337,6 +343,11 @@ # undef _ALL_SOURCE #endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + /* Define to 1 if on MINIX. */ #undef _MINIX