Fixed a bug with lcs_contacts
[siplcs.git] / configure.ac
blobf43d205bc966277d8f6c7f0ba5fbda01d40fcbae
3 # version of this package
4 m4_define(pidgin_sipe_version,  1.2.0)
6 # lower and upper-bound versions of Pidgin
7 m4_define(pidgin_version_max,           2.0.0)
9 AC_INIT
10 AM_INIT_AUTOMAKE(pidgin_sipe, pidgin_sipe_version)
12 AC_PREREQ([2.50])
14 AC_DISABLE_STATIC
16 AC_PROG_CC
17 AC_PROG_INSTALL
18 AC_PROG_LIBTOOL
19 LIBTOOL="$LIBTOOL --silent"
21 AC_HEADER_STDC
23 GAIM_MIN=pidgin_version_min
24 GAIM_MAX=pidgin_version_max
25 AC_SUBST(PIDGIN_MIN)
26 AC_SUBST(PIDGIN_MAX)
28 # tell pkgconfig to look in the same prefix we're installing this to,
29 # as that's likely where gaim will be found if it's not in the default
30 # pkgconfig path
31 PREFIX=$ac_default_prefix
32 if test "$prefix" != "NONE"; then
33    PREFIX=$prefix
36 PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$PREFIX/lib/pkgconfig"
37 export PKG_CONFIG_PATH
39 # debug mode
40 AC_ARG_ENABLE(debug,
41         [  --enable-debug         compile with debugging support],,
42         enable_debug=no)
44 if test "$enable_debug" = yes; then
45    AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
48 # Check for Pidgin
49 PKG_CHECK_MODULES(libpurple,
50 [pidgin >= pidgin_version_max],
52         AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
55 PIDGIN_CFLAGS=`$PKG_CONFIG --cflags purple`
56 PIDGIN_LIBS=`$PKG_CONFIG --libs purple`
58 AC_SUBST(PIDGIN_CFLAGS)
59 AC_SUBST(PIDGIN_LIBS)
61 dnl Check for inet_aton
62 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
63                                          [AC_ERROR(inet_aton not found)])])
65 SIPE_LIBA=`$PKG_CONFIG sipe --variable=libarchive`
66 AC_SUBST(SIPE_LIBA)
68 AC_ARG_ENABLE(static-sipe,
69         [  --enable-static-sipe  statically link in Simple Exchange],
70                 sipe_static="yes", sipe_static="no")
72 AM_CONDITIONAL(SIPE_STATIC, test $sipe_static = yes)
74 # substitutions and generated files
75 AC_CONFIG_FILES(
76         [src/config.h]
77         [Makefile 
78         pixmaps/Makefile 
79         pixmaps/16/Makefile 
80         pixmaps/22/Makefile 
81         pixmaps/48/Makefile 
82         src/Makefile]
85 AC_OUTPUT()
88 echo
89 echo -n "Simple Exchange linking mode... : "
90 if test "$sipe_static" = "yes" ; then
91    echo "static"
92    echo "Simple Exchange library...      : $SIPE_LIBA"
93 else
94    echo "dynamic"
97 echo
98 echo configure complete, now run \`make\`
99 echo
101 # The End.