Re: gthread & autoconf
- From: Edwin Young <edwin snufkin f9 co uk>
- To: gnome-devel-list gnome org
- Subject: Re: gthread & autoconf
- Date: Thu, 17 Feb 2000 20:28:10 -0500
Owen Taylor wrote:
> Havoc Pennington <hp@redhat.com> writes:
> > edwin@snufkin.f9.co.uk writes:
> > > I can't work out what I need to put in configure.in to
> > > inform autoconf/automake that I want to link to the
> > > gthread library. Can anyone help me out?
> >
> > If you read glib.m4 (in share/aclocal) it has some docs - basically
> > you want:
> >
> > AM_PATH_GLIB(1.2, , AC_MSG_ERROR("can't find glib"), gthread)
>
> If you are writing a GTK+ program, you can, instead, combine this with
> checking for GTK+
>
> AM_PATH_GTK(1.2, , AC_MSG_ERROR("can't find gtk"), gthread)
>
> This will add the GLib flags and libraries to GTK_CFLAGS and GTK_LIBS.
It's actually a gnome program. I've tried both of your suggestions,
but can't quite get them to work. ./configure says:
checking for GLIB - version >= 1.2... 1.2, bad version string
./configure: syntax error near unexpected token `"(c'
./configure: ./configure: line 2810: ` echo $ac_n "(cached) $ac_c" 1>&6'
If I use
AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR("can't find glib"), gthread)
I don't get the version complaint, but instead:
checking for GLIB - version >= 1.2.0... ./configure: syntax error near unexpected token `(There'
./configure: ./configure: line 3513: ` address. (There have been systems where private was not correctly'
I've included a copy of my configure.in below.
Thanks a lot,
--
Edwin Young
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(gnofract4d, 1.0)
AM_CONFIG_HEADER(config.h)
dnl Pick up the Gnome macros.
AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_STDC
AC_HEADER_STDC
GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS
AM_PATH_GLIB(1.2, , AC_MSG_ERROR("can't find glib"), gthread)
dnl AM_PATH_GTK(1.2, , AC_MSG_ERROR("can't find gtk"), gthread)
dnl This is my way of getting it :
dnl GNOMEUI_LIBS=" -lgthread $GNOMEUI_LIBS "
dnl look for cln
dnl AC_MSG_CHECKING(for CLN arbitrary-precision math library)
dnl AC_TRY_CPP(cln.h,AC_DEFINE(HAVE_CLN) LIBS="$LIBS -lcln")
dnl Add the languages which your application supports here.
ALL_LINGUAS="fr"
AM_GNU_GETTEXT
dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi
dnl Subst PACKAGE_PIXMAPS_DIR.
PACKAGE_PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/${PACKAGE}"
AC_SUBST(PACKAGE_PIXMAPS_DIR)
AC_OUTPUT([
Makefile
macros/Makefile
src/Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]