]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
removed wxLog::HasPendingMessages() (it can't be made to work correctly with wxLogCha...
[wxWidgets.git] / configure.in
index f4f336340fbb1920bc86f9359da1f966bbb4efa3..c3cff18cd4ecedd92ddcc675bf11bbd6203ef171 100644 (file)
@@ -1697,41 +1697,53 @@ if test "$wxUSE_ZLIB" != "no" ; then
     AC_DEFINE(wxUSE_ZLIB)
 
     if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then
-        dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is known
-        dnl to not work) and although I don't know which is the minimal
-        dnl required version it's safer to test for 1.1.4 as it fixes a
-        dnl security problem in 1.1.3 -- and hopefully nobody has anything
-        dnl more ancient (1.1.3 was released in July 1998) anyow
-        AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h,
-            AC_TRY_RUN(
-                [
-                    dnl zlib.h defines ZLIB_VERSION="x.y.z"
-                    #include <zlib.h>
-                    #include <stdio.h>
-
-                    dnl don't use the brackets as quotes, we need them
-                    changequote(,)
-                    int main()
-                    {
-                        FILE *f=fopen("conftestval", "w");
-                        if (!f) exit(1);
-                        fprintf(f, "%s",
-                                ZLIB_VERSION[0] == '1' &&
-                                (ZLIB_VERSION[2] > '1' ||
-                                (ZLIB_VERSION[2] == '1' &&
-                                 ZLIB_VERSION[4] >= '4')) ? "yes" : "no");
-                        exit(0);
-                    }
-                    changequote([,])
-                ],
-                ac_cv_header_zlib_h=`cat conftestval`,
-                ac_cv_header_zlib_h=no,
-                dnl cross-compiling: test if we have any zlib.h
-                AC_CHECK_HEADER(zlib.h)
+        dnl don't test for zlib under Mac -- its verson there is 1.1.3 but we
+        dnl should still use it because hopefully (can someone confirm this?)
+        dnl Apple did fix the security problem in it and not using the system
+        dnl library results in a whole bunch of warnings when linking with
+        dnl Carbon framework
+        if test "$USE_DARWIN" = 1; then
+            system_zlib_h_ok="yes"
+        else
+            dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is
+            dnl known to not work) and although I don't know which is
+            dnl the minimal required version it's safer to test for 1.1.4 as
+            dnl it fixes a security problem in 1.1.3 -- and hopefully nobody
+            dnl has anything more ancient (1.1.3 was released in July 1998)
+            dnl anyhow
+            AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h,
+                AC_TRY_RUN(
+                    [
+                        dnl zlib.h defines ZLIB_VERSION="x.y.z"
+                        #include <zlib.h>
+                        #include <stdio.h>
+
+                        dnl don't use the brackets as quotes, we need them
+                        changequote(,)
+                        int main()
+                        {
+                            FILE *f=fopen("conftestval", "w");
+                            if (!f) exit(1);
+                            fprintf(f, "%s",
+                                    ZLIB_VERSION[0] == '1' &&
+                                    (ZLIB_VERSION[2] > '1' ||
+                                    (ZLIB_VERSION[2] == '1' &&
+                                     ZLIB_VERSION[4] >= '4')) ? "yes" : "no");
+                            exit(0);
+                        }
+                        changequote([,])
+                    ],
+                    ac_cv_header_zlib_h=`cat conftestval`,
+                    ac_cv_header_zlib_h=no,
+                    dnl cross-compiling: test if we have any zlib.h
+                    AC_CHECK_HEADER(zlib.h)
+                )
             )
-        )
 
-        if test "$ac_cv_header_zlib_h" = "yes"; then
+            system_zlib_h_ok=$ac_cv_header_zlib_h
+        fi
+
+        if test "$system_zlib_h_ok" = "yes"; then
             AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz")
         fi
 
@@ -1809,9 +1821,9 @@ if test "$wxUSE_LIBPNG" != "no" ; then
 
             if test "x$PNG_LINK" = "x" ; then
                 if test "$wxUSE_LIBPNG" = "sys" ; then
-                    AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version])
+                    AC_MSG_ERROR([system png library not found or too old! Use --with-libpng=builtin to use built-in version])
                 else
-                    AC_MSG_WARN([png library not found or too old, will use built-in instead])
+                    AC_MSG_WARN([system png library not found or too old, will use built-in instead])
                     wxUSE_LIBPNG=builtin
                 fi
             else
@@ -2346,7 +2358,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine$mesa_link$xpm_link -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses"
         TOOLKIT=MSW
         GUIDIST=MSW_DIST
