You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2005/11/14 15:28:38 UTC

svn commit: r344129 - in /tcl/websh/trunk/src/unix: Makefile.in configure.in

Author: ronnie
Date: Mon Nov 14 06:28:29 2005
New Revision: 344129

URL: http://svn.apache.org/viewcvs?rev=344129&view=rev
Log:
- changed linking of mod_websh.so for OSX (Darwin)
- added --with-httpd option for Apache binary (needed
  for -bundle linking on OSX)

Modified:
    tcl/websh/trunk/src/unix/Makefile.in
    tcl/websh/trunk/src/unix/configure.in

Modified: tcl/websh/trunk/src/unix/Makefile.in
URL: http://svn.apache.org/viewcvs/tcl/websh/trunk/src/unix/Makefile.in?rev=344129&r1=344128&r2=344129&view=diff
==============================================================================
--- tcl/websh/trunk/src/unix/Makefile.in (original)
+++ tcl/websh/trunk/src/unix/Makefile.in Mon Nov 14 06:28:29 2005
@@ -112,6 +112,7 @@
 RANLIB = @RANLIB@
 SHLIB_CFLAGS = @SHLIB_CFLAGS@
 SHLIB_LD = @SHLIB_LD@
+SHLIB_LD_DARWIN = $(CC) -bundle -bundle_loader $(HTTPD_BIN) $(LDFLAGS)
 SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
 STLIB_LD = @STLIB_LD@
@@ -130,9 +131,12 @@
 TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
 
 SHARED_LIB_SUFFIX = @SHARED_LIB_SUFFIX@
+MODULE_LIB_SUFFIX = $(VERSION).so
 UNSHARED_LIB_SUFFIX = @UNSHARED_LIB_SUFFIX@
 
 HTTPD_INCLUDES = @HTTPD_INCLUDES@
+# needed for Darwin (OS X) only
+HTTPD_BIN = @HTTPD_BIN@
 
 AUTOCONF = autoconf
 
@@ -239,9 +243,9 @@
 %.o: ../generic/%.c
 	$(COMPILE) -c $<
 
-websh: websh$(VERSION)
+websh: websh$(VERSION) $(web_LIB_FILE)
 
-mod_websh.so: mod_websh$(SHARED_LIB_SUFFIX)
+mod_websh.so: mod_websh$(MODULE_LIB_SUFFIX)
 
 
 websh$(VERSION): tclAppInit.$(OBJEXT) $(web_OBJECTS)
@@ -249,21 +253,15 @@
 	$(TCL_LIB_SPEC) $(TCL_LIBS) $(TCL_LD_FLAGS) -o websh$(VERSION)
 
 
-mod_websh$(SHARED_LIB_SUFFIX): $(web_ap_OBJECTS)
-	$(SHLIB_LD) $(TCL_LD_FLAGS) -o mod_websh$(SHARED_LIB_SUFFIX) $(web_ap_OBJECTS) $(TCL_LIB_SPEC)
+mod_websh$(MODULE_LIB_SUFFIX): $(web_ap_OBJECTS)
+	if test "`uname -s`" = "Darwin" ; then \
+	$(SHLIB_LD_DARWIN) -o mod_websh$(MODULE_LIB_SUFFIX) $(web_ap_OBJECTS) $(TCL_LIB_SPEC); \
+	else \
+	$(SHLIB_LD) $(TCL_LD_FLAGS) -o mod_websh$(MODULE_LIB_SUFFIX) $(web_ap_OBJECTS) $(TCL_LIB_SPEC); \
+	fi
 
-mod_websh.a: $(web_ap_OBJECTS)
-	echo "proto: $(PROTO_FLAGS)"
-	echo "sec: $(SECURITY_FLAGS)"
-	echo "mem: $(MEM_DEBUG_FLAGS)"
-	echo "key: $(KEYSYM_FLAGS)"
-	echo "depre: $(NO_DEPRECATED_FLAGS)"
-	echo "tcl_defs: $(TCL_DEFS)"
-	echo "defs: $(DEFS)"
-	echo "cflags $(CFLAGS)"
-	echo "compile $(COMPILE)"
-	exit
-	$(STLIB_LD) mod_websh$(UNSHARED_LIB_SUFFIX) $(web_ap_OBJECTS)
+mod_websh$(UNSHARED_LIB_SUFFIX): $(web_ap_OBJECTS)
+	$(STLIB_LD) $(TCL_LD_FLAGS) -o mod_websh$(UNSHARED_LIB_SUFFIX) $(web_ap_OBJECTS)
 
 pure: tclAppInit.$(OBJEXT) $(web_OBJECTS)
 	purify $(CC) @LDFLAGS@ tclAppInit.$(OBJEXT) $(web_OBJECTS) \

Modified: tcl/websh/trunk/src/unix/configure.in
URL: http://svn.apache.org/viewcvs/tcl/websh/trunk/src/unix/configure.in?rev=344129&r1=344128&r2=344129&view=diff
==============================================================================
--- tcl/websh/trunk/src/unix/configure.in (original)
+++ tcl/websh/trunk/src/unix/configure.in Mon Nov 14 06:28:29 2005
@@ -135,6 +135,7 @@
   if test -f "${with_httpdinclude}/httpd.h" ; then
       echo "found ${with_httpdinclude}"
       HTTPD_INCLUDES=-I\"${with_httpdinclude}\"
+      HTTPD_INCDIR=${with_httpdinclude}
       AC_SUBST(HTTPD_INCLUDES)
   else
       AC_MSG_ERROR([${with_httpdinclude}: directory does not contain Apache httpd header file httpd.h])
@@ -143,10 +144,11 @@
   eval "temp_includedir=${includedir}"
   for i in \
     `ls -d ${temp_includedir} 2>/dev/null` \
-    /usr/local/include /usr/include ; do
+    /usr/local/include /usr/include /usr/include/httpd ; do
     if test -f "$i/httpd.h" ; then
       echo "found $i"
       HTTPD_INCLUDES=-I\"$i\"
+      HTTPD_INCDIR=$i
       AC_SUBST(HTTPD_INCLUDES)
       break
     fi
@@ -155,6 +157,35 @@
     AC_MSG_ERROR(httpd.h not found.  Please specify its location with --with-httpdinclude)
   fi
 fi
+
+if test "`uname -s`" = "Darwin" ; then
+  AC_MSG_CHECKING(for httpd binary)
+  AC_ARG_WITH(httpd, [  --with-httpd            apache binary], with_httpd=${withval}, with_httpd=NA)
+  if test x"${with_httpd}" != xNA ; then
+    if test -f "${with_httpd}" ; then
+      echo "found ${with_httpd}"
+      HTTPD_BIN=${with_httpd}
+    else
+      AC_MSG_ERROR(httpd binary not found.  Invalid specification --with-httpd)
+    fi
+  else
+    if test -f "${HTTPD_INCDIR}/../bin/httpd" ; then
+      echo "found ${HTTPD_INCDIR}/../bin/httpd"
+      HTTPD_BIN=${HTTPD_INCDIR}/../bin/httpd
+    else
+      httpd=`which httpd`
+      if test -f "${httpd}" ; then
+        echo "found ${httpd}"
+        HTTPD_BIN=${httpd}
+      else
+        AC_MSG_ERROR(httpd binary not found.  Please specify its location with --with-httpd)
+      fi
+    fi
+  fi
+else
+  HTTPD_BIN=
+fi
+AC_SUBST(HTTPD_BIN)
 
 #--------------------------------------------------------------------
 # A few miscellaneous platform-specific items:



---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org