aboutsummaryrefslogtreecommitdiff
path: root/m4/iem_operatingsystem.m4
blob: 87726e110c499cab343361e89c504ab8f0561bc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
dnl try to figure out the target operating system and set some AM-macros accordingly 
dnl
dnl Copyright (C) 2011 IOhannes m zmölnig


AC_DEFUN([IEM_OPERATING_SYSTEM],
[
AC_CANONICAL_HOST

LINUX=no
ANDROID=no
MACOSX=no
IPHONEOS=no
BSD=no
WINDOWS=no
MINGW=no
CYGWIN=no
HURD=no
IRIX=no

case $host_os in
*linux*)
	 LINUX=yes
  ;;
*darwin*)
	 MACOSX=yes
	;;
GNU/kFreeBSD)
   BSD=yes
	;;
*mingw*)
	WINDOWS=yes
	MINGW=yes
	;;
*cygwin*)
	WINDOWS=yes
	CYGWIN=yes
  ;;
GNU)
	 HURD=yes
  ;;
esac


AM_CONDITIONAL(LINUX, test x$LINUX = xyes)
AM_CONDITIONAL(ANDROID, test x$ANDROID = xyes)
AM_CONDITIONAL(MACOSX, test x$MACOSX = xyes)
AM_CONDITIONAL(IPHONEOS, test x$IPHONEOS = xyes)
AM_CONDITIONAL(BSD, test x$BSD = xyes)
AM_CONDITIONAL(WINDOWS, test x$WINDOWS = xyes)
AM_CONDITIONAL(CYGWIN, test x$MINGW = xyes)
AM_CONDITIONAL(MINGW, test x$MINGW = xyes)
AM_CONDITIONAL(HURD, test x$HURD = xyes)
AM_CONDITIONAL(IRIX, test x$IRIX = xyes)
]) dnl IEM_OPERATING_SYSTEM