autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configure is not checking everything


From: Benoit SIGOURE
Subject: Re: configure is not checking everything
Date: Thu, 6 Sep 2007 23:40:06 +0200

On Sep 6, 2007, at 10:27 PM, Adam PAPAI wrote:

Dear list,


The question has already been answered but I'd like to point out that

case "$host" in
  *-linux*)
AC_DEFINE(PLATFORM_LINUX, 1, [Define if you are compiling for Linux])
    ;;
  *-hpux*)
AC_DEFINE(PLATFORM_HPUX, 1, [Define if you are compiling for HP/ UX])
    ;;
  *-solaris*)
AC_DEFINE(PLATFORM_SOLARIS, 1, [Define if you are compiling for Solaris])
    ;;
  *-freebsd*)
    AC_DEFINE(PLATFORM_BSD, 1, [Define if you are compiling for *BSD])
    ;;
  *-bsdi*)
    AC_DEFINE(PLATFORM_BSD, 1, [Define if you are compiling for *BSD])
    ;;
  *-netbsd*)
    AC_DEFINE(PLATFORM_BSD, 1, [Define if you are compiling for *BSD])
    ;;
  *-openbsd*)
    AC_DEFINE(PLATFORM_BSD, 1, [Define if you are compiling for *BSD])
    ;;
  *)
AC_DEFINE(PLATFORM_UNKNOWN, 1, [Define if you are compiling for an unknown system])
    ;;
esac

can be simplified as

case "$host" in
  *-linux*)
AC_DEFINE(PLATFORM_LINUX, 1, [Define if you are compiling for Linux])
    ;;
  *-hpux*)
AC_DEFINE(PLATFORM_HPUX, 1, [Define if you are compiling for HP/ UX])
    ;;
  *-solaris*)
AC_DEFINE(PLATFORM_SOLARIS, 1, [Define if you are compiling for Solaris])
    ;;
  *-freebsd* | *-bsdi* | *-netbsd* | *-openbsd*)
    AC_DEFINE(PLATFORM_BSD, 1, [Define if you are compiling for *BSD])
    ;;
  *)
AC_DEFINE(PLATFORM_UNKNOWN, 1, [Define if you are compiling for an unknown system])
    ;;
esac

but you're also missing other flavors of BSD (I think DragonFly BSD is also quite popular), I'd be tempted to throw a *-*bsd*) in there :D Actually when I end up doing this, I usually check the config.guess / config.sub files installed by automake.

Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]