1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/vipshop-vire

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
configure.ac 7.2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
deep011 Отправлено 25.10.2016 06:46 fa0cdd2
# Define the package version numbers and the bug reporting address
m4_define([VR_MAJOR], 1)
m4_define([VR_MINOR], 0)
m4_define([VR_PATCH], 0)
m4_define([VR_BUGS], [diguo58@gmail.com])
# Initialize autoconf
AC_PREREQ([2.63])
AC_INIT([vire], [VR_MAJOR.VR_MINOR.VR_PATCH], [VR_BUGS])
AC_CONFIG_SRCDIR([src/vr.c])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_CONFIG_MACRO_DIR([m4])
# Initialize automake
AM_INIT_AUTOMAKE([1.9 foreign])
# Define macro variables for the package version numbers
AC_DEFINE(VR_VERSION_MAJOR, VR_MAJOR, [Define the major version number])
AC_DEFINE(VR_VERSION_MINOR, VR_MINOR, [Define the minor version number])
AC_DEFINE(VR_VERSION_PATCH, VR_PATCH, [Define the patch version number])
AC_DEFINE(VR_VERSION_STRING, "VR_MAJOR.VR_MINOR.VR_PATCH", [Define the version string])
# Checks for language
AC_LANG([C])
# Checks for programs
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_LIBTOOL
# Checks for typedefs, structures, and compiler characteristics
AC_C_INLINE
AC_TYPE_INT8_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INTMAX_T
AC_TYPE_INTPTR_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINTMAX_T
AC_TYPE_UINTPTR_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_C_BIGENDIAN(
[],
[AC_DEFINE(HAVE_LITTLE_ENDIAN, 1, [Define to 1 if machine is little endian])],
[AC_MSG_ERROR([endianess of this machine is unknown])],
[AC_MSG_ERROR([universial endianess not supported])]
)
# Checks for header files
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([fcntl.h float.h limits.h stddef.h stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([inttypes.h stdint.h])
AC_CHECK_HEADERS([sys/ioctl.h sys/time.h sys/uio.h])
AC_CHECK_HEADERS([sys/socket.h sys/un.h netinet/in.h arpa/inet.h netdb.h])
AC_CHECK_HEADERS([execinfo.h],
[AC_DEFINE(HAVE_BACKTRACE, [1], [Define to 1 if backtrace is supported])], [])
AC_CHECK_HEADERS([sys/epoll.h], [], [])
AC_CHECK_HEADERS([sys/event.h], [], [])
# Checks for libraries
AC_CHECK_LIB([m], [pow])
AC_CHECK_LIB([pthread], [pthread_create])
# Checks for library functions
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([dup2 gethostname gettimeofday strerror])
AC_CHECK_FUNCS([socket])
AC_CHECK_FUNCS([memchr memmove memset])
AC_CHECK_FUNCS([strchr strndup strtoul])
AC_CACHE_CHECK([if epoll works], [ac_cv_epoll_works],
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <sys/epoll.h>
int
main(int argc, char **argv)
{
int fd;
fd = epoll_create(256);
if (fd < 0) {
perror("epoll_create:");
exit(1);
}
exit(0);
}
], [ac_cv_epoll_works=yes], [ac_cv_epoll_works=no]))
AS_IF([test "x$ac_cv_epoll_works" = "xyes"],
[AC_DEFINE([HAVE_EPOLL], [1], [Define to 1 if epoll is supported])], [])
AC_CACHE_CHECK([if kqueue works], [ac_cv_kqueue_works],
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
int
main(int argc, char **argv)
{
int fd;
fd = kqueue();
if (fd < 0) {
perror("kqueue:");
exit(1);
}
exit(0);
}
], [ac_cv_kqueue_works=yes], [ac_cv_kqueue_works=no]))
AS_IF([test "x$ac_cv_kqueue_works" = "xyes"],
[AC_DEFINE([HAVE_KQUEUE], [1], [Define to 1 if kqueue is supported])], [])
AC_CACHE_CHECK([if event ports works], [ac_cv_evports_works],
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <port.h>
int
main(int argc, char **argv)
{
int fd;
fd = port_create();
if (fd < 0) {
perror("port_create:");
exit(1);
}
exit(0);
}
], [ac_cv_evports_works=yes], [ac_cv_evports_works=no]))
AS_IF([test "x$ac_cv_evports_works" = "xyes"],
[AC_DEFINE([HAVE_EVENT_PORTS], [1], [Define to 1 if event ports is supported])], [])
AS_IF([test "x$ac_cv_epoll_works" = "xno" &&
test "x$ac_cv_kqueue_works" = "xno" &&
test "x$ac_cv_evports_works" = "xno"],
[AC_MSG_ERROR([either epoll or kqueue or event ports support is required])], [])
AM_CONDITIONAL([OS_LINUX], [test "x$ac_cv_epoll_works" = "xyes"])
AM_CONDITIONAL([OS_BSD], [test "x$ac_cv_kqueue_works" = "xyes"])
AM_CONDITIONAL([OS_SOLARIS], [test "x$ac_cv_evports_works" = "xyes"])
AM_CONDITIONAL([OS_FREEBSD], [test "$(uname -v | cut -c 1-10)" == "FreeBSD 10"])
AM_CONDITIONAL([OS_DARWIN], [test "$(uname -v | cut -c 1-6)" == "Darwin"])
# Package options
AC_MSG_CHECKING([whether to enable debug logs and asserts])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING(
[--enable-debug=@<:@full|yes|log|no@:>@],
[enable debug logs and asserts @<:@default=no@:>@])
],
[],
[enable_debug=no])
AS_CASE([x$enable_debug],
[xfull], [AC_DEFINE([HAVE_ASSERT_PANIC], [1],
[Define to 1 if panic on an assert is enabled])
AC_DEFINE([HAVE_DEBUG_LOG], [1], [Define to 1 if debug log is enabled])
],
[xyes], [AC_DEFINE([HAVE_ASSERT_LOG], [1],
[Define to 1 if log on an assert is enabled])
AC_DEFINE([HAVE_DEBUG_LOG], [1], [Define to 1 if debug log is enabled])
],
[xlog], [AC_DEFINE([HAVE_DEBUG_LOG], [1], [Define to 1 if debug log is enabled])],
[xno], [],
[AC_MSG_FAILURE([invalid value ${enable_debug} for --enable-debug])])
AC_MSG_RESULT($enable_debug)
AC_MSG_CHECKING([whether to disable spinlock])
AC_ARG_ENABLE([spinlock],
[AS_HELP_STRING(
[--disable-spinlock],
[disable spinlock])
],
[disable_spinlock=yes],
[disable_spinlock=no])
AS_IF([test "x$disable_spinlock" = xyes],
[],
[AC_DEFINE([HAVE_SPINLOCK], [1], [Define to 1 if spinlock is not disabled])])
AC_MSG_RESULT($disable_spinlock)
AC_MSG_CHECKING([whether to use jemalloc])
AC_ARG_WITH([jemalloc],
AS_HELP_STRING([--with-jemalloc@<:@=yes|no@:>@],
[use jemalloc(default use jemalloc)]),
[
if test "$withval" = "no"; then
enable_jemalloc=no
else
enable_jemalloc=yes
fi
],
[enable_jemalloc=yes])
AS_IF([test "x$enable_jemalloc" = xyes],
[AC_DEFINE([HAVE_JEMALLOC], [1], [Define to 1 if jemalloc is used])],
[])
AC_MSG_RESULT($enable_jemalloc)
# Untar the jemalloc-4.2.0.tar.bz2 in dep/ before config.status is rerun
# Run configure in dep/jemalloc-4.2.0
AC_CONFIG_COMMANDS_PRE([rm -rf dep/jemalloc-4.2.0])
AC_CONFIG_COMMANDS_PRE([mkdir dep/jemalloc-4.2.0])
AC_CONFIG_COMMANDS_PRE([tar xvjf dep/jemalloc-4.2.0.tar.bz2 -C dep])
AC_CONFIG_COMMANDS_PRE([cd dep/jemalloc-4.2.0])
AC_CONFIG_COMMANDS_PRE([./configure --with-jemalloc-prefix=je_])
AC_CONFIG_COMMANDS_PRE([cd ../..])
# Untar the hiredis-0.13.3.tar.gz in dep/ before config.status is rerun
AC_CONFIG_COMMANDS_PRE([rm -rf dep/hiredis-0.13.3])
AC_CONFIG_COMMANDS_PRE([mkdir dep/hiredis-0.13.3])
AC_CONFIG_COMMANDS_PRE([tar zxvf dep/hiredis-0.13.3.tar.gz -C dep])
AC_CONFIG_COMMANDS_PRE([cd dep/hiredis-0.13.3])
AC_CONFIG_COMMANDS_PRE([cd ../..])
# Define Makefiles
AC_CONFIG_FILES([Makefile
dep/Makefile
dep/util/Makefile
dep/dhashkit/Makefile
dep/dmalloc/Makefile
dep/sds/Makefile
dep/ae/Makefile
dep/dlist/Makefile
dep/darray/Makefile
dep/himemcached-0.1.0/Makefile
src/Makefile
tests/Makefile])
# Generate the "configure" script
AC_OUTPUT

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/vipshop-vire.git
git@api.gitlife.ru:oschina-mirror/vipshop-vire.git
oschina-mirror
vipshop-vire
vipshop-vire
master