This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fixinc w/ SYSTEM_INCLUDE_DIR set?


> I think what I need to be able to do is to set SYSTEM_HEADER_DIR in
> Makefile.in from within configure.  I don't see any mechanism in there
> to do this.  Is the right thing to do just to add the plumbing in
> configure.in to AC_SUBST() it into the generated Makefile?

This turns out to be trivial to do, but it still feels wrong.  Here's
one possible implementation.  Suggestions for better approaches welcome.

RJL

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.136
diff -u -p -r1.136 configure.in
--- configure.in        1998/07/29 22:51:40     1.136
+++ configure.in        1998/08/03 06:59:46
@@ -3610,6 +3620,13 @@ if [[ x$enable_haifa != x ]]; then
     done
 fi

+# If no override was given for system_header_dir, default to "/usr/include"
+# NOTE: this controls where fixinc looks, not where the generated preprocessor
+# looks.
+if [[ x$system_header_dir = x ]]; then
+    system_header_dir="/usr/include"
+fi
+
 # Nothing to do for FLOAT_H, float_format already handled.
 objdir=`pwd`
 AC_SUBST(objdir)
@@ -3654,6 +3671,7 @@ AC_SUBST(gcc_version_trigger)
 AC_SUBST(local_prefix)
 AC_SUBST(gxx_include_dir)
 AC_SUBST(fixincludes)
+AC_SUBST(system_header_dir)
 AC_SUBST(build_install_headers_dir)
 AC_SUBST(build_exeext)
 AC_SUBST(host_exeext)
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/Makefile.in,v
retrieving revision 1.154
diff -u -p -r1.154 Makefile.in
--- Makefile.in 1998/07/30 12:30:30     1.154
+++ Makefile.in 1998/08/03 06:59:51
@@ -216,7 +216,7 @@ RANLIB = $(RANLIB_FOR_TARGET)
 RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET)

 # Dir to search for system headers.  Overridden by cross-make.
-SYSTEM_HEADER_DIR = /usr/include
+SYSTEM_HEADER_DIR = @system_header_dir@

 # Control whether to run fixproto.
 STMP_FIXPROTO = stmp-fixproto



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]