1
# $Id: os.m4,v 1.1 2007/10/27 11:28:08 aquamaniac Exp $
2
# (c) 2002 Martin Preuss<martin@libchipcard.de>
3
# These functions guess your operation system
5
AC_DEFUN([AQ_CHECK_OS],[
7
dnl - AC_CANONICAL_SYSTEM muste be called before
10
dnl OSYSTEM: Short name of your system (subst)
11
dnl OS_TYPE: either "posix" or "windows" (subst)
12
dnl MAKE_DLL_TARGET: under windows this is set to "dll" (subst)
13
dnl INSTALL_DLL_TARGET: under Windows this is set to "dll-install" (subst)
15
dnl OS_NAME: full name of your system
16
dnl OS_SHORTNAME: short name of your system
17
dnl Depending on your system one of the following is defined in addition:
18
dnl OS_LINUX, OS_OPENBSD, OS_FREEBSD, OS_BEOS, OS_WIN32
21
AC_MSG_CHECKING([host system type])
26
AC_DEFINE_UNQUOTED(OS_NAME,"$host", [host system])
30
AC_DEFINE(OS_LINUX,1,[if linux is used])
31
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
36
AC_DEFINE(OS_SOLARIS,1,[if Solaris is used])
37
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
42
AC_DEFINE(OS_DARWIN,1,[if Apple Darwin is used])
43
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
48
AC_DEFINE(OS_OPENBSD,1,[if OpenBSD is used])
49
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
54
AC_DEFINE(OS_FREEBSD,1,[if FreeBSD is used])
55
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
60
AC_DEFINE(OS_NETBSD,1,[if NetBSD is used])
61
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
66
AC_DEFINE(OS_BEOS,1,[if BeOS is used])
67
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
72
AC_DEFINE(OS_WIN32,1,[if WIN32 is used])
74
AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built])
76
INSTALL_DLL_TARGET="dll-install"
80
AC_DEFINE(OS_WIN32,1,[if WIN32 is used])
82
AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built])
84
INSTALL_DLL_TARGET="dll-install"
88
AC_DEFINE(OS_PALMOS,1,[if PalmOS is used])
92
AC_MSG_WARN([Sorry, but host $host is not supported.
93
Please report if it works anyway. We will assume that your system
94
is a posix system and continue.])
97
AC_DEFINE(OS_POSIX,1,[if this is a POSIX system])
102
AC_DEFINE_UNQUOTED(OS_SHORTNAME,"$OSYSTEM",[host system])
104
AC_DEFINE_UNQUOTED(OS_TYPE,"$OS_TYPE",[system type])
105
AC_SUBST(MAKE_DLL_TARGET)
106
AC_SUBST(INSTALL_DLL_TARGET)
108
AC_MSG_RESULT($OS_TYPE)