aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Lim <darren.lim@endace.com>2009-09-17 15:24:28 +1200
committerDarren Lim <darren.lim@endace.com>2009-09-17 15:24:28 +1200
commit420e592e02549a3b5e039d66c7ffa66176afffa8 (patch)
tree893ddb098802addd511e3a0223417c8e8ec0071f
parentbb8cce59686f4ebba5aeee3073fb9322ec9ef6f9 (diff)
Added the dagutil.o object file from the Endace DAG libraries into the
libpcap archive. A dependency has been introduced whereby the dagapi.o object depends on functions in the dagutil.o as og DAG software release 3.4.1. This change is backwards compatible with older versions of the DAG libraries.
-rwxr-xr-xconfigure47
-rw-r--r--configure.in32
2 files changed, 73 insertions, 6 deletions
diff --git a/configure b/configure
index 235de94..ca72f9e 100755
--- a/configure
+++ b/configure
@@ -5144,11 +5144,13 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -5188,11 +5190,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -8624,8 +8628,41 @@ echo "${ECHO_T}yes ($dagreg_obj)" >&6; }
fi
if test $ac_cv_lbl_dag_api = yes; then
+ # Under 2.5.x only we need to add dagutil.o.
+ if test -r $dag_include_dir/dagutil.h; then
+ { echo "$as_me:$LINENO: checking dagutil.o" >&5
+echo $ECHO_N "checking dagutil.o... $ECHO_C" >&6; }
+ dagutil_obj=no
+ if test -r $dag_lib_dir/dagutil.o; then
+ # Object file is ready and waiting.
+ dagutil_obj=$dag_lib_dir/dagutil.o
+ elif test -r $dag_lib_dir/libdag.a; then
+ # Extract from libdag.a.
+ ar x $dag_lib_dir/libdag.a dagutil.o 2>/dev/null
+ if test -r ./dagutil.o; then
+ dagutil_obj=./dagutil.o
+ else
+ ar x $dag_lib_dir/libdag.a libdag_la-dagutil.o 2>/dev/null
+ if test -r ./libdag_la-dagutil.o; then
+ dagutil_obj=./libdag_la-dagutil.o
+ fi
+ fi
+ fi
+
+ if test $dagutil_obj = no; then
+ { echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&5
+echo "${ECHO_T}no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&6; }
+ ac_cv_lbl_dag_api=no
+ else
+ { echo "$as_me:$LINENO: result: yes ($dagutil_obj)" >&5
+echo "${ECHO_T}yes ($dagutil_obj)" >&6; }
+ fi
+ fi
+fi
+
+if test $ac_cv_lbl_dag_api = yes; then
V_INCLS="$V_INCLS -I$dag_include_dir"
- ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $dagapi_obj $dagopts_obj $dagreg_obj"
+ ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $dagapi_obj $dagopts_obj $dagreg_obj $dagutil_obj"
if test $V_PCAP != dag ; then
SSRC="pcap-dag.c"
fi
diff --git a/configure.in b/configure.in
index cbe3b66..390a360 100644
--- a/configure.in
+++ b/configure.in
@@ -819,8 +819,38 @@ if test $ac_cv_lbl_dag_api = yes; then
fi
if test $ac_cv_lbl_dag_api = yes; then
+ # Under 2.5.x only we need to add dagutil.o.
+ if test -r $dag_include_dir/dagutil.h; then
+ AC_MSG_CHECKING([dagutil.o])
+ dagutil_obj=no
+ if test -r $dag_lib_dir/dagutil.o; then
+ # Object file is ready and waiting.
+ dagutil_obj=$dag_lib_dir/dagutil.o
+ elif test -r $dag_lib_dir/libdag.a; then
+ # Extract from libdag.a.
+ ar x $dag_lib_dir/libdag.a dagutil.o 2>/dev/null
+ if test -r ./dagutil.o; then
+ dagutil_obj=./dagutil.o
+ else
+ ar x $dag_lib_dir/libdag.a libdag_la-dagutil.o 2>/dev/null
+ if test -r ./libdag_la-dagutil.o; then
+ dagutil_obj=./libdag_la-dagutil.o
+ fi
+ fi
+ fi
+
+ if test $dagutil_obj = no; then
+ AC_MSG_RESULT([no (checked $dag_lib_dir $dag_lib_dir/libdag.a)])
+ ac_cv_lbl_dag_api=no
+ else
+ AC_MSG_RESULT([yes ($dagutil_obj)])
+ fi
+ fi
+fi
+
+if test $ac_cv_lbl_dag_api = yes; then
V_INCLS="$V_INCLS -I$dag_include_dir"
- ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $dagapi_obj $dagopts_obj $dagreg_obj"
+ ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $dagapi_obj $dagopts_obj $dagreg_obj $dagutil_obj"
if test $V_PCAP != dag ; then
SSRC="pcap-dag.c"
fi