aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-12-04 15:48:19 +0000
committerMatthew Wild <mwild1@gmail.com>2008-12-04 15:48:19 +0000
commit3ba7342f583a1b9a5c1d5d05c5febd2358e81435 (patch)
tree61da7b9bff8f644f7a6544939b9bebc23cc48308
parent2d2414f199a416409e84a3ef9c38a84ea0ba825b (diff)
parent5be02b66a8df3465a3c2c9dfe485c460b78389ab (diff)
downloadprosody-3ba7342f583a1b9a5c1d5d05c5febd2358e81435.tar.gz
prosody-3ba7342f583a1b9a5c1d5d05c5febd2358e81435.zip
Automated merge with http://waqas.ath.cx/
-rwxr-xr-xconfigure7
-rw-r--r--util-src/Makefile15
2 files changed, 15 insertions, 7 deletions
diff --git a/configure b/configure
index a647d910..8eb7b367 100755
--- a/configure
+++ b/configure
@@ -13,7 +13,8 @@ LUA_LIBDIR="/usr/lib"
IDN_LIB=idn
OPENSSL_LIB=crypto
-CFLAGS="-shared -fPIC"
+CFLAGS="-fPIC"
+LFLAGS="-shared"
# Help
@@ -125,7 +126,8 @@ then
LUA_INCDIR_SET=yes
LUA_LIBDIR=/usr/local/lib
LUA_LIBDIR_SET=yes
- CFLAGS="-bundle -Wl,-undefined,dynamic_lookup"
+ CFLAGS=""
+ LFLAGS="-bundle -undefined dynamic_lookup"
fi
fi
@@ -276,6 +278,7 @@ REQUIRE_CONFIG=$REQUIRE_CONFIG
IDN_LIB=$IDN_LIB
OPENSSL_LIB=$OPENSSL_LIB
CFLAGS=$CFLAGS
+LFLAGS=$LFLAGS
EOF
diff --git a/util-src/Makefile b/util-src/Makefile
index fdb689dd..4aedec40 100644
--- a/util-src/Makefile
+++ b/util-src/Makefile
@@ -12,16 +12,21 @@ OPENSSL_LIB?=crypto
all: encodings.so hashes.so
install: encodings.so hashes.so
- install -s *.so ../util/
+ install *.so ../util/
clean:
rm -f *.so
rm -f ../util/*.so
-encodings.so: encodings.c
- gcc $(CFLAGS) encodings.c -I$(LUA_INCDIR) -l$(LUA_LIB) -l$(IDN_LIB) -o encodings.so
+encodings.o: encodings.c
+ gcc $(CFLAGS) -I$(LUA_INCDIR) -c -o encodings.o encodings.c
+encodings.so: encodings.o
+ export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc $(LFLAGS) -o encodings.so encodings.o -L/usr/local/lib -llua$(LUA_SUFFIX) -lcrypto -lidn
+
-hashes.so: hashes.c
- gcc $(CFLAGS) hashes.c -I$(LUA_INCDIR) -l$(LUA_LIB) -l$(OPENSSL_LIB) -o hashes.so
+hashes.o: hashes.c
+ gcc $(CFLAGS) -I$(LUA_INCDIR) -c -o hashes.o hashes.c
+hashes.so: hashes.o
+ export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc $(LFLAGS) -o hashes.so hashes.o -L/usr/local/lib -llua$(LUA_SUFFIX) -lcrypto -lssl