require libtar and zlib from configure
[dana/obconf.git] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([obconf], [1.7.0], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([src/main.c])
5
6 AC_PREFIX_DEFAULT([/usr/local])
7 test "$prefix" = "NONE" && prefix=$ac_default_prefix
8
9 # Pick compiler specific/build target flags, and set $CVS
10 AM_PROG_CC_C_O
11 AC_C_CONST
12 AC_C_INLINE
13
14 AC_PROG_INSTALL
15
16 LDFLAGS="$LDFLAGS -export-dynamic"
17
18 ALL_LINGUAS=""
19 AM_GNU_GETTEXT_VERSION(0.15)
20 AM_GNU_GETTEXT([external])
21
22 PKG_CHECK_MODULES(OPENBOX, [obrender-3.0 obparser-3.0])
23 AC_SUBST(OPENBOX_CFLAGS)
24 AC_SUBST(OPENBOX_LIBS)
25
26 PKG_CHECK_MODULES(LIBSTARTUPNOTIFICATION, [libstartup-notification-1.0])
27 AC_SUBST(LIBSTARTUPNOTIFICATION_CFLAGS)
28 AC_SUBST(LIBSTARTUPNOTIFICATION_LIBS)
29
30 PKG_CHECK_MODULES(GTK, [gtk+-2.0])
31 AC_SUBST(GTK_CFLAGS)
32 AC_SUBST(GTK_LIBS)
33
34 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0])
35 AC_SUBST(GDK_PIXBUF_CFLAGS)
36 AC_SUBST(GDK_PIXBUF_LIBS)
37
38 PKG_CHECK_MODULES(GLADE, [libglade-2.0])
39 AC_SUBST(GLADE_CFLAGS)
40 AC_SUBST(GLADE_LIBS)
41
42 # zlib
43 AC_CHECK_HEADER([zlib.h], [ZLIB_LIBS="-lz"],
44   AC_MSG_ERROR([Could not find zlib.h]))
45 AC_CHECK_LIB([z], [gzopen],,
46   AC_MSG_ERROR([Could not find gzopen in -lz.]))
47 AC_SUBST(ZLIB_LIBS)
48
49 # libtar
50 AC_CHECK_HEADER([libtar.h], [LIBTAR_LIBS="-ltar"],
51   AC_MSG_ERROR([Could not find libtar.h]))
52 AC_CHECK_LIB([tar], [tar_open],,
53   AC_MSG_ERROR([Could not find tar_open in -ltar.]))
54 AC_SUBST(LIBTAR_LIBS)
55
56 AC_CONFIG_FILES([
57   Makefile
58   po/Makefile.in
59 ])
60 AC_OUTPUT
61
62 AC_MSG_RESULT
63 AC_MSG_RESULT([configure complete, now type \"make\"])
64
65