diff --git a/ChangeLog b/ChangeLog index 672fec0..457e8c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 0.2.8 ===== +- 24-Mar-2003: - made compile with uClibc (see doc/FLI4L_HOWTO.txt) - 22-Mar-2003: - made compile on SUSE5.3 (libc5) - added --enable-almost-static feature switch. This will build siproxd statically linked against libosip & pthreads diff --git a/README b/README index 6dea322..96a1ef4 100644 --- a/README +++ b/README @@ -39,9 +39,7 @@ HOW TO GET STARTED - ./configure - For Flifl: use ./configure --enable-almost-static - This will build siproxd statically linked against libosib, pthreads and - dynamically against libc. + For Flifl: see doc/FLI4L_HOWTO.txt - make diff --git a/configure.in b/configure.in index 5e9ec3e..d607293 100644 --- a/configure.in +++ b/configure.in @@ -6,7 +6,8 @@ dnl 8-Sep-2002 tries included more tests for used functions dnl 17-Sep-2002 tries fail configure if needed libs not there dnl 14-Nov-2002 tries support for *BSD systems dnl 22-Mar-2003 tries check for sockaddr_t, hstrerror() -dnl feature almost-static (for Fli4l use) +dnl --enable-almost-static (for Fli4l use) +dnl --enable-uclibc (uClibc building support) dnl dnl dnl @@ -106,6 +107,41 @@ case "$target" in ;; esac + +dnl +dnl uClibc support (only available on Linux, yet) +dnl +case "$target" in + *-*-linux*) + uclibc_path="/usr/i386-linux-uclibc/" + AC_MSG_CHECKING("uClibc path") + AC_ARG_WITH(uclibc-path, + [ --with-uclibc-path=DIR directory to uClibc development], + uclibc_path="$withval" ) + AC_MSG_RESULT($uclibc_path) + + AC_MSG_CHECKING("build against uClibc") + AC_ARG_ENABLE(uclibc, + [ --enable-uclibc build against a uClibc], + build_uclibc=$enableval, + build_uclibc="no") + AC_MSG_RESULT($build_uclibc) + ;; + + *) + AC_MSG_RESULT("FEATURE uclibc not available on this platform") + ;; +esac + +if test "x$build_uclibc" = "xyes"; then + CC=$uclibc_path/bin/i386-uclibc-gcc + LDD=$uclibc_path/bin/i386-uclibc-ldd + LD=$uclibc_path/bin/i386-uclibc-ld + CPPFLAGS=" -I $uclibc_path/include/ $CPPFLAGS" + LIBS=" -L $uclibc_path/lib/ $LIBS" +fi + + dnl dnl Features: dnl almost-static (only available on Linux, yet) @@ -124,12 +160,26 @@ case "$target" in AC_MSG_RESULT("FEATURE almost-static not available on this platform") ;; esac +if test "x$build_almost_static" = "xyes"; then + if test "x$build_uclibc" = "xyes"; then + dnl uClibc: make libosip static + build_static_libosip="yes" + build_static_pthread="no" + else + dnl must be standard libc: make libosip and libpthread static + build_static_libosip="yes" + build_static_pthread="yes" + fi +else + build_static_libosip="no" + build_static_pthread="no" +fi dnl dnl Check for libosip dnl -if test "x$build_almost_static" = "xno"; then +if test "x$build_static_libosip" = "xno"; then dnl link dynamically (default) AC_CHECK_LIB(osip, parser_init,, echo "*** ERROR: libosip is required!";exit 1;) @@ -137,7 +187,7 @@ else dnl link statically to this lib dnl (this probably only will work on linux yet...) AC_MSG_CHECKING("where I can find libosip.a") - libosip_static=`find /lib /usr/lib /usr/local/lib $extra_libs \ + libosip_static=`find $extra_libs /lib /usr/lib /usr/local/lib \ -name libosip.a 2>/dev/null|head -1` if test "x$libosip_static" != "x"; then LIBS="$libosip_static $LIBS" @@ -153,7 +203,7 @@ dnl Check for pthreads dnl ACX_PTHREAD(, echo "*** ERROR: pthreads is required!"; exit 1;) -if test "x$build_almost_static" = "xno"; then +if test "x$build_static_pthread" = "xno"; then dnl link dynamically (default) LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" @@ -162,7 +212,7 @@ else dnl link statically to this lib dnl (this probably only will work on linux yet...) AC_MSG_CHECKING("where I can find static threads library") - libpthreads_static=`find /lib /usr/lib /usr/local/lib $extra_libs \ + libpthreads_static=`find $extra_libs /lib /usr/lib /usr/local/lib \ -name 'lib*thread*.a' 2>/dev/null| \ egrep 'lib[p]?thread[s]?.a' |head -1` if test "x$libpthreads_static" != "x"; then diff --git a/doc/FLI4L_HOWTO.txt b/doc/FLI4L_HOWTO.txt new file mode 100644 index 0000000..2771aba --- /dev/null +++ b/doc/FLI4L_HOWTO.txt @@ -0,0 +1,114 @@ +compiling siproxd for FLI4L +=========================== + +2.0.x (libc5 based): + + 1) LIBOSIP + On an libc5 system (eg SUSE 5.3), first build and install + libosip. Probably you get an error when building in file + parser/port_misc.c, telling you about a non existing include + file sys/unistd.h. To fix this, simply edit the .c file and + replace the erroneous include statement to include + instead of + $ ./configure + $ make + $ make install + + 2) SIPROXD + Delete the config.cache file. + Configure siproxd: + $ ./configure --enable-almost-static + This will build siproxd statically linked against libosib, + pthreads and dynamically against libc. Then + $ make + + + + + +2.1.x (uClibc based): + Prerequisite: uClibc development enviroment installed + + + 1) LIBOSIP + Does not build very smoothly and properly. However, to link siproxd + STATICALLY against libosip this procedure might work. + Apply same fix to port_misc as described above. + Apply the following path to configure.in +---snipp--- +--- configure.in.orig Sat Jun 15 02:26:59 2002 ++++ configure.in Sun Mar 23 01:44:12 2003 +@@ -52,6 +52,38 @@ + + dnl declare --enable-* args and collect ac_help strings + ++dnl&&&&&&&&&&&&&&&&&& ++dnl ++dnl uClib support (only available on Linux, yet) ++dnl ++uclib_path="/usr/i386-linux-uclibc/" ++AC_MSG_CHECKING("uClib path") ++AC_ARG_WITH(uclib-path, ++ [ --with-uclib-path=DIR directory to uClib development], ++ uclib_path="$withval" ) ++AC_MSG_RESULT($uclib_path) ++ ++AC_MSG_CHECKING("build against uClib") ++AC_ARG_ENABLE(uclib, ++ [ --enable-uclib build against a uClib], ++ build_uclib=$enableval, ++ build_uclib="no") ++AC_MSG_RESULT($build_uclib) ++ ++ ++if test "x$build_uclib" = "xyes"; then ++ ++dnl export PATH=$uclib_path/bin:$PATH ++dnl export UCLIBC_DEVEL_PREFIX=$uclib_path ++ ++ CC=$uclib_path/bin/i386-uclibc-gcc ++ LDD=$uclib_path/bin/i386-uclibc-ldd ++ LD=$uclib_path/bin/i386-uclibc-ld ++ CPPFLAGS=" -I $uclib_path/include/ $CPPFLAGS" ++ LIBS="-L $uclib_path/lib/ $LIBS" ++fi ++dnl&&&&&&&&&&&&&&&&&& ++ + AC_ARG_ENABLE(debug, + [ --disable-debug turn off debugging.], + disable_debug=$enableval,disable_debug="yes") +---snipp--- + + Create new ./configure script + $ aclocal -I scripts/ + $ autoconf + + Configure and build libosip: + $ ./configure --prefix= + --with-uclib-path= + --enable-uclib + $ make -i clean + $ make -i + $ make -i install + + Ignore any compile errors! + + (This is just a very dirty hack to get libosip half way built) + + 2) SIPROXD + Delete the config.cache file. + Configure siproxd: + $ ./configure --with-uclibc-path= + --enable-uclibc --with-extra-includes=/include + --with-extra-libs=/lib --enable-almost-static + This will build siproxd statically linked against libosib and + dynamically linked against uClibc. + $ make + + "$ ldd src/siproxd" reports: + libpthread.so.0 => /lib/libpthread.so.0 + libc.so.0 => /lib/libc.so.0 + ld-uClibc.so.0 => /lib/ld-uClibc.so.0 + + Does Flifl 2.1.x include the full uClibc dynamic libraries (especially + the pthreads.so)?