79 lines
3.2 KiB
Diff
79 lines
3.2 KiB
Diff
|
* This patch should tell lib-src/Makefile
|
||
|
that it can use regex and getopt from GNU LibC
|
||
|
-- Stepan Kasal <kasal@suse.cz>
|
||
|
|
||
|
--- lib-src/Makefile.in
|
||
|
+++ lib-src/Makefile.in Wed Oct 24 18:17:04 2001
|
||
|
@@ -236,6 +236,8 @@
|
||
|
the information in ../src/config.h. */
|
||
|
ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
|
||
|
-I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
|
||
|
+ETAGS_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
|
||
|
+ -I. -I${srcdir} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
|
||
|
LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
|
||
|
-I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
|
||
|
CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
|
||
|
@@ -349,6 +351,10 @@
|
||
|
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
|
||
|
./test-distrib ${srcdir}/testfile
|
||
|
|
||
|
+#ifdef GETOPT_IN_LIBC
|
||
|
+GETOPTOBJS =
|
||
|
+GETOPTDEPS =
|
||
|
+#else
|
||
|
GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
|
||
|
GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
|
||
|
getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
|
||
|
@@ -357,6 +363,7 @@
|
||
|
${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
|
||
|
alloca.o: ${srcdir}/alloca.c
|
||
|
${CC} -Demacs -c ${BASE_CFLAGS} ${srcdir}/alloca.c
|
||
|
+#endif
|
||
|
|
||
|
#ifdef REGEXP_IN_LIBC
|
||
|
REGEXPOBJ =
|
||
|
@@ -370,7 +377,7 @@
|
||
|
${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
|
||
|
|
||
|
etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h
|
||
|
- $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags
|
||
|
+ $(CC) ${ETAGS_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags
|
||
|
|
||
|
ebrowse: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h
|
||
|
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse
|
||
|
@@ -378,7 +385,7 @@
|
||
|
/* We depend on etags to assure that parallel makes don't write two
|
||
|
etags.o files on top of each other. */
|
||
|
ctags: etags
|
||
|
- $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags
|
||
|
+ $(CC) ${ETAGS_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags
|
||
|
|
||
|
profile: ${srcdir}/profile.c ../src/config.h
|
||
|
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
|
||
|
--- lib-src/etags.c
|
||
|
+++ lib-src/etags.c Wed Oct 24 18:13:46 2001
|
||
|
@@ -52,7 +52,7 @@
|
||
|
#endif
|
||
|
|
||
|
#ifdef HAVE_CONFIG_H
|
||
|
-# include <config.h>
|
||
|
+# include <../src/config.h>
|
||
|
/* On some systems, Emacs defines static as nothing for the sake
|
||
|
of unexec. We don't want that here since we don't use unexec. */
|
||
|
# undef static
|
||
|
--- src/s/gnu-linux.h
|
||
|
+++ src/s/gnu-linux.h Wed Oct 24 18:13:46 2001
|
||
|
@@ -314,7 +314,11 @@
|
||
|
/* However, sometimes they disagree with the src/regex.h that comes with Emacs,
|
||
|
and that can make trouble in etags.c because it gets the regex.h from Emacs
|
||
|
and the function definitions in libc. So turn this off. */
|
||
|
-/* #define REGEXP_IN_LIBC */
|
||
|
+/* Why should etags.c include ../src/regex.h ?? Turn this on. */
|
||
|
+#define REGEXP_IN_LIBC
|
||
|
+
|
||
|
+/* ... and we also have getopt in the GNU C-library. */
|
||
|
+#define GETOPT_IN_LIBC
|
||
|
|
||
|
/* Use BSD process groups, but use setpgid() instead of setpgrp() to
|
||
|
actually set a process group. */
|