[gnome-common/macros] Patch for GNOME_GUILE_CHECKS



Hi,

I made a short patch to gnome-common/macros/gnome-guile-checks.m4.

Here's the ChangeLog:

==========================================================================
+ Sun Apr 26 14:02:29 UTC 1998  Martin Baulig  <martin@home-of-linux.org>
+ 
+ 	* gnome-guile-checks.m4 (GNOME_CHECK_GUILE): added failflag:
+ 	GNOME_CHECK_GUILE(fail) will abort if guile cannot be found.
+ 
+ 	Added checks for '-lm -ltermcap -lreadline'
+ 
+ 	Using `build-guile` to determine where to find guile libs and
+ 	headers; testing whether we can compile and link
+ 
+ 	Added GNOME_INCS.
+ 
===========================================================================

Detailed description of the patch:

* '-ltermcap' is needed for '-lreadline' on Redhat 5.0

* 'gnome-guile/guile-gtk/configure.in' uses the 'build-guile'
   script to determine where guile is installed

   I incorporated this here; when 'build-guile' can be found, we
   use

     GNOME_LIBS="-L`build-guile info libdir` `build-guile link`"
     GNOME_INCS="-I`build-guile info includedir`"

   This makes sure that guile can always be found (and all of the
   libraries it depends upon) regardless where it is installed -
   you only have to make sure that 'build-guile' in in your PATH.

   Otherwise, we'll check for some common libs like '-lrx', '-lqt',
   '-lqt', $TERMCAP_LIB, $READLINE_LIB and $QTTHREADS_LIB and search
   for them in '$GNOME_LIBDIR' and '$GNOME_INCLUDEDIR'.

*  Finally, I added a AC_TRY_LINK check to determine whether
   guile can be compiled with the settings above. If not, and we
   invoked it as 'GNOME_GUILE_CHECKS(fail)' configure will abort.

I also made a patch to gnome-guile to let it use this one. This
will (hopefully!) solve all other problems with people having
trouble to compile gnome-guile because it's configure cannot
find guile. I'll send this patch in a separate mail to the list.

Martin

----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier
   
   baulig@castor.uni-trier.de, http://www.home-of-linux.com/
   Key: 1024-bit key with ID C8178435 created 1997/01/24 
   ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
   Finger baulig@math38 or fetch mykey.asc from the url above
-----------------------------------------------------------------
? macros.diff
Index: ChangeLog
===================================================================
RCS file: /debian/home/gnomecvs/gnome-common/macros/ChangeLog,v
retrieving revision 1.35
diff -c -r1.35 ChangeLog
*** ChangeLog	1998/04/24 20:48:36	1.35
--- ChangeLog	1998/04/26 14:06:51
***************
*** 1,3 ****
--- 1,15 ----
+ Sun Apr 26 14:02:29 UTC 1998  Martin Baulig  <martin@home-of-linux.org>
+ 
+ 	* gnome-guile-checks.m4 (GNOME_CHECK_GUILE): added failflag:
+ 	GNOME_CHECK_GUILE(fail) will abort if guile cannot be found.
+ 
+ 	Added checks for '-lm -ltermcap -lreadline'
+ 
+ 	Using `build-guile` to determine where to find guile libs and
+ 	headers; testing whether we can compile and link
+ 
+ 	Added GNOME_INCS.
+ 
  Fri Apr 24 16:43:38 1998  Owen Taylor  <otaylor@gtk.org>
  
  	* autogen.sh: Pass the results of the environment variable
Index: gnome-guile-checks.m4
===================================================================
RCS file: /debian/home/gnomecvs/gnome-common/macros/gnome-guile-checks.m4,v
retrieving revision 1.1
diff -c -r1.1 gnome-guile-checks.m4
*** gnome-guile-checks.m4	1998/02/11 01:37:05	1.1
--- gnome-guile-checks.m4	1998/04/26 14:06:51
***************
*** 1,23 ****
  AC_DEFUN([GNOME_CHECK_GUILE],
  [
  	AC_CHECK_LIB(qthreads,main,[
! 	QTTHREADS_LIB="-lqthreads"
! 	AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap")
! 	AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline")
  	],[
! 	AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt")
  	],$LIBS)
  	AC_SUBST(TERMCAP_LIB)
  	AC_SUBST(READLINE_LIB)
! 	AC_SUBST(QTTHREADS_LIB)
  
! 	AC_CHECK_LIB(guile, scm_boot_guile,[
! 	    GUILE_LIBS="-lguile"
! 	    ac_cv_guile_found=yes
  	],[
! 	    AC_MSG_WARN(Can not find Guile 1.2 on the system)
! 	    ac_cv_guile_found=no
! 	], $QTTHREADS_LIB $LIBS)
  	AC_SUBST(GUILE_LIBS)
  	AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes)
  ])
