Mercurial > pidgin
comparison configure.ac @ 7200:2ddd145c9420
[gaim-migrate @ 7769]
Added additional checks and fixes for the perl build process.
ExtUtils::MakeMaker is now required to build perl. If they don't have it,
perl just won't attempt to build, which is better than failing during
compile.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 09 Oct 2003 00:16:45 +0000 |
parents | 282887c9e3dc |
children | 43b76be7796a |
comparison
equal
deleted
inserted
replaced
7199:aeaa751d32f7 | 7200:2ddd145c9420 |
---|---|
281 LIBS="$oldLIBS" | 281 LIBS="$oldLIBS" |
282 fi | 282 fi |
283 fi | 283 fi |
284 | 284 |
285 if test "$enable_perl" = yes ; then | 285 if test "$enable_perl" = yes ; then |
286 AC_SUBST(PERL_CFLAGS) | 286 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no) |
287 AC_SUBST(PERL_LIBS) | 287 |
288 AM_CONDITIONAL(USE_PERL, test "x$enable_perl" = "xyes") | 288 if test "x$have_makemaker" = "xno"; then |
289 | 289 enable_perl=no |
290 dnl This is almost definitely wrong, but in case there's | 290 PERL_CFLAGS= |
291 dnl something I'm missing, I'll leave it in. | 291 PERL_LIBS= |
292 AC_CHECK_FUNCS(Perl_eval_pv) | 292 AM_CONDITIONAL(USE_PERL, false) |
293 | 293 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker) |
294 AC_MSG_CHECKING(for old perl) | |
295 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'` | |
296 | |
297 if test "$PERL_OLD" = "yes"; then | |
298 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.]) | |
299 AC_MSG_RESULT(yes) | |
300 else | 294 else |
301 AC_MSG_RESULT(no) | 295 AC_SUBST(PERL_CFLAGS) |
302 fi | 296 AC_SUBST(PERL_LIBS) |
303 | 297 AM_CONDITIONAL(USE_PERL, test "x$enable_perl" = "xyes") |
304 if test "x$prefix" != "xNONE"; then | 298 |
305 prefix=`eval echo $prefix` | 299 dnl This is almost definitely wrong, but in case there's |
306 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix" | 300 dnl something I'm missing, I'll leave it in. |
307 fi | 301 AC_CHECK_FUNCS(Perl_eval_pv) |
308 | 302 |
309 AC_ARG_WITH(perl-lib, | 303 AC_MSG_CHECKING(for old perl) |
310 [ --with-perl-lib=[site|vendor|DIR] Specify where to install the | 304 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'` |
311 Perl libraries for gaim. Default is site.], | 305 |
312 [ | 306 if test "x$PERL_OLD" = "xyes"; then |
313 if test "x$withval" = xsite; then | 307 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.]) |
314 PERL_MM_PARAMS="" | 308 AC_MSG_RESULT(yes) |
315 elif test "x$withval" = xvendor; then | 309 else |
316 if test -z "`$perlpath -v | grep '5\.0'`"; then | 310 AC_MSG_RESULT(no) |
317 PERL_MM_PARAMS="INSTALLDIRS=vendor" | 311 fi |
312 | |
313 if test "x$prefix" != "xNONE"; then | |
314 prefix=`eval echo $prefix` | |
315 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix" | |
316 fi | |
317 | |
318 AC_ARG_WITH(perl-lib, | |
319 [ --with-perl-lib=[site|vendor|DIR] Specify where to install the | |
320 Perl libraries for gaim. Default is site.], | |
321 [ | |
322 if test "x$withval" = xsite; then | |
323 PERL_MM_PARAMS="" | |
324 elif test "x$withval" = xvendor; then | |
325 if test -z "`$perlpath -v | grep '5\.0'`"; then | |
326 PERL_MM_PARAMS="INSTALLDIRS=vendor" | |
327 else | |
328 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`" | |
329 fi | |
318 else | 330 else |
319 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`" | 331 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval" |
320 fi | 332 fi |
333 ]) | |
334 | |
335 AC_SUBST(PERL_MM_PARAMS) | |
336 | |
337 AC_MSG_CHECKING(for DynaLoader.a) | |
338 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'` | |
339 | |
340 dnl Don't check libperl.a if dynaloader.a wasn't found. | |
341 if test -n "$DYNALOADER_A"; then | |
342 AC_MSG_RESULT(yes) | |
343 | |
344 dnl Find either libperl.a or libperl.so | |
345 AC_MSG_CHECKING(for libperl.a or libperl.so) | |
346 LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'` | |
347 if test -z "$LIBPERL_A"; then | |
348 AC_MSG_RESULT(no) | |
349 DYNALOADER_A= | |
350 else | |
351 AC_MSG_RESULT(yes) | |
352 | |
353 if test "$LIBPERL_A" = "-lperl"; then | |
354 LIBPERL_A= | |
355 fi | |
356 fi | |
357 | |
358 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'` | |
359 | |
360 if test -n "$LIBPERL_A"; then | |
361 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'` | |
362 fi | |
363 | |
364 AC_SUBST(DYNALOADER_A) | |
365 AC_SUBST(LIBPERL_A) | |
321 else | 366 else |
322 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval" | |
323 fi | |
324 ]) | |
325 | |
326 AC_SUBST(PERL_MM_PARAMS) | |
327 | |
328 AC_MSG_CHECKING(for DynaLoader.a) | |
329 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'` | |
330 | |
331 dnl Don't check libperl.a if dynaloader.a wasn't found. | |
332 if test -n "$DYNALOADER_A"; then | |
333 AC_MSG_RESULT(yes) | |
334 | |
335 dnl Find either libperl.a or libperl.so | |
336 AC_MSG_CHECKING(for libperl.a or libperl.so) | |
337 LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'` | |
338 if test -z "$LIBPERL_A"; then | |
339 AC_MSG_RESULT(no) | 367 AC_MSG_RESULT(no) |
340 DYNALOADER_A= | 368 fi |
341 else | |
342 AC_MSG_RESULT(yes) | |
343 | |
344 if test "$LIBPERL_A" = "-lperl"; then | |
345 LIBPERL_A= | |
346 fi | |
347 fi | |
348 | |
349 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'` | |
350 | |
351 if test -n "$LIBPERL_A"; then | |
352 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'` | |
353 fi | |
354 | |
355 AC_SUBST(DYNALOADER_A) | |
356 AC_SUBST(LIBPERL_A) | |
357 else | |
358 AC_MSG_RESULT(no) | |
359 fi | 369 fi |
360 else | 370 else |
361 PERL_CFLAGS= | 371 PERL_CFLAGS= |
362 PERL_LIBS= | 372 PERL_LIBS= |
363 AM_CONDITIONAL(USE_PERL, false) | 373 AM_CONDITIONAL(USE_PERL, false) |