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=""
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.

View file

@ -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
;;
*)