Use pkgconfigdir variable as it is not sure it will be libdir/pkgconfig.

Let an external script handle printing of installation directories so
that printing can be done in a `cleaner' way without tests.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
Karl Lindén 2013-04-07 12:30:40 +02:00 committed by Erik de Castro Lopo
parent 958263fbd7
commit 9b331554ab
2 changed files with 28 additions and 24 deletions

View File

@ -614,11 +614,12 @@ AC_CONFIG_FILES([ \
src/version-metadata.rc tests/test_wrapper.sh tests/pedantic-header-test.sh \
doc/libsndfile.css build-test-tarball.mk libsndfile.spec sndfile.pc \
src/sndfile.h \
echo-install-dirs
])
AC_OUTPUT
# Make sure these are executable.
chmod u+x tests/test_wrapper.sh build-test-tarball.mk
chmod u+x tests/test_wrapper.sh build-test-tarball.mk echo-install-dirs
#====================================================================================
@ -660,29 +661,7 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
fi
fi
if test $libdir = "\${exec_prefix}/lib" ; then
libdir="$prefix/lib"
fi
if test $bindir = "\${exec_prefix}/bin" ; then
bindir="$prefix/bin"
fi
AC_MSG_RESULT([[
Installation directories :
Library directory : ................... $libdir
Program directory : ................... $bindir
Pkgconfig directory : ................. $libdir/pkgconfig
HTML docs directory : ................. $htmldocdir
]])
if test x$prefix != "x/usr" ; then
echo "Compiling some other packages against libsndfile may require"
echo "the addition of '$libdir/pkgconfig' to the"
echo "PKG_CONFIG_PATH environment variable."
echo
fi
./echo-install-dirs
(cd src && make genfiles)
(cd tests && make genfiles)

25
echo-install-dirs.in Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# @configure_input@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
bindir=@bindir@
pkgconfigdir=@pkgconfigdir@
datadir=@datadir@
datarootdir=@datarootdir@
docdir=@docdir@
htmldir=@htmldir@
echo "
Installation directories :
Library directory : ................... $libdir
Program directory : ................... $bindir
Pkgconfig directory : ................. $pkgconfigdir
HTML docs directory : ................. $htmldir
"
echo "Compiling some other packages against libsndfile may require"
echo "the addition of '$pkgconfigdir' to the"
echo "PKG_CONFIG_PATH environment variable."
echo