From 92b4f3b33a580c20798b60adebbc3ee4fa2a0193 Mon Sep 17 00:00:00 2001 From: Erik Walthinsen Date: Fri, 23 Feb 2001 00:55:14 +0000 Subject: [PATCH] updates to configure.in and -config to help with cross compiling Original commit message from CVS: updates to configure.in and -config to help with cross compiling --- configure.in | 21 ++++++++++++++------- gstreamer-config.in | 6 +++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index a50d43fa7f..fab6a8627a 100644 --- a/configure.in +++ b/configure.in @@ -52,6 +52,10 @@ AM_PROG_LIBTOOL CFLAGS="" +dnl This is used for the -config script... +builddir=`pwd` +AC_SUBST(builddir) + dnl ############################## dnl # Do automated configuration # dnl ############################## @@ -153,16 +157,16 @@ AM_PATH_GLIB(1.2.0,, AC_MSG_ERROR(Cannot find glib: Is glib-config in path?), glib gmodule gthread) dnl Put the glib flags into $LIBS and $CFLAGS since we always use them -LIBS="$LIBS $GLIB_LIBS" -CFLAGS="$CFLAGS $GLIB_CFLAGS" +CORE_LIBS="$GLIB_LIBS" +CORE_CFLAGS="$GLIB_CFLAGS" dnl Check for gtk AM_PATH_GTK(1.2.0,, AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?)) dnl Put the gtk flags into $LIBS and $CFLAGS since we always use them -LIBS="$LIBS $GTK_LIBS" -CFLAGS="$CFLAGS $GTK_CFLAGS" +CORE_LIBS="$CORE_LIBS $GTK_LIBS" +CORE_CFLAGS="$CORE_CFLAGS $GTK_CFLAGS" dnl Check for libxml @@ -174,8 +178,8 @@ XML_LIBS=`xml-config --libs` XML_CFLAGS=`xml-config --cflags` AC_SUBST(XML_LIBS) AC_SUBST(XML_CFLAGS) -LIBS="$LIBS $XML_LIBS" -CFLAGS="$CFLAGS $XML_CFLAGS" +CORE_LIBS="$CORE_LIBS $XML_LIBS" +CORE_CFLAGS="$CORE_CFLAGS $XML_CFLAGS" dnl Next, check for the optional libraries: @@ -617,7 +621,10 @@ dnl ############################## dnl # Set up the defaults cflags # dnl ############################## dnl CC="kgcc" -CFLAGS="$CFLAGS -O6 -Wall" +CFLAGS="$CORE_CFLAGS $CFLAGS -O6 -Wall" +LIBS="$CORE_LIBS $LIBS" +AC_SUBST(CORE_LIBS) +AC_SUBST(CORE_CFLAGS) dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS dnl need it, either. diff --git a/gstreamer-config.in b/gstreamer-config.in index 6811a7feee..8cd2df8e76 100644 --- a/gstreamer-config.in +++ b/gstreamer-config.in @@ -47,14 +47,14 @@ while test $# -gt 0; do elif test @includedir@ != /usr/include ; then includes=-I@includedir@ fi - echo $includes `gtk-config --cflags gtk gthread` + echo $includes @CORE_CFLAGS@ ;; --libs) if test $prefix -ef @builddir@ ; then - echo @builddir@/libgst.la `gtk-config --libs gtk gthread` + echo @builddir@/libgst.la @CORE_LIBS@ else libdirs=-L@libdir@ - echo $libdirs -lgst `gtk-config --libs gtk gthread` + echo $libdirs -lgst @CORE_LIBS@ fi ;; *)