-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.in
66 lines (54 loc) · 1.67 KB
/
configure.in
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([hexinspector], [0.8.3])
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([0.8.3 no-define foreign])
AC_HEADER_STDC
AC_PROG_CC
dnl Do we want debug?
AC_MSG_CHECKING(whether debug is emitted)
AC_ARG_ENABLE(debug, [ --enable-debug switch on verbose debug],
if test "$enableval" = yes; then
debug=yes;
else
debug=no;
fi,
debug=no)
if test "$debug" = yes; then
AC_DEFINE([HAVE_DEBUG], 1, [Defined if debug is wanted])
fi
AC_MSG_RESULT($debug)
dnl Do we want lots of warning messages?
AC_MSG_CHECKING(whether lots of warnings requested)
AC_ARG_ENABLE(warnings,
[ --enable-warnings give lots of warnings if using gcc],
if test "$enableval" = yes; then
warnings=yes;
else
warnings=no;
fi,
warnings=no)
AC_MSG_RESULT($warnings)
dnl If it appears we're using gcc as our compiler, turn on warnings
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall"
dnl And possibly lots of warnings
if test "$warnings" = yes; then
CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -W -Wsign-compare"
fi
fi
AM_PATH_GLIB_2_0(2.0.0, has_glib=yes, has_glib=no, gthread )
if test "has_glib" = no; then
AC_MSG_ERROR(No GLIB)
fi
AC_CHECK_LIB(ncurses,initscr,[NCURSES_LIBS="-lncurses"])
AC_SUBST([NCURSES_LIBS])
PKG_CHECK_MODULES([PCRE], [libpcre >= 0.20], has_pcre=yes, has_pcre=no)
AC_SUBST([PCRE_CFLAGS])
AC_SUBST([PCRE_LIBS])
AC_PROG_RANLIB
if test "$has_pcre" = no; then
AC_MSG_WARN(Disabling search)
CFLAGS="$CFLAGS -DNO_PCRE"
fi
AC_OUTPUT([Makefile
src/Makefile
])