public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Apache 2.0 on Cygwin
@ 2000-07-19  5:23 Fifer, Eric
  2000-08-24  8:05 ` Stipe Tolj
  0 siblings, 1 reply; 3+ messages in thread
From: Fifer, Eric @ 2000-07-19  5:23 UTC (permalink / raw)
  To: 'McDermott, Alastair', cygwin

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

>Is there currently an effort in place to port 2.0 to Cygwin? Where can I
>find more information/discussion on this?

The basic Apache 2.0a4 builds relatively cleanly on Cygwin.
Attached are a build script and two patch files that will
build a prefork version.

A few caveats: I don't watch the Apache developers list and
I wasn't involved with the previous efforts building Apache
on Cygwin.  And, I haven't seen any discussions regarding
porting the latest Apache alphas to Cygwin.

To get a fully functional Apache on Cygwin I think a fair amount
of work would be necessary, particularly getting POSIX threads
fully implemented on Cygwin.

Regards,

Eric Fifer






[-- Attachment #2: apache-build.sh --]
[-- Type: text/plain, Size: 898 bytes --]

set -e

tar zxf apache_2.0a4.tar.gz
cd apache_2.0a4/src

# NOTE: some minor tweaks ...
#	lib/apr/file_io/unix/pipe.c, no mkfifo
#	main/util.c, workaround problem in find_fqdn
#	lib/pcre/pcre.in, dllimport not needed
#	support/logresolve.c, h_errno
#	Makefile.in, helpers/install.sh, lib/pcre/Makefile.in, install/.exe
patch -p2 <../../apache.patch

# NOTE: buildconf requires autoconf and libtool
#	autoconf can be downloaded from cygutils.netpedia.net
#	libtool you'll need to build yourself
./buildconf

# NOTE: autoheader fails when it tries to rename an open file
if [ -f autoh* ]
then
    mv autoh* include/ap_config_auto.h.in
    mv lib/apr/autoh* lib/apr/include/apr_private.h.in
fi

# NOTE: tweak configure's mmap test
#	fix "test: ==: unknown operand" with s/==/=/ (ash v. bash)
patch <../../apache.conf.patch

./configure --prefix=/usr/local/apache --with-mpm=prefork

make

make install

[-- Attachment #3: apache.conf.patch --]
[-- Type: text/x-diff, Size: 8286 bytes --]

--- configure.orig	Fri Jul 14 14:07:30 2000
+++ configure	Fri Jul 14 14:08:33 2000
@@ -3776,7 +3776,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST example"
-      if test "example" == "so"; then
+      if test "example" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -5490,6 +5490,7 @@
 	int fd;
 
 	pagesize = getpagesize();
+	pagesize = 65536;
 
 	/*
 	 * First, make a file with some known garbage in it.
@@ -5516,6 +5517,7 @@
 	if (fd < 0)
 		exit(1);
 	data2 = malloc(2 * pagesize);
+	data2 += 10000 * pagesize;
 	if (!data2)
 		exit(1);
 	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -5570,6 +5572,7 @@
 fi
 
     
+    ac_cv_func_mmap=yes
     echo $ac_n "checking which shared memory mechanism to use""... $ac_c" 1>&6
 echo "configure:5575: checking which shared memory mechanism to use" >&5
     if test "$ac_cv_func_shmget" = "yes" ; then
@@ -5776,7 +5779,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST vhost_alias"
-      if test "vhost_alias" == "so"; then
+      if test "vhost_alias" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -5835,7 +5838,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST env"
-      if test "env" == "so"; then
+      if test "env" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -5894,7 +5897,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST config_log"
-      if test "log_config" == "so"; then
+      if test "log_config" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -5953,7 +5956,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST mime_magic"
-      if test "mime_magic" == "so"; then
+      if test "mime_magic" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6012,7 +6015,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST mime"
-      if test "mime" == "so"; then
+      if test "mime" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6071,7 +6074,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST negotiation"
-      if test "negotiation" == "so"; then
+      if test "negotiation" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6130,7 +6133,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST status"
-      if test "status" == "so"; then
+      if test "status" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6189,7 +6192,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST includes"
-      if test "include" == "so"; then
+      if test "include" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6248,7 +6251,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST autoindex"
-      if test "autoindex" == "so"; then
+      if test "autoindex" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6307,7 +6310,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST dir"
-      if test "dir" == "so"; then
+      if test "dir" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6366,7 +6369,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST cgi"
-      if test "cgi" == "so"; then
+      if test "cgi" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6425,7 +6428,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST cgid"
-      if test "cgid" == "so"; then
+      if test "cgid" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6484,7 +6487,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST asis"
-      if test "asis" == "so"; then
+      if test "asis" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6543,7 +6546,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST imap"
-      if test "imap" == "so"; then
+      if test "imap" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6602,7 +6605,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST action"
-      if test "actions" == "so"; then
+      if test "actions" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6661,7 +6664,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST speling"
-      if test "speling" == "so"; then
+      if test "speling" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6720,7 +6723,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST userdir"
-      if test "userdir" == "so"; then
+      if test "userdir" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6779,7 +6782,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST alias"
-      if test "alias" == "so"; then
+      if test "alias" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6838,7 +6841,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST rewrite"
-      if test "rewrite" == "so"; then
+      if test "rewrite" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6897,7 +6900,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST access"
-      if test "access" == "so"; then
+      if test "access" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -6956,7 +6959,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST auth"
-      if test "auth" == "so"; then
+      if test "auth" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7015,7 +7018,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST auth_anon"
-      if test "auth_anon" == "so"; then
+      if test "auth_anon" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7074,7 +7077,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST auth_dbm"
-      if test "auth_dbm" == "so"; then
+      if test "auth_dbm" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7134,7 +7137,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST auth_db"
-      if test "auth_db" == "so"; then
+      if test "auth_db" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7277,7 +7280,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST auth_digest"
-      if test "auth_digest" == "so"; then
+      if test "auth_digest" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7336,7 +7339,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST cern_meta"
-      if test "cern_meta" == "so"; then
+      if test "cern_meta" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7395,7 +7398,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST expires"
-      if test "expires" == "so"; then
+      if test "expires" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7454,7 +7457,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST headers"
-      if test "headers" == "so"; then
+      if test "headers" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7514,7 +7517,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST usertrack"
-      if test "usertrack" == "so"; then
+      if test "usertrack" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7574,7 +7577,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST unique_id"
-      if test "unique_id" == "so"; then
+      if test "unique_id" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7633,7 +7636,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST setenvif"
-      if test "setenvif" == "so"; then
+      if test "setenvif" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7692,7 +7695,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST echo"
-      if test "echo" == "so"; then
+      if test "echo" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7758,7 +7761,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST so"
-      if test "so" == "so"; then
+      if test "so" = "so"; then
           echo "so"
           sharedobjs=yes
       fi
@@ -7818,7 +7821,7 @@
       shared=yes;;
     *)
       MODLIST="$MODLIST so"
-      if test "so" == "so"; then
+      if test "so" = "so"; then
           echo "so"
           sharedobjs=yes
       fi


[-- Attachment #4: apache.patch --]
[-- Type: text/x-diff, Size: 3759 bytes --]

diff -upr apache_2.0a4.orig/src/Makefile.in apache_2.0a4/src/Makefile.in
--- apache_2.0a4.orig/src/Makefile.in	Tue May 16 11:57:27 2000
+++ apache_2.0a4/src/Makefile.in	Fri Jul 14 16:44:14 2000
@@ -65,11 +65,11 @@ install-support:
 	@echo Installing Support Binaries
 	@test -d $(bindir) || $(mkinstalldirs) $(bindir)
 	@cp -p $(srcdir)/support/httpd.exp $(bindir)
-	@cp -p $(builddir)/support/htpasswd $(bindir)
-	@cp -p $(builddir)/support/htdigest $(bindir)
-	@cp -p $(builddir)/support/rotatelogs $(bindir)
-	@cp -p $(builddir)/support/logresolve $(bindir)
-	@cp -p $(builddir)/support/ab $(bindir)
+	@install $(builddir)/support/htpasswd $(bindir)
+	@install $(builddir)/support/htdigest $(bindir)
+	@install $(builddir)/support/rotatelogs $(bindir)
+	@install $(builddir)/support/logresolve $(bindir)
+	@install $(builddir)/support/ab $(bindir)
 
 install-other:
 	@test -d $(logdir) || $(mkinstalldirs) $(logdir)
diff -upr apache_2.0a4.orig/src/helpers/install.sh apache_2.0a4/src/helpers/install.sh
--- apache_2.0a4.orig/src/helpers/install.sh	Tue Aug 24 06:50:38 1999
+++ apache_2.0a4/src/helpers/install.sh	Fri Jul 14 16:44:14 2000
@@ -88,6 +88,7 @@ if [ -d $dst ]; then
 fi
 
 #  Add a possible extension (such as ".exe") to src and dst
+if [ -f $src.exe ]; then ext=".exe"; fi
 src="$src$ext"
 dst="$dst$ext"
 
diff -upr apache_2.0a4.orig/src/lib/apr/file_io/unix/pipe.c apache_2.0a4/src/lib/apr/file_io/unix/pipe.c
--- apache_2.0a4.orig/src/lib/apr/file_io/unix/pipe.c	Sun Apr 30 22:17:55 2000
+++ apache_2.0a4/src/lib/apr/file_io/unix/pipe.c	Fri Jul 14 16:44:14 2000
@@ -127,9 +127,12 @@ ap_status_t ap_create_namedpipe(char *fi
 {
     mode_t mode = ap_unix_get_fileperms(perm);
 
+#if 0
     if (mkfifo(filename, mode) == -1) {
         return errno;
     }
+#endif
+    return ENOSYS;
     return APR_SUCCESS;
 } 
 
diff -upr apache_2.0a4.orig/src/lib/pcre/Makefile.in apache_2.0a4/src/lib/pcre/Makefile.in
--- apache_2.0a4.orig/src/lib/pcre/Makefile.in	Tue May 16 11:57:28 2000
+++ apache_2.0a4/src/lib/pcre/Makefile.in	Fri Jul 14 16:44:14 2000
@@ -174,7 +174,7 @@ install:        all
 		  echo $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
 		  $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
 		fi
-		$(INSTALL)	pgrep $(BINDIR)/pgrep
+		$(INSTALL)	pgrep.exe $(BINDIR)/pgrep.exe
 		$(INSTALL)	pcre-config $(BINDIR)/pcre-config
 
 # We deliberately omit dftables and chartables.c from 'make clean'; once made
diff -upr apache_2.0a4.orig/src/lib/pcre/pcre.in apache_2.0a4/src/lib/pcre/pcre.in
--- apache_2.0a4.orig/src/lib/pcre/pcre.in	Sat May  6 00:28:22 2000
+++ apache_2.0a4/src/lib/pcre/pcre.in	Fri Jul 14 16:44:14 2000
@@ -13,7 +13,7 @@
 
 /* Win32 uses DLL by default */
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__CYGWIN__)
 # ifdef STATIC
 #  define PCRE_DL_IMPORT
 # else
diff -upr apache_2.0a4.orig/src/main/util.c apache_2.0a4/src/main/util.c
--- apache_2.0a4.orig/src/main/util.c	Sun May 21 06:31:07 2000
+++ apache_2.0a4/src/main/util.c	Fri Jul 14 16:44:14 2000
@@ -1951,7 +1951,9 @@ static char *find_fqdn(ap_pool_t *a, str
 		(!strncasecmp(p->h_aliases[x], p->h_name, strlen(p->h_name))))
 		return ap_pstrdup(a, p->h_aliases[x]);
 	}
+#if 0
 	return NULL;
+#endif
     }
     return ap_pstrdup(a, (void *) p->h_name);
 }
diff -upr apache_2.0a4.orig/src/support/logresolve.c apache_2.0a4/src/support/logresolve.c
--- apache_2.0a4.orig/src/support/logresolve.c	Thu Apr 27 05:22:57 2000
+++ apache_2.0a4/src/support/logresolve.c	Fri Jul 14 17:21:41 2000
@@ -98,8 +98,10 @@ struct nsrec {
  * statistics - obvious
  */
 
+#if 0
 #ifndef h_errno
 extern int h_errno; /* some machines don't have this in their headers */
+#endif
 #endif
 
 /* largest value for h_errno */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Apache 2.0 on Cygwin
  2000-07-19  5:23 Apache 2.0 on Cygwin Fifer, Eric
@ 2000-08-24  8:05 ` Stipe Tolj
  0 siblings, 0 replies; 3+ messages in thread
