Skip to content

Commit e05c166

Browse files
committed
1 parent d8d039a commit e05c166

File tree

7 files changed

+148
-126
lines changed

7 files changed

+148
-126
lines changed

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MODULE_NAME=mod_auth_memcookie
22
APXS=@APXS@
3-
LDFLAGS_LIBMEMCACHE=-lmemcache -L@LIBMEMCACHE_DIR@/lib
4-
CFLAGS_LIBMEMCACHE=-I@LIBMEMCACHE_DIR@/include
3+
LDFLAGS_LIBMEMCACHE=-lmemcached -L@LIBMEMCACHED_DIR@/lib
4+
CFLAGS_LIBMEMCACHE=-I@LIBMEMCACHED_DIR@/include
55

66
all: $(MODULE_NAME).la
77

configure

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,8 @@ PACKAGE_BUGREPORT=
600600

601601
ac_subst_vars='LTLIBOBJS
602602
LIBOBJS
603-
LIBMEMCACHE_DIR
604603
APXS
604+
LIBMEMCACHED_DIR
605605
EGREP
606606
GREP
607607
CPP
@@ -652,8 +652,8 @@ SHELL'
652652
ac_subst_files=''
653653
ac_user_opts='
654654
enable_option_checking
655+
with_libmemcached
655656
with_apxs
656-
with_libmemcache
657657
'
658658
ac_precious_vars='build_alias
659659
host_alias
@@ -1282,8 +1282,8 @@ if test -n "$ac_init_help"; then
12821282
Optional Packages:
12831283
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
12841284
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1285+
--with-libmemcached=DIR libmemcached directory - http://libmemcached.org/
12851286
--with-apxs=EXE Apache2 apxs script
1286-
--with-libmemcache=DIR libmemcache directory - https://people.freebsd.org/~seanc/libmemcache/
12871287
12881288
Some influential environment variables:
12891289
CC C compiler command
@@ -1734,11 +1734,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
17341734
ac_compiler_gnu=$ac_cv_c_compiler_gnu
17351735
17361736
1737-
1738-
1739-
1740-
1741-
17421737
ac_ext=c
17431738
ac_cpp='$CPP $CPPFLAGS'
17441739
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3225,69 +3220,70 @@ fi
32253220
32263221
32273222
3228-
# Check whether --with-apxs was given.
3229-
if test "${with_apxs+set}" = set; then
3230-
withval=$with_apxs;
3223+
# Check whether --with-libmemcached was given.
3224+
if test "${with_libmemcached+set}" = set; then
3225+
withval=$with_libmemcached;
32313226
else
3232-
with_apxs="no"
3227+
with_libmemcached="no"
32333228
32343229
fi
32353230
32363231
3237-
{ $as_echo "$as_me:$LINENO: checking for Apache apxs script" >&5
3238-
$as_echo_n "checking for Apache apxs script... " >&6; }
3232+
{ $as_echo "$as_me:$LINENO: checking for libmemcached library" >&5
3233+
$as_echo_n "checking for libmemcached library... " >&6; }
32393234
3240-
if test "$with_apxs" = "no"; then
3241-
{ { $as_echo "$as_me:$LINENO: error: Specify where is the apache apxs script using --with-apxs" >&5
3242-
$as_echo "$as_me: error: Specify where is the apache apxs script using --with-apxs" >&2;}
3235+
if test "$with_libmemcached" = "no"; then
3236+
{ { $as_echo "$as_me:$LINENO: error: Specify where is the libmemcached directory using --with-libmemcached" >&5
3237+
$as_echo "$as_me: error: Specify where is the libmemcached directory using --with-libmemcached" >&2;}
32433238
{ (exit 1); exit 1; }; }
32443239
else
3245-
AP_INCLUDE_DIR=$($with_apxs -q "includedir")
3240+
LIBMEMCACHED_INCLUDE_DIR=$with_libmemcached/include
3241+
LIBMEMCACHED_LIB_DIR=$with_libmemcached/lib
32463242
# make sure that a well known include file exists
3247-
if test -e $AP_INCLUDE_DIR/httpd.h; then
3243+
if test -e $LIBMEMCACHED_INCLUDE_DIR/libmemcached-1.0/memcached.h && test -d $LIBMEMCACHED_LIB_DIR; then
32483244
{ $as_echo "$as_me:$LINENO: result: found!" >&5
32493245
$as_echo "found!" >&6; }
32503246
else
3251-
{ { $as_echo "$as_me:$LINENO: error: $with_apxs not found. " >&5
3252-
$as_echo "$as_me: error: $with_apxs not found. " >&2;}
3247+
{ { $as_echo "$as_me:$LINENO: error: $with_libmemcached not found. " >&5
3248+
$as_echo "$as_me: error: $with_libmemcached not found. " >&2;}
32533249
{ (exit 1); exit 1; }; }
32543250
fi
3255-
APXS=$with_apxs
3251+
LIBMEMCACHED_DIR=$with_libmemcached
32563252
fi
32573253
32583254
32593255
32603256
32613257
3262-
# Check whether --with-libmemcache was given.
3263-
if test "${with_libmemcache+set}" = set; then
3264-
withval=$with_libmemcache;
3258+
3259+
# Check whether --with-apxs was given.
3260+
if test "${with_apxs+set}" = set; then
3261+
withval=$with_apxs;
32653262
else
3266-
with_libmemcache="no"
3263+
with_apxs="no"
32673264
32683265
fi
32693266
32703267
3271-
{ $as_echo "$as_me:$LINENO: checking for libmemcache library" >&5
3272-
$as_echo_n "checking for libmemcache library... " >&6; }
3268+
{ $as_echo "$as_me:$LINENO: checking for Apache apxs script" >&5
3269+
$as_echo_n "checking for Apache apxs script... " >&6; }
32733270
3274-
if test "$with_libmemcache" = "no"; then
3275-
{ { $as_echo "$as_me:$LINENO: error: Specify where is the libmemcache directory using --with-libmemcache" >&5
3276-
$as_echo "$as_me: error: Specify where is the libmemcache directory using --with-libmemcache" >&2;}
3271+
if test "$with_apxs" = "no"; then
3272+
{ { $as_echo "$as_me:$LINENO: error: Specify where is the apache apxs script using --with-apxs" >&5
3273+
$as_echo "$as_me: error: Specify where is the apache apxs script using --with-apxs" >&2;}
32773274
{ (exit 1); exit 1; }; }
32783275
else
3279-
LIBMEMCACHE_INCLUDE_DIR=$with_libmemcache/include
3280-
LIBMEMCACHE_LIB_DIR=$with_libmemcache/lib
3276+
AP_INCLUDE_DIR=$($with_apxs -q "includedir")
32813277
# make sure that a well known include file exists
3282-
if test -e $LIBMEMCACHE_INCLUDE_DIR/memcache.h && test -d $LIBMEMCACHE_LIB_DIR; then
3278+
if test -e $AP_INCLUDE_DIR/httpd.h; then
32833279
{ $as_echo "$as_me:$LINENO: result: found!" >&5
32843280
$as_echo "found!" >&6; }
32853281
else
3286-
{ { $as_echo "$as_me:$LINENO: error: $with_libmemcache not found. " >&5
3287-
$as_echo "$as_me: error: $with_libmemcache not found. " >&2;}
3282+
{ { $as_echo "$as_me:$LINENO: error: $with_apxs not found. " >&5
3283+
$as_echo "$as_me: error: $with_apxs not found. " >&2;}
32883284
{ (exit 1); exit 1; }; }
32893285
fi
3290-
LIBMEMCACHE_DIR=$with_libmemcache
3286+
APXS=$with_apxs
32913287
fi
32923288
32933289

configure.in

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,7 @@
1+
m4_include([m4/ax_libmemcached.m4])
2+
m4_include([m4/ax_apache.m4])
13
AC_INIT
2-
3-
AC_DEFUN([APACHE_WITH],[
4-
5-
AC_ARG_WITH(
6-
apxs,
7-
[ --with-apxs[=EXE] Apache2 apxs script],
8-
,
9-
[with_apxs="no"]
10-
)
11-
12-
AC_MSG_CHECKING(for Apache apxs script)
13-
14-
if test "$with_apxs" = "no"; then
15-
AC_MSG_ERROR( Specify where is the apache apxs script using --with-apxs)
16-
else
17-
AP_INCLUDE_DIR=$($with_apxs -q "includedir")
18-
# make sure that a well known include file exists
19-
if test -e $AP_INCLUDE_DIR/httpd.h; then
20-
AC_MSG_RESULT( found!)
21-
else
22-
AC_MSG_ERROR( $with_apxs not found. )
23-
fi
24-
APXS=$with_apxs
25-
fi
26-
27-
])
28-
29-
AC_DEFUN([LIBMEMCACHE_WITH],[
30-
31-
AC_ARG_WITH(
32-
libmemcache,
33-
[ --with-libmemcache[=DIR] libmemcache directory - https://people.freebsd.org/~seanc/libmemcache/],
34-
,
35-
[with_libmemcache="no"]
36-
)
37-
38-
AC_MSG_CHECKING(for libmemcache library)
39-
40-
if test "$with_libmemcache" = "no"; then
41-
AC_MSG_ERROR( Specify where is the libmemcache directory using --with-libmemcache)
42-
else
43-
LIBMEMCACHE_INCLUDE_DIR=$with_libmemcache/include
44-
LIBMEMCACHE_LIB_DIR=$with_libmemcache/lib
45-
# make sure that a well known include file exists
46-
if test -e $LIBMEMCACHE_INCLUDE_DIR/memcache.h && test -d $LIBMEMCACHE_LIB_DIR; then
47-
AC_MSG_RESULT( found!)
48-
else
49-
AC_MSG_ERROR( $with_libmemcache not found. )
50-
fi
51-
LIBMEMCACHE_DIR=$with_libmemcache
52-
fi
53-
54-
])
55-
564
AC_HEADER_STDC
5+
LIBMEMCACHED_WITH
576
APACHE_WITH
58-
LIBMEMCACHE_WITH
59-
AC_SUBST(APXS)
60-
AC_SUBST(LIBMEMCACHE_DIR)
617
AC_OUTPUT(Makefile)

m4/ax_apache.m4

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
AC_DEFUN([APACHE_WITH],[
2+
3+
AC_ARG_WITH(
4+
apxs,
5+
[ --with-apxs[=EXE] Apache2 apxs script],
6+
,
7+
[with_apxs="no"]
8+
)
9+
10+
AC_MSG_CHECKING(for Apache apxs script)
11+
12+
if test "$with_apxs" = "no"; then
13+
AC_MSG_ERROR( Specify where is the apache apxs script using --with-apxs)
14+
else
15+
AP_INCLUDE_DIR=$($with_apxs -q "includedir")
16+
# make sure that a well known include file exists
17+
if test -e $AP_INCLUDE_DIR/httpd.h; then
18+
AC_MSG_RESULT( found!)
19+
else
20+
AC_MSG_ERROR( $with_apxs not found. )
21+
fi
22+
APXS=$with_apxs
23+
fi
24+
25+
AC_SUBST(APXS)
26+
27+
])
28+
29+

m4/ax_libmemcache.m4

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
AC_DEFUN([LIBMEMCACHE_WITH],[
2+
3+
AC_ARG_WITH(
4+
libmemcache,
5+
[ --with-libmemcache[=DIR] libmemcache directory - https://people.freebsd.org/~seanc/libmemcache/],
6+
,
7+
[with_libmemcache="no"]
8+
)
9+
10+
AC_MSG_CHECKING(for libmemcache library)
11+
12+
if test "$with_libmemcache" = "no"; then
13+
AC_MSG_ERROR( Specify where is the libmemcache directory using --with-libmemcache)
14+
else
15+
LIBMEMCACHE_INCLUDE_DIR=$with_libmemcache/include
16+
LIBMEMCACHE_LIB_DIR=$with_libmemcache/lib
17+
# make sure that a well known include file exists
18+
if test -e $LIBMEMCACHE_INCLUDE_DIR/memcache.h && test -d $LIBMEMCACHE_LIB_DIR; then
19+
AC_MSG_RESULT( found!)
20+
else
21+
AC_MSG_ERROR( $with_libmemcache not found. )
22+
fi
23+
LIBMEMCACHE_DIR=$with_libmemcache
24+
fi
25+
AC_SUBST(LIBMEMCACHE_DIR)
26+
27+
])
28+
29+

m4/ax_libmemcached.m4

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
AC_DEFUN([LIBMEMCACHED_WITH],[
2+
3+
AC_ARG_WITH(
4+
libmemcached,
5+
[ --with-libmemcached[=DIR] libmemcached directory - http://libmemcached.org/],
6+
,
7+
[with_libmemcached="no"]
8+
)
9+
10+
AC_MSG_CHECKING(for libmemcached library)
11+
12+
if test "$with_libmemcached" = "no"; then
13+
AC_MSG_ERROR( Specify where is the libmemcached directory using --with-libmemcached)
14+
else
15+
LIBMEMCACHED_INCLUDE_DIR=$with_libmemcached/include
16+
LIBMEMCACHED_LIB_DIR=$with_libmemcached/lib
17+
# make sure that a well known include file exists
18+
if test -e $LIBMEMCACHED_INCLUDE_DIR/libmemcached-1.0/memcached.h && test -d $LIBMEMCACHED_LIB_DIR; then
19+
AC_MSG_RESULT( found!)
20+
else
21+
AC_MSG_ERROR( $with_libmemcached not found. )
22+
fi
23+
LIBMEMCACHED_DIR=$with_libmemcached
24+
fi
25+
AC_SUBST(LIBMEMCACHED_DIR)
26+
27+
])
28+
29+

0 commit comments

Comments
 (0)