From a370e7ccacdb5ab945a48d08430f08880dbca328 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 22 Nov 2006 20:13:39 +0100 Subject: [PATCH] Improve CPPFLAGS usage CPPFLAGS was dropped[1] back on 2004-04-24. Then a workaround was introduced by commit 6d7e9bfe5b6379bc5a492208ff735aeb840b17c5 to fix compilation on FreeBSD that used CPPFLAGS to store iconv related flags. The use of CPPFLAGS with respect to the COMPILE "macro" reappeared in 40e257bedd59c35b4a54c5e85e4391383ad6bf84 on 2006-08-05. This commit makes configure.in print CPPFLAGS and LDFLAGS. Before, CPPFLAGS and CFLAGS was mixed together in the feature summary. It also restores the use of CPPFLAGS storing iconv related flags but keeps the use of the SAVE/RESTORE_FLAGS in the iconv macro. Reported by Daniel E. Macks on 2005-11-22 in a mail to elinks-users with the ID: . [1] http://pasky.or.cz/gitweb.cgi?p=elinks-history.git;a=commit;h=ebad0e71572b41dac5376e148fe4b1b5cb9ccc33 --- config/m4/iconv.m4 | 2 +- configure.in | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/config/m4/iconv.m4 b/config/m4/iconv.m4 index ac879e5f..6d411bb3 100644 --- a/config/m4/iconv.m4 +++ b/config/m4/iconv.m4 @@ -12,7 +12,7 @@ AC_DEFUN([AM_ICONV], AC_ARG_WITH([libiconv], [ --with-libiconv=DIR search for libiconv in DIR/include and DIR/lib], [ for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CFLAGS="$CFLAGS -I$dir/include"; fi + if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done ]) diff --git a/configure.in b/configure.in index cb08d4c7..6e4851ad 100644 --- a/configure.in +++ b/configure.in @@ -1407,13 +1407,10 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then esac fi -# CFLAGS doesn't contain all compile flags. Some will be added only when -# needed in the respective source directory. To get all compile flags -# easily just add CPPFLAGS. -ALL_CFLAGS="$CFLAGS $CPPFLAGS" - -EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], []) -EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], []) +EL_LOG_CONFIG(CFLAGS, [Compiler flags (CFLAGS)], []) +EL_LOG_CONFIG(CPPFLAGS, [Preprocessor flags (CPPFLAGS)], []) +EL_LOG_CONFIG(LDFLAGS, [Linker flags (LDFLAGS)], []) +EL_LOG_CONFIG(LIBS, [Library flags (LIBS)], []) dnl =================================================================== dnl Colored make output