1 |
# Process this file with autoconf to produce a configure script. |
# Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(src/client.c) |
AC_INIT(liblscp, 0.9.3, rncbc@rncbc.org, liblscp) |
3 |
|
|
4 |
|
AC_CONFIG_SRCDIR(src/client.c) |
5 |
AC_CONFIG_HEADERS([src/config.h]) |
AC_CONFIG_HEADERS([src/config.h]) |
6 |
AC_CONFIG_MACRO_DIR([.m4]) |
AC_CONFIG_MACRO_DIRS([.m4]) |
7 |
|
|
8 |
AM_INIT_AUTOMAKE(liblscp, 0.5.7.1) |
AM_INIT_AUTOMAKE |
9 |
|
|
10 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
11 |
# Rules for library version information: |
# Rules for library version information: |
23 |
# 6. If any interfaces have been removed since the last public release, then set age |
# 6. If any interfaces have been removed since the last public release, then set age |
24 |
# to 0. |
# to 0. |
25 |
|
|
26 |
SHARED_VERSION_INFO="6:1:0" |
SHARED_VERSION_INFO="6:4:0" |
27 |
|
|
28 |
AC_SUBST(SHARED_VERSION_INFO) |
AC_SUBST(SHARED_VERSION_INFO) |
29 |
|
|
30 |
|
# Build version string. |
31 |
|
AC_CACHE_VAL([ac_cv_build_version], [ |
32 |
|
ac_cv_build_version=$(git describe --tags --dirty --abbrev=6 2>/dev/null) |
33 |
|
if test -n "$ac_cv_build_version"; then |
34 |
|
ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[^0-9]]\+//') |
35 |
|
ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^1_//') |
36 |
|
ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[_vV]]\+//') |
37 |
|
ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/-g/git./') |
38 |
|
ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]/./g') |
39 |
|
ac_cv_build_version_extra=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) |
40 |
|
if test "x$ac_cv_build_version_extra" != "xmaster"; then |
41 |
|
ac_cv_build_version="$ac_cv_build_version [[$ac_cv_build_version_extra]]" |
42 |
|
fi |
43 |
|
else |
44 |
|
ac_cv_build_version=$PACKAGE_VERSION |
45 |
|
fi |
46 |
|
]) |
47 |
|
ac_build_version="$ac_cv_build_version" |
48 |
|
AC_DEFINE_UNQUOTED(CONFIG_BUILD_VERSION, ["$ac_build_version"], [Build version string.]) |
49 |
|
|
50 |
|
# Sanitized version string. |
51 |
|
AC_CACHE_VAL([ac_cv_version], [ |
52 |
|
ac_cv_version=$(echo $PACKAGE_VERSION | sed -r 's/^([[0-9|\.]]+).*$/\1/') |
53 |
|
]) |
54 |
|
ac_version="$ac_cv_version" |
55 |
|
AC_DEFINE_UNQUOTED(CONFIG_VERSION, ["$ac_version"], [Version string.]) |
56 |
|
AC_SUBST(ac_version) |
57 |
|
|
58 |
|
# Set default installation prefix. |
59 |
|
AC_PREFIX_DEFAULT(/usr/local) |
60 |
|
if test "x$prefix" = "xNONE"; then |
61 |
|
prefix=$ac_default_prefix |
62 |
|
fi |
63 |
|
if test "x$exec_prefix" = "xNONE"; then |
64 |
|
exec_prefix=$prefix |
65 |
|
fi |
66 |
|
eval ac_prefix=$prefix |
67 |
|
AC_SUBST(ac_prefix) |
68 |
|
|
69 |
|
# Enable debugging argument option. |
70 |
|
AC_ARG_ENABLE(debug, |
71 |
|
AS_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
72 |
|
[ac_debug="$enableval"]) |
73 |
|
if test "x$ac_debug" = "xyes"; then |
74 |
|
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
75 |
|
fi |
76 |
|
|
77 |
# Checks for programs. |
# Checks for programs. |
78 |
AC_PROG_CC |
AC_PROG_CC |
79 |
AC_LIBTOOL_WIN32_DLL |
AC_LIBTOOL_WIN32_DLL |
80 |
AC_PROG_LIBTOOL |
AC_PROG_LIBTOOL |
81 |
AM_PROG_LIBTOOL |
AM_PROG_LIBTOOL |
82 |
|
|
83 |
# Checks for header files. |
# Checks for standard header files. |
84 |
AC_HEADER_STDC |
AC_HEADER_STDC |
85 |
AC_CHECK_HEADERS(stdlib.h string.h netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h) |
|
86 |
|
AC_CHECK_HEADERS( |
87 |
|
[stdlib.h string.h netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h], |
88 |
|
[], [ac_headers_h="no"]) |
89 |
|
if test "x$ac_headers_h" = "xno"; then |
90 |
|
AC_MSG_ERROR([*** Standard headers not found.]) |
91 |
|
fi |
92 |
|
|
93 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
94 |
AC_C_CONST |
AC_C_CONST |
95 |
AC_TYPE_SIZE_T |
AC_TYPE_SIZE_T |
96 |
|
|
97 |
# Checks for library functions. |
# Checks for standard functions. |
98 |
AC_CHECK_FUNCS(strdup strtok_r memset memmove socket connect bind listen setsockopt getsockopt getsockname gethostbyname) |
AC_CHECK_FUNCS( |
99 |
|
[strdup strtok_r memset memmove socket connect bind listen setsockopt getsockopt getsockname gethostbyname], |
100 |
|
[], [ac_funcs_c="no"]) |
101 |
|
if test "x$ac_funcs_c" = "xno"; then |
102 |
|
AC_MSG_ERROR([*** Standard functions not found.]) |
103 |
|
fi |
104 |
|
|
105 |
case $host in |
case $host in |
106 |
*mingw*|*cygwin*) windows=yes ;; |
*mingw*|*cygwin*) windows=yes ;; |