I am crosscompileing syslog-ng to to a powerpc, and had to make a few changes to make it compile properly. If anyone is interested I have included these two patch files here. First I updated configure.in to allow you to specify a path to libfl.a (it should also work with libl.a, but I have not tested this). The configure tests already included does not find the lex libraries for me (I do not have them installed. Instead I am just building flex as compile time dependency.) Second, the configure script was explicitly running configure and make from the script. I did not like configure calling make, and it was not using any of my configure arguements for libol. As a result libol was built for my build machine instead of the target device. The syslog-ng configure script will now now call configure for libol (with all the supplied options), and will not run make. When make is run from the syslog-ng directory it will also run make for libol. -Ken --- Makefile.am.org 2006-01-24 17:18:51.000000000 -0500 +++ Makefile.am 2006-01-24 22:26:21.000000000 -0500 @@ -1,4 +1,4 @@ -SUBDIRS = src doc contrib +SUBDIRS = $(LIBOL_DIR) src doc contrib EXTRA_DIST = PORTS syslog-ng.spec syslog-ng.spec.in syslog-ng.spec.bb syslog-ng.spec.bb.in README.spoof dist.conf dist.conf.in --- configure.in.org 2006-01-24 11:56:15.000000000 -0500 +++ configure.in 2006-01-25 11:19:34.000000000 -0500 @@ -56,6 +56,11 @@ AC_ARG_WITH(libnet, [ --with-libnet=path use path to libnet-config script], , [with_libnet=""]) + +AC_ARG_WITH(lex, + AC_HELP_STRING([--with-lexlib=path],[use an uninstalled copy of lex]), + [with_lex=`cd $with_lex; pwd`], + [with_lex=""]) AC_ARG_ENABLE(sun-streams, [ --enable-sun-streams enable Sun STREAMS support even if not detected]) @@ -85,8 +90,8 @@ sysconfdir="${sysconfdir}/syslog-ng" AM_SANITY_CHECK dnl Checks for programs. -AC_PROG_CC -AM_PROG_CC_STDC +#AC_PROG_CC +#AM_PROG_CC_STDC AC_PROG_YACC AM_PROG_LEX AC_PROG_MAKE_SET @@ -355,15 +360,33 @@ else AC_MSG_RESULT([no clues, linking everything dynamically, please send appropriate ld arguments to syslog-ng@lists.balabit.hu]) fi -AC_MSG_CHECKING(libol version >= $LIBOL_REQ_MAJOR.$LIBOL_REQ_MINOR.$LIBOL_REQ_PATCH) +if test "$with_lex" != ""; then + AC_MSG_CHECKING(for uninstalled version of lex in $with_lex) + if test -f "$with_lex/libfl.a"; then + LEXLIB="$with_lex/libfl.a" + AC_MSG_RESULT($LEXLIB) + elif test -f "$with_lex/libl.a"; then + LEXLIB="$with_lex/libl.a" + AC_MSG_RESULT($LEXLIB) + else + AC_ERROR(no) + fi +fi + +AC_MSG_CHECKING(for libol) if test "$with_libol" = ""; then if test ! -x "`which libol-config`" ; then bundled_libol_dir="`find $srcdir/libol-* -maxdepth 0 -type d 2>/dev/null`" if test -n "$bundled_libol_dir"; then - test -d $bundled_libol_dir || mkdir $bundled_libol_dir - (cd $bundled_libol_dir; ./configure && make) + test -d $bundled_libol_dir || mkdir $bundled_libol_dir with_libol=$bundled_libol_dir + AC_MSG_RESULT(Configuration required) + + # Remove the single quotes from the configure args, and pass them to + # configure for libol + ac_configure_str=`echo $ac_configure_args | sed -e "s/'//g"` + (cd $bundled_libol_dir; ./configure $ac_configure_str) else AC_ERROR(Bundled libol not found) fi @@ -372,9 +395,12 @@ if test "$with_libol" = ""; then LIBOL_CFLAGS=`libol-config --cflags` LIBOL_LIBS=`libol-config --static-libs` MAKE_CLASS="make_class" + AC_MSG_RESULT(ok) fi fi +AC_MSG_CHECKING(libol version >= $LIBOL_REQ_MAJOR.$LIBOL_REQ_MINOR.$LIBOL_REQ_PATCH) + if test "$with_libol" != ""; then if test ! -x $with_libol/libol-config; then AC_ERROR(libol-config not found in the specified location) @@ -386,7 +412,6 @@ if test "$with_libol" != ""; then MAKE_CLASS="$with_libol/utils/make_class" fi - LIBOL_VERSION=[`echo $LIBOL_VERSION | cut -d '+' -f 1`] LIBOL_MAJOR=[`echo $LIBOL_VERSION | cut -d '.' -f 1`] LIBOL_MINOR=[`echo $LIBOL_VERSION | cut -d '.' -f 2`]