forked from aria2/aria2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibexpat.m4
33 lines (26 loc) · 901 Bytes
/
libexpat.m4
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
29
30
31
32
33
AC_DEFUN([AM_PATH_LIBEXPAT],
[
AC_ARG_WITH([libexpat-prefix],
[ --with-libexpat-prefix=PREFIX Prefix where libexpat installed (optional)],
[libexpat_prefix=$withval],
[libexpat_prefix=""])
if test "x$libexpat_prefix" = "x"; then
libexpat_prefix="/usr"
fi
libexpat_prefix_lib=$libexpat_prefix/lib
libexpat_prefix_include=$libexpat_prefix/include
LIBS_save=$LIBS
CPPFLAGS_save=$CPPFLAGS
LIBS="-L$libexpat_prefix_lib $LIBS"
CPPFLAGS="-I$libexpat_prefix_include $CPPFLAGS"
AC_CHECK_LIB([expat], [XML_ParserCreate], [have_libexpat=yes])
if test "x$have_libexpat" = "xyes"; then
AC_DEFINE([HAVE_LIBEXPAT], [1], [Define to 1 if you have libexpat.])
LIBEXPAT_LIBS="-L$libexpat_prefix_lib -lexpat"
LIBEXPAT_CPPFLAGS="-I$libexpat_prefix_include"
AC_SUBST(LIBEXPAT_LIBS)
AC_SUBST(LIBEXPAT_CPPFLAGS)
fi
LIBS=$LIBS_save
CPPFLAGS=$CPPFLAGS_save
])