OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/configure.ac versions 1.5 and 1.6
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/pth/configure.ac 1.5 -> 1.6

--- configure.ac 2002/10/15 20:34:22     1.5
+++ configure.ac 2002/10/20 11:45:10     1.6
@@ -463,10 +463,46 @@
 
 AC_MSG_PART(System Call Mapping)
 
-AC_CHECK_FUNCS(syscall)
+dnl #   check for syscall(2)
 AC_CHECK_HEADERS(sys/syscall.h sys/socketcall.h)
+AC_CHECK_FUNCS(syscall)
 AC_CHECK_DEFINE(SYS_read, sys/syscall.h)
 
+dnl #   check for dlsym(3) with RTLD_NEXT
+AC_CHECK_HEADERS(dlfcn.h)
+AC_CHECK_LIB(dl, dlsym)
+AC_CHECK_FUNCS(dlopen dlsym dlclose)
+AC_CHECK_DEFINE(RTLD_NEXT, dlfcn.h)
+
+dnl #   check for path to dynamic C library
+AC_MSG_CHECKING([for syscall dynamic libraries])
+pth_syscall_libs=""
+dirs=`echo "$LDFLAGS" |\
+      sed -e 's;-L\([[^ ]]*\);<\1>;g' |\
+      sed -e 's;^[[^<]]*<;;' -e 's;>[[^<]]*<; ;g' -e 's;>.*$;;'`
+dirs="$dirs /usr/lib /lib"
+libs=`echo "$LIBS" |\
+      sed -e 's;-l\([[^ ]]*\);<\1>;g' |\
+      sed -e 's;^[[^<]]*<;;' -e 's;>[[^<]]*<; ;g' -e 's;>.*$;;'`
+libs="$libs c"
+for lib in $libs; do
+    for dir in $dirs; do
+        for ext in so sl; do
+            if test -f "${dir}/lib${lib}.${ext}"; then
+                if test ".$pth_syscall_libs" = .; then
+                    pth_syscall_libs="${dir}/lib${lib}.${ext}"
+                else
+                    pth_syscall_libs="${pth_syscall_libs}:${dir}/lib${lib}.${ext}"
+                fi
+            fi
+        done
+    done
+done
+AC_MSG_RESULT([$pth_syscall_libs])
+AC_DEFINE_UNQUOTED(PTH_SYSCALL_LIBS, 
+                   ["$pth_syscall_libs"],
+                   [define for the paths to syscall dynamic libraries])
+
 AC_MSG_CHECKING([whether soft system call mapping is used])
 AC_ARG_ENABLE(syscall-soft,dnl
 [  --enable-syscall-soft   enable soft system call mapping (default=no)],

CVSTrac 2.0.1