-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
106 lines (80 loc) · 2.54 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([librpcsyncwerk], [3.1.0], [[email protected]])
AC_CONFIG_SRCDIR([lib/rpcsyncwerk-server.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 foreign])
#AC_MINGW32
AC_CANONICAL_BUILD
# Checks for programs.
AC_PROG_CC
LT_INIT
# 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])
# Checks for typedefs, structures, and compiler characteristics.
#AC_C_INLINE
#AC_TYPE_SIZE_T
#AC_TYPE_SSIZE_T
#AC_TYPE_UINT16_T
# Checks for library functions.
#AC_CHECK_FUNCS([memset socket strerror strndup])
# Options about demos and pyrpcsyncwerk
# option: compile-demo
# default: yes
AC_ARG_ENABLE([compile-demo],
[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"])
dnl - check if the macro WIN32 is defined on this compiler.
AC_MSG_CHECKING(for WIN32)
if test "$build_os" = "mingw32" -o "$build_os" = "mingw64"; then
bwin32=true
LIB_WS32=-lws2_32
AC_SUBST(LIB_WS32)
AC_MSG_RESULT(compile in mingw)
fi
AM_CONDITIONAL([WIN32], [test "$MINGW32" = "yes"])
AC_SUBST(WIN32)
AC_MSG_CHECKING(for Mac)
if test "$(uname -s)" = "Darwin"; then
bmac=yes
fi
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)
# Checks for libraries.
GLIB_REQUIRED=2.26.0
# check and subst gobject
PKG_CHECK_MODULES(GLIB, [gobject-2.0 >= $GLIB_REQUIRED])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
JANSSON_REQUIRED=2.2.1
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
AC_CONFIG_FILES([Makefile
lib/Makefile
demo/Makefile
pyrpcsyncwerk/Makefile
librpcsyncwerk.pc
tests/Makefile])
AC_OUTPUT