From: Sébastien G. <kx...@us...> - 2004-09-29 22:11:04
|
Update of /cvsroot/vba/VisualBoyAdvance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14484 Modified Files: configure.in configure aclocal.m4 Log Message: Fixed configure for libpng. Index: aclocal.m4 =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** aclocal.m4 12 May 2004 01:07:03 -0000 1.5 --- aclocal.m4 29 Sep 2004 22:10:53 -0000 1.6 *************** *** 1648,1651 **** --- 1648,1709 ---- fi]) + + dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) + dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page + dnl also defines GSTUFF_PKG_ERRORS on error + AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi + ]) + + + # gettext.m4 serial 28 (gettext-0.13) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. *************** *** 4278,4337 **** ]) - - dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) - dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page - dnl also defines GSTUFF_PKG_ERRORS on error - AC_DEFUN(PKG_CHECK_MODULES, [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi - ]) - - - --- 4336,4337 ---- Index: configure =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/configure,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** configure 12 May 2004 01:07:03 -0000 1.25 --- configure 29 Sep 2004 22:10:53 -0000 1.26 *************** *** 310,314 **** #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE YACC LEX LEXLIB LEX_OUTPUT_ROOT CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB NASM CPP EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GETTEXT_PACKAGE PKG_CONFIG GTKMM_CFLAGS GTKMM_LIBS GTKMM_CPPFLAGS VBA_EXTRA VBA_SRC_EXTRA VBA_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' --- 310,314 ---- #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE YACC LEX LEXLIB LEX_OUTPUT_ROOT CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB NASM PKG_CONFIG LIBPNG_CFLAGS LIBPNG_LIBS CPP EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GETTEXT_PACKAGE GTKMM_CFLAGS GTKMM_LIBS GTKMM_CPPFLAGS VBA_EXTRA VBA_SRC_EXTRA VBA_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' *************** *** 3951,4031 **** - echo "$as_me:$LINENO: checking for png_create_write_struct in -lpng" >&5 - echo $ECHO_N "checking for png_create_write_struct in -lpng... $ECHO_C" >&6 - if test "${ac_cv_lib_png_png_create_write_struct+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lpng -lz $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char png_create_write_struct (); - int - main () - { - png_create_write_struct (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_png_png_create_write_struct=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_png_png_create_write_struct=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_write_struct" >&5 - echo "${ECHO_T}$ac_cv_lib_png_png_create_write_struct" >&6 - if test $ac_cv_lib_png_png_create_write_struct = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBPNG 1 - _ACEOF - - LIBS="-lpng $LIBS" - - else - { { echo "$as_me:$LINENO: error: *** Cannot compile without libpng." >&5 - echo "$as_me: error: *** Cannot compile without libpng." >&2;} - { (exit 1); exit 1; }; } - fi - - echo "$as_me:$LINENO: checking for pthread_yield in -lpthread" >&5 echo $ECHO_N "checking for pthread_yield in -lpthread... $ECHO_C" >&6 --- 3951,3954 ---- *************** *** 4101,4104 **** --- 4024,4128 ---- + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG=$ac_cv_path_PKG_CONFIG + + if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + echo "${ECHO_T}$PKG_CONFIG" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for libpng" >&5 + echo $ECHO_N "checking for libpng... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "libpng" ; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking LIBPNG_CFLAGS" >&5 + echo $ECHO_N "checking LIBPNG_CFLAGS... $ECHO_C" >&6 + LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng"` + echo "$as_me:$LINENO: result: $LIBPNG_CFLAGS" >&5 + echo "${ECHO_T}$LIBPNG_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking LIBPNG_LIBS" >&5 + echo $ECHO_N "checking LIBPNG_LIBS... $ECHO_C" >&6 + LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng"` + echo "$as_me:$LINENO: result: $LIBPNG_LIBS" >&5 + echo "${ECHO_T}$LIBPNG_LIBS" >&6 + else + LIBPNG_CFLAGS="" + LIBPNG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng"` + echo $LIBPNG_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { echo "$as_me:$LINENO: error: Library requirements (libpng) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 + echo "$as_me: error: Library requirements (libpng) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi + + CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS" + LIBS="$LIBS $LIBPNG_LIBS" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' *************** *** 4339,4342 **** --- 4363,4367 ---- echo $ECHO_N "checking for X... $ECHO_C" >&6 + ac_path_x_has_been_run=yes # Check whether --with-x or --without-x was given. *************** *** 4431,4435 **** if test "$ac_x_includes" = no; then ! # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF --- 4456,4460 ---- if test "$ac_x_includes" = no; then ! # Guess where to find include files, by looking for a specified header file. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF *************** *** 4565,4570 **** ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" ! echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 ! echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi --- 4590,4599 ---- ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" ! # It might be that x_includes is empty (headers are found in the ! # standard search path. Then output the corresponding message ! ac_out_x_includes=$x_includes ! test "x$x_includes" = x && ac_out_x_includes="in standard search path" ! echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 ! echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 fi *************** *** 8692,8695 **** --- 8721,8727 ---- s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@NASM@,$NASM,;t t + s,@PKG_CONFIG@,$PKG_CONFIG,;t t + s,@LIBPNG_CFLAGS@,$LIBPNG_CFLAGS,;t t + s,@LIBPNG_LIBS@,$LIBPNG_LIBS,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t *************** *** 8710,8714 **** s,@POSUB@,$POSUB,;t t s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t - s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTKMM_CFLAGS@,$GTKMM_CFLAGS,;t t s,@GTKMM_LIBS@,$GTKMM_LIBS,;t t --- 8742,8745 ---- Index: configure.in =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/configure.in,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** configure.in 12 May 2004 01:07:03 -0000 1.24 --- configure.in 29 Sep 2004 22:10:53 -0000 1.25 *************** *** 64,71 **** AC_CHECK_LIB(z, gzopen, , AC_MSG_ERROR([*** Cannot compile without zlib.])) - AC_CHECK_LIB(png, png_create_write_struct, - , AC_MSG_ERROR([*** Cannot compile without libpng.]), [-lz]) AC_CHECK_LIB(pthread, pthread_yield) dnl Checks for header files. AC_PATH_X --- 64,73 ---- AC_CHECK_LIB(z, gzopen, , AC_MSG_ERROR([*** Cannot compile without zlib.])) AC_CHECK_LIB(pthread, pthread_yield) + PKG_CHECK_MODULES(LIBPNG, libpng) + CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS" + LIBS="$LIBS $LIBPNG_LIBS" + dnl Checks for header files. AC_PATH_X |