make.sh: Introduce DEFAULT_PARALLELISM
[ipfire-2.x.git] / src / installer / configure.ac
CommitLineData
5315fae6
MT
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
8AC_PREREQ([2.64])
9
10AC_INIT([installer],
11 [001],
12 [],
13 [installer],
14 [http://git.ipfire.org/?p=ipfire-2.x.git;a=summary])
15
16AC_CONFIG_MACRO_DIR([m4])
17AC_CONFIG_HEADERS([config.h])
18AC_CONFIG_AUX_DIR([build-aux])
19
20AM_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])
31AM_SILENT_RULES([yes])
32
33LT_PREREQ(2.2)
34LT_INIT([disable-static])
35
36AC_PROG_SED
37
38AC_PROG_CC
39AC_PROG_CC_C99
40AC_PROG_CC_C_O
41
335c5bd1
MT
42CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
43 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
44 -Werror=overflow \
45 -fno-strict-aliasing \
46 -fstack-protector \
47 -fstack-protector-strong \
48 -fPIE \
49 --param=ssp-buffer-size=4])
50AC_SUBST([OUR_CFLAGS], "$with_cflags")
51
5315fae6
MT
52AC_PATH_PROG([M4], [m4])
53
37f3421a
MT
54# Gettext
55AM_GNU_GETTEXT([external])
56AM_GNU_GETTEXT_VERSION([0.18])
5315fae6
MT
57AC_CHECK_HEADERS([libintl.h])
58
59# This makes sure pkg.m4 is available.
60m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
61
62save_LIBS="$LIBS"
63
64# newt
65LIBS=
66AC_SEARCH_LIBS([newtWinMenu], [newt], [], [AC_MSG_ERROR([*** newt library not found])])
67NEWT_LIBS="$LIBS"
68AC_SUBST(NEWT_LIBS)
69
70LIBS="$save_LIBS"
71
72PKG_CHECK_MODULES(BLKID, [blkid])
73PKG_CHECK_MODULES(PCI, [libpci])
74PKG_CHECK_MODULES(LIBSMOOTH, [libsmooth])
75PKG_CHECK_MODULES(UDEV, [libudev])
76
77AC_ARG_WITH([distro-name],
78 AS_HELP_STRING([--with-distro-name] [The name of the distribution]),
fb76fc51 79 AC_DEFINE_UNQUOTED([DISTRO_NAME], "$withval", [The name of the distribution]),
5315fae6
MT
80 AC_MSG_ERROR([*** you need to set the name with --with-distro-name=]))
81
82AC_ARG_WITH([distro-sname],
83 AS_HELP_STRING([--with-distro-sname] [The short name of the distribution]),
fb76fc51 84 AC_DEFINE_UNQUOTED([DISTRO_SNAME], "$withval", [The sname of the distribution]),
5315fae6
MT
85 AC_MSG_ERROR([*** you need to set the sname with --with-distro-sname=]))
86
fb76fc51
MT
87AC_ARG_WITH([distro-version],
88 AS_HELP_STRING([--with-distro-sname] [The version of the distribution]),
89 AC_DEFINE_UNQUOTED([DISTRO_VERSION], "$withval", [The version of the distribution]),
90 AC_MSG_ERROR([*** you need to set the version with --with-distro-version=]))
91
5315fae6
MT
92AC_ARG_WITH([distro-slogan],
93 AS_HELP_STRING([--with-distro-slogan] [The slogan of the distribution]),
fb76fc51 94 AC_DEFINE_UNQUOTED([DISTRO_SLOGAN], "$withval", [The slogan of the distribution]),
5315fae6
MT
95 AC_MSG_ERROR([*** you need to set the slogan with --with-distro-slogan=]))
96
97AC_ARG_WITH([config-root],
98 AS_HELP_STRING([--with-distro-config-root] [The configuration directory]),
99 AC_DEFINE_UNQUOTED([CONFIG_ROOT], "$withval", [The config-root]),
100 AC_MSG_ERROR([*** you need to set CONFIG_ROOT with --with-config-root=]))
101
c0511f3a
MT
102AC_ARG_WITH([download-url],
103 AS_HELP_STRING([--with-download-url] [The default download URL]),
104 AC_DEFINE_UNQUOTED([DOWNLOAD_URL], "$withval", [The default download URL]),
105 AC_MSG_ERROR([*** you need to set DOWNLOAD_URL with --with-download-url=]))
106
5315fae6
MT
107AC_CONFIG_FILES([
108 Makefile
37f3421a 109 po/Makefile.in
5315fae6
MT
110])
111
112AC_OUTPUT
113AC_MSG_RESULT([
114 $PACKAGE_NAME $VERSION
115
116 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
117 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
118 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
fb76fc51
MT
119
120 Distribution: ${DISTRO_NAME} (${DISTRO_SNAME})
121 Version: ${DISTRO_VERSION}
122 Slogan: ${DISTRO_SLOGAN}
123 Config Root: ${CONFIG_ROOT}
5315fae6 124])