-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
130 lines (109 loc) · 3.45 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([expand], [0.6.0], [https://code.google.com/p/expand/])
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE([1.9.5])
REQUIRED_PKG_CONFIG="0.15.0"
AC_SUBST(REQUIRED_PKG_CONFIG)
AC_CONFIG_SRCDIR([Makefile.mingw])
AC_CONFIG_HEADER([config.h])
AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
# Checks for programs.
AC_PROG_CC
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
AC_PROG_INSTALL
AC_PATH_PROG(PKG_CONFIG, [pkg-config], [no])
#
# Setup gettext
#
AC_PROG_INTLTOOL
GETTEXT_PACKAGE=expand
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
ALL_LINGUAS="es"
AM_GLIB_GNU_GETTEXT
if test x$PKG_CONFIG = xno ; then
AC_MSG_ERROR([*** pkg-config not found])
fi
# Checks for libraries.
PKG_PROG_PKG_CONFIG([$REQUIRED_PKG_CONFIG])
AS_IF([test "x$with_pidgin" != xno],
[PKG_CHECK_MODULES([PIDGIN], [pidgin >= 2.6 pidgin < 3.0],
[
AC_SUBST(PIDGIN_CFLAGS)
AC_SUBST(PIDGIN_LIBS)
]
)
AC_ARG_VAR([PIDGIN_DATADIR], [datadir of PIDGIN, overriding pkg-config])dnl
AC_ARG_VAR([PIDGIN_PLUGINDIR], [plugindir of PIDGIN, overriding pkg-config])dnl
AC_CACHE_CHECK([for PIDGIN][_DATADIR], [pkg_cv_][PIDGIN][_DATADIR],
[_PKG_CONFIG([PIDGIN][_DATADIR], [variable=datadir], [pidgin])])
AC_CACHE_CHECK([for PIDGIN][_PLUGINDIR], [pkg_cv_][PIDGIN][_PLUGINDIR],
[_PKG_CONFIG([PIDGIN][_PLUGINDIR], [variable=plugindir], [pidgin])])
PIDGIN[]_DATADIR=$pkg_cv_[]PIDGIN[]_DATADIR
PIDGIN[]_PLUGINDIR=$pkg_cv_[]PIDGIN[]_PLUGINDIR
AC_SUBST(PIDGIN_DATADIR)
AC_SUBST(PIDGIN_PLUGINDIR)
],[]
)
AM_CONDITIONAL([WITH_PIDGIN], [test "x$with_pidgin" != xno])
PKG_CHECK_MODULES([PURPLE], [purple],
[
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LIBS)
]
)
AC_ARG_VAR([PURPLE_PLUGINDIR], [plugindir of PURPLE, overriding pkg-config])dnl
AC_CACHE_CHECK([for PURPLE][_DATADIR], [pkg_cv_][PURPLE][_DATADIR],
[_PKG_CONFIG([PURPLE][_DATADIR], [variable=datadir], [purple])])
AC_CACHE_CHECK([for PURPLE][_PLUGINDIR], [pkg_cv_][PURPLE][_PLUGINDIR],
[_PKG_CONFIG([PURPLE][_PLUGINDIR], [variable=plugindir], [purple])])
PURPLE[]_DATADIR=$pkg_cv_[]PURPLE[]_DATADIR
PURPLE[]_PLUGINDIR=$pkg_cv_[]PURPLE[]_PLUGINDIR
AC_SUBST(PURPLE_PLUGINDIR)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
# AM_CONFIG_HEADER
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_C_CONST
AC_STRUCT_TM
AC_CHECK_SIZEOF(time_t, ,[
#include <stdio.h>
#include <time.h>])
# Checks for library functions.
AC_CHECK_FUNCS([gethostname inet_ntoa memmove strcasecmp strchr strdup strerror strpbrk strrchr strstr strtoul])
case "$host" in
*-*-mingw*)
CFLAGS="$CFLAGS -O2 -Wall -mno-cygwin -mms-bitfields"
LIBS="$LIBS -no-undefined -Wl,--enable-auto-image-base -lws2_32"
;;
*)
;;
esac
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -g3"
fi
AC_SUBST(CFLAGS)
AM_MAINTAINER_MODE
# Creating files.
AC_CONFIG_FILES([Makefile
po/Makefile.in
])
AC_OUTPUT
echo
echo $PACKAGE $VERSION
echo
echo Pidgin plugin directory: $PIDGIN_PLUGINDIR . Override by setting PIDGIN_PLUGINDIR
echo Pidgin data directory: $PIDGIN_DATADIR . Override by setting PIDGIN_DATADIR
echo
echo next steps:
echo make
echo sudo make install
echo