1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-04-28 02:30:08 +00:00
libsearpc/configure.ac

107 lines
2.5 KiB
Plaintext
Raw Normal View History

2011-04-08 12:58:15 +00:00
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
2011-05-24 02:51:25 +00:00
AC_PREREQ([2.61])
2017-01-05 06:19:39 +00:00
AC_INIT([libsearpc], [3.0.8], [info@seafile.com])
AC_CONFIG_SRCDIR([lib/searpc-server.c])
2011-04-08 12:58:15 +00:00
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
2011-05-18 03:06:01 +00:00
AM_INIT_AUTOMAKE([1.9 foreign])
2016-07-04 04:07:02 +00:00
#AC_MINGW32
AC_CANONICAL_BUILD
2011-04-08 12:58:15 +00:00
# Checks for programs.
AC_PROG_CC
2014-08-12 11:52:48 +00:00
LT_INIT
2011-04-08 12:58:15 +00:00
# Checks for header files.
#AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
2011-04-08 12:58:15 +00:00
# Checks for typedefs, structures, and compiler characteristics.
#AC_C_INLINE
#AC_TYPE_SIZE_T
#AC_TYPE_SSIZE_T
#AC_TYPE_UINT16_T
2011-04-08 12:58:15 +00:00
# Checks for library functions.
#AC_CHECK_FUNCS([memset socket strerror strndup])
2011-04-08 12:58:15 +00:00
# Options about demos and pysearpc
# option: compile-demo
2011-04-09 10:40:55 +00:00
# default: yes
AC_ARG_ENABLE([compile-demo],
2011-04-09 10:40:55 +00:00
[AS_HELP_STRING([--enable-compile-demo],
[compile demo programs @<:@default: yes@:>@])],
[compile_demo=${enableval}], [compile_demo=yes])
AM_CONDITIONAL([COMPILE_DEMO], [test x${compile_demo} = xyes])
AC_ARG_ENABLE(server-pkg,
AC_HELP_STRING([--enable-server-pkg], [enable static compile]),
[server_pkg=$enableval],[server_pkg="no"])
2011-09-18 14:36:29 +00:00
dnl - check if the macro WIN32 is defined on this compiler.
AC_MSG_CHECKING(for WIN32)
2016-07-04 04:07:02 +00:00
if test "$build_os" = "mingw32" -o "$build_os" = "mingw64"; then
2011-09-18 14:36:29 +00:00
bwin32=true
2011-12-01 10:42:17 +00:00
LIB_WS32=-lws2_32
AC_SUBST(LIB_WS32)
2016-07-04 04:07:02 +00:00
AC_MSG_RESULT(compile in mingw)
2011-09-18 14:36:29 +00:00
fi
2011-12-01 10:42:17 +00:00
AM_CONDITIONAL([WIN32], [test "$MINGW32" = "yes"])
AC_SUBST(WIN32)
2012-04-29 13:55:49 +00:00
AC_MSG_CHECKING(for Mac)
if test "$(uname -s)" = "Darwin"; then
2012-04-29 13:55:49 +00:00
bmac=yes
2011-09-18 14:36:29 +00:00
fi
2012-04-29 13:55:49 +00:00
if test x$bmac = "xyes"; then
server_pkg=no
AC_MSG_RESULT(compile in mac)
fi
AM_CONDITIONAL([MACOS], [test "$bmac" = "yes"])
AC_SUBST(MACOS)
2011-09-18 14:36:29 +00:00
# Checks for libraries.
2011-04-08 12:58:15 +00:00
2013-08-09 04:56:37 +00:00
GLIB_REQUIRED=2.26.0
2011-04-08 12:58:15 +00:00
# check and subst gobject
2012-05-08 03:59:31 +00:00
PKG_CHECK_MODULES(GLIB, [gobject-2.0 >= $GLIB_REQUIRED])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
2011-04-08 12:58:15 +00:00
2013-08-09 04:56:37 +00:00
JANSSON_REQUIRED=2.2.1
2013-08-08 08:24:20 +00:00
PKG_CHECK_MODULES(JANSSON, [jansson >= $JANSSON_REQUIRED])
AC_SUBST(JANSSON_CFLAGS)
AC_SUBST(JANSSON_LIBS)
AM_PATH_PYTHON([2.4])
if test "$bwin32" = true; then
if test x$PYTHON_DIR != x; then
# set pyexecdir to somewhere like /c/Python26/Lib/site-packages
pyexecdir=${PYTHON_DIR}/Lib/site-packages
pythondir=${pyexecdir}
pkgpyexecdir=${pyexecdir}/${PACKAGE}
pkgpythondir=${pythondir}/${PACKAGE}
fi
fi
2011-04-08 12:58:15 +00:00
AC_CONFIG_FILES([Makefile
lib/Makefile
demo/Makefile
2011-04-08 12:58:15 +00:00
pysearpc/Makefile
2012-05-08 03:59:31 +00:00
libsearpc.pc
2011-04-08 12:58:15 +00:00
tests/Makefile])
AC_OUTPUT