--- 1,91 ----
+ dnl
+ dnl GNOME_CHECK_GUILE (failflag)
+ dnl
+ dnl if failflag is "fail" then GNOME_CHECK_GUILE will abort if guile is not found.
+ dnl
+ 
  AC_DEFUN([GNOME_CHECK_GUILE],
  [
+ 	saved_ldflags="$LDFLAGS"
+ 	saved_cppflags="$CPPFLAGS"
+ 	LDFLAGS="$LDFLAGS $GNOME_LIBDIR"
+ 
  	AC_CHECK_LIB(qthreads,main,[
! 		QTTHREADS_LIB="-lqthreads"
  	],[
! 		AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt")
  	],$LIBS)
+ 	AC_SUBST(QTTHREADS_LIB)
+ 
+ 	AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap")
+ 	AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline",,$TERMCAP_LIB)
+ 
  	AC_SUBST(TERMCAP_LIB)
  	AC_SUBST(READLINE_LIB)
! 
! 	AC_CHECK_PROG(BUILD_GUILE, build-guile, yes, no)
! 
! 	if test $BUILD_GUILE = yes; then
! 		AC_MSG_CHECKING(whether build-guile works)
! 		if test x`build-guile --version >/dev/null 2>&1 || \
! 				echo no` = xno; then
! 			BUILD_GUILE=no
! 		fi
! 		AC_MSG_RESULT($BUILD_GUILE)
! 	fi
  
! 	AC_CHECK_LIB(m, sin)
! 
! 	if test $BUILD_GUILE = yes; then
! 		AC_MSG_CHECKING(for guile libraries)
! 		GUILE_LIBS="-L`build-guile info libdir` `build-guile link`"
! 		AC_MSG_RESULT($GUILE_LIBS)
! 		AC_MSG_CHECKING(for guile headers)
! 		GUILE_INCS="-I`build-guile info includedir`"
! 		AC_MSG_RESULT($GUILE_INCS)
! 	else
! 		GUILE_LIBS="$GNOME_LIBDIR"
! 		GUILE_INCS="$GNOME_INCLUDEDIR"
! 		AC_CHECK_LIB(rx, main, GUILE_LIBS="-lrx $GUILE_LIBS")
! 		AC_CHECK_LIB(qt, main, GUILE_LIBS="-lqt $GUILE_LIBS")
! 		AC_CHECK_LIB(dl, dlopen, GUILE_LIBS="-ldl $GUILE_LIBS")
! 		GUILE_LIBS="-lguile $GUILE_LIBS $QTTHREADS_LIB" \
! 			"$TERMCAP_LIB $READLINE_LIB"
! 	fi
! 
! 	AC_SUBST(GUILE_LIBS)
! 	AC_SUBST(GUILE_INCS)
! 
! 	LDFLAGS="$saved_ldflags $GUILE_LIBS"
! 	CPPFLAGS="$saved_cppflags $GUILE_INCS"
! 
! 	AC_MSG_CHECKING(whether guile works)
! 	AC_TRY_LINK([
! 		#include <libguile.h>
! 		#include <guile/gh.h>
! 	],[
! 		gh_eval_str("(newline)");
! 		scm_boot_guile(0,NULL,NULL,NULL);
  	],[
! 		ac_cv_guile_found=yes
! 		AC_DEFINE(HAVE_GUILE)
! 	],[
! 		ac_cv_guile_found=no
! 	])
! 	AC_MSG_RESULT($ac_cv_guile_found)
! 
! 	if test x$ac_cv_guile_found = xno ; then
! 		if test x$1 = xfail ; then
! 		  AC_MSG_ERROR(Can not find Guile 1.2 on this system)
! 		else
! 		  AC_MSG_WARN(Can not find Guile 1.2 on this system)
! 		fi
! 		ac_cv_guile_found=no
! 	fi
! 
! 	LDFLAGS="$saved_ldflags"
! 	CPPFLAGS="$saved_cppflags"
! 
  	AC_SUBST(GUILE_LIBS)
  	AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes)
  ])

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]