mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
Obtained from https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-3.0.9.tar.gz SHA1: a390f016a7a5ff419c9eef9e2b2c01fe86c11971 - SHA256: 32310a33bb97425ebc0707cb5af59f9dc05d10282dcd4db628a45ed904993dc6 - SHA512: 30776d31f860910286b96fbf60a19b5a6d1e73cb6a1077a019d763ae6e5ed1e8d81bc3649978c83f40e5e90ae779f7e530c513b700c8e73bb6399883dd6ef7ab - Sponsored by: The FreeBSD Foundation
108 lines
4.1 KiB
Plaintext
108 lines
4.1 KiB
Plaintext
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.71])
|
|
AC_INIT([pkgconf],[3.0.9],[https://github.com/pkgconf/pkgconf/issues/new])
|
|
AC_MSG_WARN([
|
|
===================================================================
|
|
Autotools support is deprecated and will be removed in pkgconf 3.1.
|
|
Please migrate to Meson or Muon.
|
|
===================================================================
|
|
])
|
|
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=c99], [CFLAGS="$CFLAGS -std=c99"])
|
|
CPPFLAGS="$CPPFLAGS -D_ATFILE_SOURCE -D_BSD_SOURCE -D_DARWIN_C_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700"
|
|
AC_CONFIG_HEADERS([libpkgconf/config.h])
|
|
AC_CHECK_DECLS([strndup], [], [], [[#include <string.h>]])
|
|
AC_CHECK_DECLS([pledge, unveil], [], [], [[#include <unistd.h>]])
|
|
AC_CHECK_DECLS([readlinkat], [], [], [[#include <unistd.h>]])
|
|
AC_CHECK_DECLS([reallocarray], [], [], [[#include <stdlib.h>]])
|
|
AC_CHECK_DECLS([mkdtemp], [], [], [[#include <stdlib.h>]])
|
|
AC_CHECK_DECLS([getc_unlocked], [], [], [[#include <stdio.h>]])
|
|
AC_CHECK_DECLS([nl_langinfo_l], [], [], [[
|
|
#ifdef __APPLE__
|
|
#include <xlocale.h>
|
|
#endif
|
|
#include <locale.h>
|
|
#include <langinfo.h>]])
|
|
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],[AS_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],[AS_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],[AS_HELP_STRING([--with-system-libdir],[specify the
|
|
system library directory (default LIBDIR)])],
|
|
[SYSTEM_LIBDIR="$withval"], [
|
|
AC_MSG_WARN([--with-system-libdir is not set, assuming ${libdir}])
|
|
AC_MSG_WARN([It is important that this value be properly set for correct behavior!])
|
|
SYSTEM_LIBDIR="${libdir}"
|
|
])
|
|
|
|
AC_SUBST([SYSTEM_LIBDIR])
|
|
|
|
AC_ARG_WITH([system-includedir],[AS_HELP_STRING([--with-system-includedir],[specify the
|
|
system include directory (default INCLUDEDIR)])],
|
|
[SYSTEM_INCLUDEDIR="$withval"], [
|
|
AC_MSG_WARN([--with-system-includedir is not set, assuming ${includedir}])
|
|
AC_MSG_WARN([It is important that this value be properly set for correct behavior!])
|
|
SYSTEM_INCLUDEDIR="${includedir}"
|
|
])
|
|
|
|
AC_SUBST([SYSTEM_INCLUDEDIR])
|
|
|
|
AC_PROG_CPP
|
|
AC_PROG_CC
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
|
|
AC_CONFIG_FILES([Makefile libpkgconf.pc])
|
|
AC_OUTPUT
|
|
|
|
cat << EOF
|
|
|
|
===================================================================
|
|
*** WARNING ***
|
|
Autotools support is deprecated and will be removed in pkgconf 3.1.
|
|
Please migrate to Meson or Muon.
|
|
See README.md for instructions on building with Meson or Muon.
|
|
===================================================================
|
|
|
|
Build configuration:
|
|
|
|
Default personality search paths: ${PERSONALITY_PATH}
|
|
Default package search paths: ${PKG_DEFAULT_PATH}
|
|
Default include search paths: ${SYSTEM_INCLUDEDIR}
|
|
Default library search paths: ${SYSTEM_LIBDIR}
|
|
|
|
Incorrect paths may result in unexpected behavior from pkgconf.
|
|
EOF
|