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.