1# Process this file with autoconf to produce a configure script.
2# some parts are taken from configure.ac from gmpc-svn
3# (see: sarine.nl/gmpc)
4
5AC_INIT([stjerm C], [0.18], [kristopherwilson@gmail.com],
6    [main_c], [http://github.com/stjerm/])
7AC_PREREQ([2.59])
8AM_INIT_AUTOMAKE([1.10 no-define foreign])
9AC_CONFIG_SRCDIR([src/mainwindow.c])
10AC_CONFIG_HEADER([config.h])
11
12# Checks for programs.
13AC_PROG_CC
14
15# Checks for libraries.
16AC_SUBST(GLIB_REQUIRED)
17AC_SUBST(GTK_REQUIRED)
18
19# glib
20PKG_CHECK_MODULES([glib], glib-2.0 >= 2.32)
21AC_SUBST(glib_LIBS)
22AC_SUBST(glib_CFLAGS)
23
24#gtk
25PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.24)
26AC_SUBST(gtk_LIBS)
27AC_SUBST(gtk_CFLAGS)
28
29# gthread
30PKG_CHECK_MODULES([gthread], gthread-2.0)
31AC_SUBST(gthread_LIBS)
32AC_SUBST(gthread_CFLAGS)
33
34# gthread
35PKG_CHECK_MODULES([vte], vte >= 0.28)
36AC_SUBST(vte_LIBS)
37AC_SUBST(vte_CFLAGS)
38
39# Checks for Xinerama extension
40PKG_CHECK_MODULES([XINERAMA], [xinerama], [ac_have_xinerama="yes"], [
41AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
42    XINERAMA_LIBS="-lXinerama"
43    ac_have_xinerama="yes",,
44    $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS)
45])
46
47# Checks for header files.
48AC_PATH_X
49AC_HEADER_STDC
50AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
51
52# Checks for typedefs, structures, and compiler characteristics.
53AC_TYPE_PID_T
54
55# Checks for library functions.
56AC_TYPE_SIGNAL
57AC_FUNC_STAT
58
59AC_OUTPUT([Makefile doc/Makefile src/Makefile])
60
61echo "ready. type make to build..."
62