diff --git a/acinclude.m4 b/acinclude.m4 index 2f70b4c2c..9ce7deed6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -222,30 +222,17 @@ AC_DEFUN(SANE_CHECK_GPHOTO2, else AC_CHECK_TOOL(HAVE_GPHOTO2, gphoto2-config, false) - if test "$with_gphoto2" = "yes" ; then - with_gphoto2=`gphoto2-config --prefix` - fi - GPVERSION=`gphoto2-config --version` + if test $HAVE_GPHOTO2 != "" + then + if test "$with_gphoto2" = "yes" ; then + with_gphoto2=`gphoto2-config --prefix` + fi - case "$GPVERSION" in - "gphoto2 2.0" | \ - "gphoto2 2.1.0" | \ - "gphoto2 2.0.1"* \ - ) CPPFLAGS="${CPPFLAGS} `gphoto2-config --cflags`" GPHOTO2_LIBS="`gphoto2-config --libs`" SANE_EXTRACT_LDFLAGS(LDFLAGS, GPHOTO2_LIBS) LIBS="${LIBS} ${GPHOTO2_LIBS}" - ;; - * ) - echo - echo "Sorry, can't use GPHOTO2" - echo "GPHOTO2 APIs have been changing rapidly. Only" - echo "the current version from CVS is likely to work." - echo - HAVE_GPHOTO2="" - ;; - esac + fi ]) fi ]) diff --git a/aclocal.m4 b/aclocal.m4 index 9ecbd3a9f..6c068673f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -234,30 +234,17 @@ AC_DEFUN(SANE_CHECK_GPHOTO2, else AC_CHECK_TOOL(HAVE_GPHOTO2, gphoto2-config, false) - if test "$with_gphoto2" = "yes" ; then - with_gphoto2=`gphoto2-config --prefix` - fi - GPVERSION=`gphoto2-config --version` + if test $HAVE_GPHOTO2 != "" + then + if test "$with_gphoto2" = "yes" ; then + with_gphoto2=`gphoto2-config --prefix` + fi - case "$GPVERSION" in - "gphoto2 2.0" | \ - "gphoto2 2.1.0" | \ - "gphoto2 2.0.1"* \ - ) CPPFLAGS="${CPPFLAGS} `gphoto2-config --cflags`" GPHOTO2_LIBS="`gphoto2-config --libs`" SANE_EXTRACT_LDFLAGS(LDFLAGS, GPHOTO2_LIBS) LIBS="${LIBS} ${GPHOTO2_LIBS}" - ;; - * ) - echo - echo "Sorry, can't use GPHOTO2" - echo "GPHOTO2 APIs have been changing rapidly. Only" - echo "the current version from CVS is likely to work." - echo - HAVE_GPHOTO2="" - ;; - esac + fi ]) fi ]) diff --git a/configure b/configure index d74d71b1c..449dde184 100755 --- a/configure +++ b/configure @@ -3503,16 +3503,12 @@ fi fi - if test "$with_gphoto2" = "yes" ; then - with_gphoto2=`gphoto2-config --prefix` - fi - GPVERSION=`gphoto2-config --version` + if test $HAVE_GPHOTO2 != "" + then + if test "$with_gphoto2" = "yes" ; then + with_gphoto2=`gphoto2-config --prefix` + fi - case "$GPVERSION" in - "gphoto2 2.0" | \ - "gphoto2 2.1.0" | \ - "gphoto2 2.0.1"* \ - ) CPPFLAGS="${CPPFLAGS} `gphoto2-config --cflags`" GPHOTO2_LIBS="`gphoto2-config --libs`" tmp_LIBS="" @@ -3531,16 +3527,7 @@ unset tmp_LIBS unset param LIBS="${LIBS} ${GPHOTO2_LIBS}" - ;; - * ) - echo - echo "Sorry, can't use GPHOTO2" - echo "GPHOTO2 APIs have been changing rapidly. Only" - echo "the current version from CVS is likely to work." - echo - HAVE_GPHOTO2="" - ;; - esac + fi fi fi @@ -3548,7 +3535,7 @@ fi if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 -echo "configure:3552: checking for gethostbyaddr in -lnsl" >&5 +echo "configure:3539: checking for gethostbyaddr in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3556,7 +3543,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3595,7 +3582,7 @@ else fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:3599: checking for socket in -lsocket" >&5 +echo "configure:3586: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3603,7 +3590,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3642,7 +3629,7 @@ else fi echo $ac_n "checking for syslog in -lsyslog""... $ac_c" 1>&6 -echo "configure:3646: checking for syslog in -lsyslog" >&5 +echo "configure:3633: checking for syslog in -lsyslog" >&5 ac_lib_var=`echo syslog'_'syslog | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3650,7 +3637,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsyslog $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3701,19 +3688,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3705: checking for working alloca.h" >&5 +echo "configure:3692: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3734,12 +3721,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3738: checking for alloca" >&5 +echo "configure:3725: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3799,12 +3786,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3803: checking whether alloca needs Cray hooks" >&5 +echo "configure:3790: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3833: checking for $ac_func" >&5 +echo "configure:3820: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3884,7 +3871,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3888: checking stack direction for C alloca" >&5 +echo "configure:3875: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3892,7 +3879,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3932,21 +3919,21 @@ EOF fi -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3940: checking for $ac_hdr" >&5 +echo "configure:3927: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3975,12 +3962,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3979: checking for $ac_func" >&5 +echo "configure:3966: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4028,7 +4015,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4032: checking for working mmap" >&5 +echo "configure:4019: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4036,7 +4023,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -4767,7 +4767,7 @@ else if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.$ac_ext | *.c | *.o | *.obj) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done