-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
91 lines (69 loc) · 2.56 KB
/
configure.ac
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
87
88
89
dnl Process this file with autoconf to produce a configure script.
# Require autoconf 2.57 or newer.
AC_PREREQ([2.57])
AC_INIT([oobicpl], [0.4.5], [claude@bic.mni.mcgill.ca])
AC_CONFIG_SRCDIR([src/mniVolume.cc])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
#------------------------------------------------------------------------
# Checks for compiler toolset.
#------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
#------------------------------------------------------------------------
# Look for perl (and make sure it's the right version)
#------------------------------------------------------------------------
AC_PATH_PROGS(PERL, [perl], no)
if test "$PERL" = no; then
AC_MSG_WARN(No perl program found!)
PERL=
dnl else check perl version ....
fi
#------------------------------------------------------------------------
# Check for third-party libraries.
#------------------------------------------------------------------------
smr_WITH_BUILD_PATH
mni_REQUIRE_BICPL
# the regular expression C library
smr_REQUIRED_LIB(pcre, pcre_compile, pcre.h)
# the C++ wrapper for the pcre library
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([for -lpcre++])
LIBS="-lpcre++ $LIBS"
AC_TRY_LINK([#include <pcre++.h>],
[using namespace pcrepp; Pcre EE("[a-z]", "i");],,
[AC_MSG_ERROR(cannot find pcre++ library)])
AC_MSG_RESULT([yes])
AC_LANG_POP
# the arguments library
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([for -larguments])
LIBS="-larguments $LIBS"
AC_TRY_LINK([#include <arguments.h>],
[Arguments cArg("test", "description");],,
[AC_MSG_ERROR(cannot find arguments library)])
AC_MSG_RESULT([yes])
AC_LANG_POP
#------------------------------------------------------------------------
# Check that we have some required header files (and macros in them)
#------------------------------------------------------------------------
AC_HEADER_STDC
AC_CHECK_HEADERS(float.h limits.h malloc.h)
#------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
#------------------------------------------------------------------------
AC_C_INLINE
AC_C_CONST
AC_TYPE_SIZE_T
#AC_CHECK_TYPE(bool,int)
#------------------------------------------------------------------------
# Checks for library functions.
#------------------------------------------------------------------------
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strtod strtol)
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT(epm-header)