diff --git a/Changelog b/Changelog index badc8c8..e2c3667 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,10 @@ +2003-03-23 Henning Meier-Geinitz + + * acinclude.m4 aclocal.m4 configure configure.in + include/sane/config.h.in src/xscanimage.c: Added GIMP 1.3 support. + Added support for autoheader. Patch from Julien BLACHE + . + 2003-03-22 Henning Meier-Geinitz * src/xcam.c: Use a scrollbar if the options dialog gets too big. diff --git a/acinclude.m4 b/acinclude.m4 index 9b65f12..01d1114 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,6 +1,7 @@ # acinclude.m4 for sane-frontends # AM_PATH_GTK # AM_PATH_GIMP +# AM_PATH_GIMP_1_4 # AM_PATH_SANE ###################################################################### @@ -421,6 +422,193 @@ dnl ok, gimp does not work, so we have to use the gtk_* things again ]) +###################################################################### +# Configure paths for GIMP-1.4 +# Manish Singh 98-6-11 +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_GIMP_1_4([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for GIMP, and define GIMP_CFLAGS and GIMP_LIBS +dnl +AC_DEFUN(AM_PATH_GIMP_1_4, +[dnl +dnl Get the cflags and libraries from the gimptool-1.3 script +dnl +AC_ARG_WITH(gimp-prefix,[ --with-gimp-prefix=PFX Prefix where GIMP is installed (optional)], + gimptool_prefix="$withval", gimptool_prefix="") +AC_ARG_WITH(gimp-exec-prefix,[ --with-gimp-exec-prefix=PFX Exec prefix where GIMP is installed (optional)], + gimptool_exec_prefix="$withval", gimptool_exec_prefix="") +AC_ARG_ENABLE(gimptest, [ --disable-gimptest Do not try to compile and run a test GIMP program], + , enable_gimptest=yes) + + if test x$gimptool_exec_prefix != x ; then + gimptool_args="$gimptool_args --exec-prefix=$gimptool_exec_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_exec_prefix/bin/gimptool-1.3 + fi + fi + if test x$gimptool_prefix != x ; then + gimptool_args="$gimptool_args --prefix=$gimptool_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_prefix/bin/gimptool-1.3 + fi + fi + + AC_PATH_PROG(GIMPTOOL, gimptool-1.3, no) + min_gimp_version=ifelse([$1], ,1.3.0,$1) + AC_MSG_CHECKING(for GIMP - version >= $min_gimp_version) + no_gimp="" + if test "$GIMPTOOL" = "no" ; then + no_gimp=yes + else + GIMP_CFLAGS=`$GIMPTOOL $gimptool_args --cflags` + GIMP_LIBS=`$GIMPTOOL $gimptool_args --libs` + + GIMP_CFLAGS_NOUI=`$GIMPTOOL $gimptool_args --cflags-noui` + noui_test=`echo $GIMP_CFLAGS_NOUI | sed 's/^\(Usage\).*/\1/'` + if test "$noui_test" = "Usage" ; then + GIMP_CFLAGS_NOUI=$GIMP_CFLAGS + GIMP_LIBS_NOUI=$GIMP_LIBS + else + GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` + fi + + GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir` + GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir` + nodatadir_test=`echo $GIMP_DATA_DIR | sed 's/^\(Usage\).*/\1/'` + if test "$nodatadir_test" = "Usage" ; then + GIMP_DATA_DIR="" + GIMP_PLUGIN_DIR="" + fi + + gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gimptool_micro_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gimptest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" +dnl +dnl Now check if the installed GIMP is sufficiently new. (Also sanity +dnl checks the results of gimptool-1.3 to some extent +dnl + rm -f conf.gimptest + AC_TRY_RUN([ +#include +#include + +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gimptest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gimp_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gimp_version"); + exit(1); + } + + if (($gimptool_major_version > major) || + (($gimptool_major_version == major) && ($gimptool_minor_version > minor)) || + (($gimptool_major_version == major) && ($gimptool_minor_version == minor) && ($gimptool_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'gimptool-1.3 --version' returned %d.%d.%d, but the minimum version\n", $gimptool_major_version, $gimptool_minor_version, $gimptool_micro_version); + printf("*** of GIMP required is %d.%d.%d. If gimptool-1.3 is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If gimptool-1.3 was wrong, set the environment variable GIMPTOOL\n"); + printf("*** to point to the correct copy of gimptool-1.3, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_gimp=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gimp" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GIMPTOOL" = "no" ; then + echo "*** The gimptool-1.3 script installed by GIMP could not be found" + echo "*** If GIMP was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GIMPTOOL environment variable to the" + echo "*** full path to gimptool-1.3." + else + if test -f conf.gimptest ; then + : + else + echo "*** Could not run GIMP test program, checking why..." + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" + AC_TRY_LINK([ +#include +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GIMP or finding the wrong" + echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GIMP was incorrectly installed" + echo "*** or that you have moved GIMP since it was installed. In the latter case, you" + echo "*** may want to edit the gimptool-1.3 script: $GIMPTOOL" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GIMP_CFLAGS="" + GIMP_LIBS="" + GIMP_CFLAGS_NOUI="" + GIMP_LIBS_NOUI="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GIMP_CFLAGS) + AC_SUBST(GIMP_LIBS) + AC_SUBST(GIMP_CFLAGS_NOUI) + AC_SUBST(GIMP_LIBS_NOUI) + AC_SUBST(GIMP_DATA_DIR) + AC_SUBST(GIMP_PLUGIN_DIR) + rm -f conf.gimptest +]) + # ******************************************************************** # Configure paths for SANE # Oliver Rauch 2000-10-30 diff --git a/aclocal.m4 b/aclocal.m4 index d8e1179..8d9f54c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,6 +13,7 @@ dnl PARTICULAR PURPOSE. # acinclude.m4 for sane-frontends # AM_PATH_GTK # AM_PATH_GIMP +# AM_PATH_GIMP_1_4 # AM_PATH_SANE # Configure paths for GTK+ @@ -431,6 +432,192 @@ dnl ok, gimp does not work, so we have to use the gtk_* things again ]) +# Configure paths for GIMP-1.4 +# Manish Singh 98-6-11 +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_GIMP_1_4([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for GIMP, and define GIMP_CFLAGS and GIMP_LIBS +dnl +AC_DEFUN(AM_PATH_GIMP_1_4, +[dnl +dnl Get the cflags and libraries from the gimptool-1.3 script +dnl +AC_ARG_WITH(gimp-prefix,[ --with-gimp-prefix=PFX Prefix where GIMP is installed (optional)], + gimptool_prefix="$withval", gimptool_prefix="") +AC_ARG_WITH(gimp-exec-prefix,[ --with-gimp-exec-prefix=PFX Exec prefix where GIMP is installed (optional)], + gimptool_exec_prefix="$withval", gimptool_exec_prefix="") +AC_ARG_ENABLE(gimptest, [ --disable-gimptest Do not try to compile and run a test GIMP program], + , enable_gimptest=yes) + + if test x$gimptool_exec_prefix != x ; then + gimptool_args="$gimptool_args --exec-prefix=$gimptool_exec_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_exec_prefix/bin/gimptool-1.3 + fi + fi + if test x$gimptool_prefix != x ; then + gimptool_args="$gimptool_args --prefix=$gimptool_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_prefix/bin/gimptool-1.3 + fi + fi + + AC_PATH_PROG(GIMPTOOL, gimptool-1.3, no) + min_gimp_version=ifelse([$1], ,1.3.0,$1) + AC_MSG_CHECKING(for GIMP - version >= $min_gimp_version) + no_gimp="" + if test "$GIMPTOOL" = "no" ; then + no_gimp=yes + else + GIMP_CFLAGS=`$GIMPTOOL $gimptool_args --cflags` + GIMP_LIBS=`$GIMPTOOL $gimptool_args --libs` + + GIMP_CFLAGS_NOUI=`$GIMPTOOL $gimptool_args --cflags-noui` + noui_test=`echo $GIMP_CFLAGS_NOUI | sed 's/^\(Usage\).*/\1/'` + if test "$noui_test" = "Usage" ; then + GIMP_CFLAGS_NOUI=$GIMP_CFLAGS + GIMP_LIBS_NOUI=$GIMP_LIBS + else + GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` + fi + + GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir` + GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir` + nodatadir_test=`echo $GIMP_DATA_DIR | sed 's/^\(Usage\).*/\1/'` + if test "$nodatadir_test" = "Usage" ; then + GIMP_DATA_DIR="" + GIMP_PLUGIN_DIR="" + fi + + gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gimptool_micro_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gimptest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" +dnl +dnl Now check if the installed GIMP is sufficiently new. (Also sanity +dnl checks the results of gimptool-1.3 to some extent +dnl + rm -f conf.gimptest + AC_TRY_RUN([ +#include +#include + +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gimptest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gimp_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gimp_version"); + exit(1); + } + + if (($gimptool_major_version > major) || + (($gimptool_major_version == major) && ($gimptool_minor_version > minor)) || + (($gimptool_major_version == major) && ($gimptool_minor_version == minor) && ($gimptool_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'gimptool-1.3 --version' returned %d.%d.%d, but the minimum version\n", $gimptool_major_version, $gimptool_minor_version, $gimptool_micro_version); + printf("*** of GIMP required is %d.%d.%d. If gimptool-1.3 is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If gimptool-1.3 was wrong, set the environment variable GIMPTOOL\n"); + printf("*** to point to the correct copy of gimptool-1.3, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_gimp=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gimp" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GIMPTOOL" = "no" ; then + echo "*** The gimptool-1.3 script installed by GIMP could not be found" + echo "*** If GIMP was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GIMPTOOL environment variable to the" + echo "*** full path to gimptool-1.3." + else + if test -f conf.gimptest ; then + : + else + echo "*** Could not run GIMP test program, checking why..." + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" + AC_TRY_LINK([ +#include +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GIMP or finding the wrong" + echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GIMP was incorrectly installed" + echo "*** or that you have moved GIMP since it was installed. In the latter case, you" + echo "*** may want to edit the gimptool-1.3 script: $GIMPTOOL" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GIMP_CFLAGS="" + GIMP_LIBS="" + GIMP_CFLAGS_NOUI="" + GIMP_LIBS_NOUI="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GIMP_CFLAGS) + AC_SUBST(GIMP_LIBS) + AC_SUBST(GIMP_CFLAGS_NOUI) + AC_SUBST(GIMP_LIBS_NOUI) + AC_SUBST(GIMP_DATA_DIR) + AC_SUBST(GIMP_PLUGIN_DIR) + rm -f conf.gimptest +]) + # ******************************************************************** # Configure paths for SANE # Oliver Rauch 2000-10-30 diff --git a/configure b/configure index a8ef1a4..d5d42b0 100755 --- a/configure +++ b/configure @@ -17,6 +17,8 @@ ac_help="$ac_help --disable-gtk2 do not use GTK2 (GIMP plugin must be disabled to use GTK2)" ac_help="$ac_help --disable-gimp do not include GIMP plugin mode" +ac_help="$ac_help + --enable-gimp13 include GIMP 1.3 plugin mode (this disables GIMP =< 1.2 plugin)" ac_help="$ac_help --with-sane-prefix=PFX Prefix where SANE is installed (optional)" ac_help="$ac_help @@ -38,6 +40,12 @@ ac_help="$ac_help ac_help="$ac_help --disable-gimptest Do not try to compile and run a test GIMP program" ac_help="$ac_help + --with-gimp-prefix=PFX Prefix where GIMP is installed (optional)" +ac_help="$ac_help + --with-gimp-exec-prefix=PFX Exec prefix where GIMP is installed (optional)" +ac_help="$ac_help + --disable-gimptest Do not try to compile and run a test GIMP program" +ac_help="$ac_help Used environment variables that can be set by user: CFLAGS, CPPFLAGS, LDFLAGS, LIBS" @@ -612,7 +620,7 @@ fi echo $ac_n "checking whether GIMP plugin is requested""... $ac_c" 1>&6 -echo "configure:616: checking whether GIMP plugin is requested" >&5 +echo "configure:624: checking whether GIMP plugin is requested" >&5 # Check whether --enable-gimp or --disable-gimp was given. if test "${enable_gimp+set}" = set; then enableval="$enable_gimp" @@ -621,7 +629,20 @@ else USE_GIMP=yes fi -echo "$ac_t""$USE_GIMP" 1>&6 +# Check whether --enable-gimp13 or --disable-gimp13 was given. +if test "${enable_gimp13+set}" = set; then + enableval="$enable_gimp13" + USE_GIMP13=$enableval +else + USE_GIMP13="no" +fi + +if test "${USE_GIMP13}" = "yes"; then + echo "$ac_t""yes, GIMP 1.3" 1>&6 + USE_GIMP="no" +else + echo "$ac_t""$USE_GIMP" 1>&6 +fi # we cannot use GTK2 with GIMP < 1.3 if test "${USE_GIMP}" = "yes"; then @@ -631,7 +652,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:635: checking for $ac_word" >&5 +echo "configure:656: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -661,7 +682,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:665: checking for $ac_word" >&5 +echo "configure:686: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -712,7 +733,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:716: checking for $ac_word" >&5 +echo "configure:737: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -744,7 +765,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:748: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -755,12 +776,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 759 "configure" +#line 780 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -786,12 +807,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:790: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:795: checking whether we are using GNU C" >&5 +echo "configure:816: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -800,7 +821,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -819,7 +840,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:823: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:844: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -851,7 +872,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:855: checking how to run the C preprocessor" >&5 +echo "configure:876: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -866,13 +887,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:897: \"$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 : @@ -883,13 +904,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:914: \"$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 : @@ -900,13 +921,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:931: \"$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 : @@ -931,9 +952,9 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:935: checking for AIX" >&5 +echo "configure:956: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:960: checking for minix/config.h" >&5 +echo "configure:981: checking for minix/config.h" >&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:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:991: \"$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* @@ -1005,7 +1026,7 @@ fi echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:1009: checking for strerror in -lcposix" >&5 +echo "configure:1030: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1013,7 +1034,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1049: \"$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 @@ -1050,7 +1071,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1054: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:1075: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1066,7 +1087,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__ do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -1103,7 +1124,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:1107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -1157,7 +1178,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1161: checking for a BSD compatible install" >&5 +echo "configure:1182: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1210,7 +1231,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1214: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1235: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1237,7 +1258,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1241: checking how to run the C preprocessor" >&5 +echo "configure:1262: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1252,13 +1273,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1283: \"$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 : @@ -1269,13 +1290,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1300: \"$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 : @@ -1286,13 +1307,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1317: \"$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 : @@ -1318,13 +1339,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1322: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1343: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1342,7 +1363,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1377,7 +1398,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1381: checking host system type" >&5 +echo "configure:1402: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1404,12 +1425,12 @@ case "$host_os" in esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1408: checking for ANSI C header files" >&5 +echo "configure:1429: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1417,7 +1438,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1442: \"$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* @@ -1434,7 +1455,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1452,7 +1473,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1473,7 +1494,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1484,7 +1505,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1511,17 +1532,17 @@ for ac_hdr in os2.h fcntl.h unistd.h libc.h sys/time.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:1515: checking for $ac_hdr" >&5 +echo "configure:1536: 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:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1546: \"$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* @@ -1549,12 +1570,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1553: checking for working const" >&5 +echo "configure:1574: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1624,21 +1645,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1628: checking for inline" >&5 +echo "configure:1649: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1664,12 +1685,12 @@ EOF esac echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1668: checking return type of signal handlers" >&5 +echo "configure:1689: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1686,7 +1707,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1705,12 +1726,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1709: checking for size_t" >&5 +echo "configure:1730: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1738,12 +1759,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1742: checking for pid_t" >&5 +echo "configure:1763: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1771,12 +1792,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:1775: checking for ssize_t" >&5 +echo "configure:1796: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1804,12 +1825,12 @@ EOF fi echo $ac_n "checking for u_char""... $ac_c" 1>&6 -echo "configure:1808: checking for u_char" >&5 +echo "configure:1829: checking for u_char" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1837,12 +1858,12 @@ EOF fi echo $ac_n "checking for u_int""... $ac_c" 1>&6 -echo "configure:1841: checking for u_int" >&5 +echo "configure:1862: checking for u_int" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1870,12 +1891,12 @@ EOF fi echo $ac_n "checking for u_long""... $ac_c" 1>&6 -echo "configure:1874: checking for u_long" >&5 +echo "configure:1895: checking for u_long" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1903,12 +1924,12 @@ EOF fi echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6 -echo "configure:1907: checking for u_int8_t" >&5 +echo "configure:1928: checking for u_int8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_int8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1936,12 +1957,12 @@ EOF fi echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6 -echo "configure:1940: checking for u_int16_t" >&5 +echo "configure:1961: checking for u_int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1969,12 +1990,12 @@ EOF fi echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6 -echo "configure:1973: checking for u_int32_t" >&5 +echo "configure:1994: checking for u_int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2003,7 +2024,7 @@ fi echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6 -echo "configure:2007: checking for sqrt in -lm" >&5 +echo "configure:2028: checking for sqrt in -lm" >&5 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2011,7 +2032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2047: \"$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 @@ -2052,7 +2073,7 @@ fi if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2056: checking for socket in -lsocket" >&5 +echo "configure:2077: 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 @@ -2060,7 +2081,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:2096: \"$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 @@ -2099,7 +2120,7 @@ else fi echo $ac_n "checking for syslog in -lsyslog""... $ac_c" 1>&6 -echo "configure:2103: checking for syslog in -lsyslog" >&5 +echo "configure:2124: 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 @@ -2107,7 +2128,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:2143: \"$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 @@ -2150,19 +2171,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:2154: checking for working alloca.h" >&5 +echo "configure:2175: 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:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2187: \"$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 @@ -2183,12 +2204,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2187: checking for alloca" >&5 +echo "configure:2208: 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:2241: \"$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 @@ -2248,12 +2269,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2252: checking whether alloca needs Cray hooks" >&5 +echo "configure:2273: 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:2282: checking for $ac_func" >&5 +echo "configure:2303: 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:2331: \"$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 @@ -2333,7 +2354,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2337: checking stack direction for C alloca" >&5 +echo "configure:2358: 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 @@ -2341,7 +2362,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:2385: \"$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 @@ -2385,17 +2406,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2389: checking for $ac_hdr" >&5 +echo "configure:2410: 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:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2420: \"$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* @@ -2424,12 +2445,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2428: checking for $ac_func" >&5 +echo "configure:2449: 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:2477: \"$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 @@ -2477,7 +2498,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2481: checking for working mmap" >&5 +echo "configure:2502: 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 @@ -2485,7 +2506,7 @@ else ac_cv_func_mmap_fixed_mapped=no 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:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2651,12 +2672,12 @@ for ac_func in atexit mkdir sigprocmask strdup strndup strftime strstr \ strsep strtod snprintf usleep strcasecmp strncasecmp getenv isfdtype vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2655: checking for $ac_func" >&5 +echo "configure:2676: 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:2704: \"$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 @@ -2704,8 +2725,19 @@ fi done +if test "$ac_cv_header_os2_h" = "yes" ; then + cat >> confdefs.h <<\EOF +#define strncasecmp strnicmp +EOF + + cat >> confdefs.h <<\EOF +#define strcasecmp stricmp +EOF + +fi + echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:2709: checking build system type" >&5 +echo "configure:2741: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -2731,7 +2763,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2735: checking for $ac_word" >&5 +echo "configure:2767: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2763,7 +2795,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2767: checking for $ac_word" >&5 +echo "configure:2799: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2837,7 +2869,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2841: checking for $ac_word" >&5 +echo "configure:2873: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SANE_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2872,7 +2904,7 @@ fi min_sane_version=1.0.0 echo $ac_n "checking for SANE - version >= $min_sane_version""... $ac_c" 1>&6 -echo "configure:2876: checking for SANE - version >= $min_sane_version" >&5 +echo "configure:2908: checking for SANE - version >= $min_sane_version" >&5 no_sane="" if test "$SANE_CONFIG" = "no" ; then no_sane=yes @@ -2900,7 +2932,7 @@ echo "configure:2876: checking for SANE - version >= $min_sane_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -2952,7 +2984,7 @@ main () } EOF -if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2988,7 +3020,7 @@ fi LIBS="$LIBS $SANE_LIBS" LDFLAGS="$LDFLAGS $SANE_LDFLAGS" cat > conftest.$ac_ext < @@ -2998,7 +3030,7 @@ int main() { return (SANE_CURRENT_MAJOR); ; return 0; } EOF -if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SANE or finding the wrong" @@ -3055,7 +3087,7 @@ fi # check for GTK2 or GTK >= 0.99.13 if test "${USE_GUI}" = "yes"; then - if test "${USE_GTK2}" = "yes"; then + if test "${USE_GTK2}" = "yes" || test "${USE_GIMP13}" = "yes"; then # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" @@ -3080,7 +3112,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3084: checking for $ac_word" >&5 +echo "configure:3116: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3128,7 +3160,7 @@ fi min_gtk_version=2.0.0 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:3132: checking for GTK+ - version >= $min_gtk_version" >&5 +echo "configure:3164: checking for GTK+ - version >= $min_gtk_version" >&5 if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs @@ -3163,7 +3195,7 @@ echo "configure:3132: checking for GTK+ - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -3238,7 +3270,7 @@ main () } EOF -if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3272,7 +3304,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -3282,7 +3314,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" @@ -3307,7 +3339,12 @@ rm -f conftest* fi GTK_CFLAGS="" GTK_LIBS="" - : + + if test "${USE_GIMP13}" = "yes"; then + { echo "configure: error: *** GIMP 1.3 plugin requested, but GTK+ 2.0 not found ***" 1>&2; exit 1; } + else + echo "configure: warning: *** GTK+ 2.0 not found, falling back to GTK+ < 2.0 if possible ***" 1>&2 + fi fi @@ -3358,7 +3395,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3362: checking for $ac_word" >&5 +echo "configure:3399: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3393,7 +3430,7 @@ fi min_gtk_version=0.99.13 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:3397: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:3434: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -3416,7 +3453,7 @@ echo "configure:3397: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -3479,7 +3516,7 @@ main () } EOF -if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3513,7 +3550,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -3523,7 +3560,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -3611,7 +3648,7 @@ fi # Extract the first word of "gimp-config", so it can be a program name with args. set dummy gimp-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3615: checking for $ac_word" >&5 +echo "configure:3652: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GIMP_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3660,7 +3697,7 @@ fi # Extract the first word of "gimptool", so it can be a program name with args. set dummy gimptool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3664: checking for $ac_word" >&5 +echo "configure:3701: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GIMP_TOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3706,17 +3743,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3710: checking for $ac_hdr" >&5 +echo "configure:3747: 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:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3757: \"$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* @@ -3747,17 +3784,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3751: checking for $ac_hdr" >&5 +echo "configure:3788: 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:3761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3798: \"$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* @@ -3788,7 +3825,7 @@ done LIBS="${LIBS} ${GTK_LIBS} ${GIMP_LIBS}" if test "x$no_gimp" = x ; then echo $ac_n "checking GIMP compilation""... $ac_c" 1>&6 -echo "configure:3792: checking GIMP compilation" >&5 +echo "configure:3829: checking GIMP compilation" >&5 gimp_config_major_version=-1 gimp_config_minor_version=0 gimp_config_micro_version=0 @@ -3807,7 +3844,7 @@ echo "configure:3792: checking GIMP compilation" >&5 CFLAGS="${CFLAGS} ${GIMP_CFLAGS}" LIBS="${LIBS} ${GIMP_LIBS}" echo $ac_n "checking for GIMP - version >= $min_gimp_version""... $ac_c" 1>&6 -echo "configure:3811: checking for GIMP - version >= $min_gimp_version" >&5 +echo "configure:3848: checking for GIMP - version >= $min_gimp_version" >&5 fi if test "x$no_gimp" = x ; then @@ -3817,7 +3854,7 @@ echo "configure:3811: checking for GIMP - version >= $min_gimp_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -3897,7 +3934,7 @@ main () } EOF -if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3925,17 +3962,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3929: checking for $ac_hdr" >&5 +echo "configure:3966: 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:3939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3976: \"$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* @@ -3965,17 +4002,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3969: checking for $ac_hdr" >&5 +echo "configure:4006: 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:3979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4016: \"$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* @@ -4015,7 +4052,7 @@ done CFLAGS="$CFLAGS $GIMP_CFLAGS" LIBS="$LIBS $GIMP_LIBS" cat > conftest.$ac_ext < @@ -4035,7 +4072,7 @@ int main() { return ((gimp_major_version) || (gimp_minor_version) || (gimp_micro_version)); ; return 0; } EOF -if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GIMP or finding the wrong" @@ -4070,6 +4107,277 @@ rm -f conftest* fi + if test "${USE_GIMP13}" = "yes"; then + # Check whether --with-gimp-prefix or --without-gimp-prefix was given. +if test "${with_gimp_prefix+set}" = set; then + withval="$with_gimp_prefix" + gimptool_prefix="$withval" +else + gimptool_prefix="" +fi + +# Check whether --with-gimp-exec-prefix or --without-gimp-exec-prefix was given. +if test "${with_gimp_exec_prefix+set}" = set; then + withval="$with_gimp_exec_prefix" + gimptool_exec_prefix="$withval" +else + gimptool_exec_prefix="" +fi + +# Check whether --enable-gimptest or --disable-gimptest was given. +if test "${enable_gimptest+set}" = set; then + enableval="$enable_gimptest" + : +else + enable_gimptest=yes +fi + + + if test x$gimptool_exec_prefix != x ; then + gimptool_args="$gimptool_args --exec-prefix=$gimptool_exec_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_exec_prefix/bin/gimptool-1.3 + fi + fi + if test x$gimptool_prefix != x ; then + gimptool_args="$gimptool_args --prefix=$gimptool_prefix" + if test x${GIMPTOOL+set} != xset ; then + GIMPTOOL=$gimptool_prefix/bin/gimptool-1.3 + fi + fi + + # Extract the first word of "gimptool-1.3", so it can be a program name with args. +set dummy gimptool-1.3; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4153: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GIMPTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GIMPTOOL" in + /*) + ac_cv_path_GIMPTOOL="$GIMPTOOL" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GIMPTOOL="$GIMPTOOL" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GIMPTOOL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GIMPTOOL" && ac_cv_path_GIMPTOOL="no" + ;; +esac +fi +GIMPTOOL="$ac_cv_path_GIMPTOOL" +if test -n "$GIMPTOOL"; then + echo "$ac_t""$GIMPTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gimp_version=1.3.12 + echo $ac_n "checking for GIMP - version >= $min_gimp_version""... $ac_c" 1>&6 +echo "configure:4188: checking for GIMP - version >= $min_gimp_version" >&5 + no_gimp="" + if test "$GIMPTOOL" = "no" ; then + no_gimp=yes + else + GIMP_CFLAGS=`$GIMPTOOL $gimptool_args --cflags` + GIMP_LIBS=`$GIMPTOOL $gimptool_args --libs` + + GIMP_CFLAGS_NOUI=`$GIMPTOOL $gimptool_args --cflags-noui` + noui_test=`echo $GIMP_CFLAGS_NOUI | sed 's/^\(Usage\).*/\1/'` + if test "$noui_test" = "Usage" ; then + GIMP_CFLAGS_NOUI=$GIMP_CFLAGS + GIMP_LIBS_NOUI=$GIMP_LIBS + else + GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` + fi + + GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir` + GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir` + nodatadir_test=`echo $GIMP_DATA_DIR | sed 's/^\(Usage\).*/\1/'` + if test "$nodatadir_test" = "Usage" ; then + GIMP_DATA_DIR="" + GIMP_PLUGIN_DIR="" + fi + + gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gimptool_micro_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gimptest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" + rm -f conf.gimptest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include + +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gimptest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gimp_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gimp_version"); + exit(1); + } + + if (($gimptool_major_version > major) || + (($gimptool_major_version == major) && ($gimptool_minor_version > minor)) || + (($gimptool_major_version == major) && ($gimptool_minor_version == minor) && ($gimptool_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'gimptool-1.3 --version' returned %d.%d.%d, but the minimum version\n", $gimptool_major_version, $gimptool_minor_version, $gimptool_micro_version); + printf("*** of GIMP required is %d.%d.%d. If gimptool-1.3 is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If gimptool-1.3 was wrong, set the environment variable GIMPTOOL\n"); + printf("*** to point to the correct copy of gimptool-1.3, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +EOF +if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gimp=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gimp" = x ; then + echo "$ac_t""yes" 1>&6 + HAVE_GIMP13=yes + else + echo "$ac_t""no" 1>&6 + if test "$GIMPTOOL" = "no" ; then + echo "*** The gimptool-1.3 script installed by GIMP could not be found" + echo "*** If GIMP was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GIMPTOOL environment variable to the" + echo "*** full path to gimptool-1.3." + else + if test -f conf.gimptest ; then + : + else + echo "*** Could not run GIMP test program, checking why..." + CFLAGS="$CFLAGS $GIMP_CFLAGS" + LIBS="$LIBS $GIMP_LIBS" + cat > conftest.$ac_ext < +#include + +GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + NULL, /* query_proc */ + NULL /* run_proc */ +}; + +int main() { + return 0; +; return 0; } +EOF +if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GIMP or finding the wrong" + echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GIMP was incorrectly installed" + echo "*** or that you have moved GIMP since it was installed. In the latter case, you" + echo "*** may want to edit the gimptool-1.3 script: $GIMPTOOL" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GIMP_CFLAGS="" + GIMP_LIBS="" + GIMP_CFLAGS_NOUI="" + GIMP_LIBS_NOUI="" + : + fi + + + + + + + rm -f conf.gimptest + + if test "${HAVE_GIMP13}" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_GIMP_1_3 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGIMP_GIMP_H 1 +EOF + + fi + fi + if test "x${HAVE_GTK}" = "x"; then echo "****************************************************************" echo "WARNING: GTK-0.99.13 or newer is needed for compiling the GUI" @@ -4283,6 +4591,11 @@ s%@GIMP_CONFIG@%$GIMP_CONFIG%g s%@GIMP_TOOL@%$GIMP_TOOL%g s%@GIMP_CFLAGS@%$GIMP_CFLAGS%g s%@GIMP_LIBS@%$GIMP_LIBS%g +s%@GIMPTOOL@%$GIMPTOOL%g +s%@GIMP_CFLAGS_NOUI@%$GIMP_CFLAGS_NOUI%g +s%@GIMP_LIBS_NOUI@%$GIMP_LIBS_NOUI%g +s%@GIMP_DATA_DIR@%$GIMP_DATA_DIR%g +s%@GIMP_PLUGIN_DIR@%$GIMP_PLUGIN_DIR%g s%@INCLUDES@%$INCLUDES%g s%@BINPROGS@%$BINPROGS%g s%@V_MAJOR@%$V_MAJOR%g diff --git a/configure.in b/configure.in index 5a32b8c..65fdbb0 100644 --- a/configure.in +++ b/configure.in @@ -21,9 +21,9 @@ BINPROGS="scanadf" SANE_V_MAJOR=1 VERSION=${V_MAJOR}.${V_MINOR}.${V_BUILD}${V_EXTRA} PACKAGE_VERSION="$PACKAGE-$VERSION" -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") -AC_DEFINE_UNQUOTED(VERSION, "$VERSION") -AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION") +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of the distribution.]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define to the version of the distribution.]) +AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION", [Define to the name and the version of the distribution.]) AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(PACKAGE_VERSION) @@ -39,7 +39,13 @@ dnl Check for gimp plugin support AC_MSG_CHECKING([whether GIMP plugin is requested]) dnl Default is enabled GIMP plugin AC_ARG_ENABLE(gimp, [ --disable-gimp do not include GIMP plugin mode], USE_GIMP=$enableval, USE_GIMP=yes) -AC_MSG_RESULT($USE_GIMP) +AC_ARG_ENABLE(gimp13, [ --enable-gimp13 include GIMP 1.3 plugin mode (this disables GIMP =< 1.2 plugin)], USE_GIMP13=$enableval, USE_GIMP13="no") +if test "${USE_GIMP13}" = "yes"; then + AC_MSG_RESULT([yes, GIMP 1.3]) + USE_GIMP="no" +else + AC_MSG_RESULT($USE_GIMP) +fi # we cannot use GTK2 with GIMP < 1.3 if test "${USE_GIMP}" = "yes"; then @@ -103,6 +109,11 @@ AC_FUNC_MMAP AC_CHECK_FUNCS(atexit mkdir sigprocmask strdup strndup strftime strstr \ strsep strtod snprintf usleep strcasecmp strncasecmp getenv isfdtype 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_CHECK_TOOL(RANLIB, ranlib, :) AM_PATH_SANE(1.0.0, HAVE_SANE=yes, ) @@ -126,8 +137,13 @@ fi # check for GTK2 or GTK >= 0.99.13 if test "${USE_GUI}" = "yes"; then - if test "${USE_GTK2}" = "yes"; then - AM_PATH_GTK_2_0(2.0.0, HAVE_GTK=yes, ) + if test "${USE_GTK2}" = "yes" || test "${USE_GIMP13}" = "yes"; then + AM_PATH_GTK_2_0(2.0.0, HAVE_GTK=yes, [ + if test "${USE_GIMP13}" = "yes"; then + AC_MSG_ERROR([*** GIMP 1.3 plugin requested, but GTK+ 2.0 not found ***]) + else + AC_MSG_WARN([*** GTK+ 2.0 not found, falling back to GTK+ < 2.0 if possible ***]) + fi]) fi # fallback to GTK < 2 if GTK2 isn't available @@ -139,6 +155,14 @@ if test "${USE_GUI}" = "yes"; then AM_PATH_GIMP(1.0.0, HAVE_GIMP=yes) fi + if test "${USE_GIMP13}" = "yes"; then + AM_PATH_GIMP_1_4(1.3.12, HAVE_GIMP13=yes) + if test "${HAVE_GIMP13}" = "yes"; then + AC_DEFINE([ENABLE_GIMP_1_3], 1, [Define to 1 if GIMP 1.3 support wanted]) + AC_DEFINE([HAVE_LIBGIMP_GIMP_H], 1, [Define to 1 if you have the header file.]) + fi + fi + if test "x${HAVE_GTK}" = "x"; then echo "****************************************************************" echo "WARNING: GTK-0.99.13 or newer is needed for compiling the GUI" diff --git a/include/sane/config.h.in b/include/sane/config.h.in index c127c22..b05b1c2 100644 --- a/include/sane/config.h.in +++ b/include/sane/config.h.in @@ -1,285 +1,219 @@ -#ifndef SANE_CONFIG_H -#define SANE_CONFIG_H +/* include/sane/config.h.in. Generated from configure.in by autoheader. */ -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -#undef _ALL_SOURCE -#endif - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ #undef CRAY_STACKSEG_END -/* Define if you have alloca, as a function or macro. */ +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 if GIMP 1.3 support wanted */ +#undef ENABLE_GIMP_1_3 + +/* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define if you have and it should be used (not on Ultrix). */ +/* Define to 1 if you have and it should be used (not on Ultrix). + */ #undef HAVE_ALLOCA_H -/* Define if you have a working `mmap' system call. */ +/* Define to 1 if you have the `atexit' function. */ +#undef HAVE_ATEXIT + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getenv' function. */ +#undef HAVE_GETENV + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `isfdtype' function. */ +#undef HAVE_ISFDTYPE + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGIMP_GIMPFEATURES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGIMP_GIMP_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the `syslog' library (-lsyslog). */ +#undef HAVE_LIBSYSLOG + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mkdir' function. */ +#undef HAVE_MKDIR + +/* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline +/* Define to 1 if you have the header file. */ +#undef HAVE_OS2_H -/* Define if on MINIX. */ -#undef _MINIX +/* Define to 1 if you have the `sigprocmask' function. */ +#undef HAVE_SIGPROCMASK -/* Define to `long' if doesn't define. */ -#undef off_t +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -#undef _POSIX_1_SOURCE +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H -/* Define to `unsigned' if doesn't define. */ -#undef size_t +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP -/* Define to `unsigned char' if doesn't define. */ -#undef u_char +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP -/* Define to `unsigned int' if doesn't define. */ -#undef u_int +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME -/* Define to `unsigned long' if doesn't define. */ -#undef u_long +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H -/* Define to `unsigned char' if doesn't define. */ -#undef u_int8_t +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H -/* Define to `unsigned short' if doesn't define. */ -#undef u_int16_t +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP -/* Define to `unsigned int' if doesn't define. */ -#undef u_int32_t +/* Define to 1 if you have the `strndup' function. */ +#undef HAVE_STRNDUP -/* Define to `long' if doesn't define. */ -#undef ssize_t +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP -/* Define to `int' if doesn't define. */ -#undef pid_t +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR -/* Define scsireq_t as `struct scsireq' if necessary. */ -#undef scsireq_t +/* Define to 1 if you have the `strtod' function. */ +#undef HAVE_STRTOD -/* Define to the return type of signal handlers. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `usleep' function. */ +#undef HAVE_USLEEP + +/* Define to 1 if you have the `vsyslog' function. */ +#undef HAVE_VSYSLOG + +/* Define to the name of the distribution. */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the name and the version of the distribution. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION -/* Define if you have the ANSI C header files. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if NLS is requested. */ -#undef ENABLE_NLS - -/* Define as 1 if you have catgets and don't want to use GNU gettext. */ -#undef HAVE_CATGETS - -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -#undef HAVE_GETTEXT - -/* Define if your locale.h file contains LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define to 1 if you have the stpcpy function. */ -#undef HAVE_STPCPY - -/* Define to the name of the distribution. */ -#undef PACKAGE - -/* The concatenation of the strings PACKAGE, "-", and VERSION. */ -#undef PACKAGE_VERSION - -/* Define to the version of the distribution. */ +/* Define to the version of the distribution. */ #undef VERSION -/* Define if you have the __argz_count function. */ -#undef HAVE___ARGZ_COUNT - -/* Define if you have the __argz_next function. */ -#undef HAVE___ARGZ_NEXT - -/* Define if you have the __argz_stringify function. */ -#undef HAVE___ARGZ_STRINGIFY - -/* Define if you have the dcgettext function. */ -#undef HAVE_DCGETTEXT - -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD - -/* Define if you have the getenv function. */ -#undef HAVE_GETENV - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the atexit function. */ -#undef HAVE_ATEXIT - -/* Define if you have the isfdtype function. */ -#undef HAVE_ISFDTYPE - -/* Define if you have the mkdir function. */ -#undef HAVE_MKDIR - -/* Define if you have the munmap function. */ -#undef HAVE_MUNMAP - -/* Define if you have the putenv function. */ -#undef HAVE_PUTENV - -/* Define if you have the scsireq_enter function. */ -#undef HAVE_SCSIREQ_ENTER - -/* Define if you have the sigprocmask function. */ -#undef HAVE_SIGPROCMASK - -/* Define if you have the setenv function. */ -#undef HAVE_SETENV - -/* Define if you have the setlocale function. */ -#undef HAVE_SETLOCALE - -/* Define if you have the stpcpy function. */ -#undef HAVE_STPCPY - -/* Define if you have the strcasecmp function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the strchr function. */ -#undef HAVE_STRCHR - -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP - -/* Define if you have the strncasecmp function. */ -#undef HAVE_STRNCASECMP - -/* Define if you have the strndup function. */ -#undef HAVE_STRNDUP - -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME - -/* Define if you have the strstr function. */ -#undef HAVE_STRSTR - -/* Define if you have the strsep function. */ -#undef HAVE_STRSEP - -/* Define if you have the strtod function. */ -#undef HAVE_STRTOD - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the vsyslog function. */ -#undef HAVE_VSYSLOG - -/* Define if you have the snprintf function. */ -#undef HAVE_SNPRINTF - -/* Ignore HAVE_USLEEP under Apollo Domain because the usleep() - implementation in the Sys5.3 environment is broken. */ -#ifndef apollo - /* Define if you have the usleep function. */ -# undef HAVE_USLEEP +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE #endif -/* Define if you have the header file. */ -#undef HAVE_ARGZ_H +/* Define to 1 if on MINIX. */ +#undef _MINIX -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE -/* Define if you have the header file. */ -#undef HAVE_LIBINTL_H +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE -/* Define if you have the header file. */ -#undef HAVE_LIBC_H +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H +/* Define to `int' if does not define. */ +#undef pid_t -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H +/* Define to `unsigned' if does not define. */ +#undef size_t -/* Define if you have the header file. */ -#undef HAVE_NL_TYPES_H +/* Define to `long' if does not define. */ +#undef ssize_t -/* Define if you have the header file. */ -#undef HAVE_STRING_H +/* Define for OS/2 only */ +#undef strcasecmp -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H +/* Define for OS/2 only */ +#undef strncasecmp -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H +/* Define to `unsigned char' if does not define. */ +#undef u_char -/* Define if you have the header file. */ -#undef HAVE_OS2_H +/* Define to `unsigned int' if does not define. */ +#undef u_int -/* Define if you have EMX's sys/hw.h headers. */ -#undef HAVE_SYS_HW_H +/* Define to `unsigned short' if does not define. */ +#undef u_int16_t -/* Define if you have sys/types.h. OS/2 wants them before select.h, etc. */ -#undef HAVE_SYS_TYPES_H +/* Define to `unsigned int' if does not define. */ +#undef u_int32_t -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H +/* Define to `unsigned char' if does not define. */ +#undef u_int8_t -/* Define if you have the header file. */ -#undef HAVE_VALUES_H - -/* Define if you have the i library (-li). */ -#undef HAVE_LIBI - -/* Define if you have the intl library (-lintl). */ -#undef HAVE_LIBINTL - -/* Define if you have the m library (-lm). */ -#undef HAVE_LIBM - -/* Define if you have the GIMP header files and library. */ -#undef HAVE_LIBGIMP_GIMP_H - -/* Define if you have the GIMPfeatures header file. */ -#undef HAVE_LIBGIMP_GIMPFEATURES_H - -/* Define if you have libjpeg. */ -#undef HAVE_LIBJPEG - -#ifndef HAVE_STRNCASECMP - /* OS/2 needs this */ -# define strncasecmp(a, b, c) strnicmp(a, b, c) -#endif - -#if defined (__sun) && defined (__GNUC__) -# define _POSIX_SOURCE -# define __EXTENSIONS__ -#endif - -#endif /* SANE_CONFIG_H */ +/* Define to `unsigned long' if does not define. */ +#undef u_long diff --git a/src/xscanimage.c b/src/xscanimage.c index 3149972..69291fb 100644 --- a/src/xscanimage.c +++ b/src/xscanimage.c @@ -64,10 +64,14 @@ # ifdef HAVE_LIBGIMP_GIMPFEATURES_H # include -# else +# elif !defined(ENABLE_GIMP_1_3) # define GIMP_CHECK_VERSION(major, minor, micro) 0 # endif /* HAVE_LIBGIMP_GIMPFEATURES_H */ +#ifdef ENABLE_GIMP_1_3 +# define GIMP_HAVE_RESOLUTION_INFO +#endif /* ENABLE_GIMP_1_3 */ + # ifdef GIMP_CHECK_VERSION # if GIMP_CHECK_VERSION(1,1,25) /* ok, we have the new gimp interface */ @@ -76,8 +80,10 @@ # include "xscanimage-gimp-1_0-compat.h" # endif # else +# ifndef ENABLE_GIMP_1_3 /* we have the old gimp interface and need the compatibility header file */ -# include "xscanimage-gimp-1_0-compat.h" +# include "xscanimage-gimp-1_0-compat.h" +# endif /* !ENABLE_GIMP_1_3 */ # endif static void query (void); @@ -343,7 +349,11 @@ run (char *name, int nparams, GimpParam * param, int *nreturn_vals, GimpParam ** return_vals) { static GimpParam values[2]; +#ifdef ENABLE_GIMP_1_3 + GimpRunMode run_mode; +#else GimpRunModeType run_mode; +#endif /* ENABLE_GIMP_1_3 */ char devname[1024]; char *args[2]; int nargs; @@ -1848,7 +1858,13 @@ init (int argc, char **argv) #ifdef HAVE_LIBGIMP_GIMP_H gtk_rc_parse (gimp_gtkrc ()); +# ifdef ENABLE_GIMP_1_3 + /* GIMP 1.3 defines gimp_use_xshm() as a macro always returning TRUE + * (in the compat header) */ + gdk_set_use_xshm (TRUE); +# else gdk_set_use_xshm (gimp_use_xshm ()); +# endif /* ENABLE_GIMP_1_3 */ #endif gsg_make_path (sizeof (filename), filename, 0, "sane-style", 0, ".rc"); @@ -2007,17 +2023,17 @@ main (int argc, char **argv) old_print_func = g_set_print_handler (null_print_func); old_printerr_func = g_set_printerr_handler(null_print_func); /* gimp_main () returns 1 if xscanimage wasn't invoked by GIMP */ -#ifdef HAVE_OS2_H +# ifdef HAVE_OS2_H set_gimp_PLUG_IN_INFO(&PLUG_IN_INFO); -#endif +# endif result = gimp_main (argc, argv); - g_set_message_handler (old_print_func); - g_set_error_handler(old_printerr_func); + g_set_print_handler (old_print_func); + g_set_printerr_handler (old_printerr_func); if (result) interface (argc, argv); } #else interface (argc, argv); -#endif +#endif /* HAVE_LIBGIMP_GIMP_H */ return 0; }