aboutsummaryrefslogblamecommitdiffstats
path: root/macros/gnome.m4
blob: a28520650e3d098de409f47a840bd64d3e3f223c (plain) (tree)
1
2
3
4
5
6
7






                                                                          


























                                                                    
                                                    
                                                   
                                        
                                



                                                                                                      
AC_DEFUN([GNOME_CHECK_GNOME],
[
    AC_REQUIRE([GNOME_X_CHECKS])
    AC_CHECK_LIB(gnome, gnome_init, [GNOME_LIBS="-lgnome -lgnomeui"],[
        AC_MSG_ERROR(Gnome libraries not found)],[
        "$GTK_LIBS $x_libs"])   
])

AC_DEFUN([GNOME_INIT],
[   
    AC_SUBST(GNOME_LIBS)
    AC_SUBST(GNOMEUI_LIBS)
    AC_SUBST(GTKXMHTML_LIBS)

    gnome_prefix=$prefix/lib
    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],[
    LDFLAGS="$LDFLAGS -L$withval/lib"
    CFLAGS="$CFLAGS -I$withval/include"
    gnome_prefix=$withval/lib
    ])
    

        AC_MSG_CHECKING(Loading gnomeConf.sh values)
    if test -e $gnome_prefix/gnomeConf.sh; then
        . $gnome_prefix/gnomeConf.sh
        AC_MSG_RESULT(found)
    else
        AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
    fi
])