You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2010/10/02 10:59:49 UTC

svn commit: r1003756 - in /commons/proper/daemon/trunk: ./ src/native/unix/ src/native/unix/native/ src/native/unix/support/

Author: mturk
Date: Sat Oct  2 08:59:48 2010
New Revision: 1003756

URL: http://svn.apache.org/viewvc?rev=1003756&view=rev
Log:
DAEMON-176: Add support for config.nice

Modified:
    commons/proper/daemon/trunk/RELEASE-NOTES.txt
    commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
    commons/proper/daemon/trunk/src/native/unix/Makedefs.in
    commons/proper/daemon/trunk/src/native/unix/Makefile.in
    commons/proper/daemon/trunk/src/native/unix/configure.in
    commons/proper/daemon/trunk/src/native/unix/native/Makefile.in
    commons/proper/daemon/trunk/src/native/unix/support/apfunctions.m4

Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Sat Oct  2 08:59:48 2010
@@ -15,6 +15,7 @@ follow the release early/release often m
 
 NEW FEATURES:
 
+* DAEMON-176: Create config.nice during configure step. (1.0.4)
 * DAEMON-173: Allow --JavaHome=jdk and --JavaHome=jre options that
               will guess default JavaHome from the registry. (1.0.4)
 * DAEMON-160: Remove obsolete code; rename native/nt as native/windows (1.0.4)

Modified: commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original)
+++ commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Sat Oct  2 08:59:48 2010
@@ -1,6 +1,11 @@
 APACHE COMMONS DAEMON (UNIX) CHANGELOG:
 Last modified at [$Date$]
 
+Changes with 1.0.4
+  * Support log rotation using SIGUSR1 (DAEMON-95)
+  * Fix FreeBSD build (DAEMON-171)
+  * Add support for config.nice and strip utility (DAEMON-176)
+
 Changes with 1.0.3
   * Implement fail() method (DAEMON-128)
   * Add missing Java6 parameters (DAEMON-140)

Modified: commons/proper/daemon/trunk/src/native/unix/Makedefs.in
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/Makedefs.in?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/Makedefs.in (original)
+++ commons/proper/daemon/trunk/src/native/unix/Makedefs.in Sat Oct  2 08:59:48 2010
@@ -22,11 +22,13 @@ CC = @CC@
 JAVAC = @JAVAC@
 JAR = @JAR@
 CFLAGS = @CFLAGS@
+INCLUDES = @INCLUDES@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 JAVACFLAGS = @JAVACFLAGS@
 RANLIB = @RANLIB@
 LDCMD = @LDCMD@
+STRIP = @STRIP@
 
 .c.o:
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

Modified: commons/proper/daemon/trunk/src/native/unix/Makefile.in
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/Makefile.in?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/Makefile.in (original)
+++ commons/proper/daemon/trunk/src/native/unix/Makefile.in Sat Oct  2 08:59:48 2010
@@ -32,9 +32,11 @@ distclean: clean
 	rm -f config.cache
 	rm -f config.log
 	rm -f config.status
+	rm -f config.nice
 	rm -f native/Makefile
 	rm -f Makefile
 	rm -f Makedefs
+	rm -rf autom4te.cache
 
 realclean: distclean
 	rm -f configure

Modified: commons/proper/daemon/trunk/src/native/unix/configure.in
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/configure.in?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/configure.in (original)
+++ commons/proper/daemon/trunk/src/native/unix/configure.in Sat Oct  2 08:59:48 2010
@@ -32,6 +32,10 @@ sinclude(./support/apsupport.m4)dnl
 AC_INIT(configure.in)
 AC_CONFIG_AUX_DIR(./support)
 
+dnl Generate ./config.nice for reproducing runs of configure
+dnl
+AP_CONFIG_NICE(config.nice)
+
 dnl -------------------------------------------------------------------------
 dnl Check current host (forget about cross compilation) and validate it
 dnl against the cache (fail if the cache differs)
@@ -46,6 +50,7 @@ dnl ------------------------------------
 AP_MSG_HEADER([C-Language compilation tools])
 AC_PROG_CC()
 AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
 
 dnl -------------------------------------------------------------------------
 dnl Check if this host is supported
@@ -66,7 +71,7 @@ then
   else
     cd /System/Library/Frameworks/JavaVM.framework/Headers
   fi
