File bibtool-use-system-regex.patch of Package bibtool

Index: BibTool/AutoConf/makefile.in
===================================================================
--- BibTool.orig/AutoConf/makefile.in
+++ BibTool/AutoConf/makefile.in
@@ -218,9 +218,9 @@ NON_ANSI_DEFS = @DEFS@
 REGEX_DIR  = regex-0.12
 # 
 
-REGEX_DEF  = -DREGEX -I$(REGEX_DIR) -I..
+REGEX_DEF  = -DREGEX
 
-REGEX      = regex$(OBJ)
+REGEX      =
 
 # -------------------------------------------------------
 #  Kpathsea Library support.
@@ -477,8 +477,8 @@ $(OFILES): $(MAKEFILE)
 # __________________________________________________________________
 #  Targets from the GNU Regular Expression Library.
 
-regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE)
-	$(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@
+#regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE)
+#	$(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@
 
 
 bibtcl:
@@ -512,7 +512,7 @@ Test:
 	(cd test; $(MAKE))
 
 libbib.a: $(OLIBFILES)
-	$(AR) $@ $(OLIBFILES) regex.o
+	$(AR) $@ $(OLIBFILES)
 	$(RANLIB) $@
 
 depend:
Index: BibTool/rewrite.c
===================================================================
--- BibTool.orig/rewrite.c
+++ BibTool/rewrite.c
@@ -22,7 +22,8 @@
 #include <bibtool/rewrite.h>
 
 #ifdef REGEX
-#include <bibtool/regex.h>
+#define  __USE_GNU
+#include <regex.h>
 #endif
 
  typedef struct rULE
openSUSE Build Service is sponsored by