--- psiconv/trunk/configure 1999/10/27 15:05:03 20 +++ psiconv/trunk/configure 1999/10/27 15:30:34 21 @@ -22,6 +22,10 @@ ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings." +ac_help="$ac_help + --enable-iso-c Try to warn if code is not ISO C " +ac_help="$ac_help --with-imagemagick enable ImageMagick (default = yes)" ac_help="$ac_help --disable-html-docs Disable generation of HTML 3.2 docs (default: on)" @@ -31,10 +35,6 @@ --enable-ascii-docs Enable generation of ASCII docs (default: off)" ac_help="$ac_help --enable-rtf-docs Enable generation of RTF docs (default: off)" -ac_help="$ac_help - --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings." -ac_help="$ac_help - --enable-iso-c Try to warn if code is not ISO C " # Initialize some variables set by options. # The variables have the same names as the options, with @@ -1476,6 +1476,70 @@ exec 5>>./config.log +# Check whether --enable-compile-warnings or --disable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval="$enable_compile_warnings" + : +else + enable_compile_warnings=minimum +fi + + +echo $ac_n "checking what warning flags to pass to the C compiler""... $ac_c" 1>&6 +echo "configure:1490: checking what warning flags to pass to the C compiler" >&5 +warnCFLAGS= +if test "x$GCC" != xyes; then + enable_compile_warnings=no +fi +if test "x$enable_compile_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *\ \ -Wall\ \ *) ;; + *) warnCFLAGS="-Wall -Wunused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_compile_warnings" = "xyes"; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" + fi + fi +fi +echo "$ac_t""$warnCFLAGS" 1>&6 + +# Check whether --enable-iso-c or --disable-iso-c was given. +if test "${enable_iso_c+set}" = set; then + enableval="$enable_iso_c" + : +else + enable_iso_c=no +fi + + +echo $ac_n "checking what language compliance flags to pass to the C compiler""... $ac_c" 1>&6 +echo "configure:1521: checking what language compliance flags to pass to the C compiler" >&5 +complCFLAGS= +if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *\ \ -ansi\ \ *) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + + case " $CFLAGS " in + *\ \ -pedantic\ \ *) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi +fi +echo "$ac_t""$complCFLAGS" 1>&6 +if test "x$cflags_set" != "xyes"; then + CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" + cflags_set=yes + +fi + + # Check whether --with-imagemagick or --without-imagemagick was given. if test "${with_imagemagick+set}" = set; then withval="$with_imagemagick" @@ -1486,7 +1550,7 @@ if test x"$IMAGEMAGICK" != xno ; then echo $ac_n "checking for MagickWarning in -lMagick""... $ac_c" 1>&6 -echo "configure:1490: checking for MagickWarning in -lMagick" >&5 +echo "configure:1554: checking for MagickWarning in -lMagick" >&5 ac_lib_var=`echo Magick'_'MagickWarning | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1494,7 +1558,7 @@ ac_save_LIBS="$LIBS" LIBS="-lMagick $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1573: \"$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 @@ -1542,7 +1606,7 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1546: checking how to run the C preprocessor" >&5 +echo "configure:1610: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1557,13 +1621,13 @@ # 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:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1631: \"$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 : @@ -1574,13 +1638,13 @@ 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:1584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1648: \"$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 : @@ -1591,13 +1655,13 @@ 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:1601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1665: \"$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 : @@ -1622,12 +1686,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1626: checking for ANSI C header files" >&5 +echo "configure:1690: 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 @@ -1635,7 +1699,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1703: \"$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* @@ -1652,7 +1716,7 @@ 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 @@ -1670,7 +1734,7 @@ 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 @@ -1691,7 +1755,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1702,7 +1766,7 @@ exit (0); } EOF -if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1729,17 +1793,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1733: checking for $ac_hdr" >&5 +echo "configure:1797: 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:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1807: \"$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* @@ -1767,12 +1831,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1771: checking for working const" >&5 +echo "configure:1835: 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:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1842,12 +1906,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1846: checking for size_t" >&5 +echo "configure:1910: 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 @@ -1877,7 +1941,7 @@ echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:1881: checking size of char" >&5 +echo "configure:1945: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1885,7 +1949,7 @@ ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < main() @@ -1896,7 +1960,7 @@ exit(0); } EOF -if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -1916,7 +1980,7 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1920: checking size of short" >&5 +echo "configure:1984: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1924,7 +1988,7 @@ ac_cv_sizeof_short=1 else cat > conftest.$ac_ext < main() @@ -1935,7 +1999,7 @@ exit(0); } EOF -if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1955,7 +2019,7 @@ echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1959: checking size of int" >&5 +echo "configure:2023: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1963,7 +2027,7 @@ ac_cv_sizeof_int=2 else cat > conftest.$ac_ext < main() @@ -1974,7 +2038,7 @@ exit(0); } EOF -if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1994,7 +2058,7 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1998: checking size of long" >&5 +echo "configure:2062: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2002,7 +2066,7 @@ ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -2013,7 +2077,7 @@ exit(0); } EOF -if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2034,7 +2098,7 @@ echo $ac_n "checking for an 8 bit integer type""... $ac_c" 1>&6 -echo "configure:2038: checking for an 8 bit integer type" >&5 +echo "configure:2102: checking for an 8 bit integer type" >&5 if test $ac_cv_sizeof_char -ge 1 ; then INT_8_BIT=char echo "$ac_t""char" 1>&6 @@ -2052,7 +2116,7 @@ fi echo $ac_n "checking for a 16 bit integer type""... $ac_c" 1>&6 -echo "configure:2056: checking for a 16 bit integer type" >&5 +echo "configure:2120: checking for a 16 bit integer type" >&5 if test $ac_cv_sizeof_char -ge 2 ; then INT_16_BIT=char echo "$ac_t""char" 1>&6 @@ -2070,7 +2134,7 @@ fi echo $ac_n "checking for a 32 bit integer type""... $ac_c" 1>&6 -echo "configure:2074: checking for a 32 bit integer type" >&5 +echo "configure:2138: checking for a 32 bit integer type" >&5 if test $ac_cv_sizeof_char -ge 4 ; then INT_32_BIT=char echo "$ac_t""char" 1>&6 @@ -2092,12 +2156,12 @@ echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2096: checking for vprintf" >&5 +echo "configure:2160: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+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:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2144,12 +2208,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2148: checking for _doprnt" >&5 +echo "configure:2212: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+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:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2199,12 +2263,12 @@ for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2203: checking for $ac_func" >&5 +echo "configure:2267: 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:2295: \"$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 @@ -2248,18 +2312,20 @@ else echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done -for ac_func in strdup + +for ac_func in getopt_long do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2258: checking for $ac_func" >&5 +echo "configure:2324: 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:2352: \"$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 @@ -2303,7 +2369,7 @@ else echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" +LIBOBJS="$LIBOBJS getopt.o getopt1.o" fi done @@ -2397,68 +2463,6 @@ RTFDOCS_FALSE= fi -# Check whether --enable-compile-warnings or --disable-compile-warnings was given. -if test "${enable_compile_warnings+set}" = set; then - enableval="$enable_compile_warnings" - : -else - enable_compile_warnings=minimum -fi - - -echo $ac_n "checking what warning flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:2411: checking what warning flags to pass to the C compiler" >&5 -warnCFLAGS= -if test "x$GCC" != xyes; then - enable_compile_warnings=no -fi -if test "x$enable_compile_warnings" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *\ \ -Wall\ \ *) ;; - *) warnCFLAGS="-Wall -Wunused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_compile_warnings" = "xyes"; then - warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" - fi - fi -fi -echo "$ac_t""$warnCFLAGS" 1>&6 - -# Check whether --enable-iso-c or --disable-iso-c was given. -if test "${enable_iso_c+set}" = set; then - enableval="$enable_iso_c" - : -else - enable_iso_c=no -fi - - -echo $ac_n "checking what language compliance flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:2442: checking what language compliance flags to pass to the C compiler" >&5 -complCFLAGS= -if test "x$enable_iso_c" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *\ \ -ansi\ \ *) ;; - *) complCFLAGS="$complCFLAGS -ansi" ;; - esac - - case " $CFLAGS " in - *\ \ -pedantic\ \ *) ;; - *) complCFLAGS="$complCFLAGS -pedantic" ;; - esac - fi -fi -echo "$ac_t""$complCFLAGS" 1>&6 -if test "x$cflags_set" != "xyes"; then - CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" - cflags_set=yes - -fi trap '' 1 2 15 cat > confcache <<\EOF @@ -2620,6 +2624,7 @@ s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g +s%@cflags_set@%$cflags_set%g s%@LIB_MAGICK@%$LIB_MAGICK%g s%@CPP@%$CPP%g s%@INT_8_BIT@%$INT_8_BIT%g @@ -2634,7 +2639,6 @@ s%@ASCIIDOCS_FALSE@%$ASCIIDOCS_FALSE%g s%@RTFDOCS_TRUE@%$RTFDOCS_TRUE%g s%@RTFDOCS_FALSE@%$RTFDOCS_FALSE%g -s%@cflags_set@%$cflags_set%g CEOF EOF