File: configure.ac

package info (click to toggle)
iml 1.0.3-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,020 kB
  • ctags: 180
  • sloc: sh: 8,654; ansic: 6,206; makefile: 70
file content (88 lines) | stat: -rw-r--r-- 2,188 bytes parent folder | download | duplicates (3)
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
dnl Autoconf

AC_PREREQ(2.59)
AC_INIT(IML, 1.0.3)
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h:config-h.in)
AC_CONFIG_SRCDIR([src/RNSop.c])
AM_INIT_AUTOMAKE

# Adds special linker flag for icc
case "x$CC" in
      x*icc) LDFLAGS="$LDFLAGS -lm -no_cpprt" 
	     ;;
      *)     LDFLAGS="$LDFLAGS -lm"
	     ;;
esac

# Checks for programs.
AC_PROG_CC

# Checks for libraries.


# Checks for header files.
AC_HEADER_STDC
AC_DISABLE_SHARED
AM_PROG_LIBTOOL

DEFAULT_CFLAGS="-O3 -Wall"
${CFLAGS:=$DEFAULT_CFLAGS}
CFLAGS="-I. ${CFLAGS}"

AC_CHECK_HEADERS([stdlib.h time.h])

AC_CHECK_HEADERS([math.h],, [echo 'error: could not find required header math.h, configuration aborted.'  exit 1])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_REALLOC

AC_CHECK_FUNCS(bzero memset, break)

AC_CHECK_FUNCS(calloc floor)

IML_VERBOSE_MODE
IML_DEFAULT_PATH
IML_CHECK_GMP(,,[AC_MSG_ERROR(
GMP not found! 
GMP version 3.1.1 or greater is required for this library to compile. 
Please make sure GMP is installed and specify the header and libraries 
location with the options --with-gmp-include=<path> and --with-gmp-lib=<path>
respectively when running configure.
)])

IML_CHECK_ATLAS(,,[AC_MSG_ERROR(
ATLAS not found! 
ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
)])

AC_SUBST(LDFLAGS)
AC_SUBST(ac_aux_dir)
	
AC_OUTPUT([
	Makefile
	config/Makefile
	repl/Makefile
	src/Makefile
	doc/Makefile
	examples/Makefile
	tests/Makefile
])		

echo \
"------------------------------------------------------------------------
Configuration:
 
  Source code location:       ${srcdir}
  Compiler:                   ${CC}
  Compiler flags:             ${CFLAGS}
  Linker flags:               ${LDFLAGS}
  Host System Type:           ${host}
  Install path:               ${prefix}
 
  See config.h for further configuration information.
------------------------------------------------------------------------"