aboutsummaryrefslogblamecommitdiffstats
path: root/macros/gnome-orbit-check.m4
blob: 71faacdbaed51aaa184e429127f003993dd90893 (plain) (tree)
1
2
3
4
5
6
7
8
   
                                                      





                                                             



                                                                              


                  
                                                                  
                                                              
                                      
                                    






                                     
dnl
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
dnl
dnl if failflag is "failure" it aborts if orbit is not found.
dnl

AC_DEFUN([GNOME_ORBIT_HOOK],[
    AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
    AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
    if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
            if test x$2 = xfailure; then
            AC_MSG_ERROR(Could not find orbit-config or orbit-idl)
            fi
    else
        $1
        ORBIT_CFLAGS=`orbit-config --cflags client server`
        ORBIT_LIBS=`orbit-config --libs client server`
        AC_SUBST(ORBIT_CFLAGS)
        AC_SUBST(ORBIT_LIBS)
        AC_DEFINE(HAVE_ORBIT)
    fi
])

AC_DEFUN([GNOME_ORBIT_CHECK], [
    GNOME_ORBIT_HOOK([],failure)
])