-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.ac
More file actions
86 lines (69 loc) · 3.42 KB
/
configure.ac
File metadata and controls
86 lines (69 loc) · 3.42 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Process this file with autoconf to produce a configure script.
#########################
# Initializations #
#########################
m4_define([libbsctools_major], [1])
m4_define([libbsctools_minor], [0])
m4_define([libbsctools_micro], [6])
m4_define([libbsctools_version], [libbsctools_major.libbsctools_minor.libbsctools_micro])
# Initialize autoconf & define package name, version and bug-report address
AC_INIT(libbsctools, [libbsctools_version], tools@bsc.es)
AC_CONFIG_AUX_DIR([.])
# Safety check to ensure that the directory told with `--srcdir` contains the source code
#AC_CONFIG_SRCDIR(src/mpitrace.c)
# Loads some shell variables like host_cpu and host_os, to get the host information
AC_CANONICAL_SYSTEM
# Write defines in the output header file for the architecture and operating system
case "${target_cpu}" in
i*86|x86_64|amd64)
Architecture="ia32"
AC_DEFINE([ARCH_IA32], [1], [Define if architecture is IA32])
if test "${target_cpu}" = "amd64" -o "${target_cpu}" = "x86_64" ; then
AC_DEFINE([ARCH_IA32_x64], [1], [Define if architecture is IA32 (with 64bit extensions)])
fi
;;
powerpc* ) Architecture="powerpc"
AC_DEFINE([ARCH_PPC], [1], [Define if architecture is PPC]) ;;
ia64 ) Architecture="ia64"
AC_DEFINE([ARCH_IA64], [1], [Define if architecture is IA64]) ;;
alpha* ) Architecture="alpha"
AC_DEFINE([ARCH_ALPHA], [1], [Define if architecture is ALPHA]) ;;
mips ) Architecture="mips"
AC_DEFINE([ARCH_MIPS], [1], [Define if architecture is MIPS]) ;;
esac
case "${target_os}" in
linux* ) OperatingSystem="linux"
AC_DEFINE([OS_LINUX], [1], [Define if operating system is Linux]) ;;
aix* ) OperatingSystem="aix"
AC_DEFINE([OS_AIX], [1], [Define if operating system is AIX]) ;;
osf* ) OperatingSystem="dec"
AC_DEFINE([OS_DEC], [1], [Define if operating system is DEC]) ;;
irix* ) OperatingSystem="irix"
AC_DEFINE([OS_IRIX], [1], [Define if operating system is IRIX]) ;;
freebsd* ) OperatingSystem="freebsd"
AC_DEFINE([OS_FREEBSD], [1], [Define if operating system is FreeBSD]) ;;
solaris* ) OperatingSystem="solaris"
AC_DEFINE([OS_SOLARIS], [1], [Define if operating system is Solaris]) ;;
esac
# Publish these defines for conditional compilation
AM_CONDITIONAL(ARCH_IA32, test "${Architecture}" = "ia32" )
AM_CONDITIONAL(ARCH_POWERPC, test "${Architecture}" = "powerpc" )
AM_CONDITIONAL(ARCH_IA64, test "${Architecture}" = "ia64" )
AM_CONDITIONAL(ARCH_ALPHA, test "${Architecture}" = "alpha" )
AM_CONDITIONAL(ARCH_MIPS, test "${Architecture}" = "mips" )
AM_CONDITIONAL(OS_LINUX, test "${OperatingSystem}" = "linux" )
AM_CONDITIONAL(OS_AIX, test "${OperatingSystem}" = "aix" )
AM_CONDITIONAL(OS_DEC, test "${OperatingSystem}" = "dec" )
AM_CONDITIONAL(OS_IRIX, test "${OperatingSystem}" = "irix" )
AM_CONDITIONAL(OS_FREEBSD, test "${OperatingSystem}" = "freebsd" )
AM_CONDITIONAL(OS_SOLARIS, test "${OperatingSystem}" = "solaris" )
# Initialize automake
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(libtools-config.h)
#########################################
# Checks for user defined options #
#########################################
AC_CONFIG_FILES([Makefile])
AC_CONFIG_SUBDIRS(pcfparser)
AC_CONFIG_SUBDIRS(prvparser)
AC_OUTPUT