[seed/old: 1/2] - Moved the pkg-config checks from files to configure.ac



commit ebb136a94965880e547d4b1e2922e106d2f308c1
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date:   Mon Apr 27 17:12:14 2009 -0400

    - Moved the pkg-config checks from files to configure.ac
    - Moved the FFI checks (what's more - incorrect) into configure.ac
    - Changed -I../../ into -I top_srcdir@ to support out-of-tree compilation
    - Removed hard-coded -O3 optimization flag which tend to be broken on many
    gcc's and should be used with care - possibly at the user own risk
    - Added missing AC_AMFLAGS which is correct way of handling additional m4 dirs
    - Make it breakes if required dependencies is not present instead of silently
    drop the module
    - Removed 'ugly' linking to .libs dirs in order to use libtool
---
 Makefile.am                         |    2 +
 configure.ac                        |  122 +++++++++++++++++------------------
 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        |   30 ++++-----
 modules/sqlite/Makefile.am          |   34 ++++------
 po/Makefile.in.in                   |    4 +-
 src/Makefile.am                     |   32 ++++-----
 tests/c/Makefile.am                 |   12 ++-
 13 files changed, 188 insertions(+), 205 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 8eba9e5..d7b59e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ AM_GLIB_GNU_GETTEXT
 IT_PROG_INTLTOOL([0.35.0])
 
 dnl ============================libffi=========================================
-PKG_CHECK_MODULES(libffi, libffi, have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no)
+PKG_CHECK_MODULES(FFI, libffi, have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no)
 
 if test x"$have_ffi_pkgconfig" = xno ; then
 	AC_MSG_CHECKING(for ffi.h)
@@ -56,9 +56,9 @@ if test x"$have_ffi_pkgconfig" = xno ; then
 
 		AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS)
 		if test x"$ac_cv_search_ffi_call" = x"none required" ; then
-			FFI_LIBS=$other_LIBS
+			FFI_LDFLAGS=$other_LIBS
 		else
-			FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS"
+			FFI_LDFLAGS="$ac_cv_search_ffi_call $other_LIBS"
 		fi
 		LIBS=$save_LIBS
 	fi
@@ -69,10 +69,11 @@ if test x"$have_ffi_pkgconfig" = xno ; then
 	FFI_CFLAGS=
 
 	AC_MSG_RESULT([$have_ffi_h])
-	AC_SUBST(FFI_LIBS)
-	AC_SUBST(FFI_CFLAGS)
 fi
 
+AC_SUBST(FFI_LIBS)
+AC_SUBST(FFI_CFLAGS)
+
 dnl =======================WebKit ContextGroup=================================
 case "$host_os" in
 	darwin*)
@@ -86,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])
+PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
+AC_SUBST(WEBKIT_CFLAGS)
+AC_SUBST(WEBKIT_LDFLAGS)
 
-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])
+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,
@@ -169,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")
@@ -212,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
 
@@ -221,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")
 
@@ -233,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 7582402..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_LIBS)
-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_LIBS)
+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..6d14d3a 100644
--- a/modules/readline/Makefile.am
+++ b/modules/readline/Makefile.am
@@ -1,28 +1,26 @@
 if BUILD_READLINE_MODULE
 
-lib_LTLIBRARIES = \
+seedlibdir = ${exec_prefix}/lib/seed
+
+seedlib_LTLIBRARIES = \
 	libreadline.la
 
 libreadline_la_SOURCES = \
 	seed-readline.c
 
+libreadline_la_CFLAGS = \
+	-I top_srcdir@/libseed/ \
+	$(GOBJECT_INTROSPECTION_CFLAGS) \
+	$(LIBFFI_CFLAGS) \
+	$(SEED_DEBUG_CFLAGS)
+
 libreadline_la_LDFLAGS = \
 	-lreadline \
-	$(SEED_LDFLAGS)
+	$(GOBJECT_INTROSPECTION_CFLAGS) \
+	$(LIBFFI_LDFLAGS) \
+	$(SEED_PROFILE_CFLAGS)
 
-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)
+libreadline_la_LIBADD = \
+	../../libseed/libseed.la
 
-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/po/Makefile.in.in b/po/Makefile.in.in
index c7e8302..57ef267 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -21,7 +21,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-SHELL = @SHELL@
+SHELL = /bin/sh
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@
 
 PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
 
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
 
 USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index ba39d99..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_LIBS) \
-	-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]