From c058c30391adcdcdd5e79355517789b1fffde019 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Thu, 9 Jun 2011 17:08:41 +0000 Subject: [PATCH] Add configure option to control gdomap port git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33264 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Source/Makefile.preamble | 6 +++++- Tools/Makefile.postamble | 2 ++ Tools/Makefile.preamble | 3 +++ config.mak.in | 1 + configure | 22 ++++++++++++++++++++++ configure.ac | 14 ++++++++++++++ 7 files changed, 57 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e76d71e0c..82da60e09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-06-09 Richard Frith-Macdonald + + * configure: Regenerate + * config.mak.in: + * configure.ac: + * Source/Makefile.preamble: + * Tools/Makefile.postamble: + * Tools/Makefile.preamble: + Add --with-gdomap-port= to specify an alternative port + 2011-06-07 Richard Frith-Macdonald * Source/Additions/GSLock.m: diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index 191b56d07..040dc6b8e 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -56,11 +56,15 @@ ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) $(WARN_FLAGS) \ # Additional flags to pass to the Objective-C compiler -#ŁADDITIONAL_OBJCFLAGS+= +#ADDITIONAL_OBJCFLAGS+= # Additional flags to pass to the C compiler #ADDITIONAL_CFLAGS+= +ifneq ($(GNUSTEP_GDOMAP_PORT_OVERRIDE),no) +ADDITIONAL_CPPFLAGS += -DGDOMAP_PORT_OVERRIDE=$(GNUSTEP_GDOMAP_PORT_OVERRIDE) +endif + # Additional include directories the compiler should search ADDITIONAL_INCLUDE_DIRS = \ -I../Headers \ diff --git a/Tools/Makefile.postamble b/Tools/Makefile.postamble index 83f052be2..289399c1f 100644 --- a/Tools/Makefile.postamble +++ b/Tools/Makefile.postamble @@ -62,6 +62,7 @@ after-install:: which gzip && rm -f $(GNUSTEP_DOC_MAN)/man8/$$file.gz \ && gzip -9 $(GNUSTEP_DOC_MAN)/man8/$$file; \ done$(END_ECHO) +ifeq ($(GNUSTEP_GDOMAP_PORT_OVERRIDE),no) ifeq ($(GNUSTEP_INSTALL_GDOMAP_AS_SETUID),no) $(ECHO_NOTHING)echo ""; \ echo "Note: gdomap has not been made setuid to root, so you must"; \ @@ -98,6 +99,7 @@ else echo "************************************************************"; \ $(END_ECHO) endif +endif # Things to do before uninstalling before-uninstall:: diff --git a/Tools/Makefile.preamble b/Tools/Makefile.preamble index fd05af0f3..5aaf3eee8 100644 --- a/Tools/Makefile.preamble +++ b/Tools/Makefile.preamble @@ -38,6 +38,9 @@ # Additional flags to pass to the preprocessor ADDITIONAL_CPPFLAGS += $(WARN_FLAGS) +ifneq ($(GNUSTEP_GDOMAP_PORT_OVERRIDE),no) +ADDITIONAL_CPPFLAGS += -DGDOMAP_PORT_OVERRIDE=$(GNUSTEP_GDOMAP_PORT_OVERRIDE) +endif # Additional flags to pass to the Objective-C compiler #ADDITIONAL_OBJCFLAGS += diff --git a/config.mak.in b/config.mak.in index 96cf9ea9c..6203baeff 100644 --- a/config.mak.in +++ b/config.mak.in @@ -33,6 +33,7 @@ ifeq ($(shared),yes) endif GNUSTEP_INSTALL_GDOMAP_AS_SETUID=@GNUSTEP_INSTALL_GDOMAP_AS_SETUID@ +GNUSTEP_GDOMAP_PORT_OVERRIDE=@GNUSTEP_GDOMAP_PORT_OVERRIDE@ GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@ GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@ diff --git a/configure b/configure index b2b4c4764..396e33aa4 100755 --- a/configure +++ b/configure @@ -645,6 +645,7 @@ MAJOR_VERSION VERSION subdirs GNUSTEP_INSTALL_GDOMAP_AS_SETUID +GNUSTEP_GDOMAP_PORT_OVERRIDE WARN_FLAGS LDIR_FLAGS INCLUDE_FLAGS @@ -824,6 +825,7 @@ with_zeroconf_api enable_icu with_gmp_include with_gmp_library +with_gdomap_port enable_setuid_gdomap enable_openssl with_openssl_include @@ -1575,6 +1577,7 @@ Optional Packages: --with-zeroconf-api=API force use of a specific zeroconf API (mdns or avahi) --with-gmp-include=PATH include path for gmp headers --with-gmp-library=PATH library path for gmp libraries + --with-gdomap-port=PORT alternative port for gdomap --with-openssl-include=PATH include path for openssl headers --with-openssl-library=PATH library path for openssl libraries @@ -25087,6 +25090,25 @@ fi +#-------------------------------------------------------------------- +# Check if we should use an alternative gdomap port +#-------------------------------------------------------------------- + +# Check whether --with-gdomap-port was given. +if test "${with_gdomap_port+set}" = set; then + withval=$with_gdomap_port; gdomap_port="$withval" +else + gdomap_port="no" +fi + + +if test "$gdomap_port" = "no"; then + GNUSTEP_GDOMAP_PORT_OVERRIDE="$gdomap_port" +else + GNUSTEP_GDOMAP_PORT_OVERRIDE="$gdomap_port" +fi + + #-------------------------------------------------------------------- # Check if we should install gdomap as setuid #-------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index b81ec3d7f..699c0ea75 100644 --- a/configure.ac +++ b/configure.ac @@ -2917,6 +2917,20 @@ fi AC_SUBST(WARN_FLAGS) +#-------------------------------------------------------------------- +# Check if we should use an alternative gdomap port +#-------------------------------------------------------------------- +AC_ARG_WITH(gdomap-port, + [ --with-gdomap-port=PORT alternative port for gdomap], + gdomap_port="$withval", gdomap_port="no") + +if test "$gdomap_port" = "no"; then + GNUSTEP_GDOMAP_PORT_OVERRIDE="$gdomap_port" +else + GNUSTEP_GDOMAP_PORT_OVERRIDE="$gdomap_port" +fi +AC_SUBST(GNUSTEP_GDOMAP_PORT_OVERRIDE) + #-------------------------------------------------------------------- # Check if we should install gdomap as setuid #--------------------------------------------------------------------