added '--enable-libgtop-server' (default=auto), '--enable-libgtop-names'
* acinclude.m4 (AC_LC_SYSDEPS): added '--enable-libgtop-server' (default=auto), '--enable-libgtop-names' (default=yes) and '--enable-libgtop-guile' (default=yes); we now define 'GLIBTOP_NAMES' here. * acconfig.h: added 'GLIBTOP_NAMES' and 'GLIBTOP_GUILE_NAMES'
This commit is contained in:
@@ -32,6 +32,8 @@ gtopConf.sh: gtopConf.sh.in Makefile
|
|||||||
-e 's,\@GTOP_INCLUDEDIR\@,$(includedir),g' \
|
-e 's,\@GTOP_INCLUDEDIR\@,$(includedir),g' \
|
||||||
-e 's,\@GTOP_LIBS\@,$(GTOP_LIBS),g' \
|
-e 's,\@GTOP_LIBS\@,$(GTOP_LIBS),g' \
|
||||||
-e 's,\@GTOP_INCS\@,$(GTOP_INCS),g' \
|
-e 's,\@GTOP_INCS\@,$(GTOP_INCS),g' \
|
||||||
|
-e 's,\@GTOP_GUILE_LIBS\@,$(GTOP_GUILE_LIBS),g' \
|
||||||
|
-e 's,\@GTOP_GUILE_INCS\@,$(GTOP_GUILE_INCS),g' \
|
||||||
-e 's,\@GTOP_BINDIR\@,$(GTOP_BINDIR),g' \
|
-e 's,\@GTOP_BINDIR\@,$(GTOP_BINDIR),g' \
|
||||||
-e 's,\@GTOP_SERVER\@,$(GTOP_SERVER),g' \
|
-e 's,\@GTOP_SERVER\@,$(GTOP_SERVER),g' \
|
||||||
-e 's,\@GTOP_SYSDEPS_DIR\@,$(sysdeps_dir),g' \
|
-e 's,\@GTOP_SYSDEPS_DIR\@,$(sysdeps_dir),g' \
|
||||||
|
@@ -28,3 +28,6 @@
|
|||||||
|
|
||||||
#undef HAVE_GLIBTOP_MACHINE_H
|
#undef HAVE_GLIBTOP_MACHINE_H
|
||||||
|
|
||||||
|
#undef GLIBTOP_NAMES
|
||||||
|
#undef GLIBTOP_GUILE_NAMES
|
||||||
|
|
||||||
|
48
acinclude.m4
48
acinclude.m4
@@ -29,7 +29,9 @@ AC_DEFUN([AC_LC_CANONICAL_HOST],[
|
|||||||
|
|
||||||
AC_DEFUN([AC_LC_SYSDEPS],[
|
AC_DEFUN([AC_LC_SYSDEPS],[
|
||||||
AC_REQUIRE([AC_LC_CANONICAL_HOST])
|
AC_REQUIRE([AC_LC_CANONICAL_HOST])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for sysdeps directory)
|
AC_MSG_CHECKING(for sysdeps directory)
|
||||||
|
|
||||||
AC_ARG_WITH(sysdeps,
|
AC_ARG_WITH(sysdeps,
|
||||||
[ --with-sysdeps=dir which sysdeps directory should be used [default=auto]],
|
[ --with-sysdeps=dir which sysdeps directory should be used [default=auto]],
|
||||||
[if test "x$withval" = "xyes" ; then
|
[if test "x$withval" = "xyes" ; then
|
||||||
@@ -39,6 +41,7 @@ AC_DEFUN([AC_LC_SYSDEPS],[
|
|||||||
else
|
else
|
||||||
ac_cv_sysdeps_dir=$withval
|
ac_cv_sysdeps_dir=$withval
|
||||||
fi],[ac_cv_sysdeps_dir=yes])
|
fi],[ac_cv_sysdeps_dir=yes])
|
||||||
|
|
||||||
if test "x$ac_cv_sysdeps_dir" = "xyes" ; then
|
if test "x$ac_cv_sysdeps_dir" = "xyes" ; then
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux*)
|
linux*)
|
||||||
@@ -68,13 +71,56 @@ AC_DEFUN([AC_LC_SYSDEPS],[
|
|||||||
else
|
else
|
||||||
sysdeps_dir=stub
|
sysdeps_dir=stub
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -d $srcdir/sysdeps/$sysdeps_dir || sysdeps_dir=stub
|
test -d $srcdir/sysdeps/$sysdeps_dir || sysdeps_dir=stub
|
||||||
AC_MSG_RESULT($sysdeps_dir)
|
AC_MSG_RESULT($sysdeps_dir)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether we need the server)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(libgtop-server,
|
||||||
|
[ --enable-libgtop-server use gtop_server [default=auto]],
|
||||||
|
[if test "x$enableval" = "xyes" ; then
|
||||||
|
need_server=yes
|
||||||
|
elif test "x$enableval" = "xno" ; then
|
||||||
|
need_server=no
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_MSG_RESULT($need_server)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether building of 'names' subdirs is requested)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(libgtop-names,
|
||||||
|
[ --enable-libgtop-names enable building of 'names' subdirs [default=yes]],
|
||||||
|
[if test "x$enableval" = "xyes" ; then
|
||||||
|
ac_cv_want_names=yes
|
||||||
|
else
|
||||||
|
ac_cv_want_names=$enableval
|
||||||
|
fi],[ac_cv_names_subdir=yes])
|
||||||
|
|
||||||
|
AC_MSG_RESULT($ac_cv_want_names)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether building of the guile interface is requested)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(libgtop-guile,
|
||||||
|
[ --enable-libgtop-guile enable building of guile interface [default=yes]],
|
||||||
|
[if test "x$enableval" = "xyes" ; then
|
||||||
|
ac_cv_want_guile=yes
|
||||||
|
else
|
||||||
|
ac_cv_want_guile=$enableval
|
||||||
|
fi],[ac_cv_want_guile=yes])
|
||||||
|
|
||||||
|
AC_MSG_RESULT($ac_cv_want_guile)
|
||||||
|
|
||||||
|
if test x$ac_cv_want_names = xyes ; then
|
||||||
|
AC_DEFINE(GLIBTOP_NAMES)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(GLIBTOP_NAMES, test x$ac_cv_want_names = xyes)
|
||||||
|
|
||||||
AC_SUBST(sysdeps_dir)
|
AC_SUBST(sysdeps_dir)
|
||||||
AC_SUBST(need_server)
|
AC_SUBST(need_server)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||||
|
|
||||||
AC_DEFUN(AM_CONFIG_HEADER,
|
AC_DEFUN(AM_CONFIG_HEADER,
|
||||||
|
55
configure.in
55
configure.in
@@ -26,15 +26,23 @@ export CC CXX RANLIB LD AS AR NM
|
|||||||
|
|
||||||
AC_LC_SYSDEPS
|
AC_LC_SYSDEPS
|
||||||
|
|
||||||
GNOME_CHECK_GUILE
|
if test x$ac_cv_want_guile = xyes ; then
|
||||||
|
GNOME_CHECK_GUILE
|
||||||
if test x$ac_cv_guile_found = xyes ; then
|
if test x$ac_cv_guile_found = xyes ; then
|
||||||
guile_examples='third third_static third_linux'
|
if test x$ac_cv_want_names = xyes ; then
|
||||||
guile_subdirs='guile'
|
AC_DEFINE(GLIBTOP_GUILE_NAMES)
|
||||||
|
fi
|
||||||
|
guile_examples='third third_static third_linux'
|
||||||
|
guile_subdirs='guile'
|
||||||
|
else
|
||||||
|
guile_examples=
|
||||||
|
guile_subdirs=
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
guile_examples=
|
guile_examples=
|
||||||
guile_subdirs=
|
guile_subdirs=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(guile_examples)
|
AC_SUBST(guile_examples)
|
||||||
AC_SUBST(guile_subdirs)
|
AC_SUBST(guile_subdirs)
|
||||||
|
|
||||||
@@ -99,24 +107,53 @@ if test "$need_libgtop_support" = yes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl These definitions are expanded in make.
|
dnl These definitions are expanded in make.
|
||||||
GTOP_LIBS='-L$(libdir) -lgtop_common -lgtop '
|
GTOP_LIBS='-L$(libdir)'
|
||||||
GTOP_INCS='-I$(includedir) -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/include'
|
GTOP_INCS='-I$(includedir) -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/include'
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_LIBS"
|
||||||
|
GTOP_GUILE_INCS="$GTOP_INCS"
|
||||||
GTOP_BINDIR='$(bindir)'
|
GTOP_BINDIR='$(bindir)'
|
||||||
GTOP_SERVER='$(bindir)/gtop_server'
|
GTOP_SERVER='$(bindir)/gtop_server'
|
||||||
|
|
||||||
GTOP_INCS="$GTOP_INCS -I\$(top_srcdir)/intl -DGTOPLOCALEDIR=\\\"\$(datadir)/locale\\\""
|
if test "x$ac_cv_guile_found" = "xyes" ; then
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop_guile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ac_cv_want_names" = "xyes" ; then
|
||||||
|
if test "x$ac_cv_guile_found" = "xyes" ; then
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop_guile_names"
|
||||||
|
fi
|
||||||
|
GTOP_LIBS="$GTOP_LIBS -lgtop_names"
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop_names"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GTOP_LIBS="$GTOP_LIBS -lgtop_common"
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop_common"
|
||||||
|
|
||||||
|
if test "x$need_server" = "xyes" ; then
|
||||||
|
GTOP_LIBS="$GTOP_LIBS -lgtop"
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop"
|
||||||
|
else
|
||||||
|
GTOP_LIBS="$GTOP_LIBS -lgtop_sysdeps"
|
||||||
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS -lgtop_sysdeps"
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$use_glibtop_machine_h" = "xyes" ; then
|
if test "x$use_glibtop_machine_h" = "xyes" ; then
|
||||||
GTOP_INCS="$GTOP_INCS -I\$(top_srcdir)/sysdeps/\$(sysdeps_dir)"
|
GTOP_INCS="$GTOP_INCS -I\$(top_srcdir)/sysdeps/\$(sysdeps_dir)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
GTOP_INCS="$GTOP_INCS -I\$(top_srcdir)/intl -DGTOPLOCALEDIR=\\\\\"\$(datadir)/locale\\\\\""
|
||||||
|
|
||||||
|
GTOP_GUILE_INCS="$GTOP_INCS"
|
||||||
|
|
||||||
if test "x$ac_cv_guile_found" = "xyes" ; then
|
if test "x$ac_cv_guile_found" = "xyes" ; then
|
||||||
GTOP_INCS="$GTOP_INCS $GUILE_INCS"
|
GTOP_GUILE_INCS="$GTOP_INCS $GUILE_INCS"
|
||||||
GTOP_LIBS="$GTOP_LIBS $GUILE_LIBS"
|
GTOP_GUILE_LIBS="$GTOP_GUILE_LIBS $GUILE_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(GTOP_LIBS)
|
AC_SUBST(GTOP_LIBS)
|
||||||
AC_SUBST(GTOP_INCS)
|
AC_SUBST(GTOP_INCS)
|
||||||
|
AC_SUBST(GTOP_GUILE_LIBS)
|
||||||
|
AC_SUBST(GTOP_GUILE_INCS)
|
||||||
AC_SUBST(GTOP_BINDIR)
|
AC_SUBST(GTOP_BINDIR)
|
||||||
AC_SUBST(GTOP_SERVER)
|
AC_SUBST(GTOP_SERVER)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user