forked from mbroemme/pidgin-osd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
84 lines (67 loc) · 1.88 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
# The autoconf initilization.
AC_INIT(pidgin-osd, 0.1.0, [mbroemme@libmpq.org], [pidgin-osd])
# Keep correct libtool macros in-tree.
AC_CONFIG_MACRO_DIR([m4])
# Detect the canonical host and target build environment
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([no-dependencies])
AC_CONFIG_HEADERS([config.h:config.h.in])
# Define some common variables.
AC_DEFINE_UNQUOTED(AUTHOR, "Maik Broemme <$PACKAGE_BUGREPORT>", [Package author])
# Notices
AC_PREREQ(2.53)
AC_REVISION($Revision: 1.6 $)
# Checking for programs.
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_CC
# Checking for purple.
PKG_CHECK_MODULES([PURPLE], [purple >= 2.0.0])
# Checking for purple flags.
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LDFLAGS)
# Checking for pidgin.
PKG_CHECK_MODULES([PIDGIN], [pidgin >= 2.0.0])
# Checking for pidgin flags.
AC_SUBST(PIDGIN_CFLAGS)
AC_SUBST(PIDGIN_LDFLAGS)
# Checking for glib.
PKG_CHECK_MODULES([GLIB], [glib-2.0])
# Checking for glib flags.
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LDFLAGS)
# Checking for gtk.
PKG_CHECK_MODULES([GTK], [gtk+-2.0])
# Checking for gtk flags.
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LDFLAGS)
# Checking for xosd-config.
AC_PATH_PROG([xosdconfigpath], [xosd-config], [no])
if test "$xosdconfigpath" = "no"; then
AC_MSG_ERROR([xosd-config binary is required])
fi
# Checking for xosd and flags.
AC_MSG_CHECKING([for xosd])
XOSD_VERSION=`$xosdconfigpath --version`
if test "$XOSD_VERSION" \< "2.2.14" ; then
AC_MSG_ERROR([*** xosd version below 2.2.14 is incompatible with recent glibc (found $XOSD_VERSION)])
fi
XOSD_CFLAGS=`$xosdconfigpath --cflags`
if test -z "$XOSD_CFLAGS"; then
AC_MSG_RESULT([not found.])
exit
fi
XOSD_LDFLAGS=`$xosdconfigpath --libs`
if test -z "$XOSD_LDFLAGS"; then
AC_MSG_RESULT([not found.])
exit
fi
AC_MSG_RESULT([yes (found $XOSD_VERSION)])
AC_SUBST(XOSD_CFLAGS)
AC_SUBST(XOSD_LDFLAGS)
# Creating files.
AC_OUTPUT([
Makefile
src/Makefile
])