~ubuntu-branches/ubuntu/trusty/log4shib/trusty

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2012-06-05 21:20:25 UTC
  • Revision ID: package-import@ubuntu.com-20120605212025-uyigtav7dqwvnf41
Tags: upstream-1.0.4
ImportĀ upstreamĀ versionĀ 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT(log4shib, 1.0.4)
 
2
 
 
3
# autoconf 2.50 or higher to rebuild aclocal.m4, because the
 
4
# AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro.
 
5
AC_PREREQ(2.50)
 
6
 
 
7
#
 
8
# +1 : ? : +1  == new interface that does not break old one
 
9
# +1 : ? : 0   == new interface that breaks old one
 
10
#  ? : ? : 0   == no new interfaces, but breaks apps
 
11
#  ? :+1 : ?   == just some internal changes, nothing breaks but might work 
 
12
#                 better
 
13
# CURRENT : REVISION : AGE
 
14
LT_VERSION=1:4:0
 
15
 
 
16
AC_SUBST(LT_VERSION)
 
17
 
 
18
#AC_CONFIG_SRCDIR(configure.in)
 
19
AC_CONFIG_AUX_DIR(config)
 
20
AM_CONFIG_HEADER(include/config.h)
 
21
 
 
22
AM_INIT_AUTOMAKE
 
23
 
 
24
# General "with" options
 
25
# ----------------------------------------------------------------------------
 
26
AC_ARG_WITH(idsa, [  --with-idsa             include idsa support])
 
27
 
 
28
# Checks for programs
 
29
# ----------------------------------------------------------------------------
 
30
AC_CANONICAL_HOST
 
31
 
 
32
AC_ARG_ENABLE(debug,
 
33
    AC_HELP_STRING(--enable-debug, [Have GCC compile with symbols (Default = no)]),
 
34
    enable_debug=$enableval, enable_debug=no)
 
35
 
 
36
if test "$enable_debug" = "yes" ; then
 
37
    GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
 
38
    GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
 
39
else
 
40
    GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
 
41
    GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
 
42
fi
 
43
 
 
44
AM_PROG_LIBTOOL
 
45
AC_PROG_INSTALL
 
46
AC_PROG_MAKE_SET
 
47
 
 
48
AC_PROG_CXX([g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC QCC])
 
49
 
 
50
if test "$GCC" = "yes" ; then
 
51
    CFLAGS="-Wall $GCC_CFLAGS"
 
52
    CXXFLAGS="-Wall $GCC_CXXFLAGS"
 
53
fi
 
54
 
 
55
AC_PROG_CXXCPP
 
56
AC_LANG(C)
 
57
 
 
58
# Checks header files
 
59
# ----------------------------------------------------------------------------
 
60
AC_CHECK_HEADERS([unistd.h])
 
61
AC_CHECK_HEADERS([io.h])
 
62
 
 
63
# Checks local idioms
 
64
# ----------------------------------------------------------------------------
 
65
AC_C_INT64_T
 
66
AC_FUNC_SNPRINTF
 
67
AC_CHECK_FUNCS([syslog gettimeofday ftime localtime_r gmtime_r])
 
68
 
 
69
# Checks for libraries
 
70
# ----------------------------------------------------------------------------
 
71
 
 
72
# for RemoteSyslogAppender
 
73
AC_CHECK_LIB(socket,socket, LIBS="-lsocket $LIBS",,)
 
74
AC_CHECK_LIB(nsl,gethostbyname, LIBS="-lnsl $LIBS",,)
 
75
 
 
76
# checks for pthreads
 
77
ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
 
78
if test $enable_threads != "pthread"; then
 
79
    AC_MSG_ERROR([unable to find pthreads, currently this is required])
 
80
else
 
81
    AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
 
82
    AC_DEFINE(HAVE_THREADING,1,[define if threading is enabled])
 
83
    AC_DEFINE(USE_PTHREADS,1,[define if pthread library is available])
 
84
    AC_DEFINE(_PTHREADS,1,[define for STL if pthread library is used])
 
