Mercurial > hg > xemacs-beta
comparison configure.in @ 997:89cca5f594bd
[xemacs-hg @ 2002-09-10 15:37:48 by james]
Commit the stuff in the top-level directory that CVS didn't commit the first
time around. This completes the module changes begun with the previous commit.
author | james |
---|---|
date | Tue, 10 Sep 2002 15:38:03 +0000 |
parents | 151d438d2d55 |
children | 989ddde6705d |
comparison
equal
deleted
inserted
replaced
996:25e260cb7994 | 997:89cca5f594bd |
---|---|
3063 | 3063 |
3064 dnl This one is for the static initializeds variables in | 3064 dnl This one is for the static initializeds variables in |
3065 dnl offix.c, so that the thing is dumped after lastfile.o | 3065 dnl offix.c, so that the thing is dumped after lastfile.o |
3066 AC_SUBST(dnd_objs) | 3066 AC_SUBST(dnd_objs) |
3067 | 3067 |
3068 dnl Autodetect dll support | |
3069 dnl This must come before the detection code for anything that is in a module | |
3070 if test "$with_modules" != "no"; then | |
3071 AC_CHECKING(for module support) | |
3072 | |
3073 dnl Check for MS-Windows | |
3074 if test "$with_msw" = "yes"; then | |
3075 have_dl=yes; | |
3076 else | |
3077 dnl Find headers and libraries | |
3078 AC_CHECK_HEADER(dlfcn.h, [ | |
3079 AC_MSG_CHECKING([for dlopen in -lc]) | |
3080 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
3081 [dlopen ("", 0);], [ have_dl=yes ], [ | |
3082 AC_MSG_CHECKING([for dlopen in -ldl]) | |
3083 ac_save_LIBS="$LIBS" | |
3084 LIBS="-ldl $LIBS" | |
3085 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
3086 [dlopen ("", 0);], [ have_dl=yes ], | |
3087 [LIBS="$ac_save_LIBS"]) | |
3088 ac_save_LIBS=])]) | |
3089 if test -n "$have_dl"; then | |
3090 AC_DEFINE(HAVE_DLOPEN) | |
3091 else | |
3092 AC_CHECK_LIB(dld, shl_load, [ | |
3093 libdl=dld have_dl=yes; | |
3094 AC_DEFINE(HAVE_SHL_LOAD)], [ | |
3095 AC_CHECK_LIB(dld, dld_init, [ | |
3096 libdl=dld have_dl=yes; | |
3097 AC_DEFINE(HAVE_DLD_INIT)])]) | |
3098 fi | |
3099 fi dnl end !MS-Windows | |
3100 | |
3101 if test -n "$have_dl"; then | |
3102 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared | |
3103 XE_SHLIB_STUFF | |
3104 fi | |
3105 | |
3106 if test "$can_build_shared" = "yes"; then | |
3107 AC_DEFINE(HAVE_SHLIB) | |
3108 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) | |
3109 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS) | |
3110 AC_CHECK_FUNCS(dlerror _dlerror) | |
3111 with_modules=yes | |
3112 MOD_CC="../../lib-src/ellcc" | |
3113 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src" | |
3114 INSTALLPATH="\$(moduledir)" | |
3115 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM} | |
3116 OBJECT_TO_BUILD="\$(MODNAME).ell" | |
3117 else | |
3118 if test "$with_modules" = "yes"; then | |
3119 XE_DIE("Required module support cannot be provided.") | |
3120 else | |
3121 echo " No module support." | |
3122 fi | |
3123 with_modules=no | |
3124 MOD_CC=${CC} | |
3125 MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src" | |
3126 INSTALLPATH="" | |
3127 MOD_INSTALL_PROGRAM="true" | |
3128 OBJECT_TO_BUILD="\$(MODNAME).o" | |
3129 fi | |
3130 fi | |
3131 MODARCHDIR= | |
3132 MAKE_DOCFILE="../../lib-src/make-docfile" | |
3133 AC_SUBST(with_modules) | |
3134 AC_SUBST(MOD_CC) | |
3135 AC_SUBST(MODARCHDIR) | |
3136 AC_SUBST(MAKE_DOCFILE) | |
3137 AC_SUBST(MODCFLAGS) | |
3138 AC_SUBST(INSTALLPATH) | |
3139 AC_SUBST(MOD_INSTALL_PROGRAM) | |
3140 AC_SUBST(OBJECT_TO_BUILD) | |
3141 | |
3068 dnl Autodetect tooltalk | 3142 dnl Autodetect tooltalk |
3069 if test "$with_tooltalk" != "no" ; then | 3143 if test "$with_tooltalk" != "no" ; then |
3070 dnl autodetect the location of tt_c.h | 3144 dnl autodetect the location of tt_c.h |
3071 dnl tt_c.h might be in Tt or desktop include directories | 3145 dnl tt_c.h might be in Tt or desktop include directories |
3072 for dir in "" "Tt/" "desktop/" ; do | 3146 for dir in "" "Tt/" "desktop/" ; do |
3165 fi | 3239 fi |
3166 fi | 3240 fi |
3167 | 3241 |
3168 dnl Autodetect LDAP | 3242 dnl Autodetect LDAP |
3169 AC_CHECKING(for LDAP) | 3243 AC_CHECKING(for LDAP) |
3244 ldap_libs= | |
3170 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } | 3245 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } |
3171 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } | 3246 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } |
3172 if test "$with_ldap" != "no"; then | 3247 if test "$with_ldap" != "no"; then |
3173 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) | 3248 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) |
3174 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } | 3249 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } |
3177 test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes | 3252 test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes |
3178 fi | 3253 fi |
3179 if test "$with_ldap" = "yes"; then | 3254 if test "$with_ldap" = "yes"; then |
3180 AC_DEFINE(HAVE_LDAP) | 3255 AC_DEFINE(HAVE_LDAP) |
3181 if test "$with_ldap_nolber" = "yes" ; then | 3256 if test "$with_ldap_nolber" = "yes" ; then |
3182 XE_PREPEND(-lldap, LIBS) | 3257 XE_PREPEND(-lldap, ldap_libs) |
3183 else | 3258 else |
3184 if test "$with_ldap_krb" = "yes" ; then | 3259 if test "$with_ldap_krb" = "yes" ; then |
3185 XE_PREPEND(-lkrb, LIBS) | 3260 XE_PREPEND(-lkrb, ldap_libs) |
3186 fi | 3261 fi |
3187 if test "$with_ldap_krbdes" = "yes" ; then | 3262 if test "$with_ldap_krbdes" = "yes" ; then |
3188 XE_PREPEND(-ldes, LIBS) | 3263 XE_PREPEND(-ldes, ldap_libs) |
3189 XE_PREPEND(-lkrb, LIBS) | 3264 XE_PREPEND(-lkrb, ldap_libs) |
3190 fi | 3265 fi |
3191 XE_PREPEND(-llber, LIBS) | 3266 XE_PREPEND(-llber, ldap_libs) |
3192 XE_PREPEND(-lldap, LIBS) | 3267 XE_PREPEND(-lldap, ldap_libs) |
3193 fi | 3268 fi |
3269 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs" | |
3194 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) | 3270 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) |
3195 fi | 3271 LIBS="$save_LIBS" |
3272 XE_APPEND(modules/ldap, MAKE_SUBDIR) | |
3273 if test "$with_modules" = "yes"; then | |
3274 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR) | |
3275 fi | |
3276 fi | |
3277 AC_SUBST(ldap_libs) | |
3196 | 3278 |
3197 dnl Autodetect PostgreSQL | 3279 dnl Autodetect PostgreSQL |
3198 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr; | 3280 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr; |
3199 dnl in this case, configure will easily detect it there. | 3281 dnl in this case, configure will easily detect it there. |
3200 dnl | 3282 dnl |
3201 dnl If PostgreSQL is installed into a different prefix, | 3283 dnl If PostgreSQL is installed into a different prefix, |
3202 dnl (such as the default /usr/local/pgsql when building from source), | 3284 dnl (such as the default /usr/local/pgsql when building from source), |
3203 dnl that prefix must be specified using the --site-prefixes flag. | 3285 dnl that prefix must be specified using the --site-prefixes flag. |
3286 postgresql_libs= | |
3204 if test "$with_postgresql" != "no"; then | 3287 if test "$with_postgresql" != "no"; then |
3205 AC_CHECKING(for PostgreSQL) | 3288 AC_CHECKING(for PostgreSQL) |
3206 | 3289 |
3207 dnl Look for these standard header file locations, known to be used on Linux | 3290 dnl Look for these standard header file locations, known to be used on Linux |
3208 for header_dir in "" "pgsql/" "postgresql/"; do | 3291 for header_dir in "" "pgsql/" "postgresql/"; do |
3217 AC_DEFINE(HAVE_POSTGRESQL) | 3300 AC_DEFINE(HAVE_POSTGRESQL) |
3218 AC_CHECK_LIB(pq,PQconnectStart, [ | 3301 AC_CHECK_LIB(pq,PQconnectStart, [ |
3219 with_postgresqlv7=yes; | 3302 with_postgresqlv7=yes; |
3220 AC_DEFINE(HAVE_POSTGRESQLV7)]) | 3303 AC_DEFINE(HAVE_POSTGRESQLV7)]) |
3221 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") | 3304 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") |
3222 XE_PREPEND(-lpq, LIBS) | 3305 XE_PREPEND(-lpq, postgresql_libs) |
3306 XE_APPEND(modules/postgresql, MAKE_SUBDIR) | |
3307 if test "$with_modules" = "yes"; then | |
3308 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR) | |
3309 fi | |
3223 elif test "$with_postgresql" = "yes"; then | 3310 elif test "$with_postgresql" = "yes"; then |
3224 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.") | 3311 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.") |
3225 fi | 3312 fi |
3226 fi | 3313 fi |
3314 AC_SUBST(postgresql_libs) | |
3227 | 3315 |
3228 dnl ---------------------- | 3316 dnl ---------------------- |
3229 dnl Graphics libraries | 3317 dnl Graphics libraries |
3230 dnl ---------------------- | 3318 dnl ---------------------- |
3231 | 3319 |
4394 if test "$usage_tracking" = "yes"; then | 4482 if test "$usage_tracking" = "yes"; then |
4395 AC_DEFINE(USAGE_TRACKING) | 4483 AC_DEFINE(USAGE_TRACKING) |
4396 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) | 4484 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) |
4397 fi | 4485 fi |
4398 | 4486 |
4399 dnl autodetect dll support | |
4400 if test "$with_modules" != "no"; then | |
4401 AC_CHECKING(for module support) | |
4402 | |
4403 dnl Check for MS-Windows | |
4404 if test "$with_msw" = "yes"; then | |
4405 have_dl=yes; | |
4406 else | |
4407 dnl Find headers and libraries | |
4408 AC_CHECK_HEADER(dlfcn.h, [ | |
4409 AC_MSG_CHECKING([for dlopen in -lc]) | |
4410 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
4411 [dlopen ("", 0);], [ have_dl=yes ], [ | |
4412 AC_MSG_CHECKING([for dlopen in -ldl]) | |
4413 ac_save_LIBS="$LIBS" | |
4414 LIBS="-ldl $LIBS" | |
4415 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
4416 [dlopen ("", 0);], [ have_dl=yes ], | |
4417 [LIBS="$ac_save_LIBS"]) | |
4418 ac_save_LIBS=])]) | |
4419 if test -n "$have_dl"; then | |
4420 AC_DEFINE(HAVE_DLOPEN) | |
4421 else | |
4422 AC_CHECK_LIB(dld, shl_load, [ | |
4423 libdl=dld have_dl=yes; | |
4424 AC_DEFINE(HAVE_SHL_LOAD)], [ | |
4425 AC_CHECK_LIB(dld, dld_init, [ | |
4426 libdl=dld have_dl=yes; | |
4427 AC_DEFINE(HAVE_DLD_INIT)])]) | |
4428 fi | |
4429 fi dnl end !MS-Windows | |
4430 | |
4431 if test -n "$have_dl"; then | |
4432 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared | |
4433 XE_SHLIB_STUFF | |
4434 fi | |
4435 | |
4436 if test "$can_build_shared" = "yes"; then | |
4437 AC_DEFINE(HAVE_SHLIB) | |
4438 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) | |
4439 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS) | |
4440 AC_CHECK_FUNCS(dlerror _dlerror) | |
4441 with_modules=yes | |
4442 else | |
4443 if test "$with_modules" = "yes"; then | |
4444 XE_DIE("Required module support cannot be provided.") | |
4445 else | |
4446 echo " No module support." | |
4447 fi | |
4448 with_modules=no | |
4449 fi | |
4450 fi | |
4451 | |
4452 dnl Unfortunately, just because we can link doesn't mean we can run. | 4487 dnl Unfortunately, just because we can link doesn't mean we can run. |
4453 dnl One of the above link tests may have succeeded but caused resulting | 4488 dnl One of the above link tests may have succeeded but caused resulting |
4454 dnl executables to fail to run. Also any tests using AC_TRY_RUN will | 4489 dnl executables to fail to run. Also any tests using AC_TRY_RUN will |
4455 dnl have reported incorrect results. | 4490 dnl have reported incorrect results. |
4456 AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[ | 4491 AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[ |
4479 dnl Compute SUBST-itutable variables | 4514 dnl Compute SUBST-itutable variables |
4480 dnl -------------------------------- | 4515 dnl -------------------------------- |
4481 | 4516 |
4482 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) | 4517 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) |
4483 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks | 4518 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks |
4519 if test "$with_modules" = "yes"; then | |
4520 ld_libs_module= | |
4521 else | |
4522 XE_SPACE(ld_libs_module, $ldap_libs $postgresql_libs) | |
4523 fi | |
4524 | |
4484 XE_SPACE(CFLAGS, $CFLAGS) | 4525 XE_SPACE(CFLAGS, $CFLAGS) |
4485 XE_SPACE(extra_objs, $extra_objs) | 4526 XE_SPACE(extra_objs, $extra_objs) |
4486 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system) | 4527 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system) |
4487 XE_SPACE(c_switch_window_system, $c_switch_x_site $c_switch_gtk $X_CFLAGS) | 4528 XE_SPACE(c_switch_window_system, $c_switch_x_site $c_switch_gtk $X_CFLAGS) |
4488 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system) | 4529 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system) |
4489 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run) | 4530 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run) |
4490 XE_SPACE(ld_switch_window_system, $ld_switch_x_site) | 4531 XE_SPACE(ld_switch_window_system, $ld_switch_x_site) |
4491 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) | 4532 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) |
4492 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) | 4533 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) |
4493 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS) | 4534 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS) |
4494 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general) | 4535 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module) |
4495 | 4536 |
4496 dnl Compute lists of Makefiles and subdirs | 4537 dnl Compute lists of Makefiles and subdirs |
4497 AC_SUBST(SRC_SUBDIR_DEPS) | 4538 AC_SUBST(SRC_SUBDIR_DEPS) |
4498 XE_APPEND(src, MAKE_SUBDIR) | 4539 XE_APPEND(src, MAKE_SUBDIR) |
4499 internal_makefile_list="Makefile.in" | 4540 internal_makefile_list="Makefile.in" |