[seed] - Move the pkg-config checks in modules from files to configure.ac



commit e423fc593afb6c19d7c5f8841e7ee99fbb0ecb35
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date:   Mon Apr 27 23:19:28 2009 -0400

     - Move the pkg-config checks in modules from files to configure.ac
     - Fix the ffi checks.
     - Change -I../../ to -I top_srcdir@ to support out-of-tree compilation
     - Remove hard-coded -O3 optimization flag
     - Add missing AC_AMFLAGS which is correct way of handling additional m4 di
     - Make configure fail if required dependencies for a module are not available, instead of silently dropping it.
     - Removed 'ugly' linking to .libs dirs in order to use libtool
---
 Makefile.am                         |    2 +
 configure.ac                        |  113 ++++++++++++++++------------------
 examples/turtle/Makefile.am         |   17 +++---
 libseed/Makefile.am                 |   20 +++++-
 modules/Multiprocessing/Makefile.am |   32 ++++------
 modules/canvas/Makefile.am          |   33 ++++------
 modules/example/Makefile.am         |   24 +++----
 modules/os/Makefile.am              |   31 ++++------
 modules/readline/Makefile.am        |   28 ++++-----
 modules/sqlite/Makefile.am          |   34 +++++------
 src/Makefile.am                     |   32 +++++-----
 tests/c/Makefile.am                 |   12 +++-
 12 files changed, 178 insertions(+), 200 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2cbd6cc..06c4378 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = po \
 	libseed \
 	src \
diff --git a/configure.ac b/configure.ac
index c15d277..d7b59e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,82 +87,79 @@ case "$host_os" in
 		;;
 esac
 
