]> The Tcpdump Group git mirrors - libpcap/commitdiff
Added the dagutil.o object file from the Endace DAG libraries into the
authorDarren Lim <[email protected]>
Thu, 17 Sep 2009 03:24:28 +0000 (15:24 +1200)
committerDarren Lim <[email protected]>
Thu, 17 Sep 2009 03:24:28 +0000 (15:24 +1200)
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.

configure
configure.in

index 235de943437e82fdbfab530bd301c03151e6003e..ca72f9eb653dd01d702ba33084f6ba8de435d661 100755 (executable)
--- 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;
 }
@@ -8623,9 +8627,42 @@ echo "${ECHO_T}yes ($dagreg_obj)" >&6; }
        fi
 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
index cbe3b66ff1a9bd095e4e9cbfae20df7ee80cd679..390a3602643f3fb6cede27b6ed3b4fcc949113d3 100644 (file)
@@ -818,9 +818,39 @@ if test $ac_cv_lbl_dag_api = yes; then
        fi
 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