-        TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXWINE__"
+        TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WINE__"
     fi
 
     if test "$wxUSE_MOTIF" = 1; then
@@ -2517,9 +2529,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
     fi
 
     if test "$wxUSE_MAC" = 1; then
-        CPPFLAGS="$CPPFLAGS -fpascal-strings -I\${top_srcdir}/src/mac/morefile -I/Developer/Headers/FlatCarbon"
+        CPPFLAGS="$CPPFLAGS -fpascal-strings -I\${top_srcdir}/src/mac/morefilex -I/Developer/Headers/FlatCarbon"
 
-        TOOLKIT_VPATH="\${top_srcdir}/src/mac${PATH_IFS}\${top_srcdir}/src/mac/morefile"
+        TOOLKIT_VPATH="\${top_srcdir}/src/mac${PATH_IFS}\${top_srcdir}/src/mac/morefilex"
         TOOLKIT=MAC
         dnl we can't call this MAC_DIST or autoconf thinks its a macro
         GUIDIST=MACX_DIST
@@ -2529,10 +2541,10 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         TOOLKIT=PM
         GUIDIST=GTK_DIST
         AC_MSG_WARN([OS/2 PM requires old resource format, re-enabled])
-       wxUSE_PROLOGIO="yes"
-       wxUSE_RESOURCES="yes"
+        wxUSE_PROLOGIO="yes"
+        wxUSE_RESOURCES="yes"
         AC_MSG_WARN([OS/2 threads are not yet supported... disabled])
-       wxUSE_THREADS="no"
+        wxUSE_THREADS="no"
     fi
 
     dnl the name of the directory where the files for this toolkit live
@@ -2755,12 +2767,24 @@ case "${host}" in
         ;;
 
     *-*-darwin* )
+        dnl Under Mac OS X, the naming conventions for shared libraries
+        dnl are different: the number precedes the suffix.
+        
+        WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}"
+        WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}"
+
+        WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${WX_CURRENT}.${SO_SUFFIX}"
+        WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}"
+        WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${SO_SUFFIX}"
+        WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}"
+
         dnl Under Mac OS X, we should build real frameworks instead of simple
         dnl dynamic shared libraries (in order to embed the resources)
         if test "$wxUSE_MAC" = 1; then
-            dnl the name of the resources file for wxMac
-            WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
-            WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc"
+            dnl base name of the resource file for wxMac must be the same
+            dnl as library installation base name (-install_name)
+            WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.${WX_CURRENT}.r"
+            WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.${WX_CURRENT}.rsrc"
         fi
         ;;
 esac
@@ -2891,8 +2915,11 @@ if test "$wxUSE_SHARED" = "yes"; then
         dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved
         SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o"
         PIC_FLAG="-dynamic -fPIC"
-        SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
-        SONAME_FLAGS_GL=${SONAME_FLAGS}
+        dnl library installation base name and wxMac resources file base name
+        dnl must be identical in order for the resource file to be found at
+        dnl run time in src/mac/app.cpp
+        SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1}"
+        SONAME_FLAGS_GL="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1_GL}"
       ;;
 
       *-*-aix* )
@@ -2915,12 +2942,12 @@ if test "$wxUSE_SHARED" = "yes"; then
 
         PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
 
-        dnl install shared libs without symlinks
+        dnl Don't build seperate GL library
+        WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
+        WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+
         if test "$wxUSE_OPENGL" = "yes"; then
-            WX_ALL_INSTALLED="preinstall_gl"
-            WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}"
-        else
-            WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
+            LIBS="${LIBS} ${OPENGL_LIBS}"
         fi
       ;;
 
@@ -5460,6 +5487,10 @@ echo "  Should wxWindows be compiled in debug mode?             ${wxUSE_DEBUG:-n
 echo "  Should wxWindows be linked as a shared library?         ${wxUSE_SHARED:-no}"
 echo "  Should wxWindows be compiled in Unicode mode?           ${wxUSE_UNICODE:-no}"
 
+echo "  What level of wxWindows compatibility should be enabled?"
+echo "                                       wxWindows 2.0      ${WXWIN_COMPATIBILITY_2:-no}"
+echo "                                       wxWindows 2.2      ${WXWIN_COMPATIBILITY_2_2:-yes}"
+
 echo "  Which libraries should wxWindows use?"
 echo "                                       jpeg               ${wxUSE_LIBJPEG-none}"
 echo "                                       png                ${wxUSE_LIBPNG-none}"