From 7f7257e80ea6d21180117021077190ada81f36c4 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sun, 23 May 2010 02:11:03 +0200 Subject: [PATCH] [build] Readded canonical host check Checking the canonical host in prevision to implement different data lookup approaches based on the host platform. I did not find a viable way that works on every system: autoconf expects all prefixes to be absolute paths while a windows installer (NSIS in this case) allows to install the project tree wherever the user wants. --- configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/configure.ac b/configure.ac index 1cf086fa..864a76f7 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,45 @@ AM_INIT_AUTOMAKE([1.6 gnits no-dist-gzip dist-bzip2 -Wall]) AC_SUBST([ADG_API_PACKAGE],AC_PACKAGE_TARNAME-adg_api_version) +# Check for host information + +AC_CANONICAL_HOST +case "${host}" in + *-*-linux*) + guessed_host=linux + ;; + *-*-freebsd*) + guessed_host=freebsd + ;; + *-*-mingw*) + guessed_host=mingw + ;; + *-*-solaris*) + guessed_host=solaris + ;; + *-*-darwin*) + guessed_host=darwin + ;; + *-*-beos*) + guessed_host=beos + ;; + *-*-cygwin*) + guessed_host=cygwin + ;; + *-*-minix) + guessed_host=minix + ;; + *-*-aix*) + guessed_host=aix + ;; + *) + guessed_host=unknown + ;; +esac +AM_CONDITIONAL([OS_UNIX],[test "${guessed_host}" != "mingw"]) +AM_CONDITIONAL([OS_WINDOWS],[test "${guessed_host}" == "mingw" -o "${guessed_host}" == "cygwin"]) + + # Check for programs AC_PROG_CC -- 2.11.4.GIT