configure.ac

changeset 11579
1ff537bd2e92
parent 11465
e26f4485cf53
child 11645
6673807e1630
equal deleted inserted replaced
11578:70230c5dded2 11579:1ff537bd2e92
99 99
100 dnl to prevent the g_stat()/g_unlink() crash, 100 dnl to prevent the g_stat()/g_unlink() crash,
101 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac 101 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
102 AC_SYS_LARGEFILE 102 AC_SYS_LARGEFILE
103 103
104 dnl Check for SILC client includes and libraries 104
105 AC_ARG_WITH(silc-includes, [ --with-silc-includes=DIR 105
106 Compile the SILC plugin against includes in DIR ], [ac_silc_includes="$withval"], [ac_silc_includes="no"]) 106 dnl #######################################################################
107 AC_ARG_WITH(silc-libs, [ --with-silc-libs=DIR Compile the SILC plugin against the SILC libs in DIR], [ac_silc_libs="$withval"], [ac_silc_libs="no"]) 107 dnl # Check for Howl headers (for Bonjour)
108 dnl #######################################################################
109 AC_ARG_WITH(howl-includes, [AC_HELP_STRING([--with-howl-includes=DIR], [Compile the Bonjour plugin against the Howl includes in DIR])], [ac_howl_includes="$withval"], [ac_howl_includes="no"])
110 AC_ARG_WITH(howl-libs, [AC_HELP_STRING([--with-howl-libs=DIR], [Compile the Bonjour plugin against the Howl libs in DIR])], [ac_howl_libs="$withval"], [ac_howl_libs="no"])
111 HOWL_CFLAGS=""
112 HOWL_LIBS=""
113
114 dnl Attempt to autodetect Howl
115 PKG_CHECK_MODULES(HOWL, howl,
116 [howlincludes="yes" howllibs="yes"],
117 [howlincludes="no" howllibs="no"])
118
119 dnl Override HOWL_CFLAGS if the user specified an include dir
120 if test "$ac_howl_includes" != "no"; then
121 HOWL_CFLAGS="-I$ac_howl_includes"
122 fi
123 CPPFLAGS_save="$CPPFLAGS"
124 CPPFLAGS="$CPPFLAGS $HOWL_CFLAGS"
125 AC_CHECK_HEADER(howl.h, [howlincludes=yes], [howlincludes=no])
126 CPPFLAGS="$CPPFLAGS_save"
127
128 dnl Override HOWL_LIBS if the user specified a libs dir
129 if test "$ac_howl_libs" != "no"; then
130 HOWL_LIBS="-L$ac_howl_libs"
131 fi
132 AC_CHECK_LIB(howl, sw_discovery_init, [howllibs=yes], [howllibs=no], $HOWL_LIBS)
133
134 AC_SUBST(HOWL_CFLAGS)
135 AC_SUBST(HOWL_LIBS)
136
137
138
139 dnl #######################################################################
140 dnl # Check for SILC client includes and libraries
141 dnl #######################################################################
142 AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [Compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
143 AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [Compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
108 SILC_CFLAGS="" 144 SILC_CFLAGS=""
109 SILC_LIBS="" 145 SILC_LIBS=""
110 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then 146 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
111 silc_manual_check="yes" 147 silc_manual_check="yes"
112 else 148 else
142 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS) 178 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
143 fi 179 fi
144 AC_SUBST(SILC_LIBS) 180 AC_SUBST(SILC_LIBS)
145 AC_SUBST(SILC_CFLAGS) 181 AC_SUBST(SILC_CFLAGS)
146 182
183
184
147 AC_ARG_ENABLE(distrib,,,enable_distrib=no) 185 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
148 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") 186 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
149 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) 187 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes)
150 DYNAMIC_PRPLS=all 188 DYNAMIC_PRPLS=all
151 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="") 189 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="")
152 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then 190 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
153 DYNAMIC_PRPLS="" 191 DYNAMIC_PRPLS=""
154 fi 192 fi
155 193
156 if test "x$STATIC_PRPLS" = "xall" ; then 194 if test "x$STATIC_PRPLS" = "xall" ; then
157 STATIC_PRPLS="gg irc jabber msn napster novell oscar sametime silc yahoo zephyr" 195 STATIC_PRPLS="bonjour gg irc jabber msn napster novell oscar sametime silc yahoo zephyr"
196 fi
197 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
198 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
158 fi 199 fi
159 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 200 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
160 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` 201 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
161 fi 202 fi
162 AC_SUBST(STATIC_PRPLS) 203 AC_SUBST(STATIC_PRPLS)
166 for i in $STATIC_PRPLS ; do 207 for i in $STATIC_PRPLS ; do
167 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" 208 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a"
168 extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();" 209 extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();"
169 load_proto="$load_proto gaim_init_${i}_plugin();" 210 load_proto="$load_proto gaim_init_${i}_plugin();"
170 case $i in 211 case $i in
212 bonjour) static_bonjour=yes ;;
171 gg) static_gg=yes ;; 213 gg) static_gg=yes ;;
172 irc) static_irc=yes ;; 214 irc) static_irc=yes ;;
173 jabber) static_jabber=yes ;; 215 jabber) static_jabber=yes ;;
174 msn) static_msn=yes ;; 216 msn) static_msn=yes ;;
175 napster) static_napster=yes ;; 217 napster) static_napster=yes ;;
183 yahoo) static_yahoo=yes ;; 225 yahoo) static_yahoo=yes ;;
184 zephyr) static_zephyr=yes ;; 226 zephyr) static_zephyr=yes ;;
185 *) echo "Invalid static protocol $i!!" ; exit ;; 227 *) echo "Invalid static protocol $i!!" ; exit ;;
186 esac 228 esac
187 done 229 done
230 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes" -a "x$howlincludes" = "xyes" -a "x$howllibs" = "xyes")
188 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes") 231 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
189 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes") 232 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
190 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes") 233 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
191 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") 234 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
192 AM_CONDITIONAL(STATIC_NAPSTER, test "x$static_napster" = "xyes") 235 AM_CONDITIONAL(STATIC_NAPSTER, test "x$static_napster" = "xyes")
201 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") 244 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
202 AC_SUBST(STATIC_LINK_LIBS) 245 AC_SUBST(STATIC_LINK_LIBS)
203 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto }, 246 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto },
204 [Loads static protocol plugin module initialization functions.]) 247 [Loads static protocol plugin module initialization functions.])
205 248
206 AC_ARG_WITH(dynamic_prpls, [ --with-dynamic-prpls specify which protocols to build dynamically],[DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) 249 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
207 if test "x$DYNAMIC_PRPLS" = "xall" ; then 250 if test "x$DYNAMIC_PRPLS" = "xall" ; then
208 DYNAMIC_PRPLS="gg irc jabber msn napster novell oscar sametime silc yahoo zephyr" 251 DYNAMIC_PRPLS="bonjour gg irc jabber msn napster novell oscar sametime silc yahoo zephyr"
252 fi
253 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
254 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
209 fi 255 fi
210 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 256 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
211 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` 257 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
212 fi 258 fi
213 AC_SUBST(DYNAMIC_PRPLS) 259 AC_SUBST(DYNAMIC_PRPLS)
214 for i in $DYNAMIC_PRPLS ; do 260 for i in $DYNAMIC_PRPLS ; do
215 case $i in 261 case $i in
262 bonjour) dynamic_bonjour=yes ;;
216 gg) dynamic_gg=yes ;; 263 gg) dynamic_gg=yes ;;
217 irc) dynamic_irc=yes ;; 264 irc) dynamic_irc=yes ;;
218 jabber) dynamic_jabber=yes ;; 265 jabber) dynamic_jabber=yes ;;
219 msn) dynamic_msn=yes ;; 266 msn) dynamic_msn=yes ;;
220 napster) dynamic_napster=yes ;; 267 napster) dynamic_napster=yes ;;
228 yahoo) dynamic_yahoo=yes ;; 275 yahoo) dynamic_yahoo=yes ;;
229 zephyr) dynamic_zephyr=yes ;; 276 zephyr) dynamic_zephyr=yes ;;
230 *) echo "Invalid dynamic protocol $i!!" ; exit ;; 277 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
231 esac 278 esac
232 done 279 done
280 AM_CONDITIONAL(DYNAMIC_BONJOUR, test "x$dynamic_bonjour" = "xyes" -a "x$bonjourincludes" = "xyes" -a "x$bonjourclient" = "xyes")
233 AM_CONDITIONAL(DYNAMIC_GG, test "x$dynamic_gg" = "xyes") 281 AM_CONDITIONAL(DYNAMIC_GG, test "x$dynamic_gg" = "xyes")
234 AM_CONDITIONAL(DYNAMIC_IRC, test "x$dynamic_irc" = "xyes") 282 AM_CONDITIONAL(DYNAMIC_IRC, test "x$dynamic_irc" = "xyes")
235 AM_CONDITIONAL(DYNAMIC_JABBER, test "x$dynamic_jabber" = "xyes") 283 AM_CONDITIONAL(DYNAMIC_JABBER, test "x$dynamic_jabber" = "xyes")
236 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes") 284 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
237 AM_CONDITIONAL(DYNAMIC_NAPSTER, test "x$dynamic_napster" = "xyes") 285 AM_CONDITIONAL(DYNAMIC_NAPSTER, test "x$dynamic_napster" = "xyes")
1176 else 1224 else
1177 AM_CONDITIONAL(PRPLS, false) 1225 AM_CONDITIONAL(PRPLS, false)
1178 enable_prpls=no 1226 enable_prpls=no
1179 fi 1227 fi
1180 1228
1181 dnl checks for icqlib 1229 dnl checks for icqlib--do we still need these?
1182 AC_CHECK_HEADERS(asm/byteorder.h byteswap.h endian.h machine/endian.h arpa/nameser_compat.h) 1230 AC_CHECK_HEADERS(asm/byteorder.h byteswap.h endian.h machine/endian.h arpa/nameser_compat.h)
1183 AC_CHECK_FUNCS(bswap_32 bswap_16) 1231 AC_CHECK_FUNCS(bswap_32 bswap_16)
1184 AC_C_BIGENDIAN 1232 AC_C_BIGENDIAN
1185 1233
1186 dnl checks for jabber 1234 dnl checks for jabber
1339 plugins/ticker/Makefile 1387 plugins/ticker/Makefile
1340 po/Makefile.in 1388 po/Makefile.in
1341 sounds/Makefile 1389 sounds/Makefile
1342 src/Makefile 1390 src/Makefile
1343 src/protocols/Makefile 1391 src/protocols/Makefile
1392 src/protocols/bonjour/Makefile
1344 src/protocols/gg/Makefile 1393 src/protocols/gg/Makefile
1345 src/protocols/irc/Makefile 1394 src/protocols/irc/Makefile
1346 src/protocols/jabber/Makefile 1395 src/protocols/jabber/Makefile
1347 src/protocols/msn/Makefile 1396 src/protocols/msn/Makefile
1348 src/protocols/napster/Makefile 1397 src/protocols/napster/Makefile

mercurial