Skip to content

Commit

Permalink
(2) Remove libevent
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamcat4 committed Sep 18, 2009
1 parent a5ff864 commit f29d228
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 121 deletions.
5 changes: 4 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ac_php_frag.m4 \
$(top_srcdir)/m4/ac_lib_event.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Expand Down Expand Up @@ -112,6 +113,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
LIBEVENT_LIBS = @LIBEVENT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
Expand Down
94 changes: 0 additions & 94 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,6 @@ AC_DEFUN([AC_FPM_CHECK_FUNC],
LIBS="$SAVED_LIBS"
])

AC_DEFUN([AC_FPM_LIBEVENT],
[
AC_ARG_WITH([libevent], AC_HELP_STRING([--with-libevent=DIR], [libevent install directory]))
LIBEVENT_CFLAGS=""
LIBEVENT_LIBS="-levent"
LIBEVENT_INCLUDE_PATH=""
if test "$with_libevent" != "no" -a -n "$with_libevent"; then
LIBEVENT_CFLAGS="-I$with_libevent/include"
LIBEVENT_LIBS="-L$with_libevent/lib $LIBEVENT_LIBS"
LIBEVENT_INCLUDE_PATH="$with_libevent/include"
fi
AC_MSG_CHECKING([for event.h])
found=no
for dir in "$LIBEVENT_INCLUDE_PATH" /usr/include ; do
if test -r "$dir/event.h" ; then
found=yes
break
fi
done
AC_MSG_RESULT([$found])
AC_FPM_CHECK_FUNC([event_set], [$LIBEVENT_CFLAGS], [$LIBEVENT_LIBS], ,
[AC_MSG_ERROR([Failed to link with libevent. Perhaps --with-libevent=DIR option could help.])])
AC_FPM_CHECK_FUNC([event_base_free], [$LIBEVENT_CFLAGS], [$LIBEVENT_LIBS], ,
[AC_MSG_ERROR([You have too old version. libevent version >= 1.2 is required.])])
])

AC_DEFUN([AC_FPM_LIBXML],
[
AC_MSG_RESULT([checking for XML configuration])
Expand Down Expand Up @@ -78,38 +43,6 @@ AC_DEFUN([AC_FPM_LIBXML],
fi
])

AC_DEFUN([AC_FPM_JUDY],
[
AC_ARG_WITH([Judy], AC_HELP_STRING([--with-Judy=DIR], [Judy install directory]))
JUDY_CFLAGS=""
JUDY_LIBS="-lJudy"
JUDY_INCLUDE_PATH=""
if test "$with_Judy" != "no" -a -n "$with_Judy"; then
JUDY_INCLUDE_PATH="$with_Judy/include"
JUDY_CFLAGS="-I$with_Judy/include $JUDY_CFLAGS"
JUDY_LIBS="-L$with_Judy/lib $JUDY_LIBS"
fi
AC_MSG_CHECKING([for Judy.h])
found=no
for dir in "$JUDY_INCLUDE_PATH" /usr/include ; do
if test -r "$dir/Judy.h" ; then
found=yes
break
fi
done
AC_MSG_RESULT([$found])
AC_FPM_CHECK_FUNC([JudyLCount], [$JUDY_CFLAGS], [$JUDY_LIBS], ,
[AC_MSG_ERROR([Failed to link with Judy])])
])

AC_DEFUN([AC_FPM_CLOCK],
[
have_clock_gettime=no
Expand Down Expand Up @@ -434,33 +367,6 @@ AC_DEFUN([AC_FPM_PHP],
AC_SUBST(PHP_VERSION)
])

AC_DEFUN([AC_FPM_LIBEVENT_EMBEDDED],
[
echo "$srcdir" | grep -qv '^/'; if test $? = 0 ; then le_rel_pfx=../; fi
libevent_configure="cd ./libevent ; CC=\"$CC\" CFLAGS=\"$AM_CFLAGS\" $le_rel_pfx$srcdir/libevent/configure --disable-shared"
$mkdir_p ./libevent
AC_MSG_RESULT()
AC_MSG_RESULT([Configuring libevent])
AC_MSG_RESULT()
(eval $libevent_configure)
if test ! -f "./libevent/Makefile" ; then
echo "Failed to configure libevent" >&2
exit 1
fi
AC_MSG_RESULT()
libevent_build=`cd libevent; pwd`
libevent_src=`cd $srcdir/libevent; pwd`
LIBEVENT_CFLAGS="-I$libevent_src -I$libevent_build"
dnl LIBEVENT_LIBS=".a `echo "@LIBS@" | ./libevent/config.status --file=-:-`"
])

AC_DEFUN([AC_FPM_PATHS],
[
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ AC_FPM_LIBXML
AC_FPM_PRCTL
AC_FPM_CLOCK
AC_FPM_TRACE
AC_FPM_LIBEVENT_EMBEDDED

AC_CHECK_FUNCS(setenv clearenv)

Expand Down
1 change: 0 additions & 1 deletion generate-fpm-patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ cd sapi/fpm
# Remove non-project files
rm -Rf .bzr* .git* *.cache autotools man1
rm -Rf libevent/autotools libevent/*.cache
# Remove those standalone files here that php-src won't use
# rm -rf file1 file2 file3...
Expand Down
9 changes: 0 additions & 9 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,4 @@ php_fpm_LDADD = \
$(PHP_OBJS:%=$(PHP_BUILDDIR)/%) \
sapi/libsapi.la \
fpm/libfpm.la \
../libevent/libevent.la \
$(php_fpm_ADD_LIBS)

BUILT_SOURCES = ../libevent/event-config.h

../libevent/libevent.la: ../libevent/Makefile
cd ../libevent && $(MAKE) libevent.la

../libevent/event-config.h: ../libevent/Makefile
cd ../libevent && $(MAKE) event-config.h
19 changes: 4 additions & 15 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ am_php_fpm_OBJECTS =
php_fpm_OBJECTS = $(am_php_fpm_OBJECTS)
am__DEPENDENCIES_1 =
php_fpm_DEPENDENCIES = $(PHP_OBJS:%=$(PHP_BUILDDIR)/%) sapi/libsapi.la \
fpm/libfpm.la ../libevent/libevent.la $(am__DEPENDENCIES_1)
fpm/libfpm.la $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
Expand Down Expand Up @@ -211,11 +211,9 @@ php_fpm_LDADD = \
$(PHP_OBJS:%=$(PHP_BUILDDIR)/%) \
sapi/libsapi.la \
fpm/libfpm.la \
../libevent/libevent.la \
$(php_fpm_ADD_LIBS)

BUILT_SOURCES = ../libevent/event-config.h
all: $(BUILT_SOURCES) fpm_autoconfig.h
all: fpm_autoconfig.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

.SUFFIXES:
Expand Down Expand Up @@ -497,16 +495,14 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
check: check-recursive
all-am: Makefile $(PROGRAMS) fpm_autoconfig.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
Expand All @@ -530,7 +526,6 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-recursive

clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
Expand Down Expand Up @@ -599,12 +594,6 @@ uninstall-info: uninstall-info-recursive

$(php_fpm_bin): php_fpm
ln -sf php_fpm $(php_fpm_bin)

../libevent/libevent.la: ../libevent/Makefile
cd ../libevent && $(MAKE) libevent.la

../libevent/event-config.h: ../libevent/Makefile
cd ../libevent && $(MAKE) event-config.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0 comments on commit f29d228

Please sign in to comment.