From 8162a06e538ffce71628175cb1d786eab4699c55 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 10 Apr 2005 11:30:14 +0000 Subject: [PATCH] make --disable-perl work allow configuration of the default font at configure time git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@379 a5681a0c-68f1-0310-ab6d-d61299d08faa --- configure.ac | 20 +++++++++++++++++++- src/Makefile.am | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a67ea55..dd6afa0 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,19 @@ AC_PROG_CC AC_PROG_CPP AC_PROG_LIBTOOL +dnl Check if we run on a system that has fonts +AC_ARG_WITH(rrd-default-font, +[ --with-rrd-default-font=[OPTIONS] set the full path to your default font.], +[RRD_DEFAULT_FONT=$withval],[ + if test -d ${WINDIR:-nodir}/cour.ttf ; then + RRD_DEFAULT_FONT=`cd $WINDIR;pwd`/cour.ttf + else + RRD_DEFAULT_FONT='$(fontsdir)/$(fonts_DATA)' + fi +]) + +AC_SUBST(RRD_DEFAULT_FONT) + dnl Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT @@ -281,7 +294,12 @@ AM_CONDITIONAL(BUILD_MULTITHREAD,[test $enable_pthread != no]) dnl Check for Perl. AC_PATH_PROG(PERL, perl, no) -if test "x$PERL" = "xno"; then + +AC_ARG_ENABLE(perl,[ --disable-perl do not build the perl modules], +[],[enable_perl=yes]) + + +if test "x$PERL" = "xno" -o x$enable_perl = xno; then COMP_PERL= else COMP_PERL="perl_piped perl_shared" diff --git a/src/Makefile.am b/src/Makefile.am index 85aad4e..df9aa94 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,8 @@ fonts_DATA = VeraMono.ttf #INCLUDES = $(CGI_INCLUDES) $(FREETYPE_INCLUDES) $(ART_INCLUDES) \ # $(PNG_INCLUDES) $(ZLIB_INCLUDES) -AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(fontsdir)/$(fonts_DATA)\" +RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@ +AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" RRD_C_FILES = \ getopt.c \ -- 2.11.0