CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
DEFS = @DEFS@ @V_DEFS@
+ADDLOBJ = @ADDLOBJ@
LIBS = @V_LIBS@
LDFLAGS = @LDFLAGS@
-DAGLIBS = @DAGLIBS@
-DEPLIBS = @DEPLIBS@
DYEXT = @DYEXT@
PROG=libpcap
libpcap.a: $(OBJ)
@rm -f $@
- $(AR) rc $@ $(OBJ) $(LIBS)
+ $(AR) rc $@ $(OBJ) $(ADDLOBJ)
$(RANLIB) $@
shared: libpcap.$(DYEXT)
@rm -f $@
VER=`cat $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
- $(CC) -shared -Wl,-soname,$@.$$MAJOR_VER $(LDFLAGS) -o $@.$$VER \
- $(OBJ) $(DAGLIBS)
@V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
- -o $@.$$VER $(OBJ) $(DAGLIBS)
+ -o $@.$$VER $(OBJ) $(ADDLOBJ) $(LIBS)
#
# The following rule succeeds, but the result is untested.
COMPAT_VER=1; \
CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
$(CC) -dynamiclib -undefined error $(LDFLAGS) \
- -o libpcap.$$VER.dylib $(OBJ) \
+ -o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJ) $(LIBS) \
-install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
-compatibility_version $$COMPAT_VER \
-current_version $$CURRENT_VER
#
libpcap.sl: $(OBJ)
@rm -f $@
scanner.c: $(srcdir)/scanner.l
@rm -f $@
sed -e 's|@includedir[@]|$(includedir)|g' \
-e 's|@libdir[@]|$(libdir)|g' \
- -e 's|@DEPLIBS[@]|$(DEPLIBS)|g' \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
chmod a+x $@
V_SHLIB_CMD
V_SHLIB_OPT
V_SONAME_OPT
+ADDLOBJ
SSRC
DYEXT
-DAGLIBS
-DEPLIBS
MAN_FILE_FORMATS
MAN_MISC_INFO
PCAP_SUPPORT_USB
# Note: spaces after V_SONAME_OPT are significant; GCC's
# option is "-Wl,-soname,{soname}", with the soname part
# of the option, while other C compiler drivers take it
- # as a regular optio with the soname following the option.
+ # as a regular option with the soname following the option.
#
case "$host_os" in
if test $ac_cv_lbl_dag_api = yes; then
V_INCLS="$V_INCLS -I$dag_include_dir"
- V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj"
+ ADDLOBJ="$dagapi_obj $dagopts_obj $dagreg_obj"
if test $V_PCAP != dag ; then
SSRC="pcap-dag.c"
fi
#define HAVE_DAG_STREAMS_API 1
_ACEOF
- DAGLIBS="-ldag"
+ V_LIBS="$V_LIBS -ldag"
fi
# We need "-lodm" and "-lcfg", as libpcap requires them on
# AIX.
- DEPLIBS="-lodm -lcfg"
+ V_LIBS="-lodm -lcfg"
;;
darwin*)
-
{ echo "$as_me:$LINENO: checking for USB sniffing support" >&5
echo $ECHO_N "checking for USB sniffing support... $ECHO_C" >&6; }
case "$host_os" in
V_SHLIB_CMD!$V_SHLIB_CMD$ac_delim
V_SHLIB_OPT!$V_SHLIB_OPT$ac_delim
V_SONAME_OPT!$V_SONAME_OPT$ac_delim
+ADDLOBJ!$ADDLOBJ$ac_delim
SSRC!$SSRC$ac_delim
DYEXT!$DYEXT$ac_delim
-DAGLIBS!$DAGLIBS$ac_delim
-DEPLIBS!$DEPLIBS$ac_delim
MAN_FILE_FORMATS!$MAN_FILE_FORMATS$ac_delim
MAN_MISC_INFO!$MAN_MISC_INFO$ac_delim
PCAP_SUPPORT_USB!$PCAP_SUPPORT_USB$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
if test $ac_cv_lbl_dag_api = yes; then
V_INCLS="$V_INCLS -I$dag_include_dir"
- V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj"
+ ADDLOBJ="$dagapi_obj $dagopts_obj $dagreg_obj"
if test $V_PCAP != dag ; then
SSRC="pcap-dag.c"
fi
if test "$dag_streams" = 1; then
AC_DEFINE(HAVE_DAG_STREAMS_API, 1, [define if you have streams capable DAG API])
- DAGLIBS="-ldag"
+ V_LIBS="$V_LIBS -ldag"
fi
AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])
# We need "-lodm" and "-lcfg", as libpcap requires them on
# AIX.
- DEPLIBS="-lodm -lcfg"
+ V_LIBS="-lodm -lcfg"
;;
darwin*)
AC_SUBST(V_SHLIB_OPT)
AC_SUBST(V_SONAME_OPT)
AC_SUBST(V_YACC)
+AC_SUBST(ADDLOBJ)
AC_SUBST(SSRC)
AC_SUBST(DYEXT)
-AC_SUBST(DAGLIBS)
-AC_SUBST(DEPLIBS)
AC_SUBST(MAN_FILE_FORMATS)
AC_SUBST(MAN_MISC_INFO)
if [ "$static" = 1 ]
then
#
- # Include DEPLIBS so that the flags include libraries containing
+ # Include LIBS so that the flags include libraries containing
# routines that libpcap uses.
#
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
- echo "-I @includedir@ -L @libdir@ -lpcap @DEPLIBS@"
+ echo "-I @includedir@ -L @libdir@ -lpcap @LIBS@"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
- echo "-I @includedir@ -L @libdir@ @DEPLIBS@"
+ echo "-I @includedir@ -L @libdir@ @LIBS@"
elif [ "$show_cflags" = 1 ]
then
echo "-I @includedir@"
elif [ "$show_libs" = 1 ]
then
- echo "-L @libdir@ -lpcap @DEPLIBS@"
+ echo "-L @libdir@ -lpcap @LIBS@"
elif [ "$show_additional_libs" = 1 ]
then
- echo "@DEPLIBS@"
+ echo "@LIBS@"
fi
else
#
- # Omit DEPLIBS - libpcap is assumed to be linked with those
+ # Omit LIBS - libpcap is assumed to be linked with those
# libraries, so there's no need to do so explicitly.
#
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]