Debian Codegraph @

configure.ac

raw
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.63])
5 AC_INIT([idutils], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
6 [[email protected]])
7
8 AC_CONFIG_AUX_DIR(build-aux)
9 AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz color-tests parallel-tests
10 std-options])
11 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
12
13 AC_CONFIG_SRCDIR([src/mkid.c])
14 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
15
16 # Checks for programs.
17 AM_MISSING_PROG(HELP2MAN, help2man)
18 AC_PROG_CC_STDC
19 AM_PROG_CC_C_O
20 AC_PROG_LN_S
21 gl_EARLY
22 gl_INIT
23
24 AC_ARG_ENABLE([gcc-warnings],
25 [AS_HELP_STRING([--enable-gcc-warnings],
26 [turn on lots of GCC warnings (for developers)])],
27 [case $enableval in
28 yes|no) ;;
29 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
30 esac
31 gl_gcc_warnings=$enableval],
32 [if test -d "$srcdir"/.git; then
33 gl_gcc_warnings=yes
34 else
35 gl_gcc_warnings=no
36 fi]
37 )
38
39 if test "$gl_gcc_warnings" = yes; then
40 gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
41 AC_SUBST([WERROR_CFLAGS])
42
43 # Add many warnings, except some...
44 nw=
45 nw="$nw -Wduplicated-branches" # Too many false alarms
46 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
47 nw="$nw -Wvla" # warnings in gettext.h
48 nw="$nw -Winline"
49 # things I might fix soon:
50
51 gl_MANYWARN_ALL_GCC([ws])
52 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
53 for w in $ws; do
54 gl_WARN_ADD([$w])
55 done
56 gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
57 gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
58 gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now
59 gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
60
61 AC_SUBST([WARN_CFLAGS])
62
63 AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
64 AC_DEFINE([_FORTIFY_SOURCE], [2],
65 [enable compile-time and run-time bounds-checking, and some warnings])
66 AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
67 fi
68
69 AC_PROG_INSTALL
70 AC_PROG_RANLIB
71
72 # check functions
73
74 # if HAVE_LINK, then in the code we look for file aliases
75 # if HAVE_SBRK, then we can generate statistics on memory usage
76
77 AC_CHECK_FUNCS([link sbrk lstat])
78
79 AM_PATH_LISPDIR
80
81 # Checks for header files.
82
83 AC_CHECK_HEADERS([termios.h sys/ioctl.h termio.h sgtty.h])
84
85 # Checks for typedefs, structures, and compiler characteristics.
86 AC_C_CONST
87 AC_C_INLINE
88 AC_TYPE_OFF_T
89 AC_TYPE_SIZE_T
90 AC_CHECK_TYPES(ptrdiff_t)
91
92 AM_GNU_GETTEXT([external], [need-ngettext])
93 AM_GNU_GETTEXT_VERSION([0.18])
94
95 AC_CONFIG_FILES([
96 po/Makefile.in
97 doc/Makefile
98 man/Makefile
99 lib/Makefile
100 libidu/Makefile
101 lisp/Makefile
102 testsuite/Makefile
103 gnulib-tests/Makefile
104 src/Makefile
105 Makefile
106 ])
107 AC_OUTPUT