+ echo "$as_me:$LINENO: result: yes ($dagreg_obj)" >&5
+echo "${ECHO_T}yes ($dagreg_obj)" >&6
+ fi
+ fi
+fi
+
+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"
+ if test $V_PCAP != dag ; then
+ SSRC="pcap-dag.c"
+ fi
+
+ # See if we can find a general version string.
+ # Don't need to save and restore LIBS to prevent -ldag being included if there's a found-action (arg 3).
+ saved_ldflags=$LDFLAGS
+ LDFLAGS="-L$dag_lib_dir"
+ echo "$as_me:$LINENO: checking for dag_attach_stream in -ldag" >&5
+echo $ECHO_N "checking for dag_attach_stream in -ldag... $ECHO_C" >&6
+if test "${ac_cv_lib_dag_dag_attach_stream+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldag $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dag_attach_stream ();
+int
+main ()
+{
+dag_attach_stream ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dag_dag_attach_stream=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dag_dag_attach_stream=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dag_dag_attach_stream" >&5
+echo "${ECHO_T}$ac_cv_lib_dag_dag_attach_stream" >&6
+if test $ac_cv_lib_dag_dag_attach_stream = yes; then
+ dag_version="2.5.x"
+else
+ dag_version="2.4.x"
+fi
+
+ LDFLAGS=$saved_ldflags
+
+ # See if we can find a specific version string.
+ echo "$as_me:$LINENO: checking the DAG API version" >&5
+echo $ECHO_N "checking the DAG API version... $ECHO_C" >&6
+ if test -r "$dag_root/VERSION"; then
+ dag_version="`cat $dag_root/VERSION`"
+ fi
+ echo "$as_me:$LINENO: result: $dag_version" >&5
+echo "${ECHO_T}$dag_version" >&6