85
    LIBS="$PTHREAD_LIBS $LIBS"
 
86
    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
 
87
    CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
 
88
fi
 
89
 
 
90
AC_LANG(C++)
 
91
 
 
92
AC_CXX_HAVE_SSTREAM
 
93
 
 
94
# idsa_test
 
95
if test "x$with_idsa" = xyes; then
 
96
    AC_CHECK_LIB([idsa], [idsa_open])
 
97
    if test "$ac_cv_lib_idsa_idsa_open" = no; then
 
98
        AC_MSG_ERROR([could not locate idsa library])
 
99
    fi
 
100
fi
 
101
 
 
102
# check for doxygen
 
103
# ----------------------------------------------------------------------------
 
104
BB_ENABLE_DOXYGEN
 
105
 
 
106
# check for omnithreads
 
107
#BB_CHECK_OMNITHREADS
 
108
#BB_CHECK_PTHREADS
 
109
 
 
110
LOG4SHIB_CFLAGS="$CXXFLAGS"
 
111
LOG4SHIB_LIBS="-llog4shib"
 
112
LOG4SHIB_LIBDEPS="$LIBS"
 
113
LOG4SHIB_VERSION="$VERSION"
 
114
 
 
115
PETI_PEDANTIC_GCC
 
116
 
 
117
# Create files
 
118
# ----------------------------------------------------------------------------
 
119
 
 
120
AC_CONFIG_LIBCONFIG_IN([log4shib])
 
121
AC_CONFIG_PKGCONFIG_IN([log4shib], [C++ library for flexible logging, modeled after Log4j])
 
122
 
 
123
AC_CONFIG_FILES([
 
124
Makefile
 
125
log4shib.spec
 
126
log4shib.pc
 
127
log4shib-config
 
128
Portfile
 
129
config/Makefile
 
130
doc/Makefile
 
131
doc/Doxyfile
 
132
doc/html/Makefile
 
133
src/Makefile
 
134
include/Makefile
 
135
include/log4shib/Makefile
 
136
include/log4shib/threading/Makefile
 
137
tests/Makefile
 
138
debian/Makefile
 
139
msvc6/Makefile
 
140
msvc6/log4shib/Makefile
 
141
msvc6/log4shibDLL/Makefile
 
142
msvc6/testCategory/Makefile
 
143
msvc6/testDLL/Makefile
 
144
msvc6/testMain/Makefile
 
145
msvc6/testNDC/Makefile
 
146
msvc6/testNTEventLog/Makefile
 
147
msvc6/testPattern/Makefile
 
148
msvc8/Makefile
 
149
msvc8/log4shib/Makefile
 
150
msvc8/log4shibDLL/Makefile
 
151
msvc8/testCategory/Makefile
 
152
msvc8/testDLL/Makefile
 
153
msvc8/testMain/Makefile
 
154
msvc8/testNDC/Makefile
 
155
msvc8/testNTEventLog/Makefile
 
156
msvc8/testPattern/Makefile
 
157
msvc9/Makefile
 
158
msvc9/log4shib/Makefile
 
159
msvc9/log4shibDLL/Makefile
 
160
msvc9/testCategory/Makefile
 
161
msvc9/testDLL/Makefile
 
162
msvc9/testMain/Makefile
 
163
msvc9/testNDC/Makefile
 
164
msvc9/testNTEventLog/Makefile
 
165
msvc9/testPattern/Makefile
 
166
bcb5/Makefile
 
167
bcb5/log4shib/Makefile
 
168
bcb5/testCategory/Makefile
 
169
bcb5/testConfig/Makefile
 
170
bcb5/testFixedContextCategory/Makefile
 
171
bcb5/testmain/Makefile
 
172
bcb5/testNDC/Makefile
 
173
bcb5/testPattern/Makefile
 
174
openvms/Makefile
 
175
])
 
176
AC_OUTPUT
 
177
 
 
178
AC_CREATE_PREFIX_CONFIG_H([include/log4shib/config.h], 
 
179
        $PACKAGE_TARNAME, [include/config.h])