Fix macOS build of libpcap due to case-insensitive filesystem. Rename VERSION to VERSION.txt

This commit is contained in:
dmiller 2023-02-24 21:10:14 +00:00
parent 762bdb0904
commit 19508bffe4
4 changed files with 3624 additions and 3209 deletions

View file

@ -160,8 +160,8 @@ GENHDR = \
TAGFILES = \
$(SRC) $(HDR)
CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \
$(PROG)-`cat $(srcdir)/VERSION`.tar.gz \
CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION.txt` \
$(PROG)-`cat $(srcdir)/VERSION.txt`.tar.gz \
lex.yy.c pcap-config libpcap.pc
MAN1 = pcap-config.1
@ -252,7 +252,7 @@ EXTRA_DIST = \
doc \
CONTRIBUTING.md \
TODO \
VERSION \
VERSION.txt \
aclocal.m4 \
charconv.c \
charconv.h \
@ -432,8 +432,8 @@ shared: libpcap.$(DYEXT)
libpcap.so: $(OBJ)
@rm -f $@
VER=`cat $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
@V_SHLIB_CMD@ $(LDFLAGS) @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER \
-o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS)
@ -448,17 +448,17 @@ libpcap.so: $(OBJ)
# but not in the older version.
#
# We also use "A" as the major version, and 1 as the compatibility version,
# but set the current version to the value in VERSION, with any non-numeric
# but set the current version to the value in VERSION.txt, with any non-numeric
# stuff stripped off (the compatibility and current version must be of the
# form X[.Y[.Z]], with Y and Z possibly absent, and with all components
# numeric).
#
libpcap.dylib: $(OBJ)
rm -f libpcap*.dylib
VER=`cat $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=A; \
COMPAT_VER=1; \
CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION.txt`; \
$(CC) -dynamiclib -undefined error $(LDFLAGS) @V_LIB_LDFLAGS_FAT@ \
-o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \
-install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
@ -478,9 +478,9 @@ libpcap.dylib: $(OBJ)
# linker, even with GCC.
#
libpcap.sl: $(OBJ)
@MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
@MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
rm -f libpcap.$$MAJOR_VER
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
$(OBJ) $(ADDLOBJS) $(LIBS)
@ -671,15 +671,15 @@ install-shared: install-shared-$(DYEXT)
install-shared-so: libpcap.so
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
VER=`cat $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
$(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
install-shared-dylib: libpcap.dylib
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
VER=`cat $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=A; \
$(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
@ -687,7 +687,7 @@ install-shared-dylib: libpcap.dylib
install-shared-sl: libpcap.sl
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
$(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
install-shared-shareda: libpcap.shareda
@ -754,19 +754,19 @@ uninstall: uninstall-shared uninstall-rpcapd
uninstall-shared: uninstall-shared-$(DYEXT)
uninstall-shared-so:
VER=`cat $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
rm -f $(DESTDIR)$(libdir)/libpcap.so
uninstall-shared-dylib:
VER=`cat $(srcdir)/VERSION`; \
VER=`cat $(srcdir)/VERSION.txt`; \
MAJOR_VER=A; \
rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
rm -f $(DESTDIR)$(libdir)/libpcap.dylib
uninstall-shared-sl:
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION.txt`; \
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
rm -f $(DESTDIR)$(libdir)/libpcap.sl
uninstall-shared-shareda:
@ -794,7 +794,7 @@ tags: $(TAGFILES)
releasetar:
@autoreconf -f; \
name=$(PROG)-`cat VERSION` ; \
name=$(PROG)-`cat VERSION.txt` ; \
mkdir $$name; \
tar -c --exclude='*~' -f - $(COMMON_C_SRC) $(HDR) $(MAN1) \
$(MAN3PCAP_EXPAND) $(MAN3PCAP_NOEXPAND) $(MANFILE) \
@ -804,10 +804,10 @@ releasetar:
rm -rf $$name
rc1 rc2 rc3 rc4 rc5:
@VER=`cat $(srcdir)/VERSION`; \
sed -i "s/$$VER/$${VER}$@/" VERSION ; \
@VER=`cat $(srcdir)/VERSION.txt`; \
sed -i "s/$$VER/$${VER}$@/" VERSION.txt ; \
make releasetar; \
git checkout VERSION configure
git checkout VERSION.txt configure
depend: $(GENERATED_C_SRC) $(GENHDR)
$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC)

6787
libpcap/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@ dnl
AC_PREREQ(2.64)
AC_INIT(pcap, m4_esyscmd_s([cat VERSION]))
AC_INIT(pcap, m4_esyscmd_s([cat VERSION.txt]))
AC_CONFIG_SRCDIR(pcap.c)
AC_SUBST(PACKAGE_NAME)