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

Contents of /liblscp/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3519 - (show annotations) (download)
Sun Jun 30 17:01:00 2019 UTC (4 years, 8 months ago) by capela
File size: 2871 byte(s)
- Modernized on debian, doxygen and reproducible build fronts.
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(src/client.c)
3 AC_CONFIG_HEADERS([src/config.h])
4 AC_CONFIG_MACRO_DIR([.m4])
5
6 AM_INIT_AUTOMAKE(liblscp, 0.6.0)
7
8 #------------------------------------------------------------------------------------
9 # Rules for library version information:
10 #
11 # 1. Start with version information of `0:0:0' for each libtool library.
12 # 2. Update the version information only immediately before a public release of
13 # your software. More frequent updates are unnecessary, and only guarantee
14 # that the current interface number gets larger faster.
15 # 3. If the library source code has changed at all since the last update, then
16 # increment revision (`c:r:a' becomes `c:r+1:a').
17 # 4. If any interfaces have been added, removed, or changed since the last update,
18 # increment current, and set revision to 0.
19 # 5. If any interfaces have been added since the last public release, then increment
20 # age.
21 # 6. If any interfaces have been removed since the last public release, then set age
22 # to 0.
23
24 SHARED_VERSION_INFO="6:1:0"
25
26 AC_SUBST(SHARED_VERSION_INFO)
27
28 # Build version string.
29 AC_CACHE_VAL([ac_cv_build_version], [
30 ac_cv_build_version=$(git describe --tags --dirty --abbrev=6 2>/dev/null)
31 if test -n "$ac_cv_build_version"; then
32 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[^_]]*[[_v]]//i')
33 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/-g/git./')
34 ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]\+/./g')
35 ac_cv_build_version_extra=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
36 if test "x$ac_cv_build_version_extra" != "xmaster"; then
37 ac_cv_build_version="$ac_cv_build_version [[$ac_cv_build_version_extra]]"
38 fi
39 else
40 ac_cv_build_version=$PACKAGE_VERSION
41 fi
42 ])
43 ac_build_version="$ac_cv_build_version"
44 AC_SUBST(ac_build_version)
45
46 # Checks for programs.
47 AC_PROG_CC
48 AC_LIBTOOL_WIN32_DLL
49 AC_PROG_LIBTOOL
50 AM_PROG_LIBTOOL
51
52 # Checks for header files.
53 AC_HEADER_STDC
54 AC_CHECK_HEADERS(stdlib.h string.h netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h)
55
56 # Checks for typedefs, structures, and compiler characteristics.
57 AC_C_CONST
58 AC_TYPE_SIZE_T
59
60 # Checks for library functions.
61 AC_CHECK_FUNCS(strdup strtok_r memset memmove socket connect bind listen setsockopt getsockopt getsockname gethostbyname)
62
63 case $host in
64 *mingw*|*cygwin*) windows=yes ;;
65 *) windows=no ;;
66 esac
67 AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
68
69 # Checks for pthread library.
70 AC_CHECK_LIB(pthread, pthread_create)
71
72 AC_ENABLE_STATIC(no)
73 AC_ENABLE_SHARED(yes)
74
75 # Checks for doxygen.
76 AC_CHECK_PROG(ac_doxygen, doxygen, [doc], [])
77 AC_SUBST(ac_doxygen)
78
79 AC_OUTPUT(Makefile src/Makefile lscp/Makefile examples/Makefile doc/Makefile doc/liblscp.doxygen lscp.pc liblscp.spec lscp/version.h)
80

  ViewVC Help
Powered by ViewVC