From: Stipe Tolj @ 2000-08-24  8:05 UTC (permalink / raw)
  To: Fifer, Eric; +Cc: 'McDermott, Alastair', cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

> >Is there currently an effort in place to port 2.0 to Cygwin? Where can I
> >find more information/discussion on this?
>
> The basic Apache 2.0a4 builds relatively cleanly on Cygwin.
> Attached are a build script and two patch files that will
> build a prefork version.
>
> A few caveats: I don't watch the Apache developers list and
> I wasn't involved with the previous efforts building Apache
> on Cygwin.  And, I haven't seen any discussions regarding
> porting the latest Apache alphas to Cygwin.
>
> To get a fully functional Apache on Cygwin I think a fair amount
> of work would be necessary, particularly getting POSIX threads
> fully implemented on Cygwin.

that's the basic problem.

Our cygwin ports of apache (up to the latest 1.3.12 which will come soon)
works well on NT.
Unfortunatly I was not able to get 2.0 to compile and run cleanly under
cygwin.

Regards,
Stipe Tolj
System Administration

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
Wapme.net - wherever you are



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Apache 2.0 on Cygwin
@ 2000-07-07  3:38 McDermott, Alastair
  0 siblings, 0 replies; 3+ messages in thread
From: McDermott, Alastair @ 2000-07-07  3:38 UTC (permalink / raw)
  To: cygwin

Hi all,

I came across the Apache 1.3.9/Cygwin port page (
http://www.student.uni-koeln.de/cygwin/ ) recently and I have some
questions.

I am porting Apache 2.0 to a POSIX run-time environment on the S/390
mainframe. Normally when porting to this system we  cross-compile using
namke, an NT compiler and pre-linker, then upload our object to the target
for final link.

I'm interested in using Cygwin as a development environment to do the
cross-compile and pre-link stages of the Apache build, especially since the
Unix build is much closer to our POSIX environment than the Visual Studio
build.

Is there currently an effort in place to port 2.0 to Cygwin? Where can I
find more information/discussion on this? 

Regards,
Alastair.

--

Alastair McDermott,
Software AG Ireland R&D Ltd.
Georges Avenue, Blackrock, Co. Dublin, Ireland. 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-24  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-19  5:23 Apache 2.0 on Cygwin Fifer, Eric
2000-08-24  8:05 ` Stipe Tolj
  -- strict thread matches above, loose matches on Subject: below --
2000-07-07  3:38 McDermott, Alastair

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).