[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    checking for GTK and glib in configure.in.in ?
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2003-07-30 19:47:51
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have some optional code in KDE's CVS that depends on gtk and glib, and thus 
should only be compiled when both are available. However, I'm not sure how to 
correctly check for this in configure.in.in.

Both gtk and glib provide aclocal scripts 
	/usr/share/aclocal/glib.m4
	/usr/share/aclocal/gtk.m4
which define AM_PATH_GLIB and AM_PATH_GTK. These macros use the correct way of 
gtk-config and glib-config to detect the correct library and include paths 
for use in configure.in.in. If gtk and glib are installed, everything works 
fine.

However, if gtk or glib are not installed, make -f Makefile.cvs can't find the 
macros and gives an error:

aclocal: configure.in: 438: macro `AM_PATH_GLIB' not found in library
aclocal: configure.in: 442: macro `AM_PATH_GTK' not found in library

So, the question is: How do I detect if these macros are available? And only 
if they are available, they should be called in configure.in.in.

I already looked into the automake/aclocal docu but couldn't find anything on 
that.
Alternatively, I could provide a copy of the two .am files, but I also haven't 
found a way to make aclocal use macro files from the source directory.

Thanks,
Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/KCDqTqjEwhXvPN0RAtwgAJ4lEu5kz/tQab6mi5zaVvqMCzT9xgCgxz4T
pt+Kax4RmgaxZ/rwLepz2kk=
=O2yc
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic