mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Clean up the gcc 3.x warnings about including system directories.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7493 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -184,6 +184,7 @@ Alessandro Seveso <aleseveso@tiscalinet.it> messages Italian translations
|
||||
Mike Simons <msimons@fsimons01.erols.com> misc configure.in patches
|
||||
Keld Simonsen <keld@dkuug.dk> messages Danish translation
|
||||
Richard Skelton <rich@brake.demon.co.uk> for Solaris cleanup
|
||||
Thomas Vander Stichele <thomas@urgent.rug.ac.be> Macro for filtering system directories
|
||||
Henning Spruth <spruth@bigfoot.com> for German text & euro date rework
|
||||
Ben Stanley <bds02@uow.edu.au> test infrastructure
|
||||
Robby Stephenson <robby.stephenson@usa.net> register & file history patches
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
2002-11-17 David Hampton <hampton@employees.org>
|
||||
|
||||
* macros/as-scrub-include.m4: New macro.
|
||||
|
||||
* configure.in: Use the new AS_SCRUB_INCLUDE macro to remove
|
||||
system directories from the compile search path. Prevents GCC 3.x
|
||||
from complaining.
|
||||
|
||||
2002-11-17 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/gnc-hbci-utils.c: Fix caching of HBCI_API
|
||||
|
||||
@@ -140,6 +140,7 @@ esac
|
||||
### the Gnome check?)
|
||||
|
||||
GNOME_CHECK_GUILE
|
||||
AS_SCRUB_INCLUDE(GUILE_INCS)
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### G-wrap (libraries and executable)
|
||||
@@ -185,6 +186,8 @@ AC_SUBST(G_WRAP_LINK_ARGS)
|
||||
AC_SUBST(G_WRAP_MODULE_DIR)
|
||||
AC_SUBST(G_WRAP_LIB_DIR)
|
||||
|
||||
AS_SCRUB_INCLUDE(CFLAGS)
|
||||
|
||||
### Check size of long_long - some guile's are broken.
|
||||
AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
|
||||
GNC_OLDCFLAGS="$CFLAGS"
|
||||
@@ -710,6 +713,8 @@ then
|
||||
AC_MSG_WARN([****** ghttp does not have SSL support.]),
|
||||
$GHTTP_LIBS)
|
||||
|
||||
AS_SCRUB_INCLUDE(GHTTP_CFLAGS)
|
||||
AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
|
||||
AC_SUBST(GTKHTML_LIBS)
|
||||
AC_SUBST(GTKHTML_CFLAGS)
|
||||
AC_SUBST(GHTTP_LIBS)
|
||||
@@ -767,6 +772,7 @@ then
|
||||
GUPPI_LIBS=`$GNOME_CONFIG --libs libguppi`
|
||||
GUPPI_CFLAGS=`$GNOME_CONFIG --cflags libguppi`
|
||||
LIBGUPPI_CHECK
|
||||
AS_SCRUB_INCLUDE(GUPPI_CFLAGS)
|
||||
AC_SUBST(GUPPI_LIBS)
|
||||
AC_SUBST(GUPPI_CFLAGS)
|
||||
|
||||
|
||||
33
macros/as-scrub-include.m4
Normal file
33
macros/as-scrub-include.m4
Normal file
@@ -0,0 +1,33 @@
|
||||
dnl as-scrub-include.m4 0.0.1
|
||||
dnl autostars m4 macro for scrubbing CFLAGS of system include dirs
|
||||
dnl because gcc 3.x complains about including system including dirs
|
||||
dnl
|
||||
dnl thomas@apestaart.org
|
||||
dnl
|
||||
dnl This macro uses output of cpp -v and expects it to contain text that
|
||||
dnl looks a little bit like this:
|
||||
dnl #include <...> search starts here:
|
||||
dnl /usr/local/include
|
||||
dnl /usr/lib/gcc-lib/i386-redhat-linux/3.2/include
|
||||
dnl /usr/include
|
||||
dnl End of search list.
|
||||
|
||||
dnl AS_SCRUB_INCLUDE(VAR)
|
||||
dnl example
|
||||
dnl AS_SCRUB_INCLUDE(CFLAGS)
|
||||
dnl will remove all system include dirs from the given CFLAGS
|
||||
|
||||
AC_DEFUN(AS_SCRUB_INCLUDE,
|
||||
[
|
||||
GIVEN_CFLAGS=$[$1]
|
||||
INCLUDE_DIRS=`echo | cpp -v 2>&1`
|
||||
|
||||
dnl remove everything from this output between the "starts here" and "End of"
|
||||
dnl line
|
||||
INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'`
|
||||
for dir in $INCLUDE_DIRS; do
|
||||
command="sed -e s#-I$dir##"
|
||||
GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | $command`
|
||||
done
|
||||
[$1]=$GIVEN_CFLAGS
|
||||
])
|
||||
Reference in New Issue
Block a user