summaryrefslogtreecommitdiffstats
path: root/kicker/configure.in.in
blob: 31a9d23452ebbdcf982ac372d58782a2cf163e09 (plain)
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
dnl Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)

if test "$PKG_CONFIG" = "no"; then
  AC_MSG_ERROR([
This package requires pkg-config.
])
fi

dnl Check for Glib-2.0
# GLIB_CFLAGS:  cflags for compiling glib dependant sources
# GLIB_LIBADD:  glib libraries (-l options)
# GLIB_LDFLAGS: flags containing path to glib libraries (-L options)

GLIB_PACKAGES="gmodule-2.0 gthread-2.0"
GLIB_VERSION="1.3.3"
AC_MSG_CHECKING(for GLib-2.0 (at least $GLIB_VERSION))

if $PKG_CONFIG --atleast-pkgconfig-version 0.15 ; then
   if $PKG_CONFIG --atleast-version $GLIB_VERSION $GLIB_PACKAGES >/dev/null 2>&1 ; then
       GLIB_CFLAGS="`$PKG_CONFIG --cflags $GLIB_PACKAGES`"
       GLIB_LIBADD="`$PKG_CONFIG --libs-only-l --libs-only-other $GLIB_PACKAGES`"
       GLIB_LDFLAGS="`$PKG_CONFIG --libs-only-L $GLIB_PACKAGES`"
       AC_MSG_RESULT(yes)
   fi
else
   if $PKG_CONFIG --atleast-version $GLIB_VERSION $GLIB_PACKAGES >/dev/null 2>&1 ; then
       GLIB_CFLAGS="`$PKG_CONFIG --cflags $GLIB_PACKAGES`"
       GLIB_LIBADD="`$PKG_CONFIG --libs-only-l $GLIB_PACKAGES`"
       GLIB_LDFLAGS="`$PKG_CONFIG --libs-only-L $GLIB_PACKAGES`"
       AC_MSG_RESULT(yes)
       AC_MSG_WARN([you may need to run make LDFLAGS=-pthread to compile arts])
   fi
fi

if test -z "$GLIB_LIBADD"; then
        AC_MSG_RESULT(not installed)
    DO_NOT_COMPILE="$DO_NOT_COMPILE kerry gmcop"
fi

AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBADD)
AC_SUBST(GLIB_LDFLAGS)