~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
AC_PREREQ(2.58)
5
5
 
 
6
AC_ARG_WITH(baseruby,
 
7
        [  --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby],
 
8
        [
 
9
                case "$withval" in
 
10
                *ruby*)
 
11
                        BASERUBY=$withval
 
12
                        ;;
 
13
                *)
 
14
                        AC_MSG_ERROR(need ruby)
 
15
                        ;;
 
16
                esac
 
17
        ],
 
18
        [
 
19
                BASERUBY="ruby"
 
20
        ])
 
21
test "`$BASERUBY -e 'p 42' 2>/dev/null`" = 42 ||
 
22
    AC_MSG_ERROR([executable host ruby is required.  use --with-baseruby option.])
 
23
AC_SUBST(BASERUBY)
 
24
 
6
25
AC_DEFUN([RUBY_MINGW32],
7
26
[case "$host_os" in
8
27
cygwin*)
216
235
AC_SUBST(RM, ['rm -f'])
217
236
AC_SUBST(CP, ['cp'])
218
237
if $as_mkdir_p; then
219
 
  AC_SUBST(MAKEDIRS, ['mkdir -p'])
 
238
  MAKEDIRS='mkdir -p'
220
239
else
221
 
  AC_SUBST(MAKEDIRS, ['install -d'])
 
240
  MAKEDIRS='install -d'
222
241
fi
 
242
AC_SUBST(MAKEDIRS)
223
243
 
224
244
dnl check for large file stuff
225
245
AC_SYS_LARGEFILE
355
375
RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE)
356
376
RUBY_FUNC_ATTRIBUTE(stdcall)
357
377
RUBY_FUNC_ATTRIBUTE(cdecl)
 
378
RUBY_FUNC_ATTRIBUTE(fastcall)
358
379
 
359
380
AC_CACHE_CHECK([for RUBY_EXTERN], rb_cv_ruby_extern,
360
381
[rb_cv_ruby_extern=no
484
505
                ;;
485
506
superux*)     ac_cv_func_setitimer=no
486
507
              ;;
487
 
solaris*2.10)  if test -z "$GCC"; then
488
 
                      ac_cv_func_isinf=yes
 
508
solaris*2.1*) if test -z "$GCC"; then
 
509
                   ac_cv_func_isinf=yes
489
510
              fi
490
 
               LIBS="-lm $LIBS"
 
511
              LIBS="-lm $LIBS"
491
512
              ;;
492
513
*) LIBS="-lm $LIBS";;
493
514
esac
573
594
              setitimer setruid seteuid setreuid setresuid setproctitle socketpair\
574
595
              setrgid setegid setregid setresgid issetugid pause lchown lchmod\
575
596
              getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
576
 
              getpriority getrlimit setrlimit sysconf\
 
597
              getpriority getrlimit setrlimit sysconf group_member\
577
598
              dlopen sigprocmask sigaction _setjmp vsnprintf snprintf\
578
599
              setsid telldir seekdir fchmod mktime timegm cosh sinh tanh log2\
579
600
              setuid setgid daemon select_large_fdset setenv unsetenv)
871
892
 
872
893
AC_CHECK_FUNCS(backtrace)
873
894
 
 
895
AC_ARG_WITH(valgrind,
 
896
        [  --with-valgrind         enable valgrind memcheck support.],
 
897
        [AC_CHECK_HEADERS(valgrind/memcheck.h)])
 
898
 
874
899
dnl default value for $KANJI
875
900
DEFAULT_KCODE="KCODE_NONE"
876
901
 
1036
1061
        aix*)           if test "$GCC" = yes; then
1037
1062
                            : ${LDSHARED='$(CC) -shared'}
1038
1063
                        else
1039
 
                            : ${LDSHARED='/usr/ccs/bin/ld'}
 
1064
                            : ${LDSHARED='$(CC)'}
1040
1065
                        fi
1041
 
                        DLDFLAGS="${linker_flag}-G"' -eInit_$(TARGET)'
1042
 
                        LDFLAGS="${LDFLAGS} ${linker_flag}-brtl"
1043
 
                        XLDFLAGS="${linker_flag}-bE:ruby.imp"
 
1066
                        LDSHARED="$LDSHARED ${linker_flag}-G"
 
1067
                        DLDFLAGS='-eInit_$(TARGET)'
 
1068
                        XLDFLAGS="${linker_flag}-bE:ruby.imp ${linker_flag}-brtl"
1044
1069
                        : ${ARCHFILE="ruby.imp"}
1045
1070
                        TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
1046
1071
                        TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
