Rev 3520 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
dnldnl GNOME_INIT_HOOK (script-if-gnome-enabled, failflag)dnldnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.shdnl is not found.dnlAC_DEFUN([GNOME_INIT_HOOK],[AC_SUBST(GNOME_LIBS)AC_SUBST(GNOMEUI_LIBS)AC_SUBST(GNOMEGNORBA_LIBS)AC_SUBST(GTKXMHTML_LIBS)AC_SUBST(GNOME_APPLET_LIBS)AC_SUBST(GNOME_LIBDIR)AC_SUBST(GNOME_INCLUDEDIR)AC_ARG_WITH(gnome-includes,[ --with-gnome-includes Specify location of GNOME headers],[CFLAGS="$CFLAGS -I$withval"])AC_ARG_WITH(gnome-libs,[ --with-gnome-libs Specify location of GNOME libs],[LDFLAGS="$LDFLAGS -L$withval"gnome_prefix=$withval])AC_ARG_WITH(gnome,[ --with-gnome Specify prefix for GNOME files],if test x$withval = xyes; thenwant_gnome=yesdnl Note that an empty true branch is notdnl valid sh syntax.ifelse([$1], [], :, [$1])elseif test "x$withval" = xno; thenwant_gnome=noelsewant_gnome=yesLDFLAGS="$LDFLAGS -L$withval/lib"CFLAGS="$CFLAGS -I$withval/include"gnome_prefix=$withval/libfifi,want_gnome=yes)if test "x$want_gnome" = xyes; thenAC_PATH_PROG(GNOME_CONFIG,gnome-config,no)if test "$GNOME_CONFIG" = "no"; thenno_gnome_config="yes"elseAC_MSG_CHECKING(if $GNOME_CONFIG works)if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; thenAC_MSG_RESULT(yes)GNOME_GNORBA_HOOK([],$2)GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"GNOME_APPLET_LIBS="`$GNOME_CONFIG --libs-only-l applets`"GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"$1elseAC_MSG_RESULT(no)no_gnome_config="yes"fifiif test x$exec_prefix = xNONE; thenif test x$prefix = xNONE; thengnome_prefix=$ac_default_prefix/libelsegnome_prefix=$prefix/libfielsegnome_prefix=`eval echo \`echo $libdir\``fiif test "$no_gnome_config" = "yes"; thenAC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)if test -f $gnome_prefix/gnomeConf.sh; thenAC_MSG_RESULT(found)echo "loading gnome configuration from" \"$gnome_prefix/gnomeConf.sh". $gnome_prefix/gnomeConf.sh$1elseAC_MSG_RESULT(not found)if test x$2 = xfail; thenAC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)fifififi])AC_DEFUN([GNOME_INIT],[GNOME_INIT_HOOK([],fail)])dnldnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)dnldnl if failflag is "failure" it aborts if gnorba is not found.dnlAC_DEFUN([GNOME_GNORBA_HOOK],[GNOME_ORBIT_HOOK([],$2)AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[gnome_cv_gnorba_found=noif test x$gnome_cv_orbit_found = xyes; thenGNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"if test -n "$GNORBA_LIBS"; thengnome_cv_gnorba_found=yesfifi])AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)if test x$gnome_cv_orbit_found = xyes; then$1GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"AC_SUBST(GNORBA_CFLAGS)AC_SUBST(GNORBA_LIBS)elseif test x$2 = xfailure; thenAC_MSG_ERROR(gnorba library not installed or installation problem)fifi])AC_DEFUN([GNOME_GNORBA_CHECK], [GNOME_GNORBA_HOOK([],failure)])dnldnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)dnldnl if failflag is "failure" it aborts if orbit is not found.dnlAC_DEFUN([GNOME_ORBIT_HOOK],[AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; thengnome_cv_orbit_found=noelsegnome_cv_orbit_found=yesfi])AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)if test x$gnome_cv_orbit_found = xyes; then$1ORBIT_CFLAGS=`orbit-config --cflags client server`ORBIT_LIBS=`orbit-config --use-service=name --libs client server`AC_SUBST(ORBIT_CFLAGS)AC_SUBST(ORBIT_LIBS)elseif test x$2 = xfailure; thenAC_MSG_ERROR(ORBit not installed or installation problem)fifi])AC_DEFUN([GNOME_ORBIT_CHECK], [GNOME_ORBIT_HOOK([],failure)])AC_DEFUN(AM_CONDITIONAL,[AC_SUBST($1_TRUE)AC_SUBST($1_FALSE)if $2; then$1_TRUE=$1_FALSE='#'else$1_TRUE='#'$1_FALSE=fi])