Browse Source

autotools: Fix linking

personal/stbuehler/wip
Stefan Bühler 12 years ago
parent
commit
4fd27aca81
  1. 6
      configure.ac
  2. 3
      src/angel/Makefile.am
  3. 2
      src/common/Makefile.am
  4. 3
      src/main/Makefile.am
  5. 8
      src/modules/Makefile.am

6
configure.ac

@ -264,16 +264,14 @@ AC_SUBST(BZ_LIB)
AM_CONDITIONAL([USE_MOD_DEFLATE], [test "x$use_mod_deflate" = "xyes"])
save_LIBS=$LIBS
LIBS=
AC_SEARCH_LIBS(crypt_r,crypt,[
AC_DEFINE([HAVE_CRYPT_R], [1], [crypt_r])
AC_CHECK_HEADERS([crypt.h],[
AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
])
AC_DEFINE([HAVE_LIBCRYPT], [1], [libcrypt])
if test "$ac_cv_search_crypt" != no; then
test "$ac_cv_search_crypt" = "none required" || CRYPT_LIB="$ac_cv_search_crypt"
fi
CRYPT_LIB=$LIBS
])
LIBS=$save_LIBS
AC_SUBST(CRYPT_LIB)

3
src/angel/Makefile.am

@ -22,7 +22,8 @@ EXTRA_DIST=angel_config_parser.rl
liblighttpd_sharedangel_la_SOURCES=$(lighttpd_angel_shared_src)
liblighttpd_sharedangel_la_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS)
liblighttpd_sharedangel_la_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)
liblighttpd_sharedangel_la_LDFLAGS=-release $(PACKAGE_VERSION) -export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)
liblighttpd_sharedangel_la_LIBADD=../common/liblighttpd-common.la
lighttpd_angel_SOURCES=angel_main.c

2
src/common/Makefile.am

@ -26,4 +26,4 @@ EXTRA_DIST=ip_parsers.rl
liblighttpd_common_la_SOURCES=$(common_src)
liblighttpd_common_la_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS)
liblighttpd_common_la_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)
liblighttpd_common_la_LDFLAGS=-release $(PACKAGE_VERSION) -export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)

3
src/main/Makefile.am

@ -83,7 +83,8 @@ EXTRA_DIST=config_parser.rl http_range_parser.rl http_request_parser.rl http_re
liblighttpd_shared_la_SOURCES=$(lighttpd_shared_src)
liblighttpd_shared_la_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS)
liblighttpd_shared_la_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)
liblighttpd_shared_la_LDFLAGS=-release $(PACKAGE_VERSION) -export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
liblighttpd_shared_la_LIBADD=../common/liblighttpd-common.la
lighttpd_SOURCES=lighttpd.c

8
src/modules/Makefile.am

@ -1,8 +1,8 @@
install_libs =
common_cflags = -I$(top_srcdir)/include -I$(top_builddir)/include
common_cflags += $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) $(OPENSSL_CFLAGS)
common_libs = $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
common_cflags += $(GTHREAD_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) $(OPENSSL_CFLAGS)
common_libs = $(GTHREAD_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
common_ldflags = -module -export-dynamic -avoid-version -no-undefined $(common_libs)
common_libadd = ../common/liblighttpd-common.la ../main/liblighttpd-shared.la
@ -20,8 +20,8 @@ libmod_accesslog_la_LIBADD = $(common_libadd)
install_libs += libmod_auth.la
libmod_auth_la_SOURCES = mod_auth.c
libmod_auth_la_LDFLAGS = $(common_ldflags)
libmod_auth_la_LIBADD = $(CRYPT_LIB) $(common_libadd)
libmod_auth_la_LDFLAGS = $(common_ldflags) $(CRYPT_LIB)
libmod_auth_la_LIBADD = $(common_libadd)
install_libs += libmod_balancer.la
libmod_balancer_la_SOURCES = mod_balancer.c

Loading…
Cancel
Save