--- a/Makefile.in
+++ b/Makefile.in
-@@ -40,6 +40,14 @@ mandir = @mandir@
+@@ -38,6 +38,14 @@ mandir = @mandir@
srcdir = @srcdir@
VPATH = @srcdir@
#
# You shouldn't need to edit anything below.
#
-@@ -63,7 +71,8 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
+@@ -62,7 +70,8 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
PROG=libpcap
# Standard CFLAGS
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -83,7 +92,11 @@ YACC = @V_YACC@
+@@ -82,7 +91,11 @@ YACC = @V_YACC@
# problem if you don't own the file but can write to the directory.
.c.o:
@rm -f $@
+ @rm -f $@
+ $(CC) -fPIC $(FULL_CFLAGS) -c -o $@ $(srcdir)/$*.c
- PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
+ PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
FSRC = fad-@V_FINDALLDEVS@.c
-@@ -99,6 +112,7 @@ SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(
+@@ -98,6 +111,7 @@ SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection
OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
MAN1 = pcap-config.1
-@@ -363,7 +377,7 @@ libpcap.a: $(OBJ)
+@@ -365,7 +379,7 @@ libpcap.a: $(OBJ)
$(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
$(RANLIB) $@
libpcap.so: $(OBJ)
@rm -f $@
-@@ -441,6 +455,13 @@ libpcap.shareda: $(OBJ)
+@@ -443,6 +457,13 @@ libpcap.shareda: $(OBJ)
#
libpcap.none:
+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
+
scanner.c: $(srcdir)/scanner.l
- @rm -f $@
+ @rm -f $@ $@.bottom
$(srcdir)/runlex.sh $(LEX) -o$@ $<
-@@ -448,6 +469,9 @@ scanner.c: $(srcdir)/scanner.l
+@@ -453,6 +474,9 @@ scanner.c: $(srcdir)/scanner.l
scanner.o: scanner.c tokdefs.h
$(CC) $(FULL_CFLAGS) -c scanner.c
pcap.o: version.h
tokdefs.h: grammar.c
-@@ -461,9 +485,16 @@ grammar.o: grammar.c
+@@ -466,9 +490,16 @@ grammar.o: grammar.c
@rm -f $@
$(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
+grammar_pic.o: grammar.c
+ @rm -f $@
-+ $(CC) -fPIC $(FULL_CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
++ $(CC) -fPIC $(FULL_CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
+
version.o: version.c
$(CC) $(FULL_CFLAGS) -c version.c
snprintf.o: $(srcdir)/missing/snprintf.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
-@@ -501,6 +532,9 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
+@@ -506,6 +537,9 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
bpf_filter.o: bpf_filter.c
$(CC) $(FULL_CFLAGS) -c bpf_filter.c
#
# Generate the pcap-config script.
#
-@@ -618,11 +652,9 @@ install-shared: install-shared-$(DYEXT)
- install-shared-so: libpcap.so
+@@ -622,14 +656,12 @@ install: install-shared install-archive
+ $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
+
+ install-shared: install-shared-$(DYEXT)
+-install-shared-so: libpcap.so
++install-shared-so: $(SHAREDLIB)
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
- VER=`cat $(srcdir)/VERSION`; \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
--- a/aclocal.m4
+++ b/aclocal.m4
-@@ -440,7 +440,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
+@@ -438,7 +438,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
esac
;;
esac
V_SONAME_OPT="-Wl,-soname,"
V_RPATH_OPT="-Wl,-rpath,"
;;
-@@ -503,7 +503,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
+@@ -501,7 +501,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
#
# "cc" is GCC.
#