1 1.1 christos dnl 2 1.1 christos dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) 3 1.1 christos dnl 4 1.1 christos dnl if failflag is "failure" it aborts if orbit is not found. 5 1.1 christos dnl 6 1.1 christos 7 1.1 christos AC_DEFUN([GNOME_ORBIT_HOOK],[ 8 1.1 christos AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) 9 1.1 christos AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) 10 1.1 christos AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ 11 1.1 christos if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then 12 1.1 christos gnome_cv_orbit_found=no 13 1.1 christos else 14 1.1 christos gnome_cv_orbit_found=yes 15 1.1 christos fi 16 1.1 christos ]) 17 1.1 christos AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) 18 1.1 christos if test x$gnome_cv_orbit_found = xyes; then 19 1.1 christos $1 20 1.1 christos ORBIT_CFLAGS=`orbit-config --cflags client server` 21 1.1 christos ORBIT_LIBS=`orbit-config --use-service=name --libs client server` 22 1.1 christos AC_SUBST(ORBIT_CFLAGS) 23 1.1 christos AC_SUBST(ORBIT_LIBS) 24 1.1 christos else 25 1.1 christos if test x$2 = xfailure; then 26 1.1 christos AC_MSG_ERROR(ORBit not installed or installation problem) 27 1.1 christos fi 28 1.1 christos fi 29 1.1 christos ]) 30 1.1 christos 31 1.1 christos AC_DEFUN([GNOME_ORBIT_CHECK], [ 32 1.1 christos GNOME_ORBIT_HOOK([],failure) 33 1.1 christos ]) 34