From a3ede0e519fc4ebaa25da9739af4089507bb94a6 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 16 Jun 2011 15:37:51 +0000 Subject: [PATCH] Fix for bug #1034 Monotone-Parent: 698461b7043455867e02dfbd291566ea991bf8a5 Monotone-Revision: 745ebe569ac5b050683e557f5e5fb7c1699ca7f5 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2011-06-16T15:37:51 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/GNUmakefile.preamble | 2 +- configure | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/GNUmakefile.preamble b/SoObjects/SOGo/GNUmakefile.preamble index d35e9d3af..ee71f35ab 100644 --- a/SoObjects/SOGo/GNUmakefile.preamble +++ b/SoObjects/SOGo/GNUmakefile.preamble @@ -5,7 +5,7 @@ SOGo_INCLUDE_DIRS += -I.. -I../../UI \ -DSOGO_MINOR_VERSION="@\"$(MINOR_VERSION)\"" \ -DSOGO_SUBMINOR_VERSION="@\"$(SUBMINOR_VERSION)\"" -HOSTNAME = $(shell hostname -f) +HOSTNAME ?= $(shell hostname -f) BUILD_DATE = $(shell echo $$USER@$(HOSTNAME); date +"%Y%m%d%H%M") ADDITIONAL_CPPFLAGS += \ diff --git a/configure b/configure index 73ecdbb4e..d2b2317ee 100755 --- a/configure +++ b/configure @@ -37,6 +37,15 @@ else MAKE=gmake fi +# hostname(1) on some systems may not know the -f parameter +hostname -f 2>/dev/null >/dev/null +if [ $? -eq 0 ];then + HOSTNAME=`hostname -f` +else + HOSTNAME=`hostname` +fi + + NGSTREAMS_DIR="./sope-core/NGStreams" LINK_SYSLIBDIRS="-L/usr/local/pgsql/lib -L/usr/local/lib -L/usr/lib" @@ -251,6 +260,7 @@ genConfigMake() { cfgwrite "CGS_LIBDIR_NAME:=lib" fi + cfgwrite "HOSTNAME=${HOSTNAME}" cfgwrite "SOGO_SYSLIBDIR=\${GNUSTEP_LIBRARIES}" cfgwrite "SOGO_LIBDIR=\${GNUSTEP_LIBRARY}/SOGo" cfgwrite "SOGO_TEMPLATESDIR=\${SOGO_LIBDIR}/Templates"