Re: libIIOP not built with -fPIC
Greetings,
Finally got around to making a patch for ORBit, which is attached. I
think it will preserve the libwrap.a behavior for platforms missing
libwrap.so, so it might even be accepted upstream. Best of all, now all
those GNOME packages for debian-arm actually work! Yay!!!
To use it, you have to run autoconf and automake in the top orbit source
directory after patching and before building. (The configure target in
debian/rules assumes the macros dir, which doesn't come with the source
package.)
It's kinda kludgey, but not as much as the original hack to use
libwrap.a!
Zeen,
--
Adam Powell http://lyre.mit.edu/~powell/
Thomas B. King Assistant Professor of Materials Engineering
77 Massachusetts Ave. Rm. 4-117 Phone (617) 452-2086
Cambridge, MA 02139 USA Fax (617) 253-5418
--- configure.in.bak Tue Sep 28 12:11:34 1999
+++ configure.in Thu Jan 27 10:38:14 2000
@@ -140,21 +140,31 @@
# not letting us link a .a (libwrap.a) into a libtool library
# (libIIOP.la) for internal use by that libtool library.
+# Modified to prefer shared libwrap by Adam Powell
+
AC_MSG_CHECKING("whether to use TCP wrappers")
LIBWRAP_PATH=""
+LIB_WRAP=""
for I in $LDFLAGS $LIBS -L/usr/lib; do
case "$I" in
-L*)
THEFILE="`echo $I | sed -e 's,^-L,,'`"
- echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
- if test -f $THEFILE/libwrap.a; then
- LIBWRAP_PATH=$THEFILE/libwrap.a
- echo "Found $LIBWRAP_PATH" 1>&5
+ echo "From $I, checking in dir $THEFILE for libwrap.so" 1>&5
+ if test -f $THEFILE/libwrap.so; then
+ LIB_WRAP=-lwrap
+ echo "Found $THEFILE/libwrap.so" 1>&5
break
+ else
+ echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
+ if test -f $THEFILE/libwrap.a; then
+ LIBWRAP_PATH=$THEFILE/libwrap.a
+ echo "Found $LIBWRAP_PATH" 1>&5
+ break
+ fi
fi
esac
done
-if test -n "$LIBWRAP_PATH"; then
+if test -n "$LIBWRAP_PATH" || test -n "$LIB_WRAP"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -179,7 +189,7 @@
if test -n "$LIBWRAP_PATH"; then
AC_MSG_CHECKING(whether -lwrap requires -lnsl)
ORIG_LIBS="$LIBS"
- LIBS="$LIBWRAP_PATH $LIBS"
+ LIBS="$LIBWRAP_PATH $LIB_WRAP $LIBS"
AC_TRY_LINK([
extern int hosts_access;
int allow_severity, deny_severity;
@@ -204,6 +214,7 @@
fi
AC_SUBST(LIBWRAP_PATH)
+AC_SUBST(LIB_WRAP)
AM_CONDITIONAL(HAVE_HOSTS_ACCESS, test -n "$LIBWRAP_PATH")
if test -n "$LIBWRAP_PATH"; then
AC_DEFINE(HAVE_HOSTS_ACCESS)
--- src/IIOP/Makefile.am.bak Tue Sep 14 18:21:30 1999
+++ src/IIOP/Makefile.am Thu Jan 27 10:31:31 2000
@@ -1,8 +1,11 @@
LIBWRAP_PATH=@LIBWRAP_PATH@
+LIB_WRAP=@LIB_WRAP@
if HAVE_HOSTS_ACCESS
libwrap_files=$(addsuffix .lo, $(basename $(filter %.o, $(shell ar t $(LIBWRAP_PATH)))))
+libwrap_deps=
else
libwrap_files=
+libwrap_deps=$(LIB_WRAP)
endif
libIIOPincludedir = $(includedir)/ORBit/IIOP
@@ -35,7 +38,7 @@
iiop-encoders.h \
iiop-endian.h
-libIIOP_la_LIBADD=$(libwrap_files)
+libIIOP_la_LIBADD=$(libwrap_files) $(libwrap_deps)
$(libwrap_files): make_libwrap_files
Reply to: