root/trunk/licq/configure.ac

Revision 6517, 6.5 kB (checked in by flynd, 2 months ago)

Bumped version to 1.3.6 for upcoming release. All plugins updated to have same version as daemon.

  • Property svn:eol-style set to native
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(src/licq.h)
3AC_CONFIG_AUX_DIR(admin)
4AC_CANONICAL_SYSTEM
5AC_ARG_PROGRAM
6
7dnl All versioning is done via these defines
8INT_VERSION=1035
9AM_INIT_AUTOMAKE(licq, 1.3.6)
10
11AM_CONFIG_HEADER(config.h)
12
13dnl Chuck #defines for PACKAGE and VERSION into config.h
14AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
15AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
16AC_DEFINE_UNQUOTED(INT_VERSION,$INT_VERSION, [Licq version number as int])
17AC_DEFINE_UNQUOTED(USE_FIFO, 1, [Undefine if it causes problems])
18
19
20dnl Expand prefix and exec_prefix
21test "x${prefix}" = "xNONE" && prefix="${ac_default_prefix}"
22test "x${exec_prefix}" = "xNONE" && exec_prefix='${prefix}'
23
24dnl (May) need to expand libdir and datadir more than once:
25dnl $libdir => $exec_prefix/lib => $prefix/lib => /some/path/lib
26install_libdir=$(eval "echo \"$(eval "echo \"${libdir}\"")\"")
27AC_DEFINE_UNQUOTED(INSTALL_LIBDIR, "${install_libdir}/licq/", [Directory where plugins go])
28
29dnl $datadir => $datarootdir => $prefix/share => /some/path/share
30install_datadir=$(eval "echo \"$(eval "echo \"${datadir}\"")\"")
31AC_DEFINE_UNQUOTED(INSTALL_SHAREDIR, "${install_datadir}/licq/", [Directory where shared data go])
32
33
34AC_ARG_ENABLE(
35  hebrew,
36  [  --enable-hebrew  include support for hebrew reverse string],
37  USE_HEBREW=yes, USE_HEBREW=no)
38if test "$USE_HEBREW" = "yes"; then
39  AC_DEFINE_UNQUOTED(USE_HEBREW, 1, [reverse string support])
40fi
41
42dnl Also substitute PACKAGE and VERSION in the AC_OUTPUT files
43AC_SUBST(PACKAGE)
44AC_SUBST(VERSION)
45
46dnl Checks for programs.
47AC_PROG_CC
48AC_PROG_CPP
49AC_PROG_CXX
50LICQDAEMON_CXX_FLAGS
51LICQ_CXX_WEXTRA
52AC_PROG_CXXCPP
53AC_ISC_POSIX
54AC_PROG_MAKE_SET
55AC_PROG_INSTALL
56AC_PATH_PROG(PROG_STRIP,strip,:)
57AC_PATH_PROG(PROG_SIZE,size,:)
58
59dnl Required for GPGME...
60AC_SYS_LARGEFILE
61
62dnl Set up some operating system specific options
63case "$host" in
64    *-*-openbsd*)
65        CFLAGS="$CFLAGS -pthread"
66        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
67        CXXFLAGS="$CXXFLAGS -pthread"
68        echo "Setting OpenBSD compilation options"
69        ;;
70    *-*-freebsd*)
71        CFLAGS="$CFLAGS -pthread"
72        CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
73        CXXFLAGS="$CXXFLAGS -pthread"
74        echo "Setting FreeBSD compilation options"
75        ;;
76    *-*-solaris*)
77        CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DPIC -fPIC"
78        LDFLAGS="$LDFLAGS -mimpure-text"
79        echo "Setting Solaris compilation options"
80        ;;
81    *-*-linux*)
82        CPPFLAGS="$CPPFLAGS -fPIC -DPIC -D_REENTRANT"
83        echo "Setting Linux compilation options"
84        ;;
85  *-*-aix*)
86    CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
87    LIBS="$LIBS -lc_r"
88    echo "Setting AIX compilation options"
89    ;;
90  *-*-irix*)
91    LDFLAGS="$LDFLAGS -L/usr/lib32"
92    echo "Setting Irix compilation options"
93    ;;
94    *)
95        echo "Licq may not compile on this system. Good luck :-)"
96        ;;
97esac
98
99dnl Checks for header files.
100AC_HEADER_DIRENT
101AC_HEADER_STDC
102AC_CHECK_HEADERS(errno.h fcntl.h getopt.h limits.h malloc.h pwd.h unistd.h paths.h)
103
104dnl Check for headers we can use to get endian for system and maybe some bswap functions
105AC_CHECK_HEADERS(byteswap.h endian.h machine/endian.h sys/byteorder.h)
106
107dnl Checks for library functions.
108AC_CHECK_LIB(xnet,inet_addr)
109AC_CHECK_LIB(socket, socket)
110LICQ_CHECK_GETHOSTBYNAME
111AC_CHECK_LIB(c_r,pthread_cancel, [], [
112  AC_CHECK_LIB(pthread, pthread_cancel, [], [
113    AC_CHECK_LIB(thread, pthread_cancel, [], [
114      AC_CHECK_LIB(pthreads, pthread_cancel, [], [
115        cat <<EOF;
116
117Please install/update your POSIX threads (pthreads) library. Updates should be
118available from either your system vendor, or, for GNU/Linux systems, go to
119http://pauillac.inria.fr/~xleroy/linuxthreads/.  GNU Pth can also be used if
120configured with --enable-pthread.
121
122EOF
123exit 1
124      ])
125    ])
126  ])
127])
128
129
130AC_CHECK_LIB(c_r, dlopen, [], [
131  AC_CHECK_LIB(c, dlopen, [], [
132    AC_CHECK_LIB(dl, dlopen, [], [
133      echo "I can't find the library containing dlopen()"
134      exit 1
135    ])
136  ])
137])
138
139AC_MSG_CHECKING([for dlopen modes])
140AC_TRY_COMPILE([
141#include <stdio.h>
142#include <dlfcn.h>
143],[
144dlopen(NULL, RTLD_NOW)
145],[
146  AC_MSG_RESULT([RTLD_NOW])
147  AC_DEFINE_UNQUOTED(DLOPEN_POLICY, RTLD_NOW, [2nd dlopen parameter])
148],[
149  AC_TRY_COMPILE([
150  #include <stdio.h>
151  #include <dlfcn.h>
152  ],[
153  dlopen(NULL, RTLD_LAZY)
154  ],[
155    AC_MSG_RESULT([RTLD_LAZY])
156    AC_DEFINE_UNQUOTED(DLOPEN_POLICY, RTLD_LAZY, [2nd dlopen parameter])
157  ],[
158    AC_MSG_RESULT([cannot determine, bailing])
159    exit 1;
160  ])
161])
162
163
164AC_CHECK_FUNCS(inet_addr inet_aton mktime select strdup strerror hstrerror readdir_r)
165
166AC_CHECK_FUNC(pthread_kill_other_threads_np,[AC_DEFINE([HAVE_PTHREAD_KILL_OTHER_THREADS_NP],
167[], [we are not using NTPL])])
168AC_CHECK_SOCKS5
169LICQ_CHECK_GPGME
170LICQ_CHECK_OPENSSL
171AX_BOOST_BASE([1.33.1])
172
173dnl Switch to C++ mode and check for needed C++ headers
174AC_LANG_SAVE
175AC_LANG_CPLUSPLUS
176
177AC_CHECK_HEADER(vector,,
178  AC_MSG_ERROR(You need to have the libstdc++ headers installed))
179
180AC_LANG_RESTORE
181
182dnl Checks for typedefs, structures, and compiler characteristics.
183AC_C_CONST
184AC_TYPE_SIZE_T
185AC_C_SOCKLEN_T
186AC_HEADER_TIME
187AC_STRUCT_TM
188LICQ_SYS_ERRLIST
189LICQ_CHECK_GMTOFF
190LICQ_CHECK_TIMEZONE
191
192dnl libtool stuff
193AC_OBJEXT
194AC_EXEEXT
195AC_LIBTOOL_DLOPEN
196AC_DISABLE_SHARED
197m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
198AC_PROG_LIBTOOL
199AC_LIBTOOL_CXX
200
201AM_GNU_GETTEXT([external])
202AM_ICONV
203if test "$am_cv_func_iconv" != "yes"; then
204  AC_MSG_ERROR(Please install the iconv library.)
205fi
206
207AC_OUTPUT(
208  po/Makefile.in \
209  bin/Makefile \
210  share/Makefile \
211  src/Makefile \
212  include/Makefile \
213  Makefile )
214
215
216echo ""
217echo ""
218
219if test "$WITH_SOCKS5" = "no"; then
220  echo "SOCKS5 support is disabled."
221else
222  echo "SOCKS5 support is enabled."
223fi
224
225if test "$WITH_GPGME" = "no"; then
226  echo "GPGME support is disabled."
227else
228  echo "GPGME support is enabled."
229fi
230
231if test "$WITH_OPENSSL" = "no"; then
232  echo ""
233  echo "OpenSSL support is not available.  Licq will not be able to"
234  echo "establish secure communication channels. This is not required"
235  echo "for proper function (i.e. it is optional). If you really desire this"
236  echo "functionality then install OpenSSL (libraries and headers) and"
237  echo "rebuild Licq.  OpenSSL can be found at http://www.openssl.org"
238  echo "or as RPM from your local distribution site."
239  echo ""
240  echo "Note you need version 0.9.5a or greater."
241else
242  echo "OpenSSL secure channel support is enabled."
243fi
244
245dnl Check for msgfmt and gmsgfmt
246if test "$GMSGFMT" = ":"; then
247  if test "$MSGFMT" = ":"; then
248    echo "** msgfmt and gmsgfmt could not be found. You're loosing daemon localization."
249  fi
250fi
251
252echo ""
253echo "--- Now type \"gmake\" to build Licq ---"
254echo "--- If gmake is not working, try \"make\" ---"
255echo ""
Note: See TracBrowser for help on using the browser.