require libtar and zlib from configure
authorDana Jansens <danakj@orodu.net>
Wed, 30 May 2007 01:59:01 +0000 (01:59 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 30 May 2007 01:59:01 +0000 (01:59 +0000)
Makefile.am
configure.ac

index e553d37..4e47405 100644 (file)
@@ -13,8 +13,8 @@ bin_PROGRAMS = \
        src/obconf
 
 src_obconf_CPPFLAGS = \
-       $(OBLIBS_CFLAGS) \
-       $(STARTUP_CFLAGS) \
+       $(OPENBOX_CFLAGS) \
+       $(LIBSTARTUPNOTIFICATION_CFLAGS) \
        $(GTK_CFLAGS) \
        $(GLADE_CFLAGS) \
        $(GDK_PIXBUF_CFLAGS) \
@@ -25,13 +25,14 @@ src_obconf_CPPFLAGS = \
        -DTHEMEDIR=\"$(themedir)\" \
        -DG_LOG_DOMAIN=\"Obconf\"
 src_obconf_LDADD = \
-       $(OBLIBS_LIBS) \
-       $(STARTUP_LIBS) \
+       $(OPENBOX_LIBS) \
+       $(LIBSTARTUPNOTIFICATION_LIBS) \
        $(GTK_LIBS) \
        $(GLADE_LIBS) \
        $(GDK_PIXBUF_LIBS) \
        $(LIBINTL) \
-       -lz -ltar
+       $(ZLIB_LIBS) \
+       $(LIBTAR_LIBS)
 src_obconf_SOURCES = \
        src/gettext.h \
        src/main.c \
index a0a5081..05fad9d 100644 (file)
@@ -19,13 +19,13 @@ ALL_LINGUAS=""
 AM_GNU_GETTEXT_VERSION(0.15)
 AM_GNU_GETTEXT([external])
 
-PKG_CHECK_MODULES(OBLIBS, [obrender-3.0 obparser-3.0])
-AC_SUBST(OB_CFLAGS)
-AC_SUBST(OB_LIBS)
+PKG_CHECK_MODULES(OPENBOX, [obrender-3.0 obparser-3.0])
+AC_SUBST(OPENBOX_CFLAGS)
+AC_SUBST(OPENBOX_LIBS)
 
-PKG_CHECK_MODULES(STARTUP, [libstartup-notification-1.0])
-AC_SUBST(STARTUP_CFLAGS)
-AC_SUBST(STARTUP_LIBS)
+PKG_CHECK_MODULES(LIBSTARTUPNOTIFICATION, [libstartup-notification-1.0])
+AC_SUBST(LIBSTARTUPNOTIFICATION_CFLAGS)
+AC_SUBST(LIBSTARTUPNOTIFICATION_LIBS)
 
 PKG_CHECK_MODULES(GTK, [gtk+-2.0])
 AC_SUBST(GTK_CFLAGS)
@@ -39,6 +39,20 @@ PKG_CHECK_MODULES(GLADE, [libglade-2.0])
 AC_SUBST(GLADE_CFLAGS)
 AC_SUBST(GLADE_LIBS)
 
+# zlib
+AC_CHECK_HEADER([zlib.h], [ZLIB_LIBS="-lz"],
+  AC_MSG_ERROR([Could not find zlib.h]))
+AC_CHECK_LIB([z], [gzopen],,
+  AC_MSG_ERROR([Could not find gzopen in -lz.]))
+AC_SUBST(ZLIB_LIBS)
+
+# libtar
+AC_CHECK_HEADER([libtar.h], [LIBTAR_LIBS="-ltar"],
+  AC_MSG_ERROR([Could not find libtar.h]))
+AC_CHECK_LIB([tar], [tar_open],,
+  AC_MSG_ERROR([Could not find tar_open in -ltar.]))
+AC_SUBST(LIBTAR_LIBS)
+
 AC_CONFIG_FILES([
   Makefile
   po/Makefile.in
@@ -47,3 +61,5 @@ AC_OUTPUT
 
 AC_MSG_RESULT
 AC_MSG_RESULT([configure complete, now type \"make\"])
+
+