]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
fix for HP-UX
[wxWidgets.git] / configure.in
index b5519d4ba52ba1e5e8e0c531df3daa1c74d6264d..cf00865f5cfdfed89492d607039c73c6cf1006ac 100644 (file)
@@ -18,7 +18,7 @@ dnl ---------------------------------------------------------------------------
 dnl the file passed to AC_INIT should be specific to our package
 AC_INIT(wx-config.in)
 
-AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
 
 dnl When making releases do:
 dnl
@@ -770,11 +770,15 @@ AC_CACHE_SAVE
 dnl cross-compiling support: we're cross compiling if the build system is
 dnl different from the target one (assume host and target be always the same)
 if eval "test $host != $build"; then
-  if eval "test $build != NONE"; then
-    CC="$build-gcc"
-    CXX="$build-g++"
-    RANLIB="$build-ranlib"
-    NM="$build-nm"
+  if eval "test $host_alias != NONE"; then
+    CC=$host_alias-gcc 
+    CXX=$host_alias-c++ 
+    AR=$host_alias-ar
+    RANLIB=$host_alias-ranlib
+    DLLTOOL=$host_alias-dlltool 
+    LD=$host_alias-ld 
+    NM=$host_alias-nm
+    STRIP=$host_alias-strip
   fi
 fi
 
@@ -884,7 +888,53 @@ dnl DLLs under Win32.
 dnl AC_LIBTOOL_WIN32_DLL
 
 dnl disable static libs by default, this takes too much time...
-AM_DISABLE_STATIC
+dnl libtool doesn't work on anything but Linux and maybe
+dnl ***BSD
+
+case "${host}" in
+  *-hp-hpux* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-linux* )
+    AM_DISABLE_STATIC
+  ;;
+  *-*-irix5* | *-*-irix6* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-solaris2* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-sunos4* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-freebsd* | *-*-netbsd*)
+    AM_DISABLE_STATIC
+  ;;
+  *-*-osf* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-dgux5* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-sysv5* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-aix* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-cygwin32* )
+    AM_DISABLE_STATIC
+  ;;
+  *-*-mingw32* )
+    AM_DISABLE_STATIC
+  ;;
+  *-pc-os2_emx )
+    AM_DISABLE_SHARED
+  ;;
+  *)
+    AC_MSG_ERROR(unknown system type ${host}.)
+esac
+
 AM_PROG_LIBTOOL
 
 dnl ---------------------------------------------------------------------------