File: configure.ac

package info (click to toggle)
siscone 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,496 kB
  • ctags: 856
  • sloc: sh: 10,842; cpp: 4,708; makefile: 106
file content (66 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download | duplicates (4)
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
AC_INIT([SISCone], [2.0.6])
AC_CONFIG_SRCDIR([siscone/siscone.cpp])
AM_INIT_AUTOMAKE
dnl uncomment the following line if you want to use autoheader
AC_CONFIG_HEADERS(siscone/config.h:config.h.in)
dnl and also uncomment the call to autoheader in autogen.sh

dnl check autoconf version
AC_PREREQ(2.63)

dnl check basic types
AC_CHECK_TYPE(int)
AC_CHECK_TYPE(long)

dnl set default compilation and link flags
dnl those can be changed at configure time so we don't use AM_CXXFLAGS here
test "x${CXXFLAGS+yes}" = xyes || CXXFLAGS="-O3 -Wall -ffast-math"
dnl CXXFLAGS=" -Wall -O3 -ffast-math "

dnl check useful programs
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

dnl check standard C headers
AC_STDC_HEADERS

dnl set the default destination directory
AC_PREFIX_DEFAULT(/usr/local)

dnl if the debug flag is set, build with -g
dnl default is "yes"
AC_ARG_ENABLE(debug, 
	[  --enable-debug      Turn on debug compiler information],
	[ENABLE_DEBUG_FLAG="$enableval"],
	[ENABLE_DEBUG_FLAG="yes"])
if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then
   CXXFLAGS=${CXXFLAGS}" -g "
fi

dnl uncomment the next line not to build the shared lib by default
dnl AM_DISABLE_SHARED

dnl-----------------
dnl check libraries
dnl ----------------

dnl math lib
AC_CHECK_LIB(m, cos)
dnl already included into LIBS by the previous check
dnl AM_LDFLAGS=" -lm "

dnl if the debug flags are on, check if we can also use 
dnl some profiling tools
dnl COMMENTED: Pass LDFLAGS to configure instead
dnl if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then
dnl    AC_CHECK_LIB(profiler, google_initializer_module_profiler)
dnl    AC_CHECK_LIB(pthread, pthread_create)
dnl    AC_CHECK_LIB(tcmalloc, malloc)
dnl fi

dnl enable libtool
AC_PROG_LIBTOOL

AC_OUTPUT( Makefile siscone/Makefile siscone/spherical/Makefile examples/Makefile examples/events/Makefile )