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
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
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 ---------------------------------------------------------------------------