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
This commit is contained in:
Erik Walthinsen 2001-02-23 00:55:14 +00:00
parent fd24fcb749
commit 92b4f3b33a
2 changed files with 17 additions and 10 deletions

View file

@ -52,6 +52,10 @@ AM_PROG_LIBTOOL
CFLAGS="" CFLAGS=""
dnl This is used for the -config script...
builddir=`pwd`
AC_SUBST(builddir)
dnl ############################## dnl ##############################
dnl # Do automated configuration # dnl # Do automated configuration #
dnl ############################## dnl ##############################
@ -153,16 +157,16 @@ AM_PATH_GLIB(1.2.0,,
AC_MSG_ERROR(Cannot find glib: Is glib-config in path?), AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
glib gmodule gthread) glib gmodule gthread)
dnl Put the glib flags into $LIBS and $CFLAGS since we always use them dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
LIBS="$LIBS $GLIB_LIBS" CORE_LIBS="$GLIB_LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS" CORE_CFLAGS="$GLIB_CFLAGS"
dnl Check for gtk dnl Check for gtk
AM_PATH_GTK(1.2.0,, AM_PATH_GTK(1.2.0,,
AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?)) 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 dnl Put the gtk flags into $LIBS and $CFLAGS since we always use them
LIBS="$LIBS $GTK_LIBS" CORE_LIBS="$CORE_LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS" CORE_CFLAGS="$CORE_CFLAGS $GTK_CFLAGS"
dnl Check for libxml dnl Check for libxml
@ -174,8 +178,8 @@ XML_LIBS=`xml-config --libs`
XML_CFLAGS=`xml-config --cflags` XML_CFLAGS=`xml-config --cflags`
AC_SUBST(XML_LIBS) AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS) AC_SUBST(XML_CFLAGS)
LIBS="$LIBS $XML_LIBS" CORE_LIBS="$CORE_LIBS $XML_LIBS"
CFLAGS="$CFLAGS $XML_CFLAGS" CORE_CFLAGS="$CORE_CFLAGS $XML_CFLAGS"
dnl Next, check for the optional libraries: dnl Next, check for the optional libraries:
@ -617,7 +621,10 @@ dnl ##############################
dnl # Set up the defaults cflags # dnl # Set up the defaults cflags #
dnl ############################## dnl ##############################
dnl CC="kgcc" 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 FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
dnl need it, either. dnl need it, either.

View file

@ -47,14 +47,14 @@ while test $# -gt 0; do
elif test @includedir@ != /usr/include ; then elif test @includedir@ != /usr/include ; then
includes=-I@includedir@ includes=-I@includedir@
fi fi
echo $includes `gtk-config --cflags gtk gthread` echo $includes @CORE_CFLAGS@
;; ;;
--libs) --libs)
if test $prefix -ef @builddir@ ; then if test $prefix -ef @builddir@ ; then
echo @builddir@/libgst.la `gtk-config --libs gtk gthread` echo @builddir@/libgst.la @CORE_LIBS@
else else
libdirs=-L@libdir@ libdirs=-L@libdir@
echo $libdirs -lgst `gtk-config --libs gtk gthread` echo $libdirs -lgst @CORE_LIBS@
fi fi
;; ;;
*) *)