aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-02-11 09:37:05 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-02-11 09:37:05 +0800
commit867d9158bca053090c8a815e163fa303fad6a4fb (patch)
tree491cb9ae4592c10c26a8528e2aeb406014da9ae2 /macros
parentf97c786c151fd4d96f0ae33f0c6bfc4e71ebd2a6 (diff)
downloadgsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar.gz
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar.bz2
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar.lz
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar.xz
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.tar.zst
gsoc2013-evolution-867d9158bca053090c8a815e163fa303fad6a4fb.zip
Gnome Utils autoconf/automake setup is ready
svn path=/trunk/; revision=12
Diffstat (limited to 'macros')
-rw-r--r--macros/gnome-guile-checks.m423
-rw-r--r--macros/gnome-objc-checks.m458
2 files changed, 81 insertions, 0 deletions
diff --git a/macros/gnome-guile-checks.m4 b/macros/gnome-guile-checks.m4
new file mode 100644
index 0000000000..df1e9f0665
--- /dev/null
+++ b/macros/gnome-guile-checks.m4
@@ -0,0 +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)
+])
diff --git a/macros/gnome-objc-checks.m4 b/macros/gnome-objc-checks.m4
new file mode 100644
index 0000000000..603909e3f8
--- /dev/null
+++ b/macros/gnome-objc-checks.m4
@@ -0,0 +1,58 @@
+AC_DEFUN([GNOME_CHECK_OBJC],
+[
+ dnl Look for an ObjC compiler.
+ dnl FIXME: extend list of possible names of ObjC compilers.
+ AC_CHECK_PROGS(OBJC, $OBJC gcc, "")
+
+ dnl See if it works
+ dnl FIXME: I don't know ObjC. I took hints from *.m files
+ dnl already in the gnome tree. But this one compiles, and looks
+ dnl for pthread libs, when linked. (Raja Harinath)
+
+ dnl The ObjC library, with threads enabled, uses sched_yield, which,
+ dnl on Solaris is in -lposix4. For now, I just put -lposix4 into
+ dnl PTHREAD_LIB: it is as good a place as any. Maybe there should
+ dnl be an OBJC_LIBS.
+ oLIBS=$LIBS
+ LIBS="$LIBS $PTHREAD_LIB"
+ AC_CHECK_FUNC(sched_yield,,[
+ AC_CHECK_LIB(posix4,sched_yield,PTHREAD_LIB="$PTHREAD_LIB -lposix4")])
+ LIBS=$oLIBS
+
+ AC_CACHE_CHECK([if Objective C compiler ($OBJC) works],
+ ac_cv_prog_objc_works, [
+ if test -n "$OBJC"; then
+ cat > conftest.m <<EOF
+ #include <objc/Object.h>
+ @interface myRandomObj : Object
+ {
+ }
+ @end
+ @implementation myRandomObj
+ @end
+ int main () {
+ /* No, you are not seeing double. Remember that square brackets
+ are the autoconf m4 quotes. */
+ id myid = [[myRandomObj alloc]];
+ [[myid free]];
+ return 0;
+ }
+
+ EOF
+ dnl FIXME: internal autoconf knowledge here. Really we should copy
+ dnl autoconf's C++ support for ObjC. (Tom Tromey)
+ $OBJC -o conftest $LDFLAGS conftest.m -lobjc $PTHREAD_LIB 1>&AC_FD_CC 2>&1
+ result=$?
+ rm -f conftest*
+
+ if test $result -eq 0; then
+ ac_cv_prog_objc_works=yes
+ fi
+ else
+ ac_cv_prog_objc_works=no
+ fi
+ dnl End of AC_CACHE_CHECK
+ ])
+
+ AM_CONDITIONAL(OBJECTIVE_C, test x$ac_cv_prog_objc_works = xyes)
+])