comparison configure.in @ 265:8efd647ea9ca r20-5b31

Import from CVS: tag r20-5b31
author cvs
date Mon, 13 Aug 2007 10:25:37 +0200
parents 727739f917cb
children 966663fcf606
comparison
equal deleted inserted replaced
264:682d2a9d41a5 265:8efd647ea9ca
359 native_sound_lib='' 359 native_sound_lib=''
360 dnl use-assertions should be 'yes' by default. Too many people in this 360 dnl use-assertions should be 'yes' by default. Too many people in this
361 dnl world have core dumps turned off by default or \"cannot find where the 361 dnl world have core dumps turned off by default or \"cannot find where the
362 dnl core file went\". At least we should get some useful output ... 362 dnl core file went\". At least we should get some useful output ...
363 use_assertions="yes" 363 use_assertions="yes"
364 dnl the following is set to yes or no later.
365 with_gif=""
366 dnl the following is set to yes or no later. 364 dnl the following is set to yes or no later.
367 with_toolbars="" 365 with_toolbars=""
368 with_tty="" 366 with_tty=""
369 use_union_type="no" 367 use_union_type="no"
370 with_dnet="" 368 with_dnet=""
544 n | no ) val=no ;; 542 n | no ) val=no ;;
545 d | de | def | defa | defau | defaul | default ) val=default ;; 543 d | de | def | defa | defau | defaul | default ) val=default ;;
546 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values: 544 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values:
547 \`yes', \`no', or \`default'."]) ;; 545 \`yes', \`no', or \`default'."]) ;;
548 esac 546 esac
549 case "$opt" in use_* ) opt="`echo $opt | sed /use/with/`" ;; esac 547 case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
550 eval "$opt=\"$val\"" 548 eval "$opt=\"$val\""
551 ;; 549 ;;
552 550
553 dnl Has the user requested database support? 551 dnl Has the user requested database support?
554 "with_database" ) 552 "with_database" )
1455 if test "$with_clash_detection" = "yes"; then 1453 if test "$with_clash_detection" = "yes"; then
1456 AC_DEFINE(CLASH_DETECTION) 1454 AC_DEFINE(CLASH_DETECTION)
1457 XE_ADD_OBJS(filelock.o) 1455 XE_ADD_OBJS(filelock.o)
1458 fi 1456 fi
1459 1457
1460 dnl Autodetected below
1461 dnl if test "$with_shlib" = "yes"; then
1462 dnl AC_DEFINE(HAVE_SHLIB)
1463 dnl XE_ADD_OBJS(dlopen.o)
1464 dnl fi
1465
1466 dnl Choose a compiler from (in order) 1458 dnl Choose a compiler from (in order)
1467 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC 1459 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC
1468 test -n "$compiler" && CC="$compiler" 1460 test -n "$compiler" && CC="$compiler"
1469 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler 1461 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler
1470 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac 1462 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1507 #error Not a GNU libc system :-( 1499 #error Not a GNU libc system :-(
1508 ******* ======= ******** &&&&&&&& 1500 ******* ======= ******** &&&&&&&&
1509 #endif 1501 #endif
1510 ], have_glibc=yes, have_glibc=no) 1502 ], have_glibc=yes, have_glibc=no)
1511 AC_MSG_RESULT($have_glibc) 1503 AC_MSG_RESULT($have_glibc)
1512 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) 1504 dnl I'm tired of pop being broken with GLIBC -slb
1505 dnl test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
1513 1506
1514 AC_MSG_CHECKING(whether we are using SunPro C) 1507 AC_MSG_CHECKING(whether we are using SunPro C)
1515 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C 1508 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
1516 #error Not a SunPro compiler :-( 1509 #error Not a SunPro compiler :-(
1517 ******* ======= ******** &&&&&&&& 1510 ******* ======= ******** &&&&&&&&
2153 case "$with_x11" in 2146 case "$with_x11" in
2154 yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; 2147 yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
2155 no ) window_system=none HAVE_X_WINDOWS=no ;; 2148 no ) window_system=none HAVE_X_WINDOWS=no ;;
2156 esac 2149 esac
2157 2150
2158 if test "$with_msw" != "no"; then
2159 AC_CHECKING(for MS-Windows)
2160 AC_CHECK_LIB(gdi32,main,with_msw=yes)
2161 if test "$with_msw" = "yes"; then
2162 AC_DEFINE(HAVE_MS_WINDOWS)
2163 XE_APPEND(-lshell32 -lgdi32 -luser32, libs_system)
2164 if test "$window_system" != x11; then
2165 window_system=msw
2166 test "$with_scrollbars" != "no" && with_scrollbars=msw \
2167 && XE_ADD_OBJS(scrollbar-msw.o)
2168 test "$with_menubars" != "no" && with_menubars=msw \
2169 && XE_ADD_OBJS(menubar-msw.o)
2170 with_dialogs=msw
2171 with_toolbars=no
2172 else
2173 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
2174 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
2175 fi
2176 const_is_losing=no
2177 with_file_coding=yes
2178 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o)
2179 fi
2180 fi
2181
2182 if test "$with_x11" = "yes"; then 2151 if test "$with_x11" = "yes"; then
2183 AC_DEFINE(HAVE_X_WINDOWS) 2152 AC_DEFINE(HAVE_X_WINDOWS)
2184 XE_APPEND(lwlib, MAKE_SUBDIR) 2153 XE_APPEND(lwlib, MAKE_SUBDIR)
2185 XE_APPEND(lwlib, SRC_SUBDIR_DEPS) 2154 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
2186 2155
2224 if test "$extra_verbose" = "yes"; then 2193 if test "$extra_verbose" = "yes"; then
2225 echo; echo "X11 compilation variables:" 2194 echo; echo "X11 compilation variables:"
2226 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS) 2195 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
2227 echo 2196 echo
2228 fi 2197 fi
2198
2199 dnl Set up bitmaps search path.
2200 dnl The original suggestion was to unconditionally to append X11/bitmaps
2201 dnl to each element of $x_includes, I'm pretty sure this is the wrong
2202 dnl thing to do. We test for bitmaps and X11/bitmaps directories on each
2203 dnl element and add them to BITMAPDIR if they exist.
2204 bitmapdirs=
2205 if test "$x_includes" != NONE; then
2206 for i in $x_includes; do
2207 if test -d "$i/bitmaps"; then
2208 bitmapdirs="$i/bitmaps:$bitmapdirs"
2209 fi
2210 if test -d "$i/X11/bitmaps"; then
2211 bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
2212 fi
2213 done
2214 bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
2215 fi
2216 test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
2229 2217
2230 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO 2218 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
2231 AC_CHECKING(for X defines extracted by xmkmf) 2219 AC_CHECKING(for X defines extracted by xmkmf)
2232 rm -fr conftestdir 2220 rm -fr conftestdir
2233 if mkdir conftestdir; then 2221 if mkdir conftestdir; then
2313 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then 2301 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
2314 XE_APPEND(-lc_r, libs_x) 2302 XE_APPEND(-lc_r, libs_x)
2315 fi 2303 fi
2316 2304
2317 fi dnl $with_x11 = yes 2305 fi dnl $with_x11 = yes
2306
2307 if test "$with_msw" != "no"; then
2308 AC_CHECKING(for MS-Windows)
2309 AC_CHECK_LIB(gdi32,main,with_msw=yes)
2310 if test "$with_msw" = "yes"; then
2311 AC_DEFINE(HAVE_MS_WINDOWS)
2312 XE_APPEND(-lshell32 -lgdi32 -luser32, libs_system)
2313 if test "$window_system" != x11; then
2314 window_system=msw
2315 test "$with_scrollbars" != "no" && with_scrollbars=msw \
2316 && XE_ADD_OBJS(scrollbar-msw.o)
2317 test "$with_menubars" != "no" && with_menubars=msw \
2318 && XE_ADD_OBJS(menubar-msw.o)
2319 with_dialogs=msw
2320 with_toolbars=no
2321 else
2322 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
2323 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
2324 fi
2325 const_is_losing=no
2326 with_file_coding=yes
2327 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o)
2328 fi
2329 fi
2318 2330
2319 test -z "$window_system" && window_system="none" 2331 test -z "$window_system" && window_system="none"
2320 2332
2321 if test "$window_system" = "none" ; then 2333 if test "$window_system" = "none" ; then
2322 if test "$with_tty" = "no" ; then 2334 if test "$with_tty" = "no" ; then
2487 if test "$with_xface" = "yes"; then 2499 if test "$with_xface" = "yes"; then
2488 AC_DEFINE(HAVE_XFACE) 2500 AC_DEFINE(HAVE_XFACE)
2489 XE_PREPEND(-lcompface, libs_x) 2501 XE_PREPEND(-lcompface, libs_x)
2490 fi 2502 fi
2491 2503
2492 dnl Built-in GIF support defaults to yes (note: this will be libraried soon) 2504 dnl Autodetect GIFlib
2493 test -z "$with_gif" && with_gif=yes; 2505 AC_MSG_CHECKING(for giflib - no older than 3.1)
2506 test -z "$with_gif" && { AC_CHECK_HEADER(gif_lib.h, ,with_gif=no) }
2507 test -z "$with_gif" && { AC_CHECK_LIB(gif, GetGifError,[:] ,with_gif=no) }
2508 test -z "$with_gif" && with_gif=yes
2494 if test "$with_gif" = "yes"; then 2509 if test "$with_gif" = "yes"; then
2495 AC_DEFINE(HAVE_GIF) 2510 AC_DEFINE(HAVE_GIF)
2496 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o) 2511 XE_PREPEND(-lgif, libs_x)
2497 fi 2512 fi
2498 2513
2499 dnl autodetect JPEG 2514 dnl autodetect JPEG
2500 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } 2515 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
2501 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } 2516 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
2744 dnl AIX needs the following library for use with Motif 2759 dnl AIX needs the following library for use with Motif
2745 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)]) 2760 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
2746 XE_COMPUTE_RUNPATH() 2761 XE_COMPUTE_RUNPATH()
2747 fi 2762 fi
2748 2763
2749 AC_CHECK_FUNCS(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) 2764 AC_CHECK_FUNCS(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 snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf)
2750 2765
2751 dnl realpath is buggy on linux, decosf and aix4 2766 dnl realpath is buggy on linux, decosf and aix4
2752 2767
2753 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. 2768 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
2754 dnl The realpath in ELF linux libc's is O.K. 2769 dnl The realpath in ELF linux libc's is O.K.
3155 dnl nor does libc implement it, we are a bit lost :) 3170 dnl nor does libc implement it, we are a bit lost :)
3156 3171
3157 AC_CHECKING(for database support) 3172 AC_CHECKING(for database support)
3158 3173
3159 if test "$with_database_gnudbm" != "no"; then 3174 if test "$with_database_gnudbm" != "no"; then
3160 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) 3175 AC_CHECK_HEADERS(ndbm.h, have_ndbm_h=yes)
3176 if test "$have_ndbm_h" = "yes"; then
3177 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes)
3178 fi
3161 if test "$with_database_gnudbm" != "yes"; then 3179 if test "$with_database_gnudbm" != "yes"; then
3162 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) 3180 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes)
3163 fi 3181 fi
3164 if test "$with_database_gnudbm" = "yes"; then 3182 if test "$with_database_gnudbm" = "yes"; then
3165 AC_DEFINE(HAVE_DBM) 3183 AC_DEFINE(HAVE_DBM)
3229 AC_DEFINE(USAGE_TRACKING) 3247 AC_DEFINE(USAGE_TRACKING)
3230 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) 3248 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
3231 fi 3249 fi
3232 3250
3233 dnl autodetect dll support 3251 dnl autodetect dll support
3234 test -z "$with_shlib" && { AC_CHECK_HEADER(dlfcn.h, ,with_shlib=no) } 3252 AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes)
3235 test -z "$with_shlib" && { AC_CHECK_LIB(dl, dlopen, XE_PREPEND(-ldl, LIBS), 3253 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) }
3236 AC_CHECK_LIB(c, dlopen, with_shlib=yes, with_shlib=no)) } 3254 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) }
3237 test -z "$with_shlib" && with_shlib=yes 3255 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) }
3256 test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) }
3257 test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) }
3238 if test "$with_shlib" = "yes"; then 3258 if test "$with_shlib" = "yes"; then
3239 AC_DEFINE(HAVE_SHLIB) 3259 AC_DEFINE(HAVE_SHLIB)
3240 XE_ADD_OBJS(dlopen.o) 3260 XE_ADD_OBJS(sysdll.o)
3261 XE_ADD_OBJS(dll.o)
3262 test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS)
3263 XE_MAKE_SHAREDLIB
3241 ld_dynamic_link_flags= 3264 ld_dynamic_link_flags=
3242 dnl Fill this in with other values as this gets more testing 3265 dnl Fill this in with other values as this gets more testing
3243 case "$opsys" in 3266 case "$opsys" in
3267 hpux*) ld_dynamic_link_flags="-E" ;;
3244 linux*) ld_dynamic_link_flags="-rdynamic" ;; 3268 linux*) ld_dynamic_link_flags="-rdynamic" ;;
3245 *) ;; 3269 *) ;;
3246 esac 3270 esac
3247 fi 3271 fi
3248 3272
3503 echo " WARNING: You should strongly considering installing XPM." 3527 echo " WARNING: You should strongly considering installing XPM."
3504 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." 3528 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
3505 echo " --------------------------------------------------------------------" 3529 echo " --------------------------------------------------------------------"
3506 fi 3530 fi
3507 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." 3531 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
3508 test "$with_gif" = yes && echo " Compiling in (built in) support for GIF image conversion." 3532 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion."
3509 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." 3533 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion."
3510 test "$with_png" = yes && echo " Compiling in support for PNG image conversion." 3534 test "$with_png" = yes && echo " Compiling in support for PNG image conversion."
3511 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion (not implemented)." 3535 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion."
3512 case "$with_sound" in 3536 case "$with_sound" in
3513 nas ) echo " Compiling in network sound (NAS) support." ;; 3537 nas ) echo " Compiling in network sound (NAS) support." ;;
3514 native ) echo " Compiling in native sound support." ;; 3538 native ) echo " Compiling in native sound support." ;;
3515 both ) echo " Compiling in both network and native sound support." ;; 3539 both ) echo " Compiling in both network and native sound support." ;;
3516 esac 3540 esac
3572 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" 3596 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host"
3573 echo " The \`Info-default-directory-list' will be initialized from:" 3597 echo " The \`Info-default-directory-list' will be initialized from:"
3574 echo " INFOPATH=\"$infopath\"" 3598 echo " INFOPATH=\"$infopath\""
3575 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." 3599 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
3576 test "$with_minimal_tagbits" != "no" -o "$with_gung" != "no" && \ 3600 test "$with_minimal_tagbits" != "no" -o "$with_gung" != "no" && \
3577 echo "Using Lisp_Objects with minimal tagbits." 3601 echo " Using Lisp_Objects with minimal tagbits."
3578 test "$with_gung" != "no" && echo "Using indexed lrecord implementation." 3602 test "$with_gung" != "no" && echo " Using indexed lrecord implementation."
3579 test "$debug" = yes && echo " Compiling in extra code for debugging." 3603 test "$debug" = yes && echo " Compiling in extra code for debugging."
3580 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." 3604 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage."
3581 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." 3605 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)."
3582 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ 3606 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
3583 != "no no no no no"; then 3607 != "no no no no no"; then