diff options
author | Nikos Mavrogiannopoulos | 2008-03-05 21:45:58 +0000 |
---|---|---|
committer | Nokis Mavrogiannopoulos | 2008-03-05 21:45:58 +0000 |
commit | 0e277f2bac918d98b4e1090fb8e5e42e5f9c5653 (patch) | |
tree | ce1d56d2d302e9e12ed8636042de8aab4c3d042c /m4 | |
parent | b71edd5f90a3c5c30cc637da1fc6677f09ce5d6c (diff) |
added new apr_memcache.m4 from Guillaume Rousse
Diffstat (limited to 'm4')
-rw-r--r-- | m4/apr_memcache.m4 | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/m4/apr_memcache.m4 b/m4/apr_memcache.m4 index 71ab2b6..c8f6a7e 100644 --- a/m4/apr_memcache.m4 +++ b/m4/apr_memcache.m4 | |||
@@ -9,19 +9,16 @@ AC_ARG_WITH( | |||
9 | apr-memcache-prefix, | 9 | apr-memcache-prefix, |
10 | [AC_HELP_STRING([--with-apr-memcache-prefix=PATH],[Install prefix for apr_memcache])], | 10 | [AC_HELP_STRING([--with-apr-memcache-prefix=PATH],[Install prefix for apr_memcache])], |
11 | apr_memcache_prefix="$withval", | 11 | apr_memcache_prefix="$withval", |
12 | apr_memcache_prefix="/usr", | ||
13 | :) | 12 | :) |
14 | AC_ARG_WITH( | 13 | AC_ARG_WITH( |
15 | apr-memcache-libs, | 14 | apr-memcache-libs, |
16 | [AC_HELP_STRING([--with-apr-memcache-libs=PATH],[Path to apr_memcache libs])], | 15 | [AC_HELP_STRING([--with-apr-memcache-libs=PATH],[Path to apr_memcache libs])], |
17 | apr_memcache_libs="$withval", | 16 | apr_memcache_libs="$withval", |
18 | apr_memcache_libs="$apr_memcache_prefix/lib" | ||
19 | :) | 17 | :) |
20 | AC_ARG_WITH( | 18 | AC_ARG_WITH( |
21 | apr-memcache-includes, | 19 | apr-memcache-includes, |
22 | [AC_HELP_STRING([--with-apr-memcache-includes=PATH],[Path to apr_memcache includes])], | 20 | [AC_HELP_STRING([--with-apr-memcache-includes=PATH],[Path to apr_memcache includes])], |
23 | apr_memcache_includes="$withval", | 21 | apr_memcache_includes="$withval", |
24 | apr_memcache_includes="$apr_memcache_prefix/include/apr_memcache-0" | ||
25 | :) | 22 | :) |
26 | 23 | ||
27 | 24 | ||
@@ -30,14 +27,34 @@ AC_LIBTOOL_SYS_DYNAMIC_LINKER | |||
30 | dnl # Determine memcache lib directory | 27 | dnl # Determine memcache lib directory |
31 | save_CFLAGS=$CFLAGS | 28 | save_CFLAGS=$CFLAGS |
32 | save_LDFLAGS=$LDFLAGS | 29 | save_LDFLAGS=$LDFLAGS |
33 | CFLAGS="-I$apr_memcache_includes $APR_INCLUDES $CFLAGS" | 30 | |
34 | LDFLAGS="-L$apr_memcache_libs $LDFLAGS" | 31 | if test -n "$apr_memcache_libs"; then |
32 | apr_memcache_libdir=$apr_memcache_libs | ||
33 | elif test -n "$apr_memcache_prefix"; then | ||
34 | apr_memcache_libdir=$apr_memcache_prefix/lib | ||
35 | fi | ||
36 | if test -n "$apr_memcache_libdir"; then | ||
37 | LDFLAGS="-L$apr_memcache_libdir $LDFLAGS" | ||
38 | fi | ||
39 | |||
40 | if test -n "$apr_memcache_includes"; then | ||
41 | apr_memcache_includedir=$apr_memcache_includes | ||
42 | elif test -n "$apr_memcache_prefix"; then | ||
43 | apr_memcache_includedir=$apr_memcache_prefix/include/apr_memcache-0 | ||
44 | else | ||
45 | apr_memcache_includedir=$includedir/apr_memcache-0 | ||
46 | fi | ||
47 | CFLAGS="-I$apr_memcache_includedir $CFLAGS" | ||
48 | |||
35 | AC_CHECK_LIB( | 49 | AC_CHECK_LIB( |
36 | apr_memcache, | 50 | apr_memcache, |
37 | apr_memcache_create, | 51 | apr_memcache_create, |
38 | [ | 52 | [ |
39 | APR_MEMCACHE_LIBS="-R$apr_memcache_libs -L$apr_memcache_libs -lapr_memcache" | 53 | APR_MEMCACHE_LIBS="-lapr_memcache" |
40 | APR_MEMCACHE_CFLAGS="-I$apr_memcache_includes" | 54 | if test -n "$apr_memcache_libdir"; then |
55 | APR_MEMCACHE_LIBS="-R$apr_memcache_libdir -L$apr_memcache_libdir $APR_MEMCACHE_LIBS" | ||
56 | fi | ||
57 | APR_MEMCACHE_CFLAGS="-I$apr_memcache_includedir" | ||
41 | ] | 58 | ] |
42 | ) | 59 | ) |
43 | CFLAGS=$save_CFLAGS | 60 | CFLAGS=$save_CFLAGS |