"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."
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