cvs commit: ALFS/halfling configure.ac

highos at linuxfromscratch.org highos at linuxfromscratch.org
Wed Apr 17 00:13:49 PDT 2002


highos      02/04/17 00:13:49

  Modified:    halfling configure.ac
  Log:
  Initial support for libxml2 auto-detection and setup.
  This is slightly bugging however, as if you specific --with-libxml2 with
  no additional options, it will break.. will have to fix.
  
  Revision  Changes    Path
  1.2       +45 -0     ALFS/halfling/configure.ac
  
  Index: configure.ac
  ===================================================================
  RCS file: /home/cvsroot/ALFS/halfling/configure.ac,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- configure.ac	17 Apr 2002 05:39:46 -0000	1.1
  +++ configure.ac	17 Apr 2002 07:13:49 -0000	1.2
  @@ -1,6 +1,51 @@
   AC_INIT(halfling, CVS, highos at linuxfromscratch.org)
   AM_INIT_AUTOMAKE(halfling, CVS, no-define)
   
  +LIBXML2_REQUIRED_VERSION=2.4.1
  +dnl AC_SUBST(LIBXML2_REQUIRED_VERSION)
  +
  +
  +dnl Add our extra little libxml2 switch to configure..
  +
  +AC_ARG_WITH(libxml2,
  +[  --with-libxml2=PREFIX   Specify the location of libxml2 installation],
  +    LIBXML2_PREFIX=$withval
  +)
  +
  +
  +
  +AC_PROG_CC
  +AC_PROG_INSTALL
  +
  +
  +dnl Let's find libxml2 and get setup.
  +
  +AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML2_REQUIRED_VERSION)
  +
  +if test "$LIBXML2_PREFIX" != ""
  +then
  +    XML2_CONFIG=${LIBXML2_PREFIX}/bin/xml2-config
  +else
  +    XML2_CONFIG=xml2-config
  +fi
  +
  +if $XML2_CONFIG --libs print > /dev/null 2>&1
  +then
  +    XML2_VERSION=`$XML2_CONFIG --version`
  +
  +    if test `echo $XML2_VERSION | tr -d .` -ge `echo $LIBXML2_REQUIRED_VERSION | tr -d .`
  +    then
  +	LIBXML2_LIBS=`$XML2_CONFIG --libs`
  +	LIBXML2_CLFAGS=`$XML2_CONFIG --cflags`
  +	AC_MSG_RESULT($XML2_VERSION found)
  +    else
  +	AC_MSG_ERROR(Version $XML2_VERSION found.  You need at least libxml2 $LIBXML2_REQUIRED VERSION for this version of halfling.)
  +    fi
  +else
  +    AC_MSG_ERROR([Could not find libxml2 anywhere, download a copy from ftp://xmlsoft.org/.])
  +fi
  +
  +
   AC_CONFIG_FILES(Makefile src/Makefile)
   
   AC_OUTPUT
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list