]> err.no Git - dpkg/blob - configure.ac
Merge commit 'err.no/master'
[dpkg] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.59)
4 AC_INIT([dpkg], [1.14.17~], [debian-dpkg@lists.debian.org])
5 AC_CONFIG_SRCDIR([lib/dpkg.h])
6 AC_CONFIG_MACRO_DIR([m4])
7 AC_CONFIG_AUX_DIR([config])
8
9 AC_CANONICAL_SYSTEM
10 AC_GNU_SOURCE
11 DPKG_ARCHITECTURE
12
13 AM_INIT_AUTOMAKE([1.8 gnu])
14
15 AM_GNU_GETTEXT_VERSION([0.16.1])
16 AM_GNU_GETTEXT([external])
17
18 # Allow compilation without dselect
19 AC_ARG_WITH(dselect,
20         AS_HELP_STRING([--without-dselect],
21                        [don't build dselect package-management frontend]),
22         [build_dselect=$with_dselect],
23         [build_dselect=yes])
24 AM_CONDITIONAL(WITH_DSELECT, [test "x$build_dselect" = "xyes"])
25
26 # Allow compilation without start-stop-daemon
27 AC_ARG_WITH(start-stop-daemon,
28         AS_HELP_STRING([--without-start-stop-daemon],
29                        [don't build or use start-stop-daemon]),
30         [build_start_stop_daemon=$with_start_stop_daemon],
31         [build_start_stop_daemon=yes])
32 AM_CONDITIONAL(WITH_START_STOP_DAEMON,
33         [test "x$build_start_stop_daemon" = "xyes"])
34 if test "x$build_start_stop_daemon" = "xyes"; then
35    AC_DEFINE(WITH_START_STOP_DAEMON, 1,
36         [Define to 1 if start-stop-daemon is compiled.])
37 else
38    AC_DEFINE(WITH_START_STOP_DAEMON, 0)
39 fi
40
41 # Allow alternate admin directory
42 admindir="${localstatedir}/${PACKAGE_NAME}"
43 AC_ARG_WITH(admindir,
44         AS_HELP_STRING([--with-admindir=DIR],
45                        [dpkg database directory [[LOCALSTATEDIR/dpkg]]]),
46 [case "$with_admindir" in
47       "") AC_MSG_ERROR([invalid admindir specified]) ;;
48       *) admindir="$with_admindir" ;;
49 esac])
50 AC_SUBST(admindir)
51
52
53 # Checks for programs.
54 AC_PROG_CC
55 AC_PROG_CXX
56 AC_PROG_RANLIB
57 DPKG_PROG_PERL
58
59 # Checks for operating system services and capabilities.
60 AC_SYS_LARGEFILE
61
62 # Checks for libraries.
63 DPKG_LIB_ZLIB
64 DPKG_LIB_BZ2
65 DPKG_LIB_SELINUX
66 if test "x$build_dselect" = "xyes"; then
67    DPKG_LIB_CURSES
68 fi
69 if test "x$build_start_stop_daemon" = "xyes"; then
70    DPKG_LIB_SSD
71 fi
72
73 # Checks for header files.
74 AC_HEADER_STDC
75 AC_CHECK_HEADERS([stddef.h error.h locale.h sys/cdefs.h kvm.h])
76 DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
77
78 # Checks for typedefs, structures, and compiler characteristics.
79 AC_C_BIGENDIAN
80 AC_C_CONST
81 AC_C_INLINE
82 AC_C_VOLATILE
83 DPKG_C_C99
84 AC_TYPE_MODE_T
85 AC_TYPE_PID_T
86 AC_TYPE_SIZE_T
87 DPKG_TYPE_PTRDIFF_T
88 AC_CHECK_SIZEOF([unsigned int])
89 AC_CHECK_SIZEOF([unsigned long])
90 DPKG_DECL_SYS_SIGLIST
91 DPKG_C_ATTRIBUTE
92
93 # Checks for library functions.
94 DPKG_FUNC_VA_COPY
95 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free])
96 AC_CHECK_FUNCS([vsnprintf snprintf strtoul strerror strsignal alphasort \
97                 isascii bcopy memcpy scandir unsetenv lchown setsid \
98                 getdtablesize])
99
100 SJR_COMPILER_WARNINGS
101 SJR_COMPILER_OPTIMISATIONS
102 SJR_LINKER_OPTIMISATIONS
103
104 AC_CONFIG_FILES([ Makefile
105                   dpkg-deb/Makefile
106                   dpkg-split/Makefile
107                   dselect/Makefile
108                   dselect/methods/Makefile
109                   dselect/po/Makefile.in
110                   libcompat/Makefile
111                   lib/Makefile
112                   man/Makefile
113                   origins/Makefile
114                   po/Makefile.in
115                   scripts/Makefile
116                   scripts/po/Makefile.in
117                   src/Makefile
118                   utils/Makefile ])
119 AC_CONFIG_HEADERS([config.h])
120 AC_OUTPUT