]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
fix for a warning when wxUSE_STL == 1
[wxWidgets.git] / configure.in
index 4343dc67c78042340ce4d041a584a4c4f9596423..c8117f3cdb9053062756cf42d65c7dd9609e6b5a 100644 (file)
@@ -330,6 +330,7 @@ dnl usage
 DEBUG_CONFIGURE=0
 if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_UNIVERSAL=no
+  DEFAULT_wxUSE_STL=no
 
   DEFAULT_wxUSE_NANOX=no
 
@@ -504,6 +505,7 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_MONOLITHIC=yes
 else
   DEFAULT_wxUSE_UNIVERSAL=no
+  DEFAULT_wxUSE_STL=no
 
   DEFAULT_wxUSE_NANOX=no
 
@@ -744,6 +746,7 @@ dnl ---------------------------------------------------------------------------
 WX_ARG_ENABLE(shared,      [  --enable-shared         create shared library code], wxUSE_SHARED)
 WX_ARG_ENABLE(optimise,    [  --enable-optimise       create optimised code], wxUSE_OPTIMISE)
 WX_ARG_ENABLE(debug,       [  --enable-debug          same as debug_flag and debug_info], wxUSE_DEBUG)
+WX_ARG_ENABLE(stl,         [  --enable-stl            use STL for containers], wxUSE_STL)
 
 dnl allow the precompiled header option to be disabled under Mac OS X/Darwin
 WX_ARG_ENABLE(precomp,     [  --enable-precomp        enable use of precompiled headers (Mac OS X/Darwin)], wxUSE_PRECOMP)
@@ -992,7 +995,6 @@ if test "x$wxUSE_COCOA" != "x" -a "$wxUSE_COCOA" != "0" ; then
   DEFAULT_wxUSE_FINDREPLDLG=no
   DEFAULT_wxUSE_FONTDLG=no
   DEFAULT_wxUSE_GRID=no
-  DEFAULT_wxUSE_NUMBERDLG=no
   DEFAULT_wxUSE_PROGRESSDLG=no
   DEFAULT_wxUSE_SASH=no
   DEFAULT_wxUSE_SPLITTER=no
@@ -2102,7 +2104,7 @@ if test "$USE_WIN32" = 1 ; then
 
     dnl --- FIXME: This is still a somewhat random list of libs,
     dnl ---        some of them should probably be included conditionally.
-    LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
+    LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
 
     if test "$wxUSE_ACCESSIBILITY" = "yes" ; then
         LIBS="$LIBS -loleacc"
@@ -2111,7 +2113,7 @@ if test "$USE_WIN32" = 1 ; then
     case "${host}" in
         *-*-cygwin* )
             dnl Cygwin doesn't include these by default
-            LIBS="$LIBS -lkernel32 -luser32 -lcomdlg32"
+            LIBS="$LIBS -lkernel32 -luser32"
             TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WIN95__"
     esac
 
@@ -2228,7 +2230,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
                 PKG_CHECK_MODULES(PANGOFT2, pangoft2,
                     [
                         CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
-                        LIBS="$LIBS $PANGOFT2_LIBS"
+                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
                     ],
                     [
                         AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
@@ -2250,7 +2252,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         fi
 
         TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
-        GUI_TK_LIBRARY="$wx_cv_libs_gtk"
+        GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
 
         AFMINSTALL=afminstall
         TOOLKIT=GTK
@@ -2419,7 +2421,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
                 PKG_CHECK_MODULES(PANGOX, pangox,
                     [
                         CXXFLAGS="$CXXFLAGS $PANGOX_CFLAGS"
-                        LIBS="$LIBS $PANGOX_LIBS"
+                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOX_LIBS"
                     ],
                     [
                         AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode])
@@ -2428,7 +2430,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
                 PKG_CHECK_MODULES(PANGOFT2, pangoft2,
                     [
                         CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
-                        LIBS="$LIBS $PANGOFT2_LIBS"
+                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
                     ],
                     [
                         AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
@@ -2438,7 +2440,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
                 PKG_CHECK_MODULES(PANGOXFT, pangoxft,
                     [
                         CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
-                        LIBS="$LIBS $PANGOXFT_LIBS"
+                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
                     ],
                     [
                         AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support])
@@ -3036,70 +3038,11 @@ SHARED=0
 if test "$wxUSE_SHARED" = "yes"; then
     SHARED=1
 
-    dnl install targets
-    if test "$wxUSE_OPENGL" = "yes"; then
-        WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
-        WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1} \$(build_libdir)/${WX_LIBRARY_LINK1_GL}"
-    else
-        WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
-        WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1}"
-    fi
-
-    dnl the extra compiler flags needed for compilation of shared library
-    if test "$GCC" = "yes"; then
-        dnl the switch for gcc is the same under all platforms
-        PIC_FLAG="-fPIC"
-    fi
-
-
     dnl use versioned symbols if available on the platform
     WX_VERSIONED_SYMBOLS([\$(top_builddir)version-script])
 
-    dnl the command to use for creating the shared library
-    SHARED_LD="${CXX} -shared -o"
-
     case "${host}" in
-      *-hp-hpux* )
-        dnl default settings are good for gcc but not for the native HP-UX
-        if test "$GCC" = "yes"; then
-            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"
-
-            SHARED_LD="${CXX} -b -o"
-            PIC_FLAG="+Z"
-        fi
-
-        dnl install shared libs without symlinks
-        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}"
-        fi
-      ;;
-
       *-*-linux* | *-*-gnu* )
