From f20ba4d1f6f145118362d3c5246f27d647fbb6d2 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Sat, 19 Feb 2011 23:07:22 +0100 Subject: [PATCH] Add --with-pkglibdir option to set the installation directory of freeswitch.pc. Default behaviour is unchanged. Packagers should use this option to install freeswitch.pc into the system's main pkg-config directory (e.g. /usr/lib/pkgconfig). Signed-off-by: Stefan Knoblich Tested-by: Stefan Knoblich --- Makefile.am | 2 +- configure.in | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 37a01d27fb..5b6b9896ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -356,7 +356,7 @@ scripts/fsxs: scripts/fsxs.in ## misc ## -pkgconfigdir = $(libdir)/pkgconfig +pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = build/freeswitch.pc $(switch_builddir)/modules.conf: diff --git a/configure.in b/configure.in index a0c9418751..0e45e064f1 100644 --- a/configure.in +++ b/configure.in @@ -93,6 +93,17 @@ AC_SUBST(libdir) AC_SUBST(bindir) AC_SUBST(includedir) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir=DIR], [Installation directory for pkgconfig file (default: \${libdir}/pkgconfig)])], + [case "${withval}" in + yes|no) AC_MSG_ERROR([Invalid value ${withval} for option --with-pkgconfigdir]) ;; + *) pkgconfigdir="${withval}" ;; + esac + ], + [pkgconfigdir="${libdir}/pkgconfig"] +) +AC_SUBST([pkgconfigdir]) + #Set default language AC_LANG_C # Checks for programs.