-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
70 lines (56 loc) · 1.46 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([Sprut], 0.97, [vmakarov@gcc.gnu.org])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([anal.c])
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memset strerror])
AC_PROG_YACC
AC_TYPE_SIGNAL
AC_CONFIG_FILES([Makefile])
AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging],
[case "${enableval}" in
yes) cocom_debug=true ;;
no) cocom_debug= ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[cocom_debug=])
if test x$cocom_debug = x; then
c_debug_define=-DNDEBUG
else
my_save_cflags="$CFLAGS"
CFLAGS=-g3
AC_MSG_CHECKING([whether CC supports -g3])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[g3=yes],
[AC_MSG_RESULT([no])]
)
CFLAGS="$my_save_cflags"
if test "$g3" = yes; then
CFLAGS='-O0 -g3'
CXXFLAGS='-O0 -g3'
else
CFLAGS='-O0 -g'
CXXFLAGS='-O0 -g'
fi
c_debug_define=
fi
CFLAGS="$CFLAGS $c_debug_define"
CXXFLAGS="$CXXFLAGS $c_debug_define"
AC_OUTPUT