--- /tmp/tcptraceroute-1.5beta7/configure.ac 2004-12-28 04:40:54.000000000 +0100 +++ configure.ac 2011-07-05 02:05:06.243200245 +0200 @@ -146,73 +146,24 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([gettimeofday memset select socket strchr]) -# Is this Solaris? -AC_MSG_CHECKING(for Solaris) -AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ -#if defined (__SVR4) && defined (__sun) - exit(0); -#else - exit(-1); -#endif - ]) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?]) - HAVE_SOLARIS=yes - ],[ - AC_MSG_RESULT(no) - ]) - -# Is this BSDI? -AC_MSG_CHECKING(for BSDI) -AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ -#if defined (__bsdi__) - exit(0); -#else - exit(-1); -#endif - ]) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_BSDI], 1, [Is this a BSDI system?]) - HAVE_BSDI=yes - ],[ - AC_MSG_RESULT(no) - ]) - -# Is this NetBSD? -AC_MSG_CHECKING(for NetBSD) -AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ -#if defined (__NetBSD__) - exit(0); -#else - exit(-1); -#endif - ]) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_NETBSD], 1, [Is this a NetBSD system?]) - HAVE_NETBSD=yes - ],[ - AC_MSG_RESULT(no) - ]) - -# Is this MacOS X? -AC_MSG_CHECKING(for MacOS X) -AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ -#if defined (__APPLE__) && defined (__MACH__) - exit(0); -#else - exit(-1); -#endif - ]) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_MACOSX], 1, [Is this a MacOS X system?]) - HAVE_MACOSX=yes - ],[ - AC_MSG_RESULT(no) - ]) +case $host_os in + *-*-solaris*) + AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?]) + HAVE_SOLARIS=yes + ;; + *-*-bsdi*) + AC_DEFINE([HAVE_BSDI], 1, [Is this a BSDI system?]) + HAVE_BSDI=yes + ;; + *-*-netbsd*) + AC_DEFINE([HAVE_NETBSD], 1, [Is this a NetBSD system?]) + HAVE_NETBSD=yes + ;; + *-*-darwin*) + AC_DEFINE([HAVE_MACOSX], 1, [Is this a MacOS X system?]) + HAVE_MACOSX=yes + ;; +esac # Handle --enable-noselect-default AC_ARG_ENABLE(noselect-default,