File: configure.ac

package info (click to toggle)
rats 2.1-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,140 kB
  • ctags: 1,316
  • sloc: ansic: 4,892; xml: 3,604; lex: 1,519; sh: 176; makefile: 114
file content (28 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
AC_INIT(rats-c.xml)
AC_PROG_CC()
AC_PROG_LEX()
AC_PROG_INSTALL
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"
CPPFLAGS="$CPPFLAGS -I/usr/local/include"

AC_ARG_WITH(expat-lib,
    [  --with-expat-lib[=path] ],
    [LDFLAGS="$LDFLAGS -L$withval"],
    )
AC_ARG_WITH(expat-include,
    [  --with-expat-include[=path] ],
    [CFLAGS="$CFLAGS -I$withval" 
     CPPFLAGS="$CPPFLAGS -I$withval"]
    )
AC_CHECK_LIB(expat, XML_ParserCreate, [],AC_MSG_ERROR("Expat library not found. You may need to use the --with-expat-lib\[=path\] command line switch to specify which directory the expat libraries are located"))
AC_CHECK_HEADERS(expat.h, [expat_h_found="yes"], [expat_h_found="no"])
AC_CHECK_HEADERS(xmlparse.h, [xmlparse_h_found="yes"], [xmlparse_h_found="no"])


if test "$xmlparse_h_found" = "no" && test "$expat_h_found" = "no"
then
  AC_MSG_ERROR("Unable to locate xmlparse.h or expat.h. You may need to use the --with-expat-include\[=path\] to specify which directory the expat include files are located") 
fi

AC_OUTPUT(Makefile)