summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-07-17 01:32:43 +0000
committerHavoc Pennington <hp@redhat.com>2003-07-17 01:32:43 +0000
commit1554fa1bee5b5ee902d62e16658760699784b56b (patch)
tree3789d7ce241a319888233e33b9b7331bfd69d4b5 /configure.in
parent57dfa1e3a72b5269c8a8342895ca17ae95006029 (diff)
2003-07-16 Havoc Pennington <hp@pobox.com>
* configure.in: print out EXPANDED_* variables in the summary at the end; clean up the code that computes EXPANDED_ variables and get the ones using exec_prefix right. Should make things work when you build without --prefix
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in40
1 files changed, 26 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index f8e69ca..277e362 100644
--- a/configure.in
+++ b/configure.in
@@ -677,6 +677,9 @@ fi
AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
AC_MSG_RESULT(yes)
+#### Have to go $localstatedir->$prefix/var->/usr/local/var
+#### someone please fix this a better way...
+
#### find the actual value for $prefix that we'll end up with
## (I know this is broken and should be done in the Makefile, but
## that's a major pain and almost nobody actually seems to care)
@@ -687,35 +690,39 @@ else
REAL_PREFIX=$prefix
fi
-#### Have to go $localstatedir->$prefix/var->/usr/local/var
-#### someone please fix this a better way...
-LOCALSTATEDIR_TMP="$localstatedir"
+## temporarily change prefix and exec_prefix
old_prefix=$prefix
prefix=$REAL_PREFIX
+
+if test "x$exec_prefix" = xNONE ; then
+ REAL_EXEC_PREFIX=$REAL_PREFIX
+else
+ REAL_EXEC_PREFIX=$exec_prefix
+fi
+old_exec_prefix=$exec_prefix
+exec_prefix=$REAL_EXEC_PREFIX
+
+## eval everything
+LOCALSTATEDIR_TMP="$localstatedir"
EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
-prefix=$old_prefix
AC_SUBST(EXPANDED_LOCALSTATEDIR)
SYSCONFDIR_TMP="$sysconfdir"
-old_prefix=$prefix
-prefix=$REAL_PREFIX
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
-prefix=$old_prefix
AC_SUBST(EXPANDED_SYSCONFDIR)
BINDIR_TMP="$bindir"
-old_prefix=$prefix
-prefix=$REAL_PREFIX
EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
-prefix=$old_prefix
AC_SUBST(EXPANDED_BINDIR)
-old_exec_prefix=${exec_prefix}
-test "x$exec_prefix" = xNONE && eval exec_prefix=${prefix}
-eval EXPANDED_LIBDIR=${libdir}
-exec_prefix=${old_exec_prefix}
+LIBDIR_TMP="$libdir"
+EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
AC_SUBST(EXPANDED_LIBDIR)
+## put prefix and exec_prefix back
+prefix=$old_prefix
+exec_prefix=$old_exec_prefix
+
#### Check our operating system
operating_system=unknown
if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
@@ -839,6 +846,11 @@ echo "
==============
prefix: ${prefix}
+ exec_prefix: ${exec_prefix}
+ libdir: ${EXPANDED_LIBDIR}
+ bindir: ${EXPANDED_BINDIR}
+ sysconfdir: ${EXPANDED_SYSCONFDIR}
+ localstatedir: ${EXPANDED_LOCALSTATEDIR}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}