Mercurial > hg > xemacs-beta
comparison configure.in @ 169:15872534500d r20-3b11
Import from CVS: tag r20-3b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:46:53 +0200 |
parents | 85ec50267440 |
children | 929b76928fce |
comparison
equal
deleted
inserted
replaced
168:9851d5c6556e | 169:15872534500d |
---|---|
1578 AC_DEFINE(SUNPRO) | 1578 AC_DEFINE(SUNPRO) |
1579 XE_ADD_OBJS(sunpro.o) | 1579 XE_ADD_OBJS(sunpro.o) |
1580 with_tooltalk=yes | 1580 with_tooltalk=yes |
1581 fi | 1581 fi |
1582 | 1582 |
1583 dnl Choose a compiler. | 1583 dnl Choose a compiler from (in order) |
1584 test -n "$CC" && cc_specified=yes | 1584 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC |
1585 | 1585 test -n "$compiler" && CC="$compiler" |
1586 if test -n "$compiler"; then CC="$compiler"; fi | 1586 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler |
1587 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac | |
1588 fi | |
1587 | 1589 |
1588 dnl If we don't set CFLAGS here, AC_PROG_CC will set it. | 1590 dnl If we don't set CFLAGS here, AC_PROG_CC will set it. |
1589 dnl But we know better what's good for us, so we do our own | 1591 dnl But we know better what's good for us, so we do our own |
1590 dnl computation of real CFLAGS later. | 1592 dnl computation of real CFLAGS later. |
1591 test "$cflags" != "UNSPECIFIED" && CFLAGS="$cflags" | 1593 test "$cflags" != "UNSPECIFIED" && CFLAGS="$cflags" |
1592 xe_save_CFLAGS="$CFLAGS" | 1594 xe_save_CFLAGS="$CFLAGS" |
1593 | 1595 |
1594 dnl Some systems specify a CPP or CC to use unless we are using GCC. | 1596 AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection |
1595 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" | 1597 |
1596 AC_PROG_CC | 1598 dnl Retry using random guesswork if AC_PROG_CC got it wrong... |
1597 | 1599 if test "$with_gcc" = "no" -a "$GCC" = "yes"; then |
1598 if test "$with_gcc" = "no" -a "$ac_cv_prog_gcc" = "yes"; then | |
1599 CC=${NON_GNU_CC-cc} | 1600 CC=${NON_GNU_CC-cc} |
1600 AC_PROG_CC | 1601 AC_PROG_CC |
1601 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then | 1602 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then |
1602 CC=gcc | 1603 CC=gcc |
1603 AC_PROG_CC | 1604 AC_PROG_CC |
1604 fi | 1605 fi |
1605 CFLAGS="$xe_save_CFLAGS" | 1606 CFLAGS="$xe_save_CFLAGS" |
1606 | 1607 |
1607 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi | 1608 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" |
1608 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" | |
1609 | 1609 |
1610 AC_PROG_CPP | 1610 AC_PROG_CPP |
1611 | 1611 |
1612 AC_AIX | 1612 AC_AIX |
1613 | 1613 |
1841 AC_SUBST(start_files) | 1841 AC_SUBST(start_files) |
1842 test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start" | 1842 test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start" |
1843 AC_SUBST(start_flags) | 1843 AC_SUBST(start_flags) |
1844 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then | 1844 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then |
1845 test -z "$linker" && linker='$(CC) -nostdlib' | 1845 test -z "$linker" && linker='$(CC) -nostdlib' |
1846 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-lib-gcc-file-name`' | 1846 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-lib-gccfile-name`' |
1847 fi | 1847 fi |
1848 test "$GCC" != "yes" && lib_gcc= | 1848 test "$GCC" != "yes" && lib_gcc= |
1849 AC_SUBST(ld) | 1849 AC_SUBST(ld) |
1850 AC_SUBST(lib_gcc) | 1850 AC_SUBST(lib_gcc) |
1851 | 1851 |
2010 AC_PROG_INSTALL | 2010 AC_PROG_INSTALL |
2011 AC_PROG_YACC | 2011 AC_PROG_YACC |
2012 | 2012 |
2013 dnl checks for header files | 2013 dnl checks for header files |
2014 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) | 2014 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) |
2015 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h) | 2015 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) |
2016 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) | 2016 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) |
2017 AC_HEADER_SYS_WAIT | 2017 AC_HEADER_SYS_WAIT |
2018 AC_HEADER_STDC | 2018 AC_HEADER_STDC |
2019 AC_HEADER_TIME | 2019 AC_HEADER_TIME |
2020 AC_DECL_SYS_SIGLIST | 2020 AC_DECL_SYS_SIGLIST |
2265 | 2265 |
2266 dnl Autodetect -lXext | 2266 dnl Autodetect -lXext |
2267 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) | 2267 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) |
2268 | 2268 |
2269 dnl Require -lXt | 2269 dnl Require -lXt |
2270 case "$opsys" in dnl SunOS4 bug workaround | 2270 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), |
2271 sunos4* ) XE_PREPEND(-u _XtToolkitInitialize -lXt, libs_x) ;; | 2271 AC_MSG_ERROR("Unable to find X11 libraries.")) |
2272 * ) AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), | |
2273 [AC_MSG_ERROR("Unable to find X11 libraries.")]) ;; | |
2274 esac | |
2275 | 2272 |
2276 AC_MSG_CHECKING(the version of X11 being used) | 2273 AC_MSG_CHECKING(the version of X11 being used) |
2277 AC_TRY_RUN([#include <X11/Intrinsic.h> | 2274 AC_TRY_RUN([#include <X11/Intrinsic.h> |
2278 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], | 2275 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], |
2279 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) | 2276 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) |
2283 AC_CHECK_HEADERS(X11/Xlocale.h) | 2280 AC_CHECK_HEADERS(X11/Xlocale.h) |
2284 | 2281 |
2285 dnl remove this - we should avoid checking for specific OS | 2282 dnl remove this - we should avoid checking for specific OS |
2286 AC_MSG_CHECKING(for XFree86) | 2283 AC_MSG_CHECKING(for XFree86) |
2287 if test -d "/usr/X386/include" -o \ | 2284 if test -d "/usr/X386/include" -o \ |
2288 -f "/etc/XF86Config" -o \ | 2285 -f "/etc/XF86Config" -o \ |
2289 -f "/etc/X11/XF86Config" -o \ | 2286 -f "/etc/X11/XF86Config" -o \ |
2290 -f "/usr/X11R6/lib/X11/XF86Config"; then | 2287 -f "/usr/X11R6/lib/X11/XF86Config"; then |
2291 AC_MSG_RESULT(yes) | 2288 AC_MSG_RESULT(yes) |
2292 AC_DEFINE(HAVE_XFREE386) | 2289 AC_DEFINE(HAVE_XFREE386) |
2293 else | 2290 else |
2294 AC_MSG_RESULT(no) | 2291 AC_MSG_RESULT(no) |
2295 fi | 2292 fi |
2296 | 2293 |
2297 dnl autodetect -lXmu | 2294 dnl autodetect -lXmu |
2298 case "$opsys" in dnl SunOS4 bug workaround | 2295 test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile, |
2299 sunos4* ) XE_PREPEND(-u _get_applicationShellWidgetClass -lXmu, libs_x) ;; | 2296 with_xmu=yes, with_xmu=no) } |
2300 * ) if test -z "$with_xmu"; then | 2297 if test "$with_xmu" = "no" |
2301 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) | 2298 then XE_ADD_OBJS(xmu.o) |
2302 fi | 2299 else XE_PREPEND(-lXmu, libs_x) |
2303 if test "$with_xmu" = "no"; then | 2300 fi |
2304 XE_ADD_OBJS(xmu.o) | |
2305 else | |
2306 XE_PREPEND(-lXmu, libs_x) | |
2307 fi ;; | |
2308 esac | |
2309 | 2301 |
2310 dnl Autodetect -lXbsd | 2302 dnl Autodetect -lXbsd |
2311 dnl #### Someone, please add a better function than main | 2303 dnl #### Someone, please add a better function than main |
2312 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) | 2304 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) |
2313 | 2305 |
2669 if test "$need_motif" = "yes" ; then | 2661 if test "$need_motif" = "yes" ; then |
2670 XE_PREPEND(-lXm, libs_x) | 2662 XE_PREPEND(-lXm, libs_x) |
2671 XE_COMPUTE_RUNPATH() | 2663 XE_COMPUTE_RUNPATH() |
2672 fi | 2664 fi |
2673 | 2665 |
2674 AC_CHECK_FUNCS(acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset usleep utimes waitpid) | 2666 AC_CHECK_FUNCS(acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset ulimit usleep utimes waitpid) |
2675 | 2667 |
2676 dnl realpath is buggy on linux, decosf and aix4 | 2668 dnl realpath is buggy on linux, decosf and aix4 |
2677 | 2669 |
2678 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. | 2670 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. |
2679 dnl For example, call realpath on a file thirty-five or so directories deep | 2671 dnl For example, call realpath on a file thirty-five or so directories deep |
2946 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") | 2938 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") |
2947 fi | 2939 fi |
2948 if test -n "$native_sound_lib"; then | 2940 if test -n "$native_sound_lib"; then |
2949 sound_found=yes | 2941 sound_found=yes |
2950 XE_ADD_OBJS(hpplay.o) | 2942 XE_ADD_OBJS(hpplay.o) |
2951 if test "$with_gcc" = "yes" # Kludge city | 2943 if test "$GCC" = "yes" # Kludge city |
2952 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" | 2944 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" |
2953 else sound_cflags="+e -I/usr/audio/examples" | 2945 else sound_cflags="+e -I/usr/audio/examples" |
2954 fi | 2946 fi |
2955 fi ;; | 2947 fi ;; |
2956 esac | 2948 esac |
3321 | 3313 |
3322 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC) | 3314 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC) |
3323 elif test "$use_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) | 3315 elif test "$use_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) |
3324 fi | 3316 fi |
3325 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) | 3317 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) |
3326 test "$with_gcc" = "yes" && AC_DEFINE(USE_GCC) | 3318 test "$GCC" = "yes" && AC_DEFINE(USE_GCC) |
3327 test "$with_term" = "yes" && AC_DEFINE(HAVE_TERM) | 3319 test "$with_term" = "yes" && AC_DEFINE(HAVE_TERM) |
3328 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) | 3320 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) |
3329 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE) | 3321 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE) |
3330 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) | 3322 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) |
3331 test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) | 3323 test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) |