Comparison

configure @ 511:f9ab28562fda

Potential fixes for building on Mac OSX
author Matthew Wild <mwild1@gmail.com>
date Sun, 30 Nov 2008 19:02:00 +0000
parent 502:21dc299387a6
child 515:5bc65a944ed5
comparison
equal deleted inserted replaced
510:62c91dc9f9f3 511:f9ab28562fda
11 LUA_INCDIR="/usr/include" 11 LUA_INCDIR="/usr/include"
12 LUA_LIBDIR="/usr/lib" 12 LUA_LIBDIR="/usr/lib"
13 IDN_LIB=idn 13 IDN_LIB=idn
14 OPENSSL_LIB=crypto 14 OPENSSL_LIB=crypto
15 15
16 CFLAGS="-shared -fPIC"
17
16 # Help 18 # Help
17 19
18 show_help() { 20 show_help() {
19 cat <<EOF 21 cat <<EOF
20 Configure Prosody prior to building. 22 Configure Prosody prior to building.
21 23
22 --help This help. 24 --help This help.
25 --ostype=OS Use one of the OS presets.
26 May be one of: debian, macosx
23 --prefix=DIR Prefix where Prosody should be installed. 27 --prefix=DIR Prefix where Prosody should be installed.
24 Default is $PREFIX 28 Default is $PREFIX
25 --sysconfdir=DIR Location where the config file should be installed. 29 --sysconfdir=DIR Location where the config file should be installed.
26 Default is \$PREFIX/etc/prosody 30 Default is \$PREFIX/etc/prosody
27 --datadir=DIR Location where the server data should be stored. 31 --datadir=DIR Location where the server data should be stored.
36 Default is \$LUA_DIR/lib 40 Default is \$LUA_DIR/lib
37 --with-idn=LIB The name of the IDN library to link with. 41 --with-idn=LIB The name of the IDN library to link with.
38 Default is $IDN_LIB 42 Default is $IDN_LIB
39 --with-ssl=LIB The name of the SSL to link with. 43 --with-ssl=LIB The name of the SSL to link with.
40 Default is $OPENSSL_LIB 44 Default is $OPENSSL_LIB
41 --require-config Will cause Prosody to refuse to run when 45 --cflags=FLAGS Flags to pass to the compiler
46 Default is $CFLAGS
47 --require-config Will cause Prosody to refuse to run when
42 it fails to find a configuration file 48 it fails to find a configuration file
43 EOF 49 EOF
44 } 50 }
45 51
46 52
61 ;; 67 ;;
62 --prefix=*) 68 --prefix=*)
63 PREFIX="$value" 69 PREFIX="$value"
64 PREFIX_SET=yes 70 PREFIX_SET=yes
65 ;; 71 ;;
72 --ostype=*)
73 OSTYPE="$value"
74 OSTYPE_SET=yes
75 ;;
66 --data-dir=*) 76 --data-dir=*)
67 DATADIR="$value" 77 DATADIR="$value"
68 DATADIR_SET=yes 78 DATADIR_SET=yes
69 ;; 79 ;;
70 --require-config) 80 --require-config)
89 IDN_LIB="$value" 99 IDN_LIB="$value"
90 ;; 100 ;;
91 --with-ssl=*) 101 --with-ssl=*)
92 OPENSSL_LIB="$value" 102 OPENSSL_LIB="$value"
93 ;; 103 ;;
104 --cflags=*)
105 CFLAGS="$value"
106 ;;
94 *) 107 *)
95 echo "Error: Unknown flag: $1" 108 echo "Error: Unknown flag: $1"
96 exit 1 109 exit 1
97 ;; 110 ;;
98 esac 111 esac
99 shift 112 shift
100 done 113 done
114
115 if [ "$OSTYPE_SET" = "yes" ]
116 then
117 if [ "$OSTYPE" = "debian" ]
118 then LUA_SUFFIX="5.1";
119 LUA_INCDIR=/usr/include/lua5.1;
120 fi
121 if [ "$OSTYPE" = "macosx" ]
122 then LUA_INCDIR=/usr/local/include;
123 LUA_LIBDIR=/usr/local/lib
124 CFLAGS="-bundle -Wl,-undefined,dynamic_lookup"
125 fi
126 fi
101 127
102 if [ "$PREFIX_SET" = "yes" -a ! "$SYSCONFDIR_SET" = "yes" ] 128 if [ "$PREFIX_SET" = "yes" -a ! "$SYSCONFDIR_SET" = "yes" ]
103 then 129 then
104 if [ "$PREFIX" = "/usr" ] 130 if [ "$PREFIX" = "/usr" ]
105 then SYSCONFDIR=/etc/prosody 131 then SYSCONFDIR=/etc/prosody
243 LUA_LIBDIR=$LUA_LIBDIR 269 LUA_LIBDIR=$LUA_LIBDIR
244 LUA_BINDIR=$LUA_BINDIR 270 LUA_BINDIR=$LUA_BINDIR
245 REQUIRE_CONFIG=$REQUIRE_CONFIG 271 REQUIRE_CONFIG=$REQUIRE_CONFIG
246 IDN_LIB=$IDN_LIB 272 IDN_LIB=$IDN_LIB
247 OPENSSL_LIB=$OPENSSL_LIB 273 OPENSSL_LIB=$OPENSSL_LIB
274 CFLAGS=$CFLAGS
248 275
249 EOF 276 EOF
250 277
251 echo "Installation prefix: $PREFIX" 278 echo "Installation prefix: $PREFIX"
252 echo "Prosody configuration directory: $SYSCONFDIR" 279 echo "Prosody configuration directory: $SYSCONFDIR"