From c17894de44a9edbff02e2ef35be65ae2333a276f 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@379 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/configure.ac | 20 +++++++++++++++++++- program/src/Makefile.am | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/program/configure.ac b/program/configure.ac index a67ea551..dd6afa06 100644 --- a/program/configure.ac +++ b/program/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/program/src/Makefile.am b/program/src/Makefile.am index 85aad4e1..df9aa940 100644 --- a/program/src/Makefile.am +++ b/program/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.30.2