[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
${prefix} expansion in configure.ac ?
From: |
Philippe Trottier |
Subject: |
${prefix} expansion in configure.ac ? |
Date: |
Fri, 04 Feb 2005 15:58:51 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20050114) |
I have a little trouble here, I am trying to add the destination
directory "--prefix" to the library and header directorys to look in...
but since I am using ${libdir} and ${includedir} I get this
CPPFLAGS=-I${prefix}/include
LDFLAGS=-L${exec_prefix}/lib
and not /home/user/include and /home/user/home ...
I am trying to get the autoconf script to be easy to install in a home
directory instead of needing the "su" power to install, and also prevent
the need to change LD_LIBRARY_PATH etc... etc...
Is there better way to expand ${prefix} other than using sed ?
Yours,
Phil
AC_MSG_CHECKING([prefix for libraries and headers])
AC_ARG_ENABLE([search-prefix],
AC_HELP_STRING([--enable-search-prefix],
[search installation location for libraries and headers.
[[Default=yes]]]),
,
enableval="yes"
)
if test "$enableval" = "yes" ; then
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([Headers directory at])
test -d $includedir && echo YES
CPPFLAGS="-I$includedir $CPPFLAGS" &&
AC_MSG_RESULT($includedir)
AC_MSG_CHECKING([Library directory at])
test -d $libdir && echo YES
LDFLAGS="-L$libdir $LDFLAGS" &&
AC_MSG_RESULT($libdir)
else
AC_MSG_RESULT([no])
fi
- ${prefix} expansion in configure.ac ?,
Philippe Trottier <=