Diff

configure @ 798:2a92b58144a9

Use $CC, $LD in Makefile. Add --c-compiler, --linker flags to ./configure script. Add --lflags to ./configure script. Thanks to Lorenzo for the initial patch!
author Matthew Wild <mwild1@gmail.com>
date Sat, 14 Feb 2009 15:38:37 +0000
parent 536:dfe06eab47c0
child 802:33c012048492
line wrap: on
line diff
--- a/configure	Fri Feb 13 16:43:44 2009 +0000
+++ b/configure	Sat Feb 14 15:38:37 2009 +0000
@@ -12,6 +12,8 @@
 LUA_LIBDIR="/usr/lib"
 IDN_LIB=idn
 OPENSSL_LIB=crypto
+CC=gcc
+LD=gcc
 
 CFLAGS="-fPIC"
 LFLAGS="-shared"
@@ -45,6 +47,12 @@
                             Default is $OPENSSL_LIB
 --cflags=FLAGS              Flags to pass to the compiler
                             Default is $CFLAGS
+--lflags=FLAGS              Flags to pass to the linker
+                            Default is $LFLAGS
+--c-compiler=CC             The C compiler to use when building modules.
+                            Default is $CC
+--linker=CC                 The linker to use when building modules.
+                            Default is $LD
 --require-config            Will cause Prosody to refuse to run when
                             it fails to find a configuration file
 EOF
@@ -105,6 +113,12 @@
    --cflags=*)
       CFLAGS="$value"
       ;;      
+   --c-compiler=*)
+      CC="$value"
+      ;;      
+   --linker=*)
+      LD="$value"
+      ;;      
    *)
       echo "Error: Unknown flag: $1"
       exit 1
@@ -279,6 +293,8 @@
 OPENSSL_LIB=$OPENSSL_LIB
 CFLAGS=$CFLAGS
 LFLAGS=$LFLAGS
+CC=$CC
+LD=$LD
 
 EOF