/[svn]/liblscp/trunk/configure.ac
ViewVC logotype

Contents of /liblscp/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3866 - (show annotations) (download)
Sat Mar 27 12:17:51 2021 UTC (3 years ago) by capela
File size: 3994 byte(s)
* Switching to CMake build system as for packaging default.
1 # Process this file with autoconf to produce a configure script.
2 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])
6 AC_CONFIG_MACRO_DIRS([.m4])
7
8 AM_INIT_AUTOMAKE
9
10 #------------------------------------------------------------------------------------
11 # Rules for library version information:
12 #
13 # 1. Start with version information of `0:0:0' for each libtool library.
14 # 2. Update the version information only immediately before a public release of
15 # your software. More frequent updates are unnecessary, and only guarantee
16 # that the current interface number gets larger faster.
17 # 3. If the library source code has changed at all since the last update, then
18 # increment revision (`c:r:a' becomes `c:r+1:a').
19 # 4. If any interfaces have been added, removed, or changed since the last update,
20 # increment current, and set revision to 0.
21 # 5. If any interfaces have been added since the last public release, then increment
22 # age.
23 # 6. If any interfaces have been removed since the last public release, then set age
24 # to 0.
25
26 SHARED_VERSION_INFO="6:4:0"
27
28 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/-g/git./')
36 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]\+/./g')
37 ac_cv_build_version_extra=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
38 if test "x$ac_cv_build_version_extra" != "xmaster"; then
39 ac_cv_build_version="$ac_cv_build_version [[$ac_cv_build_version_extra]]"
40 fi
41 else
42 ac_cv_build_version=$PACKAGE_VERSION
43 fi
44 ])
45 ac_build_version="$ac_cv_build_version"
46 AC_DEFINE_UNQUOTED(CONFIG_BUILD_VERSION, ["$ac_build_version"], [Build version string.])
47
48 # Sanitized version string.
49 AC_CACHE_VAL([ac_cv_version], [
50 ac_cv_version=$(echo $PACKAGE_VERSION | sed -r 's/^([[0-9|\.]]+).*$/\1/')
51 ])
52 ac_version="$ac_cv_version"
53 AC_DEFINE_UNQUOTED(CONFIG_VERSION, ["$ac_version"], [Version string.])
54 AC_SUBST(ac_version)
55
56 # Set default installation prefix.
57 AC_PREFIX_DEFAULT(/usr/local)
58 if test "x$prefix" = "xNONE"; then
59 prefix=$ac_default_prefix
60 fi
61 if test "x$exec_prefix" = "xNONE"; then
62 exec_prefix=$prefix
63 fi
64 eval ac_prefix=$prefix
65 AC_SUBST(ac_prefix)
66
67 # Enable debugging argument option.
68 AC_ARG_ENABLE(debug,
69 AS_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
70 [ac_debug="$enableval"])
71 if test "x$ac_debug" = "xyes"; then
72 AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
73 fi
74
75 # Checks for programs.
76 AC_PROG_CC
77 AC_LIBTOOL_WIN32_DLL
78 AC_PROG_LIBTOOL
79 AM_PROG_LIBTOOL
80
81 # Checks for standard header files.
82 AC_HEADER_STDC
83
84 AC_CHECK_HEADERS(
85 [stdlib.h string.h netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h],
86 [], [ac_headers_h="no"])
87 if test "x$ac_headers_h" = "xno"; then
88 AC_MSG_ERROR([*** Standard headers not found.])
89 fi
90
91 # Checks for typedefs, structures, and compiler characteristics.
92 AC_C_CONST
93 AC_TYPE_SIZE_T
94
95 # Checks for standard functions.
96 AC_CHECK_FUNCS(
97 [strdup strtok_r memset memmove socket connect bind listen setsockopt getsockopt getsockname gethostbyname],
98 [], [ac_funcs_c="no"])
99 if test "x$ac_funcs_c" = "xno"; then
100 AC_MSG_ERROR([*** Standard functions not found.])
101 fi
102
103 case $host in
104 *mingw*|*cygwin*) windows=yes ;;
105 *) windows=no ;;
106 esac
107 AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
108
109 # Checks for pthread library.
110 AC_CHECK_LIB(pthread, pthread_create)
111
112 AC_ENABLE_STATIC(no)
113 AC_ENABLE_SHARED(yes)
114
115 # Checks for doxygen.
116 AC_CHECK_PROG(ac_doxygen, doxygen, [doc], [])
117 AC_SUBST(ac_doxygen)
118
119 AC_OUTPUT(Makefile src/Makefile lscp/Makefile examples/Makefile doc/Makefile doc/liblscp.doxygen lscp.pc liblscp.spec lscp/version.h)
120

  ViewVC Help
Powered by ViewVC