Commit b9984fb4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the C-compiler invocation determination to autoconf.

(Fixed the apple & gnu compiler strings relative to submitted patch)

Submitted by:	Theo Schlossnagle



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3073 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ca7d4b5f
......@@ -705,13 +705,7 @@ static const struct parspec parspec[] = {
"the string will be replaced with the source file name, "
"and %o will be replaced with the output file name.",
MUST_RELOAD,
#ifdef __APPLE__
"exec cc -dynamiclib -Wl,-undefined,dynamic_lookup -o %o %s"
#elif defined(__SOLARIS__)
"exec cc -shared -fpic -c %o %s"
#else /* default: GCC on Linux & FreeBSD */
"exec cc -fpic -shared -Wl,-x -o %o %s"
#endif
VCC_CC
, NULL },
{ "max_restarts", tweak_uint, &master.max_restarts, 0, UINT_MAX,
"Upper limit on how many times a request can restart."
......
......@@ -305,6 +305,23 @@ AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
CFLAGS="${CFLAGS} -Werror")
# Command line for compiling VCL code. I wish there were a simple way
# to figure this out dynamically without introducing a run-time
# dependency on libtool.
case $host in
*-*-solaris*)
VCC_CC="cc -Kpic ${CFLAGS} -G -o %o %s"
;;
*-*-darwin*)
VCC_CC="exec cc -dynamiclib -Wl,-undefined,dynamic_lookup -o %o %s"
;;
*)
VCC_CC="exec cc -fpic -shared -Wl,-x -o %o %s"
;;
esac
AC_DEFINE_UNQUOTED([VCC_CC],"$VCC_CC",[C compiler command line for VCL code])
# Generate output
AC_CONFIG_FILES([
Makefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment