From 5039a2df0143cc131c048bcd42fe6daf269fefe5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 7 Sep 2006 22:03:11 +0000 Subject: [PATCH] define wx_cv_func_snprintf_pos_params when cross-compiling too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 28 +++++++++++++++------------- configure.in | 12 +++++++++--- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/configure b/configure index ea611c49f4..0a13ed716f 100755 --- a/configure +++ b/configure @@ -15672,7 +15672,7 @@ cat >>conftest.$ac_ext <<_ACEOF #else "Innotek6" #endif - ); + ); exit(0); } @@ -29220,7 +29220,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -29247,7 +29247,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi @@ -29261,18 +29261,18 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" + LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XrmInitialize () +XtMalloc (0) ; return 0; } @@ -29310,7 +29310,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do - if test -r $ac_dir/libX11.$ac_extension; then + if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi @@ -34967,11 +34967,14 @@ if test "${wx_cv_func_snprintf_pos_params+set}" = set; then else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + + { echo "$as_me:$LINENO: WARNING: Assuming Unix98 printf() is not available, +define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available." >&5 +echo "$as_me: WARNING: Assuming Unix98 printf() is not available, +define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available." >&2;} + wx_cv_func_snprintf_pos_params=no + + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -35011,7 +35014,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) wx_cv_func_snprintf_pos_params=yes - fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi diff --git a/configure.in b/configure.in index 7ac5bdaafe..9edb29e938 100644 --- a/configure.in +++ b/configure.in @@ -1689,11 +1689,11 @@ case "${host}" in #else "Innotek6" #endif - ); + ); exit(0); } ], - wx_cv_gccversion=`cat conftestval`, + wx_cv_gccversion=`cat conftestval`, wx_cv_gccversion="EMX2", dnl Compilation error: Assuming standard EMX environment wx_cv_gccversion="EMX2" @@ -4402,7 +4402,13 @@ if test "$ac_cv_func_snprintf" = "yes"; then } ], wx_cv_func_snprintf_pos_params=no, - wx_cv_func_snprintf_pos_params=yes + wx_cv_func_snprintf_pos_params=yes, + dnl be pessimistic when cross-compiling + [ + AC_MSG_WARN([Assuming Unix98 printf() is not available, +define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.]) + wx_cv_func_snprintf_pos_params=no + ] ) ] ) -- 2.45.2