File: configure.ac

package info (click to toggle)
tachyon 0.99~b6%2Bdsx-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,848 kB
  • sloc: ansic: 16,987; makefile: 737; sh: 275
file content (89 lines) | stat: -rw-r--r-- 2,691 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
dnl                                               -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([tachyon], [0.99b9], [johns@ks.uiuc.edu])
AC_CONFIG_SRCDIR([src/tachyon.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config_tachyon.h])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([no])
AM_MAINTAINER_MODE

dnl Select library variant scheme.
AC_ARG_WITH([libflavour],
[AS_HELP_STRING([--with-libflavour=LIBFLAVOUR],[select as library flavour scheme LIBFLAVOUR [mt]])],
[],[with_libflavour="mt"])
case $with_libflavour in
	serial|mt|openmpi|mpich) ;;
	*) AC_MSG_ERROR([unknown library flavour scheme $with_libflavour])
esac
AM_CONDITIONAL([LIBFLAVOUR_IS_SERIAL],  [test "X$with_libflavour" = "Xserial"])
AM_CONDITIONAL([LIBFLAVOUR_IS_MT],      [test "X$with_libflavour" = "Xmt"])
AM_CONDITIONAL([LIBFLAVOUR_IS_OPENMPI], [test "X$with_libflavour" = "Xopenmpi"])
AM_CONDITIONAL([LIBFLAVOUR_IS_MPICH],   [test "X$with_libflavour" = "Xmpich"])

dnl Checks for system features.
AC_CANONICAL_HOST
case "$host_os" in
	linux*) CPPFLAGS="$CPPFLAGS -DLinux" ;;
	k*bsd-gnu*) CPPFLAGS="$CPPFLAGS -DBsd" ;;
	gnu*) CPPFLAGS="$CPPFLAGS -DGnu" ;;
esac

dnl libtool:
LT_INIT

dnl Check linker script support.
gl_LD_VERSION_SCRIPT

dnl Checks for programs.
AC_PATH_PROG([HELP2MAN],[help2man])
AC_PROG_CC
AC_PROG_CC_C99
PKG_PROG_PKG_CONFIG

dnl Checks for generic compiler characteristics.
AM_COND_IF([LIBFLAVOUR_IS_SERIAL],[],[AC_OPENMP])

dnl Checks for POSIX threads
AM_COND_IF([LIBFLAVOUR_IS_SERIAL],[],[ACX_PTHREAD([],[AC_MSG_ERROR([unable to figure out how to build C programs using POSIX threads])])])

dnl Checks for libraries.
## math library
LT_LIB_M
## JPEG library
AM_PATH_LIBJPEG([62],[CPPFLAGS="$CPPFLAGS -DUSEJPEG"],[AC_MSG_ERROR([unable to find libjpeg])])
## PNG library
PKG_CHECK_MODULES([LIBPNG],[libpng],[CPPFLAGS="$CPPFLAGS -DUSEPNG"],[AC_MSG_ERROR([unable to find libpng])])
## OpenGL
####AC_PATH_X
####AC_PATH_XTRA
AX_CHECK_GL([:],[AC_MSG_ERROR([unable to find an OpenGL implementation])])
X_LIBS="-lX11"
AC_SUBST(X_LIBS)

dnl Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

dnl Append compliler options
AX_APPEND_COMPILE_FLAGS(-D_REENTRANT)
AX_APPEND_COMPILE_FLAGS(-ffast-math)
AX_APPEND_COMPILE_FLAGS(-fomit-frame-pointer)

dnl Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([clock_gettime gethostname gettimeofday isascii memset pow sqrt strcspn strstr])

AC_CONFIG_FILES([
	Makefile
	src/Makefile
	demosrc/Makefile
	])
AC_OUTPUT
dnl