diff --git a/Makefile.in b/Makefile.in index 9d4463397..3a3119e7f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -177,6 +177,13 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ + +# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe +# other operating systems (NeXT?) the C preprocessor selected by configure +# checks input tokens for validity - effectively it performs part of the ANSI-C +# parsing - and therefore fails with the .df files. configure.ac has special +# checks for this and sets DFNCPP appropriately. +DFNCPP = @DFNCPP@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -1278,7 +1285,7 @@ pngvalid.o pngtest.o: pnglibconf.h rm -f $@ dfn.c dfn?.out test -d scripts || mkdir scripts echo '#include "$<"' >dfn.c - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\ + $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\ $(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out $(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\ dfn1.out >dfn2.out diff --git a/configure b/configure index 99ffdf026..ccc0de80c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for libpng 1.5.1beta08 +# Generated by GNU Autoconf 2.68 for libpng 1.5.1beta08. # # Report bugs to . # @@ -627,6 +627,7 @@ HAVE_LD_VERSION_SCRIPT_TRUE LIBPNG_DEFINES LIBOBJS POW_LIB +DFNCPP OTOOL64 OTOOL LIPO @@ -2797,6 +2798,12 @@ ac_config_headers="$ac_config_headers config.h" # Checks for programs. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -11809,6 +11816,46 @@ CC="$lt_save_CC" +# On Solaris 10 and 12 CPP gets set to cc -E, however this still +# does some input parsing. We need strict ANSI-C style tokenization, +# check this: + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a C preprocessor that does not parse its input" >&5 +$as_echo_n "checking for a C preprocessor that does not parse its input... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +1.5.0 16BIT +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + DFNCPP="$CPP" +else + DFNCPP="" + sav_CPP="$CPP" + for CPP in "${CC-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp" "cpp"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +1.5.0 16BIT +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + DFNCPP="$CPP" + break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + done + CPP="$sav_CPP" +fi +rm -f conftest.err conftest.i conftest.$ac_ext +if test -n "$DFNCPP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DFNCPP" >&5 +$as_echo "$DFNCPP" >&6; } + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 1 "not found +See \`config.log' for more details" "$LINENO" 5; } +fi + # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } @@ -12365,7 +12412,7 @@ $as_echo_n "checking if libraries can be versioned... " >&6; } # support for version-script, but doesn't actually # DO anything with it. case $host in -*cygwin* | *mingw32* ) +*cygwin* | *mingw32* | *interix* ) have_ld_version_script=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }