2
dnl m4 preprocessor script for autotools
4
dnl Copyright (c) 2011, 2012, 2013, 2014 pkgconf authors (see AUTHORS).
6
dnl Permission to use, copy, modify, and/or distribute this software for any
7
dnl purpose with or without fee is hereby granted, provided that the above
8
dnl copyright notice and this permission notice appear in all copies.
10
dnl This software is provided 'as is' and without any warranty, express or
11
dnl implied. In no event shall the authors be liable for any damages arising
12
dnl from the use of this software.
15
AC_INIT([pkgconf], [1.8.1], [https://github.com/pkgconf/pkgconf/issues/new])
16
AC_CONFIG_SRCDIR([cli/main.c])
17
AC_CONFIG_MACRO_DIR([m4])
18
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
19
AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
20
AX_CHECK_COMPILE_FLAG([-Wformat=2], [CFLAGS="$CFLAGS -Wformat=2"])
21
AX_CHECK_COMPILE_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [
22
AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"])
24
AC_CONFIG_HEADERS([libpkgconf/config.h])
25
AC_CHECK_FUNCS([strlcpy strlcat strndup])
26
AC_CHECK_HEADERS([sys/stat.h])
27
AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
28
AM_SILENT_RULES([yes])
33
AC_ARG_WITH([personality-dir],[AC_HELP_STRING([--with-personality-dir],[specify
34
the place where cross-compile personality files will be found])],
35
PERSONALITY_PATH="$withval",
36
PERSONALITY_PATH="${datadir}/pkgconfig/personality.d:${sysconfdir}/pkgconfig/personality.d")
38
AC_SUBST([PERSONALITY_PATH])
40
AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify
41
the place where pc files will be found])],PKG_DEFAULT_PATH="$withval",
42
PKG_DEFAULT_PATH="${libdir}/pkgconfig:${datadir}/pkgconfig")
44
AC_SUBST([PKG_DEFAULT_PATH])
46
AC_ARG_WITH([system-libdir],[AC_HELP_STRING([--with-system-libdir],[specify the
47
system library directory (default LIBDIR)])],
48
SYSTEM_LIBDIR="$withval", SYSTEM_LIBDIR="${libdir}")
50
AC_SUBST([SYSTEM_LIBDIR])
52
AC_ARG_WITH([system-includedir],[AC_HELP_STRING([--with-system-includedir],[specify the
53
system include directory (default INCLUDEDIR)])],
54
SYSTEM_INCLUDEDIR="$withval", SYSTEM_INCLUDEDIR="${includedir}")
56
AC_SUBST([SYSTEM_INCLUDEDIR])
63
AC_CONFIG_FILES([Makefile Kyuafile libpkgconf.pc tests/Kyuafile tests/test_env.sh])