1271
1296
AC_SUBST(MINIRUBY)
1272
1297
AC_SUBST(PREP)
1273
1298
AC_SUBST(RUNRUBY)
1274
 
AC_SUBST(EXTOUT, [${EXTOUT-.ext}])
 
1299
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
1275
1300
 
1276
1301
FIRSTMAKEFILE=""
1277
1302
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
1353
1378
        LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).sl'
1354
1379
        ;;
1355
1380
    aix*)
1356
 
        LIBRUBY_DLDFLAGS="${linker_flag}-G ${linker_flag}-bnoentry $XLDFLAGS"
 
1381
        LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS"
1357
1382
        LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
1358
1383
        SOLIBS='-lm -lc'
1359
1384
        ;;
1378
1403
  esac
1379
1404
fi
1380
1405
if test "$enable_rpath" = yes; then
1381
 
    LIBRUBYARG_SHARED="${linker_flag}-R ${linker_flag}\$(libdir) -L. -L\$(libdir) $LIBRUBYARG_SHARED"
 
1406
    LIBRUBYARG_SHARED="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir) $LIBRUBYARG_SHARED"
1382
1407
fi
1383
1408
 
1384
1409
LDFLAGS="-L. $LDFLAGS"
1398
1423
    THREAD_MODEL=pthread
1399
1424
fi
1400
1425
case "$target_os" in
 
1426
    linux*)
 
1427
        XCFLAGS="$XCFLAGS -D_GNU_SOURCE=1"
 
1428
        ;;
1401
1429
    netbsd*)
1402
1430
        CFLAGS="$CFLAGS -pipe"
1403
1431
        ;;
1417
1445
        ;;
1418
1446
    darwin*)
1419
1447
        CFLAGS="$CFLAGS -pipe -fno-common"
 
1448
        MINIOBJS=dmydln.o
1420
1449
        ;;
1421
1450
    os2-emx)
1422
1451
        CFLAGS="$CFLAGS -DOS2 -Zmts"
1439
1468
          rm -f /tmp/main.o
1440
1469
          CFLAGS="$CFLAGS -std"
1441
1470
        fi
1442
 
                ;;
 
1471
        ;;
1443
1472
    beos*)
1444
1473
        case "$target_cpu" in
1445
1474
        powerpc*)
1607
1636
    AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path")
1608
1637
fi
1609
1638
 
 
1639
AC_ARG_WITH(rubyhdrdir,
 
1640
            [  --with-ruby-hdrdir=DIR  core headers in DIR [INCLUDEDIR]],
 
1641
            [rubyhdrdir=$withval],
 
1642
            [rubyhdrdir='${includedir}/ruby-${MAJOR}.${MINOR}'])
 
1643
 
 
1644
AC_ARG_WITH(sitehdrdir,
 
1645
            [  --with-site-hdrdir=DIR  core headers in DIR [INCLUDEDIR]],
 
1646
            [sitehdrdir=$withval],
 
1647
            [sitehdrdir='${rubyhdrdir}/site_ruby'])
 
1648
 
 
1649
AC_SUBST(rubyhdrdir)dnl
 
1650
AC_SUBST(sitehdrdir)dnl
 
1651
 
1610
1652
AC_ARG_WITH(mantype,
1611
1653
                [  --with-mantype=TYPE specify man page type; TYPE is one of man and doc],
1612
1654
                [
1629
1671
fi
1630
1672
AC_SUBST(MANTYPE)
1631
1673
 
1632
 
AC_ARG_WITH(baseruby,
1633
 
        [  --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby],
1634
 
        [
1635
 
                case "$withval" in
1636
 
                *ruby*)
1637
 
                        BASERUBY=$withval
1638
 
                        ;;
1639
 
                *)
1640
 
                        AC_MSG_ERROR(need ruby)
1641
 
                        ;;
1642
 
                esac
1643
 
        ],
1644
 
        [
1645
 
                BASERUBY="ruby"
1646
 
        ])
1647
 
AC_SUBST(BASERUBY)
1648
 
 
1649
 
if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then
 
1674
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
 
1675
$MAKEDIRS "${arch_hdrdir}"
 
1676
config_h="${arch_hdrdir}/config.h"
 
1677
if test -f "${config_h}" && tr -d '\015' < confdefs.h | cmp -s "${config_h}" -; then
1650
1678
  echo "config.h unchanged"
1651
1679
else
1652
1680
  echo "creating config.h"
1653
 
  tr -d '\015' < confdefs.h > config.h
 
1681
  tr -d '\015' < confdefs.h > "${config_h}"
1654
1682
fi
1655
1683
: > confdefs.h
1656
1684