[Snort-devel] configure.in for IDMEF

Yasuhiro ABE m5031201 at ...166...
Fri Dec 15 11:08:43 EST 2000


Hello,

I tried to compile IDMEF-xml-plugin_0.1 with snort-1.7beta8, but
the configure script stopped when checking libxml-2 stuffs.

Environments:
  linux-2.2.17
  libxml2: /usr/local/libxml2/{include,lib} # installed by 'make install'
  libidmef: /usr/local/libidmef/{include,lib} # moved manually
  # also libxml1 is installed in /usr/{include/gnome-lib,lib}

Problems:
  I have libxml.so.1.8.9 and libxml.so.2.2.10, that means the configure
  script finds libxml.so.1 first.
  The configure script cannot find some include files included in
  $INCVAL/tree.h.

I guess the configure script will fail in some cases, typically
my environment. I modified configure.in by hand as the followings;

==begin
--- configure.in.original       Sat Dec 16 00:06:59 2000
+++ configure.in        Sat Dec 16 00:10:47 2000
@@ -481,20 +481,23 @@
   fi
 fi
 
-INCVAL="/usr/include/libxml"
+INCVAL="/usr/include"
 LIBVAL="/usr/lib"
 AC_ARG_WITH(libxml_includes,
       [ --with-libxml-includes=DIR  libxml include directory],
       [INCVAL="$withval"])
 
-AC_CHECK_HEADER($INCVAL/tree.h, MYINC=yes, MYINC=no)
+_cppflags=$CPPFLAGS
+CPPFLAGS="-I$INCVAL $CPPFLAGS"
+AC_CHECK_HEADER($INCVAL/libxml/tree.h, MYINC=yes, MYINC=no)
+CPPFLAGS=$_cppflags
 
 if test "$MYINC" = "yes"; then
    AC_ARG_WITH(libxml_libraries,
       [ --with-libxml-libraries=DIR  libxml library directory],
       [LIBVAL="$withval"])

-   LDFLAGS="${LDFLAGS} -L${LIBVAL}"
+   LDFLAGS="-L${LIBVAL} ${LDFLAGS}"
 
    AC_CHECK_LIB(xml, xmlNewNode, , MYLIB=no)
    if test "$MYLIB" != "no"; then
==end

regards,
----
Yasuhiro ABE <m5031201 at ...166...,yasu at ...167...>
http://www.u-aizu.ac.jp/%7Em5031201/
http://dengaku.org/yasu/



More information about the Snort-devel mailing list