]> git.ipfire.org Git - ipfire-2.x.git/blob - src/installer/configure.ac
mympd: remove create config start
[ipfire-2.x.git] / src / installer / configure.ac
1 # This file is part of the installer.
2 #
3 # installer is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as published by
5 # the Free Software Foundation; either version 2.1 of the License, or
6 # (at your option) any later version.
7
8 AC_PREREQ([2.64])
9
10 AC_INIT([installer],
11 [001],
12 [],
13 [installer],
14 [http://git.ipfire.org/?p=ipfire-2.x.git;a=summary])
15
16 AC_CONFIG_MACRO_DIR([m4])
17 AC_CONFIG_HEADERS([config.h])
18 AC_CONFIG_AUX_DIR([build-aux])
19
20 AM_INIT_AUTOMAKE([
21 foreign
22 1.11
23 -Wall
24 -Wno-portability
25 silent-rules
26 tar-pax
27 no-dist-gzip
28 dist-xz
29 subdir-objects
30 ])
31 AM_SILENT_RULES([yes])
32
33 LT_PREREQ(2.2)
34 LT_INIT([disable-static])
35
36 AC_PROG_SED
37
38 AC_PROG_CC
39 AC_PROG_CC_C_O
40
41 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
42 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
43 -Werror=overflow \
44 -fno-strict-aliasing \
45 -fstack-protector \
46 -fstack-protector-strong \
47 -fPIE \
48 --param=ssp-buffer-size=4])
49 AC_SUBST([OUR_CFLAGS], "$with_cflags")
50
51 AC_PATH_PROG([M4], [m4])
52
53 # Gettext
54 AM_GNU_GETTEXT([external])
55 AM_GNU_GETTEXT_VERSION([0.18])
56 AC_CHECK_HEADERS([libintl.h])
57
58 # This makes sure pkg.m4 is available.
59 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
60
61 save_LIBS="$LIBS"
62
63 # newt
64 LIBS=
65 AC_SEARCH_LIBS([newtWinMenu], [newt], [], [AC_MSG_ERROR([*** newt library not found])])
66 NEWT_LIBS="$LIBS"
67 AC_SUBST(NEWT_LIBS)
68
69 LIBS="$save_LIBS"
70
71 PKG_CHECK_MODULES(BLKID, [blkid])
72 PKG_CHECK_MODULES(PCI, [libpci])
73 PKG_CHECK_MODULES(LIBSMOOTH, [libsmooth])
74 PKG_CHECK_MODULES(UDEV, [libudev])
75
76 AC_ARG_WITH([distro-name],
77 AS_HELP_STRING([--with-distro-name] [The name of the distribution]),
78 AC_DEFINE_UNQUOTED([DISTRO_NAME], "$withval", [The name of the distribution]),
79 AC_MSG_ERROR([*** you need to set the name with --with-distro-name=]))
80
81 AC_ARG_WITH([distro-sname],
82 AS_HELP_STRING([--with-distro-sname] [The short name of the distribution]),
83 AC_DEFINE_UNQUOTED([DISTRO_SNAME], "$withval", [The sname of the distribution]),
84 AC_MSG_ERROR([*** you need to set the sname with --with-distro-sname=]))
85
86 AC_ARG_WITH([distro-version],
87 AS_HELP_STRING([--with-distro-sname] [The version of the distribution]),
88 AC_DEFINE_UNQUOTED([DISTRO_VERSION], "$withval", [The version of the distribution]),
89 AC_MSG_ERROR([*** you need to set the version with --with-distro-version=]))
90
91 AC_ARG_WITH([distro-slogan],
92 AS_HELP_STRING([--with-distro-slogan] [The slogan of the distribution]),
93 AC_DEFINE_UNQUOTED([DISTRO_SLOGAN], "$withval", [The slogan of the distribution]),
94 AC_MSG_ERROR([*** you need to set the slogan with --with-distro-slogan=]))
95
96 AC_ARG_WITH([config-root],
97 AS_HELP_STRING([--with-distro-config-root] [The configuration directory]),
98 AC_DEFINE_UNQUOTED([CONFIG_ROOT], "$withval", [The config-root]),
99 AC_MSG_ERROR([*** you need to set CONFIG_ROOT with --with-config-root=]))
100
101 AC_ARG_WITH([download-url],
102 AS_HELP_STRING([--with-download-url] [The default download URL]),
103 AC_DEFINE_UNQUOTED([DOWNLOAD_URL], "$withval", [The default download URL]),
104 AC_MSG_ERROR([*** you need to set DOWNLOAD_URL with --with-download-url=]))
105
106 AC_CONFIG_FILES([
107 Makefile
108 po/Makefile.in
109 ])
110
111 AC_OUTPUT
112 AC_MSG_RESULT([
113 $PACKAGE_NAME $VERSION
114
115 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
116 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
117 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
118
119 Distribution: ${DISTRO_NAME} (${DISTRO_SNAME})
120 Version: ${DISTRO_VERSION}
121 Slogan: ${DISTRO_SLOGAN}
122 Config Root: ${CONFIG_ROOT}
123 ])