diff options
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 5575705..4626e46 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,6 @@ AC_CONFIG_SRCDIR(syshead.h) dnl Guess host type. AC_CANONICAL_HOST -AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(openvpn, [$PACKAGE_VERSION]) AC_ARG_WITH(cygwin-native, @@ -48,7 +47,7 @@ case "${host}" in WIN32="yes" cross_compiling="yes" ;; - *-cygwin*) + *-*-cygwin*) AC_MSG_CHECKING([cygwin mode to use]) if test "${CYGWIN_NATIVE}" = "yes"; then AC_MSG_RESULT([Using native win32]) @@ -275,38 +274,38 @@ AC_ARG_WITH(mem-check, dnl fix search path, to allow compilers to find syshead.h CPPFLAGS="$CPPFLAGS -I${srcdir}" -dnl check target OS -openvpn_target=$target -if test $target_alias; then - openvpn_target=$target_alias +dnl check host OS +openvpn_host=$host +if test $host_alias; then + openvpn_host=$host_alias fi -AC_DEFINE_UNQUOTED(TARGET_ALIAS, "$openvpn_target", [A string representing our target]) -case "$target" in -*linux*) +AC_DEFINE_UNQUOTED(TARGET_ALIAS, "$openvpn_host", [A string representing our host]) +case "$host" in +*-*-linux*) AC_DEFINE(TARGET_LINUX, 1, [Are we running on Linux?]) dnl RH9 SSL headers workaround if test -z $CS_HDR_DIR && test "$CRYPTO" = "yes"; then CPPFLAGS="$CPPFLAGS $(pkg-config --cflags openssl 2>/dev/null)" fi ;; -*solaris*) +*-*-solaris*) AC_DEFINE(TARGET_SOLARIS, 1, [Are we running on Solaris?]) ;; -*openbsd*) +*-*-openbsd*) AC_DEFINE(TARGET_OPENBSD, 1, [Are we running on OpenBSD?]) ;; -*freebsd*) +*-*-freebsd*) AC_DEFINE(TARGET_FREEBSD, 1, [Are we running on FreeBSD?]) ;; -*netbsd*) +*-*-netbsd*) AC_DEFINE(TARGET_NETBSD, 1, [Are we running NetBSD?]) ;; -*darwin*) +*-*-darwin*) dnl some Mac OS X tendering (we use vararg macros...) AC_DEFINE(TARGET_DARWIN, 1, [Are we running on Mac OS X?]) CPPFLAGS="$CPPFLAGS -no-cpp-precomp" ;; -*mingw*) +*-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running WIN32?]) OPENVPN_ADD_LIBS(-lgdi32) OPENVPN_ADD_LIBS(-lws2_32) @@ -315,7 +314,7 @@ case "$target" in OPENVPN_ADD_LIBS(-liphlpapi) OPENVPN_ADD_LIBS(-lwinmm) ;; -*dragonfly*) +*-*-dragonfly*) AC_DEFINE(TARGET_DRAGONFLY, 1, [Are we running on DragonFlyBSD?]) ;; @@ -574,7 +573,7 @@ if test "$PTHREAD" = "yes"; then AC_MSG_RESULT([********* WARNING: pthread support is experimental for OpenVPN 2.0]) ACX_PTHREAD( [ - case "$target" in + case "$host" in *openbsd*) AC_MSG_RESULT([WARNING: pthread support on OpenBSD is unstable!]) CFLAGS="$CFLAGS -pthread" |