~mmach/netext73/pkgconf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dnl configure.ac
dnl m4 preprocessor script for autotools
dnl
dnl Copyright (c) 2011, 2012, 2013, 2014 pkgconf authors (see AUTHORS).
dnl
dnl Permission to use, copy, modify, and/or distribute this software for any
dnl purpose with or without fee is hereby granted, provided that the above
dnl copyright notice and this permission notice appear in all copies.
dnl
dnl This software is provided 'as is' and without any warranty, express or
dnl implied.  In no event shall the authors be liable for any damages arising
dnl from the use of this software.

AC_PREREQ([2.68])
AC_INIT([pkgconf], [1.8.1], [https://github.com/pkgconf/pkgconf/issues/new])
AC_CONFIG_SRCDIR([cli/main.c])
AC_CONFIG_MACRO_DIR([m4])
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
AX_CHECK_COMPILE_FLAG([-Wformat=2], [CFLAGS="$CFLAGS -Wformat=2"])
AX_CHECK_COMPILE_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [
	AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"])
])
AC_CONFIG_HEADERS([libpkgconf/config.h])
AC_CHECK_FUNCS([strlcpy strlcat strndup])
AC_CHECK_HEADERS([sys/stat.h])
AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
AM_SILENT_RULES([yes])
LT_INIT

AC_SYS_LARGEFILE

AC_ARG_WITH([personality-dir],[AC_HELP_STRING([--with-personality-dir],[specify
	     the place where cross-compile personality files will be found])],
	     PERSONALITY_PATH="$withval",
	     PERSONALITY_PATH="${datadir}/pkgconfig/personality.d:${sysconfdir}/pkgconfig/personality.d")

AC_SUBST([PERSONALITY_PATH])

AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify
	     the place where pc files will be found])],PKG_DEFAULT_PATH="$withval",
	     PKG_DEFAULT_PATH="${libdir}/pkgconfig:${datadir}/pkgconfig")

AC_SUBST([PKG_DEFAULT_PATH])

AC_ARG_WITH([system-libdir],[AC_HELP_STRING([--with-system-libdir],[specify the
	     system library directory (default LIBDIR)])],
	     SYSTEM_LIBDIR="$withval", SYSTEM_LIBDIR="${libdir}")

AC_SUBST([SYSTEM_LIBDIR])

AC_ARG_WITH([system-includedir],[AC_HELP_STRING([--with-system-includedir],[specify the
	     system include directory (default INCLUDEDIR)])],
	     SYSTEM_INCLUDEDIR="$withval", SYSTEM_INCLUDEDIR="${includedir}")

AC_SUBST([SYSTEM_INCLUDEDIR])

AC_PROG_CPP
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S

AC_CONFIG_FILES([Makefile Kyuafile libpkgconf.pc tests/Kyuafile tests/test_env.sh])
AC_OUTPUT