-        if test "$GCC" != "yes"; then
-            AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc,
-            [
-                AC_TRY_COMPILE([],
-                    [
-                        #ifndef __INTEL_COMPILER
-                        #error Not icc
-                        #endif
-                    ],
-                    wx_cv_prog_icc=yes,
-                    wx_cv_prog_icc=no
-                )
-            ])
-            if test "$wx_cv_prog_icc" = "yes"; then
-                PIC_FLAG="-KPIC"
-            fi
-        fi
-
         SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib"
       ;;
 
@@ -3141,40 +3084,7 @@ if test "$wxUSE_SHARED" = "yes"; then
         fi
       ;;
 
-      *-*-darwin* )
-        dnl For Unix to MacOS X porting instructions, see:
-        dnl http://fink.sourceforge.net/doc/porting/porting.html
-        TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXMAKINGDLL"
-        CFLAGS="$CFLAGS -fno-common"
-        CXXFLAGS="$CXXFLAGS -fno-common"
-        dnl wxWindows must be fully binded (lazy binding breaks RTTI classinfo)
-        dnl this can be done either with the exe linker flag -Wl,-bind_at_load
-        dnl or with a double stage link in order to create a single module
-        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"
-      ;;
-
-      *-*-aix* )
-        dnl default settings are ok for gcc
-        if test "$GCC" != "yes"; then
-            dnl the abs path below used to be hardcoded here so I guess it must
-            dnl be some sort of standard location under AIX?
-            AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
-                          makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
-
-            SHARED_LD="$(AIX_CXX_LD) -p 0 -o"
-        fi
-      ;;
-
       *-*-cygwin* | *-*-mingw32* )
-        WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a"
-
-        SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o"
-        TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
-
-        PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
-
         dnl Don't build seperate GL library
         WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
         WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
@@ -3183,30 +3093,6 @@ if test "$wxUSE_SHARED" = "yes"; then
             LIBS="${LIBS} ${OPENGL_LIBS}"
         fi
       ;;
-
-      *-*-beos* )
-        dnl can't use gcc under BeOS for shared library creation because it
-        dnl complains about missing 'main'
-        SHARED_LD="${LD} -shared -o"
-      ;;
-
-      *-*-irix* )
-        dnl default settings are ok for gcc
-        if test "$GCC" != "yes"; then
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-      *-*-sunos4* | \
-      *-*-osf* | \
-      *-*-dgux5* | \
-      *-*-sysv5* )
-        dnl defaults are ok
-      ;;
-
-      *)
-        AC_MSG_ERROR(unknown system type $host.)
     esac
 
     dnl set target to shared if not explicitly chose static before
@@ -4265,6 +4151,10 @@ dnl ---------------------------------------------------------------------------
 dnl Register non-GUI class options for makefiles and setup.h
 dnl ---------------------------------------------------------------------------
 
+if test "$wxUSE_STL" = "yes"; then
+  AC_DEFINE(wxUSE_STL)
+fi
+
 if test "$wxUSE_APPLE_IEEE" = "yes"; then
   AC_DEFINE(wxUSE_APPLE_IEEE)
 fi
@@ -5315,7 +5205,7 @@ fi
 
 if test "$wxUSE_HTML" = "yes"; then
     AC_DEFINE(wxUSE_HTML)
-    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html htlbox"
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
 fi
 
 if test "$wxUSE_VALIDATORS" = "yes"; then
@@ -5524,8 +5414,6 @@ fi
 
 if test "$wxUSE_GUI" = "yes"; then
 
-    LIBS="$GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LIBS"
-
     dnl TODO add checks that these samples will really compile (i.e. all the
     dnl      library features they need are present)
 
@@ -5566,11 +5454,17 @@ fi
 EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE"
 
 dnl remove the extra white space from the cc/c++/ld options
-CPPFLAGS=`echo $INCLUDES $CPPFLAGS | sed 's/ \\+/ /g'`
+CPPFLAGS=`echo $WXDEBUG_DEFINE $INCLUDES $CPPFLAGS | sed 's/ \\+/ /g'`
 CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'`
 CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS | sed 's/ \+/ /g'`
-LIBS=`echo $LIBS | sed 's/ \+/ /g'`
+    
 
+LIBS=`echo $LIBS | sed 's/ \+/ /g'`
+EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
+if test "$wxUSE_GUI" = "yes"; then
+    EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK | sed 's/ \+/ /g'`
+fi
+    
 LDFLAGS="$LDFLAGS $PROFILE"
 
 dnl wxGTK does not need TOOLKIT includes in wx-config
@@ -5593,8 +5487,6 @@ AC_SUBST(wxUSE_LIBJPEG)
 AC_SUBST(wxUSE_LIBPNG)
 AC_SUBST(wxUSE_LIBTIFF)
 
-EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
-
 if test $wxUSE_MONOLITHIC = "yes" ; then
     MONOLITHIC=1
 else
@@ -5610,6 +5502,7 @@ AC_SUBST(OFFICIAL_BUILD)
 AC_SUBST(WXUNIV)
 AC_SUBST(MONOLITHIC)
 AC_SUBST(EXTRALIBS)
+AC_SUBST(EXTRALIBS_GUI)
 AC_SUBST(UNICODE)
 AC_SUBST(BUILD)
 AC_SUBST(SHARED)
@@ -5692,6 +5585,8 @@ AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
 AC_SUBST(WXCONFIG_INCLUDE)
 AC_SUBST(WXCONFIG_RPATH)
 AC_SUBST(WX_LARGEFILE_FLAGS)
+AC_SUBST(CODE_GEN_FLAGS)
+AC_SUBST(CODE_GEN_FLAGS_CXX)
 
 dnl the list of files to compile/install
 AC_SUBST(ALL_OBJECTS)