-dnl ==============================readline=====================================
-AC_MSG_CHECKING(for readline)
-AC_TRY_CPP([#include <readline/readline.h>],
-			have_readline_h=yes,
-			have_readline_h=no)
-AC_MSG_RESULT([$have_readline_h])
-
-dnl ==============================cairo========================================
-AC_MSG_CHECKING(for cairo)
-AC_TRY_CPP([#include <cairo/cairo.h>], have_cairo_h=yes, have_cairo_h=no)
-AC_MSG_RESULT([$have_cairo_h])
-
-dnl ============================sqlite3========================================
-AC_MSG_CHECKING(for sqlite3)
-AC_TRY_CPP([#include <sqlite3.h>], have_sqlite3_h=yes, have_sqlite3_h=no)
-AC_MSG_RESULT([$have_sqlite3_h])
-
-dnl =============================gtk+-2.0======================================
-AC_MSG_CHECKING(for gtk+-2.0)
-PKG_CHECK_EXISTS(gtk+-2.0, have_gtk=yes, have_gtk=no)
-AC_MSG_RESULT([$have_gtk])
+PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
+AC_SUBST(WEBKIT_CFLAGS)
+AC_SUBST(WEBKIT_LDFLAGS)
+
+dnl =========================Introspection=====================================
+PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, gobject-introspection-1.0 >= 0.6.3)
+AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
+AC_SUBST(GOBJECT_INTROSPECTION_LDFLAGS)
 
 dnl =============================Modules=======================================
+dnl ==== canvas ====
 AC_ARG_ENABLE(canvas-module,
 			  AC_HELP_STRING([--enable-canvas-module],
 							 [enable the canvas Seed module. [default=yes]]),
 			  [want_canvas_module=$enableval],[want_canvas_module="yes"])
 
-AC_ARG_ENABLE(example-module,
-			  AC_HELP_STRING([--enable-example-module],
-							 [enable the example Seed module. [default=yes]]),
-			  [want_example_module=$enableval],[want_example_module="yes"])
+if test x"$want_canvas_module" == x"yes" ; then
+	PKG_CHECK_MODULES(CAIRO, cairo)
+	AC_SUBST(CAIRO_CFLAGS)
+	AC_SUBST(CAIRO_LDFLAGS)
+fi
+
+AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
+AC_SUBST(BUILD_CANVAS_MODULE)
+
+dnl ==== readline ====
+AC_ARG_ENABLE(readline-module,
+			  AC_HELP_STRING([--enable-readline-module],
+							 [enable the readline Seed module. [default=yes]]),
+			  [want_readline_module=$enableval],[want_readline_module="yes"])
+if test x"$want_readline_module" != x"yes" ; then
+	AC_CHECK_HEADER([readline/readline.h])
+fi
+
+AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
+AC_SUBST(BUILD_READLINE_MODULE)
 
+dnl ==== multiprocessing ====
 AC_ARG_ENABLE(multiprocessing-module,
 			  AC_HELP_STRING([--enable-multiprocessing-module],
 							 [enable the multiprocessing Seed module. [default=yes]]),
 			  [want_multiprocessing_module=$enableval],
 			  [want_multiprocessing_module="yes"])
 
-AC_ARG_ENABLE(readline-module,
-			  AC_HELP_STRING([--enable-readline-module],
-							 [enable the readline Seed module. [default=yes]]),
-			  [want_readline_module=$enableval],[want_readline_module="yes"])
+AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
+AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
 
+dnl ==== sqlite ====
 AC_ARG_ENABLE(sqlite-module,
 			  AC_HELP_STRING([--enable-sqlite-module],
 							 [enable the sqlite Seed module. [default=yes]]),
 			  [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
 
-dnl --- Special Cases ---
-
-if test x"$have_cairo_h" != x"yes" ; then
-	want_canvas_module="no"
-fi
-
-if test x"$have_readline_h" != x"yes" ; then
-	want_readline_module="no"
+if test x"$want_sqlite_module" == x"yes" ; then
+	PKG_CHECK_MODULES(SQLITE, sqlite3)
+	AC_SUBST(SQLITE_CFLAGS)
+	AC_SUBST(SQLITE_LDFLAGS)
 fi
 
-if test x"$have_sqlite3_h" != x"yes" ; then
-	want_sqlite_module="no"
-fi
+AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
+AC_SUBST(BUILD_SQLITE_MODULE)
 
-want_dbus_modules="yes"
+dnl ==== Example ====
+AC_ARG_ENABLE(example-module,
+			  AC_HELP_STRING([--enable-example-module],
+							 [enable the example Seed module. [default=yes]]),
+			  [want_example_module=$enableval],[want_example_module="yes"])
 
-AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
-AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
-AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
-AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
-
-AC_SUBST(BUILD_CANVAS_MODULE)
 AC_SUBST(BUILD_EXAMPLE_MODULE)
-AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
-AC_SUBST(BUILD_READLINE_MODULE)
-AC_SUBST(BUILD_SQLITE_MODULE)
+
+dnl ==== dbus? ====
+want_dbus_modules="yes"
 
 dnl =========================turtle example====================================
 AC_ARG_ENABLE(turtle-example,
@@ -170,8 +167,10 @@ AC_ARG_ENABLE(turtle-example,
 							 [enable the turtle graphics example. [default=yes]]),
 			  [want_turtle_example=$enableval],[want_turtle_example="yes"])
 
-if test x"$have_gtk" != x"yes" ; then
-	want_turtle_example="no"
+if test x"$want_turtle_example" == x"yes" ; then
+	PKG_CHECK_MODULES(GTK, gtk+-2.0)
+	AC_SUBST(GTK_CFLAGS)
+	AC_SUBST(GTK_LIBS)
 fi
 
 AM_CONDITIONAL(BUILD_TURTLE_EXAMPLE, test "x$want_turtle_example" = "xyes")
@@ -213,7 +212,7 @@ AC_ARG_ENABLE(profile-modules,
 
 if test "x$enable_profile" = "xyes"; then
 	SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
-	SEED_PROFILE_LDFLAGS="-lgcov"
+	SEED_PROFILE_LIBS="-lgcov"
 	CFLAGS="-O0"
 fi
 
@@ -222,7 +221,7 @@ if test "x$enable_profile" = "xno"; then
 fi
 
 AC_SUBST(SEED_PROFILE_CFLAGS)
-AC_SUBST(SEED_PROFILE_LDFLAGS)
+AC_SUBST(SEED_PROFILE_LIBS)
 
 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
 
@@ -234,12 +233,6 @@ case "$host_os" in
 	darwin*)
 		SEED_OSX_CFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
 		SEED_OSX_LDFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
-		PKG_CHECK_MODULES(SEED, gobject-introspection-1.0 >= 0.6.3)
-		PKG_CHECK_MODULES(LIBSEED, gobject-introspection-1.0 >= 0.6.3)
-		;;
-	*)
-		PKG_CHECK_MODULES(SEED, webkit-1.0 gobject-introspection-1.0 >= 0.6.3)
-		PKG_CHECK_MODULES(LIBSEED, webkit-1.0 gobject-introspection-1.0  >= 0.6.3)
 		;;
 esac
 AC_SUBST(SEED_OSX_CFLAGS)
diff --git a/examples/turtle/Makefile.am b/examples/turtle/Makefile.am
index cdcddab..c946677 100644
--- a/examples/turtle/Makefile.am
+++ b/examples/turtle/Makefile.am
@@ -1,23 +1,22 @@
 if BUILD_SEED_EXAMPLES
 if BUILD_TURTLE_EXAMPLE
 
-AM_CPPFLAGS = \
-	$(SEED_CFLAGS) `pkg-config --cflags gtk+-2.0`
-
-AM_CFLAGS =\
-	 -Wall -I../../libseed
-
 bin_PROGRAMS = seed_turtle
 
 seed_turtle_SOURCES = \
 	turtle.c
 
+seed_turtle_CFLAGS = \
+	-Wall \
+	-I top_srcdir@/libseed \
+	$(GTK_CFLAGS) \
+	$(GOBJECT_INTROSPECTION_CFLAGS)
+
 seed_turtle_LDFLAGS = \
-	-L../../libseed/.libs -lseed `pkg-config --libs gtk+-2.0`
+	$(GTK_LIBS)
 
 seed_turtle_LDADD = \
-	$(SEED_LIBS) \
-	-lseed
+	../../libseed/libseed.la
 
 endif
 endif
diff --git a/libseed/Makefile.am b/libseed/Makefile.am
index ce9a48e..209bf3a 100644
--- a/libseed/Makefile.am
+++ b/libseed/Makefile.am
@@ -24,12 +24,24 @@ libseed_la_SOURCES = \
 	seed-importer.c \
 	seed-importer.h 
 
-libseed_la_LIBADD = $(LIBSEED_LIBS) $(LIBFFI_LDFLAGS)
-libseed_la_CPPFLAGS = -lgmodule-2.0 $(LIBSEED_CFLAGS) $(SEED_OSX_CFLAGS) $(FFI_CFLAGS) -Wall
-libseed_la_LDFLAGS = -no-undefined $(SEED_PROFILE_LDFLAGS) $(SEED_OSX_LDFLAGS) $(FFI_LDFLAGS)
+libseed_la_CFLAGS = \
+	-Wall \
+	$(GOBJECT_INTROSPECTION_CFLAGS) \
+        $(WEBKIT_CFLAGS) \
+        $(SEED_OSX_CFLAGS) \
+        $(SEED_DEBUG_CFLAGS) \
+        $(SEED_PROFILE_CFLAGS) \
+        $(FFI_CFLAGS)
+
+libseed_la_LDFLAGS = \
+        -no-undefined \
+        $(GOBJECT_INTROSPECTION_LIBS) \
+	$(WEBKIT_LIBS) \
+        $(SEED_PROFILE_LIBS) \
+        $(SEED_OSX_LIBS) \
+        $(FFI_LDFLAGS)
 
 seedheaders_HEADERS = seed.h
 
 seedheadersdir = $(pkgincludedir)
 
-LIBSEED_CFLAGS += $(SEED_DEBUG_CFLAGS) $(SEED_PROFILE_CFLAGS)
diff --git a/modules/Multiprocessing/Makefile.am b/modules/Multiprocessing/Makefile.am
index f2dc3b9..f3e3949 100644
--- a/modules/Multiprocessing/Makefile.am
+++ b/modules/Multiprocessing/Makefile.am
@@ -1,31 +1,25 @@
 if BUILD_MULTIPROCESSING_MODULE
 
-lib_LTLIBRARIES = \
+EXTRA_DIST = fork.js bi.js
+
+seedlibdir = ${exec_prefix}/lib/seed
+
+seedlib_LTLIBRARIES = \
 	libmultiprocessing.la
 
 libmultiprocessing_la_SOURCES = \
 	multi.c
 
-libmultiprocessing_la_LDFLAGS = \
-	`pkg-config --libs seed`
-
-AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	$(SEED_DEBUG_CFLAGS)
+libmultiprocessing_la_CFLAGS = \
+        $(GOBJECT_INTROSPECTION_CFLAGS) \
+	-I top_srcdir@/libseed/ \
+        $(SEED_DEBUG_CFLAGS) \
+        $(SEED_PROFILE_CFLAGS)
 
-AM_LDFLAGS = 
-
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS += $(SEED_PROFILE_LDFLAGS)
-endif
+libmultiprocessing_la_LDFLAGS = \
+	$(GOBJECT_INTROSPECTION_LDFLAGS) \
+	$(SEED_PROFILE_LIBS)
 
 endif
 
-EXTRA_DIST = fork.js bi.js
-
-libdir = ${exec_prefix}/lib/seed
 
diff --git a/modules/canvas/Makefile.am b/modules/canvas/Makefile.am
index 18daefb..35373bc 100644
--- a/modules/canvas/Makefile.am
+++ b/modules/canvas/Makefile.am
@@ -1,30 +1,25 @@
 if BUILD_CANVAS_MODULE
 
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+EXTRA_DIST=run-tests.js
+
+seedlib_LTLIBRARIES = \
 	libcanvas.la
 
 libcanvas_la_SOURCES = \
 	seed-canvas.c
 
-libcanvas_la_LDFLAGS = \
-	`pkg-config --libs seed cairo`
-
-AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	`pkg-config --cflags cairo` \
-	$(SEED_DEBUG_CFLAGS)
+libcanvas_la_CFLAGS = \
+        $(GOBJECT_INTROSPECTION_CFLAGS) \
+	-I top_srcdir@/libseed/ \
+	$(CAIRO_CFLAGS) \
+	$(SEED_DEBUG_CFLAGS) \
+	$(SEED_PROFILE_CFLAGS)
 
-AM_LDFLAGS =
-
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS = $(SEED_PROFILE_LDFLAGS)
-endif
+libcanvas_la_LDFLAGS = \
+        $(GOBJECT_INTROSPECTION_LDFLAGS) \
+	$(CAIRO_LDFLAGS) \
+	$(SEED_PROFILE_LIBS)
 
 endif
 
-libdir = ${exec_prefix}/lib/seed
-EXTRA_DIST=run-tests.js
diff --git a/modules/example/Makefile.am b/modules/example/Makefile.am
index 84f4384..3d986ec 100644
--- a/modules/example/Makefile.am
+++ b/modules/example/Makefile.am
@@ -1,29 +1,25 @@
 if BUILD_EXAMPLE_MODULE
 
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+
+seedlib_LTLIBRARIES = \
 	libexample.la
 
 libexample_la_SOURCES = \
 	example.c
 
-libexample_la_LDFLAGS = \
-	`pkg-config --libs seed`
 
 AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	$(SEED_DEBUG_CFLAGS)
+	-I top_srcdir@/libseed/ \
+	$(GOBJECT_INTROSPECTION_CFLAGS)
+	$(SEED_DEBUG_CFLAGS) \
+	$(SEED_PROFILE_CFLAGS)
 
-AM_LDFLAGS = 
+libexample_la_LDFLAGS = \
+	$(GOBJECT_INTROSPECTION_LDFLAGS) \
+	$(SEED_PROFILE_LIBS)
 
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS += $(SEED_PROFILE_LDFLAGS)
 endif
 
-endif
 
-libdir = ${exec_prefix}/lib/seed
 
diff --git a/modules/os/Makefile.am b/modules/os/Makefile.am
index 4ec59ce..a58198c 100644
--- a/modules/os/Makefile.am
+++ b/modules/os/Makefile.am
@@ -1,25 +1,20 @@
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+
+seedlib_LTLIBRARIES = \
 	libos.la
 
 libos_la_SOURCES = \
 	os.c
 
-libos_la_LDFLAGS = \
-	`pkg-config --libs seed` -lutil
-
-AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	$(SEED_DEBUG_CFLAGS)
+libos_la_CFLAGS = \
+        $(GOBJECT_INTROSPECTION_CFLAGS) \
+	-I top_srcdir@/libseed/ \
+        $(SEED_DEBUG_CFLAGS) \
+        $(SEED_PROFILE_CFLAGS)
 
-AM_LDFLAGS = 
-
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS += $(SEED_PROFILE_LDFLAGS)
-endif
-
-libdir = ${exec_prefix}/lib/seed
+libos_la_LDFLAGS = \
+	$(GOBJECT_INTROSPECTION_LDFLAGS) \
+	-lutil \
+        $(SEED_DEBUG_LDFLAGS) \
+        $(SEED_PROFILE_LIBS)
 
diff --git a/modules/readline/Makefile.am b/modules/readline/Makefile.am
index ba8d724..a6b2b4e 100644
--- a/modules/readline/Makefile.am
+++ b/modules/readline/Makefile.am
@@ -1,28 +1,22 @@
 if BUILD_READLINE_MODULE
 
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+
+seedlib_LTLIBRARIES = \
 	libreadline.la
 
 libreadline_la_SOURCES = \
 	seed-readline.c
 
+libreadline_la_CFLAGS = \
+	$(GOBJECT_INTROSPECTION_CFLAGS) \
+	-I top_srcdir@/libseed/ \
+	$(SEED_DEBUG_CFLAGS) \
+	$(SEED_PROFILE_CFLAGS)
+
 libreadline_la_LDFLAGS = \
+	$(GOBJECT_INTROSPECTION_LDFLAGS) \
 	-lreadline \
-	$(SEED_LDFLAGS)
-
-AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	`pkg-config --cflags libffi` \
-	$(SEED_DEBUG_CFLAGS)
+	$(SEED_PROFILE_LIBS) 
 
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS += $(SEED_PROFILE_LDFLAGS)
 endif
-
-endif
-
-libdir = ${exec_prefix}/lib/seed
diff --git a/modules/sqlite/Makefile.am b/modules/sqlite/Makefile.am
index 0be0201..826b4ce 100644
--- a/modules/sqlite/Makefile.am
+++ b/modules/sqlite/Makefile.am
@@ -1,29 +1,25 @@
 if BUILD_SQLITE_MODULE
 
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+EXTRA_DIST = example.js
+
+seedlib_LTLIBRARIES = \
 	libsqlite.la
 
 libsqlite_la_SOURCES = \
 	seed-sqlite.c
 
-libsqlite_la_LDFLAGS = \
-	`pkg-config --libs seed sqlite3`
-
-AM_CPPFLAGS = \
-	-I../../libseed/ \
-	`pkg-config --cflags seed` \
-	`pkg-config --cflags glib-2.0` -g \
-	`pkg-config --cflags gobject-introspection-1.0` \
-	$(SEED_DEBUG_CFLAGS)
-
-AM_LDFLAGS =
+libsqlite_la_CFLAGS = \
+        $(GOBJECT_INTROSPECTION_CFLAGS) \
+	$(SQLITE_CFLAGS) \
+        $(SEED_DEBUG_CFLAGS) \
+        $(SEED_PROFILE_CFLAGS)
+	
 
-if PROFILE_MODULES
-	AM_CPPFLAGS += $(SEED_PROFILE_CFLAGS)
-	AM_LDFLAGS += $(SEED_PROFILE_LDFLAGS)
-endif
+libsqlite_la_LDFLAGS = \
+        $(GOBJECT_INTROSPECTION_CFLAGS) \
+	$(SQLITE_LDFLAGS) \
+        $(SEED_DEBUG_LDFLAGS) \
+        $(SEED_PROFILE_LIBS)
 
 endif
-
-libdir = ${exec_prefix}/lib/seed
-EXTRA_DIST = example.js
diff --git a/src/Makefile.am b/src/Makefile.am
index 46efaf7..d91ef20 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,27 +1,25 @@
 ## Process this file with automake to produce Makefile.in
 
-## Created by Anjuta
-
-AM_CPPFLAGS = \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-	$(SEED_CFLAGS)
-
-AM_CFLAGS =\
-	 -Wall\
-	 $(SEED_DEBUG_CFLAGS)\
-	 $(SEED_PROFILE_CFLAGS)
-
 bin_PROGRAMS = seed
 
 seed_SOURCES = \
 	main.c
 
+seed_CFLAGS = \
+	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+	-Wall \
+	$(SEED_DEBUG_CFLAGS) \
+	$(SEED_PROFILE_CFLAGS) \
+	$(GOBJECT_INTROSPECTION_CFLAGS) \
+	$(WEBKIT_CFLAGS)
+
 seed_LDFLAGS = \
-	-L../libseed/.libs -lseed $(SEED_PROFILE_LDFLAGS)
+	$(SEED_PROFILE_LIBS) \
+	$(LIBFFI_LDFLAGS) \
+	$(GOBJECT_INTROSPECTION_LDFLAGS) \
+	$(WEBKIT_LDFLAGS)
 
 seed_LDADD = \
-	$(SEED_LIBS) \
-	$(LIBFFI_LDFLAGS) \
-	-lseed
+	../libseed/libseed.la
diff --git a/tests/c/Makefile.am b/tests/c/Makefile.am
index 320be15..091ecaf 100644
--- a/tests/c/Makefile.am
+++ b/tests/c/Makefile.am
@@ -10,9 +10,13 @@ test_SOURCES =					\
 EXTRA_DIST =					\
 	test-common.h
 	
-test_CFLAGS = -g -Wall				\
-	 $(SEED_CFLAGS)
+test_CFLAGS = \
+	-Wall \
+	$(GOBJECT_INTROSPECTION_CFLAGS)
 
-test_LDADD = $(SEED_LIBS) -lseed
-test_LDFLAGS = -L../../libseed/.libs -lseed
+test_LDFLAGS = \
+	$(GOBJECT_INTROSPECTION_LIBS)
+
+test_LDADD = \
+	../../libseed/libseed.la
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]