PERFORCE change 94156 for review
Robert Watson
rwatson at FreeBSD.org
Tue Mar 28 11:56:20 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94156
Change 94156 by rwatson at rwatson_zoo on 2006/03/28 11:56:08
Don't test for -lbsm, since we're going to use our own copy anyway.
Do test for dlsym() in libc, then libdl, since that's required on
Linux.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/config/config.h.in#7 edit
.. //depot/projects/trustedbsd/openbsm/configure#17 edit
.. //depot/projects/trustedbsd/openbsm/configure.ac#19 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/config/config.h.in#7 (text+ko) ====
@@ -42,9 +42,6 @@
/* Define if ipc_perm.__seq instead of seq */
#undef HAVE_IPC_PERM___SEQ
-/* Define to 1 if you have the `bsm' library (-lbsm). */
-#undef HAVE_LIBBSM
-
/* Define to 1 if you have the <machine/endian.h> header file. */
#undef HAVE_MACHINE_ENDIAN_H
==== //depot/projects/trustedbsd/openbsm/configure#17 (xtext) ====
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#17 .
+# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#18 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for OpenBSM 1.0a5.
#
@@ -19627,16 +19627,13 @@
-# Checks for libraries.
-# FIXME: Replace `main' with a function in `-lbsm':
-
-echo "$as_me:$LINENO: checking for main in -lbsm" >&5
-echo $ECHO_N "checking for main in -lbsm... $ECHO_C" >&6
-if test "${ac_cv_lib_bsm_main+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing dlsym" >&5
+echo $ECHO_N "checking for library containing dlsym... $ECHO_C" >&6
+if test "${ac_cv_search_dlsym+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsm $LIBS"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_dlsym=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -19644,11 +19641,72 @@
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 dlsym ();
+int
+main ()
+{
+dlsym ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_search_dlsym="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_dlsym" = no; then
+ for ac_lib in -ldl; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* 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 dlsym ();
int
main ()
{
-main ();
+dlsym ();
;
return 0;
}
@@ -19675,25 +19733,23 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_bsm_main=yes
+ ac_cv_search_dlsym="-l$ac_lib"
+break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_bsm_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_main" >&5
-echo "${ECHO_T}$ac_cv_lib_bsm_main" >&6
-if test $ac_cv_lib_bsm_main = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBSM 1
-_ACEOF
-
- LIBS="-lbsm $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_search_dlsym" >&5
+echo "${ECHO_T}$ac_cv_search_dlsym" >&6
+if test "$ac_cv_search_dlsym" != no; then
+ test "$ac_cv_search_dlsym" = "none required" || LIBS="$ac_cv_search_dlsym $LIBS"
fi
==== //depot/projects/trustedbsd/openbsm/configure.ac#19 (text+ko) ====
@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
AC_INIT([OpenBSM], [1.0a5], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#18 $])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#19 $])
AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADER([config/config.h])
@@ -16,9 +16,7 @@
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-# Checks for libraries.
-# FIXME: Replace `main' with a function in `-lbsm':
-AC_CHECK_LIB([bsm], [main])
+AC_SEARCH_LIBS(dlsym, -ldl,,)
# Checks for header files.
AC_HEADER_STDC
More information about the trustedbsd-cvs
mailing list