From 46c6f7880bebcdb3589e6e8d67a2c192076a540d Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 20 Jul 2006 00:41:04 +1000 Subject: [PATCH] Set value of install path macros like DATADIR from the Makefile, not automatically by Autoconf using AC_DEFINE. That way we get correct expansion of ${prefix} and friends to their install-time value. This fixes a bug reported by James Vega. darcs-hash:20060719144104-ac50b-05001b151a54bf893ff4c5a82c5f040529e27f57.gz --- Makefile.in | 11 +++++++---- configure.ac | 13 +++---------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1bbabf9c7..01a355ea5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,10 +36,6 @@ CC := @CC@ INSTALL:=@INSTALL@ -CFLAGS:=@CFLAGS@ -CPPFLAGS=@CPPFLAGS@ -LDFLAGS:= @LIBS@ @LDFLAGS@ - # Installation directories prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -48,6 +44,13 @@ bindir = @bindir@ mandir = @mandir@ sysconfdir = @sysconfdir@ docdir = @docdir@ +localedir = @localedir@ +prefix = @prefix@ + +CFLAGS:=@CFLAGS@ -DLOCALEDIR=L\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" +CPPFLAGS=@CPPFLAGS@ +LDFLAGS:= @LIBS@ @LDFLAGS@ + #etc files to install ETC_DIR_INSTALL = etc/fish_interactive.fish diff --git a/configure.ac b/configure.ac index 16efd236c..b4eb2d264 100644 --- a/configure.ac +++ b/configure.ac @@ -212,17 +212,11 @@ fi # it can make sure the fish installation directory is in the path # during startup. if [[ "$prefix" = NONE ]]; then - AC_DEFINE_UNQUOTED( [PREFIX], L"/usr/local", [Installation directory]) - AC_SUBST( PREFIX, /usr/local) export prefix=/usr/local + AC_SUBST( prefix, /usr/local) else - AC_DEFINE_UNQUOTED( [PREFIX], L"$prefix", [Installation directory]) - AC_SUBST( PREFIX, [$prefix]) + AC_SUBST( prefix, [$prefix]) fi -AC_DEFINE_UNQUOTED( SYSCONFDIR, [L"$(eval echo $sysconfdir)"], [System configuration directory] ) -AC_DEFINE_UNQUOTED( DATADIR, [L"$(eval echo $datadir)"], [System configuration directory] ) -AC_SUBST( SYSCONFDIR, ["$(eval echo $sysconfdir)"] ) -AC_SUBST( DATADIR, ["$(eval echo $datadir)"] ) # Set up the directory where the documentation files should be @@ -237,8 +231,7 @@ fi # Set up locale directory. This is where the .po files will be # installed. -AC_DEFINE_UNQUOTED( [LOCALEDIR], "$(eval echo $datadir)/locale", [Locale directory]) -AC_SUBST( [LOCALEDIR], [$datadir/locale]) +AC_SUBST( [localedir], [$datadir/locale]) # See if Linux procfs is present. This is used to get extra # information about running processes.