Commit dad3ede2 authored by Brian Havard's avatar Brian Havard
Browse files

Switch to using aplibtool for building under OS/2 & add support for building

loadable modules as OS/2 DLLs.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88645 13f79535-47bb-0310-9956-ffa450edef68
parent b47ceeaa
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line

SUBDIRS = srclib modules os server support
SUBDIRS = srclib os server modules support

PROGRAM_NAME         = $(progname)
PROGRAM_SOURCES      = modules.c
@@ -126,3 +126,5 @@ install-suexec:

suexec:
	cd support && make suexec

include $(top_srcdir)/os/os2/core.mk
+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
  APACHE_SUBST(PORT)
  APACHE_SUBST(NOTEST_CFLAGS)
  APACHE_SUBST(NOTEST_LDFLAGS)
  APACHE_SUBST(CORE_IMPLIB_FILE)
  APACHE_SUBST(CORE_IMPLIB)
  APACHE_SUBST(SH_LIBTOOL)
  APACHE_SUBST(MK_IMPLIB)

  abs_srcdir="`(cd $srcdir && pwd)`"

+9 −4
Original line number Diff line number Diff line
@@ -71,14 +71,13 @@ LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
# Link-related commands

LINK     = $(LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(LDFLAGS) $(NOTEST_LDFLAGS) -o $@
SH_LINK  = $(SH_LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(LDFLAGS) $(NOTEST_LDFLAGS) -o $@
SH_LINK  = $(SH_LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(CORE_IMPLIB) -o $@
MOD_LINK = $(LIBTOOL) --mode=link $(COMPILE) -module $(LTFLAGS) $(LDFLAGS) $(NOTEST_LDFLAGS) -o $@

# Cross compile commands

# Helper programs

SH_LIBTOOL = $(SHELL) $(top_builddir)/shlibtool --silent
MKINSTALLDIRS = $(abs_srcdir)/build/mkdir.sh
INSTALL = $(abs_srcdir)/build/install.sh -c
INSTALL_DATA = $(INSTALL) -m 644
@@ -92,7 +91,7 @@ CXX_SUFFIX = cpp
SHLIB_SUFFIX = so

.SUFFIXES:
.SUFFIXES: .S .c .$(CXX_SUFFIX) .lo .o .s .y .l .slo
.SUFFIXES: .S .c .$(CXX_SUFFIX) .lo .o .s .y .l .slo .def .la

.c.o:
	$(COMPILE) -c $<
@@ -128,6 +127,12 @@ SHLIB_SUFFIX = so
all: all-recursive
install: install-recursive


# Makes an import library from a def file
.def.la:
	$(LIBTOOL) --mode=compile $(MK_IMPLIB) -o $@ $<


# if we are doing a distclean, we actually want to hit every 
# directory that has ever been configured.  To do this, we just do a quick
# find for all the leftover Makefiles, and then run make distclean in those
@@ -184,7 +189,7 @@ depend: depend-recursive
clean: clean-recursive clean-x

clean-x:
	rm -f $(targets) *.slo *.lo *.la *.o $(CLEAN_TARGETS)
	rm -f $(targets) *.slo *.lo *.la *.o *.obj $(CLEAN_TARGETS)
	rm -rf .libs

distclean: distclean-recursive clean-x
+21 −2
Original line number Diff line number Diff line
@@ -41,6 +41,23 @@ fi

AC_CANONICAL_SYSTEM

case "$host_alias" in
  *os2*)
      # Use a custom made libtool replacement
      echo "using aplibtool"
      LIBTOOL="$abs_srcdir/srclib/apr/build/aplibtool"
      SH_LIBTOOL="$LIBTOOL --shared --export-all"
      CORE_IMPLIB_FILE="ApacheCoreOS2.la"
      CORE_IMPLIB="$abs_srcdir/server/$CORE_IMPLIB_FILE"
      MK_IMPLIB="emximp"
      SHMOD_EXPORT_EXT="def"
      other_targets="$other_targets os2core"
      ;;
  *)
      SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool --silent'
      ;;
esac

dnl
dnl ## Preload our OS configuration
APR_PRELOAD
@@ -158,8 +175,10 @@ APACHE_SUBST(OS_DIR)
APACHE_SUBST(BUILTIN_LIBS)

AM_DISABLE_SHARED
if test -z "$LIBTOOL"; then
  AM_PROG_LIBTOOL
  APACHE_LIBTOOL_SILENT
fi

if test "$apache_need_shared" = "yes"; then
  $SHELL $ac_aux_dir/ltconfig --output=shlibtool --disable-static --srcdir=$ac_aux_dir --cache-file=./config.cache $ac_aux_dir/ltmain.sh
+0 −1
Original line number Diff line number Diff line
if test "$OS" = "os2" ; then
  CFLAGS="$CFLAGS -DOS2 -O2"
  LDFLAGS="$LDFLAGS -Zexe"
fi
Loading