* re-add macros/gnome.m4 for GNOME_INIT

* configure.in: re-add call to GNOME_INIT


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@8025 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2003-02-28 00:51:01 +00:00
parent efef189897
commit 839fc7215a
3 changed files with 134 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2003-02-27 Derek Atkins <derek@ihtfp.com>
* re-add macros/gnome.m4 for GNOME_INIT
* configure.in: re-add call to GNOME_INIT
2003-02-18 TomF changes for Gnome-2 branch
* autogen.sh: Use Gnome2 libraries

View File

@@ -771,7 +771,7 @@ AM_CONDITIONAL(GNUCASH_ENABLE_GUI, test x${gnc_build_gui} = xtrue)
if test x${gnc_build_gui} = xtrue ;
then
# GNOME_INIT 2/18/03 remove
GNOME_INIT
GNOME_COMPILE_WARNINGS
# GNOME_CHECK_GDK_PIXBUF
# GNOME_PRINT_CHECK

128
macros/gnome.m4 Normal file
View File

@@ -0,0 +1,128 @@
dnl
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
dnl
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
dnl is not found.
dnl
AC_DEFUN([GNOME_INIT_HOOK],[
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOMEUI_LIBS)
AC_SUBST(GNOMEGNORBA_LIBS)
AC_SUBST(GTKXMHTML_LIBS)
AC_SUBST(ZVT_LIBS)
AC_SUBST(GNOME_LIBDIR)
AC_SUBST(GNOME_INCLUDEDIR)
AC_ARG_WITH(gnome-includes,
[ --with-gnome-includes Specify location of GNOME-2 headers],[
CPPFLAGS="$CPPFLAGS -I$withval"
])
AC_ARG_WITH(gnome-libs,
[ --with-gnome-libs Specify location of GNOME-2 libs],[
LDFLAGS="$LDFLAGS -L$withval"
gnome_prefix=$withval
])
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],
if test x$withval = xyes; then
want_gnome=yes
dnl Note that an empty true branch is not
dnl valid sh syntax.
ifelse([$1], [], :, [$1])
else
if test "x$withval" = xno; then
want_gnome=no
else
want_gnome=yes
LDFLAGS="$LDFLAGS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
gnome_prefix=$withval/lib
fi
fi,
want_gnome=yes)
if test "x$want_gnome" = xyes; then
AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
if test "$PKG_CONFIG" = "no"; then
no_pkg_config="yes"
else
AC_MSG_CHECKING(if $PKG_CONFIG works)
if $PKG_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
#GNOME_GNORBA_HOOK([],$2)
GNOME_LIBS="`$PKG_CONFIG --libs-only-l gnome2`"
GNOMEUI_LIBS="`$PKG_CONFIG --libs-only-l gnomeui2`"
GNOMEGNORBA_LIBS="`$PKG_CONFIG --libs-only-l gnorba2 gnomeui2`"
#GTKXMHTML_LIBS="`$PKG_CONFIG --libs-only-l gtkxmhtml`"
#ZVT_LIBS="`$PKG_CONFIG --libs-only-l zvt`"
GNOME_LIBDIR="`$PKG_CONFIG --libs-only-L gtk2 gnorba2 gnomeui2`"
GNOME_INCLUDEDIR="`$PKG_CONFIG --cflags gtk2 gnorba2 gnomeui2`"
$1
else
AC_MSG_RESULT(no)
no_pkg_config="yes"
fi
fi
if test x$exec_prefix = xNONE; then
if test x$prefix = xNONE; then
gnome_prefix=$ac_default_prefix/lib
else
gnome_prefix=$prefix/lib
fi
else
gnome_prefix=`eval echo \`echo $libdir\``
fi
if test "$no_pkg_config" = "yes"; then
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
if test -f $gnome_prefix/gnomeConf.sh; then
AC_MSG_RESULT(found)
echo "loading gnome configuration from" \
"$gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
$1
else
AC_MSG_RESULT(not found)
if test x$2 = xfail; then
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
fi
fi
fi
fi
if test -n "$3"; then
n="$3"
for i in $n; do
AC_MSG_CHECKING(extra library \"$i\")
case $i in
applets)
AC_SUBST(GNOME_APPLETS_LIBS)
GNOME_APPLETS_LIBS=`$PKG_CONFIG --libs-only-l applets`
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
docklets)
AC_SUBST(GNOME_DOCKLETS_LIBS)
GNOME_DOCKLETS_LIBS=`$PKG_CONFIG --libs-only-l docklets`
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
capplet)
AC_SUBST(GNOME_CAPPLET_LIBS)
GNOME_CAPPLET_LIBS=`$PKG_CONFIG --libs-only-l capplet`
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
*)
AC_MSG_RESULT(unknown library)
esac
done
fi
])
dnl
dnl GNOME_INIT ([additional-inits])
dnl
AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail,$1)
])