]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
1. made wxBase compile/link/run again under Unix
[wxWidgets.git] / configure.in
index c2193d6fee428cb2bc1e5c3767d8a7ae926add3f..d71e25eff030e28d63067470e01a0692a0f52626 100644 (file)
@@ -1735,14 +1735,16 @@ WX_ALL=
 WX_ALL_INSTALLED=
 
 if test "$wxUSE_SHARED" = "yes"; then
 WX_ALL_INSTALLED=
 
 if test "$wxUSE_SHARED" = "yes"; then
-    dnl set target to shared
-    WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
-
     case "${host}" in
       *-hp-hpux* )
     case "${host}" in
       *-hp-hpux* )
+        if test "$GCC" = yes ; then
+            SHARED_LD="${CC} -shared -o"
+            PIC_FLAG="-fPIC"
+        else
+            SHARED_LD="${CXX} -b -o"
+            PIC_FLAG="+Z"
+        fi
         WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl"
         WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl"
-        SHARED_LD="${CXX} -b -o"
-        PIC_FLAG="+Z"
         WX_ALL=${WX_LIBRARY_NAME_SHARED}
       ;;
       *-*-linux* )
         WX_ALL=${WX_LIBRARY_NAME_SHARED}
       ;;
       *-*-linux* )
@@ -1822,6 +1824,10 @@ if test "$wxUSE_SHARED" = "yes"; then
         AC_MSG_ERROR(unknown system type ${host}.)
     esac
 
         AC_MSG_ERROR(unknown system type ${host}.)
     esac
 
+    dnl set target to shared if not explicitly chose static before
+    if test "x$WX_TARGET_LIBRARY" = "x"; then
+        WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
+    fi
 else
     dnl set target to static
     WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
 else
     dnl set target to static
     WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
@@ -2126,6 +2132,13 @@ if test "$wxUSE_THREADS" = "yes"; then
   CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
 
   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
   CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
 
   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
+else
+  dnl on some systems, _REENTRANT should bedefined if we want to use any _r()
+  dnl functions - add tests for other functions here as well
+  if test "$ac_cv_func_strtok_r" = "yes"; then
+    CFLAGS="${CFLAGS} -D_REENTRANT"
+    CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+  fi
 fi
 
 if test "$WXGTK12" = 1 ; then
 fi
 
 if test "$WXGTK12" = 1 ; then
@@ -2996,6 +3009,7 @@ AC_OUTPUT([
             samples/resource/Makefile
             samples/sashtest/Makefile
             samples/scroll/Makefile
             samples/resource/Makefile
             samples/sashtest/Makefile
             samples/scroll/Makefile
+            samples/scrollsub/Makefile
             samples/splitter/Makefile
             samples/text/Makefile
             samples/thread/Makefile
             samples/splitter/Makefile
             samples/text/Makefile
             samples/thread/Makefile