| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
|
| 3 |
AC_PREREQ(2.59) |
| 4 |
m4_include([version.m4]) |
| 5 |
AC_INIT(authselect, VERSION_NUMBER) |
| 6 |
|
| 7 |
AC_CONFIG_SRCDIR(src/cli/main.c) |
| 8 |
AC_CONFIG_AUX_DIR(build) |
| 9 |
AC_CONFIG_HEADERS(config.h) |
| 10 |
|
| 11 |
m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], |
| 12 |
[AC_USE_SYSTEM_EXTENSIONS], |
| 13 |
[AC_GNU_SOURCE]) |
| 14 |
|
| 15 |
AM_INIT_AUTOMAKE([foreign subdir-objects]) |
| 16 |
LT_INIT |
| 17 |
|
| 18 |
AC_PROG_CC |
| 19 |
AC_PROG_MKDIR_P |
| 20 |
AC_PROG_LN_S |
| 21 |
AC_PROG_SED |
| 22 |
AC_PATH_PROG(FIND, find, /usr/bin/find) |
| 23 |
AC_PATH_PROG(SHA256SUM, sha256sum, /usr/bin/sha256sum) |
| 24 |
AC_LANG([C]) |
| 25 |
|
| 26 |
AM_GNU_GETTEXT([external]) |
| 27 |
AM_GNU_GETTEXT_VERSION(0.19) |
| 28 |
|
| 29 |
AC_SUBST([RELEASE_NUMBER], m4_esyscmd(./scripts/release-version.sh RELEASE_VERSION)) |
| 30 |
|
| 31 |
AC_CONFIG_MACRO_DIRS([m4]) |
| 32 |
m4_include(src/build_macros.m4) |
| 33 |
m4_include(src/conf_macros.m4) |
| 34 |
m4_include(external/a2x.m4) |
| 35 |
m4_include(external/po4a.m4) |
| 36 |
|
| 37 |
dnl Check if functions are present |
| 38 |
AC_CHECK_FUNCS_ONCE([reallocarray]) |
| 39 |
|
| 40 |
dnl Required libraries |
| 41 |
REQUIRE_POPT |
| 42 |
REQUIRE_CMOCKA |
| 43 |
REQUIRE_SELINUX |
| 44 |
CHECK_BASH_COMPLETION |
| 45 |
|
| 46 |
dnl Optional build dependencies - man pages generation |
| 47 |
CHECK_ASCIIDOC_TOOLS |
| 48 |
CHECK_PO4A |
| 49 |
AM_CONDITIONAL([HAVE_MANPAGES], [test ! -z "$A2X" -a ! -z "$PO4A_TRANSLATE"]) |
| 50 |
|
| 51 |
AC_CONFIG_FILES([Makefile |
| 52 |
po/Makefile.in |
| 53 |
profiles/Makefile |
| 54 |
systemd/Makefile |
| 55 |
rpm/authselect.spec |
| 56 |
src/common/Makefile |
| 57 |
src/cli/Makefile |
| 58 |
src/lib/Makefile |
| 59 |
src/lib/authselect.pc |
| 60 |
src/man/Makefile |
| 61 |
src/tests/Makefile]) |
| 62 |
|
| 63 |
AC_CONFIG_FILES([scripts/manpages-build.sh], |
| 64 |
[chmod +x scripts/manpages-build.sh]) |
| 65 |
AC_CONFIG_FILES([scripts/manpages-install.sh], |
| 66 |
[chmod +x scripts/manpages-install.sh]) |
| 67 |
AC_CONFIG_FILES([scripts/manpages-uninstall.sh], |
| 68 |
[chmod +x scripts/manpages-uninstall.sh]) |
| 69 |
|
| 70 |
AC_OUTPUT |