package compiler and linker metadata toolkit https://www.pkgconf.org/

configure.ac 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. dnl configure.ac
  2. dnl m4 preprocessor script for autotools
  3. dnl
  4. dnl Copyright (c) 2011, 2012, 2013, 2014 pkgconf authors (see AUTHORS).
  5. dnl
  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.
  9. dnl
  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.
  13. AC_PREREQ([2.68])
  14. AC_INIT([pkgconf], [1.6.0], [http://github.com/pkgconf/pkgconf/issues])
  15. AC_CONFIG_SRCDIR([cli/main.c])
  16. AC_CONFIG_MACRO_DIRS([m4])
  17. AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
  18. AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
  19. AX_CHECK_COMPILE_FLAG([-Wformat=2], [CFLAGS="$CFLAGS -Wformat=2"])
  20. AX_CHECK_COMPILE_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [
  21. AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"])
  22. ])
  23. AC_CONFIG_HEADERS([libpkgconf/config.h])
  24. AC_CHECK_FUNCS([strlcpy strlcat strndup cygwin_conv_path])
  25. AC_CHECK_HEADERS([sys/stat.h])
  26. AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
  27. AM_SILENT_RULES([yes])
  28. LT_INIT
  29. AC_SYS_LARGEFILE
  30. AC_ARG_WITH([personality-dir],[AC_HELP_STRING([--with-personality-dir],[specify
  31. the place where cross-compile personality files will be found])],
  32. PERSONALITY_PATH="$withval",
  33. PERSONALITY_PATH="${datadir}/pkgconfig/personality.d:${sysconfdir}/pkgconfig/personality.d")
  34. AC_SUBST([PERSONALITY_PATH])
  35. AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify
  36. the place where pc files will be found])],PKG_DEFAULT_PATH="$withval",
  37. PKG_DEFAULT_PATH="${libdir}/pkgconfig:${datadir}/pkgconfig")
  38. AC_SUBST([PKG_DEFAULT_PATH])
  39. AC_ARG_WITH([system-libdir],[AC_HELP_STRING([--with-system-libdir],[specify the
  40. system library directory (default LIBDIR)])],
  41. SYSTEM_LIBDIR="$withval", SYSTEM_LIBDIR="${libdir}")
  42. AC_SUBST([SYSTEM_LIBDIR])
  43. AC_ARG_WITH([system-includedir],[AC_HELP_STRING([--with-system-includedir],[specify the
  44. system include directory (default INCLUDEDIR)])],
  45. SYSTEM_INCLUDEDIR="$withval", SYSTEM_INCLUDEDIR="${includedir}")
  46. AC_SUBST([SYSTEM_INCLUDEDIR])
  47. AC_PROG_CPP
  48. AC_PROG_CC
  49. AC_PROG_INSTALL
  50. AC_PROG_LN_S
  51. AC_CONFIG_FILES([Makefile Kyuafile libpkgconf.pc tests/Kyuafile tests/test_env.sh])
  52. AC_OUTPUT