File: configure.ac

package info (click to toggle)
sigma-align 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 620 kB
  • ctags: 99
  • sloc: sh: 3,403; ansic: 1,344; xml: 221; makefile: 56
file content (64 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download
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
AC_INIT(src/main.c)
AM_CONFIG_HEADER(config.h)

PACKAGE=sigma
VERSION=1.1.1
AM_INIT_AUTOMAKE([$PACKAGE], [$VERSION])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL



# Checks for libraries.
AC_CHECK_LIB([m],[main],[],[
	echo "Error: couldn't find libm"
	exit -1
	])

PKG_CHECK_MODULES(DEPS, glib-2.0,[],[
	echo " ** Error: couldn't find libglib-2.0                         **"
	echo " ** Make sure the glib library and headers are installed     **"
	echo " ** If they are in a non-standard location, set the          **"
	echo " ** environment variables CPPFLAGS and LDFLAGS appropriately **"
	exit -1
	])
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_CPPFLAGS)
AC_SUBST(DEPS_LIBS)

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h],[],[
	echo " ** Couldn't find necessary system header                    **"
	exit -1
	])

old_CFLAGS="$CFLAGS"
old_CPPFLAGS="$CPPFLAGS"
#CPPFLAGS=`pkg-config --cflags glib-2.0`
CFLAGS="$DEPS_CFLAGS"
CPPFLAGS="$DEPS_CFLAGS"
AC_CHECK_HEADERS([glib.h],,[
	echo " ** Couldn't find necessary header glib.h                    **"
	echo " ** Make sure the glib library and headers are installed     **"
	echo " ** If they are in a non-standard location, set the          **"
	echo " ** environment variables CPPFLAGS and LDFLAGS appropriately **"
	exit -1
	])
CFLAGS=$old_CFLAGS
CPPFLAGS=$old_CPPFLAGS

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

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([gettimeofday])

AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT