From: Vadim Zeitlin Date: Mon, 7 Feb 2000 17:28:48 +0000 (+0000) Subject: many fixed for configure for Win32 - cross-compiling should work now X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b089607b6329149f3bb56662ddf6b4c18236f1d8?ds=sidebyside many fixed for configure for Win32 - cross-compiling should work now git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index df0cabc64f..2c1b4889f9 100755 --- a/configure +++ b/configure @@ -8208,7 +8208,7 @@ fi ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS)" - if test "$(TOOLKIT)" != "MSW"; then + if test "$TOOLKIT" != "MSW"; then ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" fi @@ -9908,7 +9908,7 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross -if test "$USE_UNIX" = 1; then +if test "$TOOLKIT" != "MSW"; then for ac_func in vfork do @@ -10619,7 +10619,7 @@ rm -f confcache -if test "$USE_UNIX" = 1; then +if test "$TOOLKIT" != "MSW"; then THREADS_LINK="" @@ -11989,14 +11989,16 @@ EOF fi +if test "$TOOLKIT" != "MSW"; then + if test "$wxUSE_SOCKETS" = "yes"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:11995: checking for socket" >&5 +echo "configure:11997: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+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:12025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -12037,7 +12039,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:12041: checking for socket in -lsocket" >&5 +echo "configure:12043: 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 @@ -12045,7 +12047,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:12062: \"$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 @@ -12086,6 +12088,8 @@ fi fi +fi + if test "$wxUSE_SOCKETS" = "yes" ; then ac_ext=C @@ -12096,16 +12100,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:12100: checking the type of the third argument of getsockname" >&5 +echo "configure:12104: checking the type of the third argument of getsockname" >&5 cat > conftest.$ac_ext < int main() { socklen_t len; getsockname(0, 0, &len); ; return 0; } EOF -if { (eval echo configure:12109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SOCKLEN_T socklen_t @@ -12116,14 +12120,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { size_t len; getsockname(0, 0, &len); ; return 0; } EOF -if { (eval echo configure:12127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SOCKLEN_T size_t @@ -12134,14 +12138,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { int len; getsockname(0, 0, &len); ; return 0; } EOF -if { (eval echo configure:12145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SOCKLEN_T int @@ -12178,22 +12182,24 @@ EOF fi +if test "$TOOLKIT" != "MSW"; then + if test "$wxUSE_JOYSTICK" = 1; then for ac_hdr in linux/joystick.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12187: checking for $ac_hdr" >&5 +echo "configure:12193: 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:12197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12203: \"$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* @@ -12219,28 +12225,37 @@ else fi done - if test "$ac_cv_header_linux_joystick_h" = "yes"; then + if test "$ac_cv_header_linux_joystick_h" != "yes"; then + wxUSE_JOYSTICK=0 + echo "configure: warning: Joystick not supported yb this system" 1>&2 + fi +fi + +fi + +if test "$wxUSE_JOYSTICK" = 1; then cat >> confdefs.h <<\EOF #define wxUSE_JOYSTICK 1 EOF SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" - fi fi +if test "$TOOLKIT" != "MSW"; then + HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 if test "$wxUSE_DYNLIB_CLASS" = "yes"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12239: checking for $ac_func" >&5 +echo "configure:12254: 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:12282: \"$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 @@ -12291,7 +12306,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:12295: checking for dlopen in -ldl" >&5 +echo "configure:12310: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12299,7 +12314,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12329: \"$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 @@ -12339,12 +12354,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12343: checking for $ac_func" >&5 +echo "configure:12358: 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:12386: \"$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 @@ -12417,6 +12432,8 @@ done fi fi +fi + if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then cat >> confdefs.h <<\EOF #define wxUSE_DYNLIB_CLASS 1 @@ -12596,17 +12613,17 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12600: checking for $ac_hdr" >&5 +echo "configure:12617: 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:12610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12627: \"$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* @@ -13128,7 +13145,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:13132: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:13149: 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 @@ -13159,7 +13176,7 @@ fi if test "$wxUSE_GUI" = "yes"; then echo $ac_n "checking glcanvas subdirectory to use""... $ac_c" 1>&6 -echo "configure:13163: checking glcanvas subdirectory to use" >&5 +echo "configure:13180: checking glcanvas subdirectory to use" >&5 if eval "test \"`echo '$''{'wx_cv_path_glcanvas'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index af9e9a81d5..2fe6d5492e 100644 --- a/configure.in +++ b/configure.in @@ -1755,7 +1755,7 @@ fi ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS)" dnl ODBC objects are Unix only - if test "$(TOOLKIT)" != "MSW"; then + if test "$TOOLKIT" != "MSW"; then ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" fi @@ -2092,7 +2092,8 @@ AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf, AC_LANG_RESTORE -if test "$USE_UNIX" = 1; then +dnl under MSW we always have Sleep() +if test "$TOOLKIT" != "MSW"; then dnl check for vfork() (even if it's the same as fork() in modern Unices) AC_CHECK_FUNCS(vfork) @@ -2162,7 +2163,7 @@ if test "x$INET_LINK" != "x"; then fi fi -dnl Unix +dnl if !MSW dnl =========================================================================== dnl Now we have all the info we need - use it! @@ -2175,7 +2176,8 @@ dnl --------------------------------------------------------------------------- dnl thread support for Unix (always available under Win32) dnl --------------------------------------------------------------------------- -if test "$USE_UNIX" = 1; then +dnl under MSW we always have thread support +if test "$TOOLKIT" != "MSW"; then dnl the code below: dnl defines THREADS_OBJ which contains the object files to build @@ -2288,7 +2290,7 @@ if test "$wxUSE_THREADS" = "yes" ; then THREADS_LINK="-l$THREADS_LINK" fi -dnl from if USE_UNIX +dnl from if !MSW fi if test "$wxUSE_THREADS" = "yes"; then @@ -2692,6 +2694,9 @@ dnl ------------------------------------------------------------------------ dnl wxSocket dnl ------------------------------------------------------------------------ +dnl under MSW we always have sockets +if test "$TOOLKIT" != "MSW"; then + if test "$wxUSE_SOCKETS" = "yes"; then dnl under Solaris, socket functions live in -lsocket AC_CHECK_FUNC(socket,, @@ -2705,10 +2710,14 @@ if test "$wxUSE_SOCKETS" = "yes"; then ) fi +fi +dnl if !MSW + if test "$wxUSE_SOCKETS" = "yes" ; then AC_LANG_SAVE AC_LANG_CPLUSPLUS dnl determine the type of third argument for getsockname + dnl TODO cache it!! AC_MSG_CHECKING(the type of the third argument of getsockname) AC_TRY_COMPILE( [#include ], @@ -2737,19 +2746,33 @@ dnl --------------------------------------------------------------------------- dnl Joystick support dnl --------------------------------------------------------------------------- +dnl under MSW we always have joystick support +if test "$TOOLKIT" != "MSW"; then + if test "$wxUSE_JOYSTICK" = 1; then dnl joystick support is only for Linux 2.1.x or greater AC_CHECK_HEADERS(linux/joystick.h) - if test "$ac_cv_header_linux_joystick_h" = "yes"; then + if test "$ac_cv_header_linux_joystick_h" != "yes"; then + wxUSE_JOYSTICK=0 + AC_MSG_WARN(Joystick not supported yb this system, disabled) + fi +fi + +fi +dnl if !MSW + +if test "$wxUSE_JOYSTICK" = 1; then AC_DEFINE(wxUSE_JOYSTICK) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" - fi fi dnl ------------------------------------------------------------------------ dnl DLL support dnl ------------------------------------------------------------------------ +dnl under MSW we always have LoadLibrary/GetProcAddress +if test "$TOOLKIT" != "MSW"; then + HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 if test "$wxUSE_DYNLIB_CLASS" = "yes"; then @@ -2789,6 +2812,9 @@ if test "$wxUSE_DYNLIB_CLASS" = "yes"; then fi fi +fi +dnl if !MSW + if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then AC_DEFINE(wxUSE_DYNLIB_CLASS) else