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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
dnl ----------------------------------------------------------------------------
dnl $Id: configure.ac,v 1.3 2012/05/23 02:52:25 vlg Exp $
dnl ----------------------------------------------------------------------------
dnl
dnl Name: configure.ac
dnl
dnl Author: Vladislav Grinchenko
dnl Date: Sep 1, 2001 19:20:31 EDT
dnl
dnl ----------------------------------------------------------------------------
dnl ----------------------------------------------------------------------------
dnl Initialization
dnl ----------------------------------------------------------------------------
AC_INIT(assa/GenServer.cpp)
AC_CONFIG_MACRO_DIR([macros])
AM_CONFIG_HEADER(config.h)
dnl ----------------------------------------------------------------------------
dnl Package name and release number
dnl
dnl Legend:
dnl
dnl +1 : ? : +1 == new interface that does not break old one
dnl +1 : ? : 0 == new interface that breaks old one
dnl ? : ? : 0 == no new interfaces, but breaks apps
dnl ? :+1 : ? == just some internal changes, nothing breaks but might work
dnl better
dnl ----------------------------------------------------------------------------
ASSA_MAJOR_VERSION=3
ASSA_MINOR_VERSION=5
ASSA_MICRO_VERSION=1
dnl ----------------------------------------------------------------------------
dnl "The library version number is for the use of the runtime loader, and
dnl is completely unrelated to the release number of your project.
dnl If you really want to encode the project release into the library,
dnl you can use '-release' to do it.
dnl The effect would be libname-RELEASE.so.CURRENT.REVISION.AGE"
dnl
dnl From libtool User's Manual (Chapter 6, Library interface version):
dnl
dnl "Interface for libraries may be many any of the following (and more):
dnl
dnl - global variables: both names and types
dnl - global functions: argument types and numbers, return types,
dnl function names
dnl - standard I/O and file formats
dnl - sockets, pipes, and inter-process communication protocol formats"
dnl
dnl libtool library versions are described by three integers:
dnl
dnl current - the most recent interface number this library implements
dnl revision - the implementation number of the current interface
dnl age - the difference between the newest and the oldest
dnl interfaces that this library implements. The library
dnl implements all the interface numbers in the range from
dnl number [current - age; current]
dnl
dnl If two libraries have identical current and age numbers, then the
dnl dynamic linker chooses the library with the greater revision number.
dnl 'Age' must be less or equal to the 'current' interface number.
dnl
dnl Simple rules:
dnl
dnl 1. Start with version number 0.0.0 for each library
dnl
dnl 2. If the library source code has changed at all since the
dnl last update, then increment 'revision': (current : revision+1 : age)
dnl
dnl 3. If any interfaces has been added, removed, or changed since
dnl the last update, increment 'current' and set 'revision' to 0:
dnl (current+1 : 0 : age)
dnl
dnl 4. If any interface has been added since the last public release, then
dnl increment age: (current : revision : age+1)
dnl
dnl 5. If any interface has been removed since the last public release,
dnl then set age to 0: (current : revision : 0)
dnl
dnl CURRENT : REVISION : AGE
dnl ----------------------------------------------------------------------------
dnl libassa-3.1.0: LIBASSA_SO_VERSION=2:0:1
dnl libassa-3.2.0: LIBASSA_SO_VERSION=3:0:2
dnl libassa-3.3.0: LIBASSA_SO_VERSION=3:1:3
dnl libassa-3.3.1: LIBASSA_SO_VERSION=3:2:3
dnl libassa-3.3.2: LIBASSA_SO_VERSION=3:3:3
dnl libassa-3.4.0: LIBASSA_SO_VERSION=4:0:4
dnl libassa-3.4.1: LIBASSA_SO_VERSION=4:1:4
dnl libassa-3.4.2: LIBASSA_SO_VERSION=4:2:4
dnl
dnl libassa-3.5.0: LIBASSA_SO_VERSION=5:0:0
dnl libassa-3.5.1: LIBASSA_SO_VERSION=5:1:0
dnl
LIBASSA_SO_VERSION=5:1:0
ASSA_VERSION=$ASSA_MAJOR_VERSION.$ASSA_MINOR_VERSION.$ASSA_MICRO_VERSION
ASSA_RELEASE=$ASSA_MAJOR_VERSION.$ASSA_MINOR_VERSION
AC_DEFINE_UNQUOTED(ASSA_MAJOR_VERSION, $ASSA_MAJOR_VERSION,[Major version])
AC_DEFINE_UNQUOTED(ASSA_MINOR_VERSION, $ASSA_MINOR_VERSION,[Minor version])
AC_DEFINE_UNQUOTED(ASSA_MICRO_VERSION, $ASSA_MICRO_VERSION,[Micro version])
AC_SUBST(ASSA_VERSION)
AC_SUBST(ASSA_RELEASE)
AC_SUBST(LIBASSA_SO_VERSION)
dnl For automake.
VERSION=$ASSA_VERSION
PACKAGE=libassa
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl ----------------------------------------------------------------------------
dnl Check for doxygen/dot
dnl ----------------------------------------------------------------------------
BB_ENABLE_DOXYGEN
dnl ----------------------------------------------------------------------------
dnl Check for development environment
dnl ----------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AM_SANITY_CHECK
AC_LANG_CPLUSPLUS
dnl ----------------------------------------------------------------------------
dnl Fetch LIBTIRPC library flags.
dnl Sometimes around late 2011/early 2012, glibc 2.14.x discontinued
dnl support for built-in RPC support. We only use XDR part of it.
dnl ----------------------------------------------------------------------------
PKG_CHECK_MODULES(TIRPC, libtirpc >= 0.2.2)
AC_SUBST(TIRPC_CFLAGS)
AC_SUBST(TIRPC_LIBS)
dnl ----------------------------------------------------------------------------
dnl Check if we are building for Win32
dnl ----------------------------------------------------------------------------
WIN32_EXTRA_LIBADD=
WIN32_EXTRA_LDFLAGS=
AC_CHECK_LIB(rpc, main, [LIBRPC="-lrpc"])
AC_SUBST(LIBRPC)
AC_MSG_CHECKING([for win32 environment... ])
case "$host_os" in
cygwin*)
WIN32_EXTRA_LDFLAGS="--no-undefined"
WIN32_EXTRA_LIBADD="$LIBRPC"
AC_MSG_RESULT([found cygwin: added -no-undefined to LDFLAGS])
;;
*mingw*)
WIN32_EXTRA_LDFLAGS="-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc"
WIN32_EXTRA_LIBADD="--no-undefined -lregex $LIBRPC -lwsock32"
AC_MSG_RESULT([found mingw32: added -lregex -lwsock32 to LDFLAGS])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_SUBST(WIN32_EXTRA_LDFLAGS)
AC_SUBST(WIN32_EXTRA_LIBADD)
dnl ----------------------------------------------------------------------------
dnl Do we have to build self-tests?
dnl ----------------------------------------------------------------------------
AC_ARG_ENABLE(selftests,
[ --enable-selftests compiling self-tests suite (default=no)],
[],
[enable_selftests=no])
if test "x$enable_selftests" = xno; then
with_selftests=no
else
with_selftests=yes
fi
AM_CONDITIONAL(SELF_TESTS_ENABLED, test x$with_selftests = xyes)
dnl ----------------------------------------------------------------------------
dnl Do we have to build examples?
dnl ----------------------------------------------------------------------------
AC_ARG_ENABLE(examples,
[ --enable-examples compiling examples (default=no)],
[],
[enable_examples=no])
if test "x$enable_examples" = xno; then
with_examples=no
else
with_examples=yes
fi
AM_CONDITIONAL(EXAMPLES_ENABLED, test x$with_examples = xyes)
dnl ----------------------------------------------------------------------------
dnl Generate Makefile's, configuration files and scripts
dnl ----------------------------------------------------------------------------
AC_OUTPUT([
Makefile
libassa.spec
assa-3.5.pc
assa/Makefile
utils/Makefile
doc/Makefile
doc/Doxyfile
tests/Makefile
examples/Makefile
examples/helloworld/Makefile
examples/logserver/Makefile
examples/logserver/server/Makefile
examples/logserver/monitor/Makefile
examples/logserver/client/Makefile
])
|