]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Weekly catch-up
[wxWidgets.git] / configure.in
index f5bb406ea65521d2125b82c3eda1b7fd56a23820..c2d697351fbef0187decd83d06f5b47415755015 100644 (file)
@@ -738,7 +738,7 @@ WX_ARG_ENABLE(permissive,    [  --enable-permissive     compile code disregardin
 WX_ARG_ENABLE(no_deps,       [  --enable-no_deps        create code without dependency information], wxUSE_NO_DEPS)
 
 WX_ARG_ENABLE(compat20,      [  --enable-compat20       enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
-WX_ARG_ENABLE(compat22,      [  --disable-compat22      disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
+WX_ARG_ENABLE(compat22,      [  --disable-compat22      disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2, disable)
 
 AC_ARG_ENABLE(rpath,         [  --enable-rpath=DIR      output the rpath flag from wx-config], [wxRPATH_DIR="$enableval"])
 
@@ -1423,6 +1423,13 @@ case "${host}" in
     arm-*-linux* )
         AC_CHECK_SIZEOF(long long, 8)
     ;;
+    *-hp-hpux* )
+        AC_CHECK_SIZEOF(long long, 0)
+        if test "$ac_cv_sizeof_long_long" != "0"; then
+            dnl HPUX 10.20 headers need this define in order to use long long definitions
+            CPPFLAGS="$CPPFLAGS -D_INCLUDE_LONGLONG"
+        fi
+    ;;
     * )
         AC_CHECK_SIZEOF(long long, 0)
 esac
@@ -1469,11 +1476,12 @@ dnl wx/defs.h which defines these constants leading to inconsistent
 dnl sizeof(off_t) in different source files of the same program and linking
 dnl problems
 if test "x$wx_largefile" = "xyes"; then
-    if test "x$ac_cv_sys_file_offset_bits" = "xyes"; then
-        CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
+    if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
+        WX_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
     else
-        CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
+        WX_LARGEFILE_FLAGS="-D_LARGE_FILES"
     fi
+    CPPFLAGS="$CPPFLAGS $WX_LARGEFILE_FLAGS"
 fi
 
 dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
@@ -1908,8 +1916,8 @@ if test "$USE_WIN32" = 1 ; then
 fi
 
 if test "$USE_DARWIN" = 1; then
-    // Mac OS X/Darwin GCC uses precompiled headers by default
-    // this can cause problems both when compiling wxMac and wxBase
+    dnl Mac OS X/Darwin GCC uses precompiled headers by default
+    dnl this can cause problems both when compiling wxMac and wxBase
     if test "$wxUSE_PRECOMP" = "yes"; then
         CPPFLAGS="$CPPFLAGS -cpp-precomp"
     else
@@ -2337,7 +2345,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         for libp in "" " -lXp"; do
             if test "$libs_found" = "0"; then
                 for libsm_ice in " -lSM -lICE"; do
-                    if test "$libs_found" = "0"; then                
+                    if test "$libs_found" = "0"; then
                         save_LIBS="$LIBS"
                         LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
                         save_CFLAGS=$CFLAGS
@@ -2673,7 +2681,8 @@ if test "$wxUSE_SHARED" = "yes"; then
       *-hp-hpux* )
         dnl default settings are good for gcc but not for the native HP-UX
         if test "$GCC" = "yes"; then
-            SHARED_LD="${SHARED_LD} ${PIC_FLAG}"
+            dnl -o flag must be after PIC flag
+            SHARED_LD="${CXX} -shared ${PIC_FLAG} -o"
         else
             dnl no idea why it wants it, but it does
             LDFLAGS="$LDFLAGS -L/usr/lib"
@@ -2999,6 +3008,15 @@ AC_CHECK_FUNCS(vsnprintf)
 if test "$wxUSE_UNICODE" = yes; then
     dnl also look if we have wide char IO functions
     AC_CHECK_FUNCS(fputwc wprintf vswprintf)
+    dnl MinGW has a vswprintf with a different prototype, and
+    dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
+    dnl finds it even if it is not declared in some versions...
+    AC_MSG_CHECKING([for _vsnwprintf])
+    AC_TRY_COMPILE([#include <wchar.h>],
+                   [&_vsnwprintf;],
+                   [AC_MSG_RESULT([yes])
+                    AC_DEFINE(HAVE__VSNWPRINTF)],
+                   [AC_MSG_RESULT([no])]);
 fi
 
 AC_LANG_RESTORE
@@ -3348,6 +3366,9 @@ if test "$TOOLKIT" != "MSW"; then
             *-aix* | *-freebsd*)
                 flag="-D_THREAD_SAFE"
                 ;;
+            *-hp-hpux* )
+                flag="-D_REENTRANT"
+                ;;
             *solaris* | alpha*-osf*)
                 flag="-D_REENTRANT"
                 ;;
@@ -4217,7 +4238,7 @@ fi
 
 if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
 
-dnl     There is now experimental generic MDI support 
+dnl     There is now experimental generic MDI support
 dnl     if test "$wxUSE_UNIVERSAL" = "yes"; then
 dnl         AC_MSG_WARN(MDI not yet supported for wxUniversal... disabled)
 dnl         wxUSE_MDI_ARCHITECTURE=no
@@ -5085,6 +5106,7 @@ AC_SUBST(WXCONFIG_LIBS_STATIC)
 AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
 AC_SUBST(WXCONFIG_INCLUDE)
 AC_SUBST(WXCONFIG_RPATH)
+AC_SUBST(WX_LARGEFILE_FLAGS)
 
 dnl the list of files to compile/install
 AC_SUBST(ALL_OBJECTS)