forked from lstrojny/php-nanotime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.m4
21 lines (17 loc) · 926 Bytes
/
config.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PHP_ARG_ENABLE(nanotime, enable nanotime PHP extension,
[ --enable-nanotime Enable nanotime PHP extension])
if test -z "$PHP_LIBNANOTIME_PREFIX"; then
PHP_ARG_WITH(libnanotime-prefix, libcld install prefix,
[ --with-libnanotime-prefix=DIR nanotime: libnanotime install prefix], no, no)
fi
if test "$PHP_NANOTIME" != "no"; then
if ! test -f $PHP_LIBNANOTIME_PREFIX/include/libnanotime-1.0.0/nanotime/nanotime.h; then
AC_MSG_ERROR([libnanotime not found. Specify installation prefix --with-libnanotime-prefix=])
fi
AC_DEFINE(HAVE_NANOTIME, 1 ,[Whether you want nanotime support])
PHP_SUBST(NANOTIME_SHARED_LIBADD)
PHP_ADD_INCLUDE($PHP_LIBNANOTIME_PREFIX/include/libnanotime-1.0.0)
PHP_ADD_LIBRARY_WITH_PATH(nanotime-1.0.0, PHP_LIBNANOTIME_PREFIX/lib, NANOTIME_SHARED_LIBADD)
PHP_NEW_EXTENSION(nanotime, nanotime.c, $ext_shared)
CFLAGS="$CFLAGS -Wall -g -O2 -pedantic"
fi