-  CFLAGS="$CFLAGS -I`/bin/pwd -P`"
+  INCLUDES="$INCLUDES -I`/bin/pwd -P`"
   cd $_prevdir
   unset _prevdir
 fi
@@ -82,7 +87,7 @@ AP_PROG_JAVAC()
 AP_PROG_JAR()
 if test "$supported_os" != "darwin"
 then
-  CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
+  INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
 fi
 
 dnl -------------------------------------------------------------------------
@@ -106,6 +111,14 @@ then
 AC_CHECK_LIB([cap], [cap_init], [CFLAGS="$CFLAGS -DHAVE_LIBCAP" ; LIBS="$LIBS -lcap"])
 fi
 
+if test -z "$STRIPFLAGS"
+then
+   STRIP="@: "
+else
+   STRIP="$STRIP $STRIPFLAGS"
+fi
+
+AC_SUBST(INCLUDES)
 dnl -------------------------------------------------------------------------
 dnl Random programs we need to compile locally
 dnl -------------------------------------------------------------------------

Modified: commons/proper/daemon/trunk/src/native/unix/native/Makefile.in
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/native/Makefile.in (original)
+++ commons/proper/daemon/trunk/src/native/unix/native/Makefile.in Sat Oct  2 08:59:48 2010
@@ -39,6 +39,7 @@ libservice.a: $(OBJS)
 
 jsvc: jsvc-unix.o libservice.a
 	$(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a $(LIBS) -o ../jsvc
+	$(STRIP) ../jsvc
 
 clean:
 	rm -f $(OBJS) ../jsvc jsvc-unix.o libservice.a

Modified: commons/proper/daemon/trunk/src/native/unix/support/apfunctions.m4
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/support/apfunctions.m4?rev=1003756&r1=1003755&r2=1003756&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/support/apfunctions.m4 (original)
+++ commons/proper/daemon/trunk/src/native/unix/support/apfunctions.m4 Sat Oct  2 08:59:48 2010
@@ -38,3 +38,73 @@ AC_DEFUN(AP_CANONICAL_HOST_CHECK,[
   fi
   AC_PROVIDE([$0])
 ])
+
+dnl Iteratively interpolate the contents of the second argument
+dnl until interpolation offers no new result. Then assign the
+dnl final result to $1.
+dnl
+dnl Example:
+dnl
+dnl foo=1
+dnl bar='${foo}/2'
+dnl baz='${bar}/3'
+dnl AP_EXPAND_VAR(fraz, $baz)
+dnl   $fraz is now "1/2/3"
+dnl
+AC_DEFUN([AP_EXPAND_VAR], [
+ap_last=
+ap_cur="$2"
+while test "x${ap_cur}" != "x${ap_last}";
+do
+  ap_last="${ap_cur}"
+  ap_cur=`eval "echo ${ap_cur}"`
+done
+$1="${ap_cur}"
+])
+
+dnl
+dnl AP_CONFIG_NICE(filename)
+dnl
+dnl Saves a snapshot of the configure command-line for later reuse
+dnl
+AC_DEFUN([AP_CONFIG_NICE], [
+  rm -f $1
+  cat >$1<<EOF
+#! /bin/sh
+#
+# Created by configure
+
+EOF
+  if test -n "$CC"; then
+    echo "CC=\"$CC\"; export CC" >> $1
+  fi
+  if test -n "$CFLAGS"; then
+    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
+  fi
+  if test -n "$CPPFLAGS"; then
+    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
+  fi
+  if test -n "$LDFLAGS"; then
+    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
+  fi
+  if test -n "$LIBS"; then
+    echo "LIBS=\"$LIBS\"; export LIBS" >> $1
+  fi
+  if test -n "$STRIPFLAGS"; then
+    echo "STRIPFLAGS=\"$STRIPFLAGS\"; export STRIPFLAGS" >> $1
+  fi
+  if test -n "$INCLUDES"; then
+    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
+  fi
+# Retrieve command-line arguments.
+  eval "set x $[0] $ac_configure_args"
+  shift
+
+  for arg
+  do
+    AP_EXPAND_VAR(arg, $arg)
+    echo "\"[$]arg\" \\" >> $1
+  done
+  echo '"[$]@"' >> $1
+  chmod +x $1
+])dnl