Mercurial > hg > xemacs-beta
comparison configure.in @ 1452:dd63b61df78c
[xemacs-hg @ 2003-05-03 22:47:10 by youngs]
2003-05-04 Steve Youngs <youngs@xemacs.org>
* configure: Regenerate.
2003-05-01 Andrew Begel <abegel@CS.Berkeley.EDU>
* configure.in: Move module detection to after src/ is added to
MAKE_SUBDIR. On MacOS X, building modules requires xemacs to
already be built.
* aclocal.m4 (XE_SHLIB_STUFF): Properly define ellcc flags for
MacOS X.
author | youngs |
---|---|
date | Sat, 03 May 2003 22:47:15 +0000 |
parents | 5142be485095 |
children | 38d0f093d818 |
comparison
equal
deleted
inserted
replaced
1451:9a406c30e65e | 1452:dd63b61df78c |
---|---|
3169 dnl o XEMACS_CC environment variable | 3169 dnl o XEMACS_CC environment variable |
3170 dnl o same as the regular compiler, (determined previously) | 3170 dnl o same as the regular compiler, (determined previously) |
3171 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" | 3171 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" |
3172 : ${XEMACS_CC:="$CC"} | 3172 : ${XEMACS_CC:="$CC"} |
3173 | 3173 |
3174 dnl Autodetect dll support | |
3175 dnl This must come before the detection code for anything that is in a module | |
3176 if test "$with_modules" != "no"; then | |
3177 AC_CHECKING(for module support) | |
3178 | |
3179 dnl Check for MS-Windows | |
3180 if test "$with_msw" = "yes"; then | |
3181 have_dl=yes; | |
3182 else | |
3183 case "$opsys" in | |
3184 darwin ) have_dl=yes; AC_DEFINE(HAVE_DYLD) ;; | |
3185 * ) | |
3186 dnl Find headers and libraries | |
3187 AC_CHECK_HEADER(dlfcn.h, [ | |
3188 AC_MSG_CHECKING([for dlopen in -lc]) | |
3189 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
3190 [dlopen ("", 0);], [ have_dl=yes ], [ | |
3191 AC_MSG_CHECKING([for dlopen in -ldl]) | |
3192 ac_save_LIBS="$LIBS" | |
3193 LIBS="-ldl $LIBS" | |
3194 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
3195 [dlopen ("", 0);], [ have_dl=yes ], | |
3196 [LIBS="$ac_save_LIBS"]) | |
3197 ac_save_LIBS=])]) | |
3198 if test -n "$have_dl"; then | |
3199 AC_DEFINE(HAVE_DLOPEN) | |
3200 else | |
3201 AC_CHECK_LIB(dld, shl_load, [ | |
3202 libdl=dld have_dl=yes; | |
3203 AC_DEFINE(HAVE_SHL_LOAD)], [ | |
3204 AC_CHECK_LIB(dld, dld_init, [ | |
3205 libdl=dld have_dl=yes; | |
3206 AC_DEFINE(HAVE_DLD_INIT)])]) | |
3207 fi | |
3208 esac dnl end !darwin | |
3209 fi dnl end !MS-Windows | |
3210 | |
3211 if test -n "$have_dl"; then | |
3212 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared | |
3213 XE_SHLIB_STUFF | |
3214 fi | |
3215 | |
3216 if test "$can_build_shared" = "yes"; then | |
3217 AC_DEFINE(HAVE_SHLIB) | |
3218 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) | |
3219 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS) | |
3220 AC_CHECK_FUNCS(dlerror _dlerror) | |
3221 with_modules=yes | |
3222 MOD_CC="../../lib-src/ellcc" | |
3223 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src" | |
3224 INSTALLPATH="\$(moduledir)" | |
3225 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM} | |
3226 OBJECT_TO_BUILD="\$(MODNAME).ell" | |
3227 else | |
3228 if test "$with_modules" = "yes"; then | |
3229 XE_DIE("Required module support cannot be provided.") | |
3230 else | |
3231 echo " No module support." | |
3232 fi | |
3233 with_modules=no | |
3234 MOD_CC="$XEMACS_CC" | |
3235 MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src" | |
3236 INSTALLPATH="" | |
3237 MOD_INSTALL_PROGRAM="true" | |
3238 OBJECT_TO_BUILD="\$(MODNAME).o" | |
3239 fi | |
3240 fi | |
3241 MODARCHDIR= | |
3242 MAKE_DOCFILE="../../lib-src/make-docfile" | |
3243 AC_SUBST(with_modules) | |
3244 AC_SUBST(MOD_CC) | |
3245 AC_SUBST(MODARCHDIR) | |
3246 AC_SUBST(MAKE_DOCFILE) | |
3247 AC_SUBST(MODCFLAGS) | |
3248 AC_SUBST(INSTALLPATH) | |
3249 AC_SUBST(MOD_INSTALL_PROGRAM) | |
3250 AC_SUBST(OBJECT_TO_BUILD) | |
3251 | 3174 |
3252 dnl Autodetect tooltalk | 3175 dnl Autodetect tooltalk |
3253 if test "$with_tooltalk" != "no" ; then | 3176 if test "$with_tooltalk" != "no" ; then |
3254 dnl autodetect the location of tt_c.h | 3177 dnl autodetect the location of tt_c.h |
3255 dnl tt_c.h might be in Tt or desktop include directories | 3178 dnl tt_c.h might be in Tt or desktop include directories |
3347 with_dragndrop=no | 3270 with_dragndrop=no |
3348 AC_MSG_RESULT(no) | 3271 AC_MSG_RESULT(no) |
3349 fi | 3272 fi |
3350 fi | 3273 fi |
3351 | 3274 |
3352 dnl Autodetect LDAP | |
3353 AC_CHECKING(for LDAP) | |
3354 ldap_libs= | |
3355 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } | |
3356 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } | |
3357 if test "$with_ldap" != "no"; then | |
3358 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) | |
3359 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } | |
3360 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) } | |
3361 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) } | |
3362 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 | |
3363 fi | |
3364 if test "$with_ldap" = "yes"; then | |
3365 AC_DEFINE(HAVE_LDAP) | |
3366 if test "$with_ldap_nolber" = "yes" ; then | |
3367 XE_PREPEND(-lldap, ldap_libs) | |
3368 else | |
3369 if test "$with_ldap_krb" = "yes" ; then | |
3370 XE_PREPEND(-lkrb, ldap_libs) | |
3371 fi | |
3372 if test "$with_ldap_krbdes" = "yes" ; then | |
3373 XE_PREPEND(-ldes, ldap_libs) | |
3374 XE_PREPEND(-lkrb, ldap_libs) | |
3375 fi | |
3376 XE_PREPEND(-llber, ldap_libs) | |
3377 XE_PREPEND(-lldap, ldap_libs) | |
3378 fi | |
3379 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs" | |
3380 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) | |
3381 LIBS="$save_LIBS" | |
3382 XE_APPEND(modules/ldap, MAKE_SUBDIR) | |
3383 need_modules_common=yes | |
3384 if test "$with_modules" = "yes"; then | |
3385 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR) | |
3386 fi | |
3387 fi | |
3388 AC_SUBST(ldap_libs) | |
3389 | |
3390 dnl Autodetect PostgreSQL | |
3391 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr; | |
3392 dnl in this case, configure will easily detect it there. | |
3393 dnl | |
3394 dnl If PostgreSQL is installed into a different prefix, | |
3395 dnl (such as the default /usr/local/pgsql when building from source), | |
3396 dnl that prefix must be specified using the --site-prefixes flag. | |
3397 postgresql_libs= | |
3398 if test "$with_postgresql" != "no"; then | |
3399 AC_CHECKING(for PostgreSQL) | |
3400 | |
3401 dnl Look for these standard header file locations, known to be used on Linux | |
3402 for header_dir in "" "pgsql/" "postgresql/"; do | |
3403 AC_CHECK_HEADER(${header_dir}libpq-fe.h, | |
3404 libpq_fe_h_file=${header_dir}libpq-fe.h; break) | |
3405 done | |
3406 | |
3407 test -n "$libpq_fe_h_file" && { AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) } | |
3408 | |
3409 if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then | |
3410 with_postgresql=yes | |
3411 AC_DEFINE(HAVE_POSTGRESQL) | |
3412 AC_CHECK_LIB(pq,PQconnectStart, [ | |
3413 with_postgresqlv7=yes; | |
3414 AC_DEFINE(HAVE_POSTGRESQLV7)]) | |
3415 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") | |
3416 XE_PREPEND(-lpq, postgresql_libs) | |
3417 XE_APPEND(modules/postgresql, MAKE_SUBDIR) | |
3418 need_modules_common=yes | |
3419 if test "$with_modules" = "yes"; then | |
3420 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR) | |
3421 fi | |
3422 elif test "$with_postgresql" = "yes"; then | |
3423 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.") | |
3424 fi | |
3425 fi | |
3426 AC_SUBST(postgresql_libs) | |
3427 | 3275 |
3428 dnl ---------------------- | 3276 dnl ---------------------- |
3429 dnl Graphics libraries | 3277 dnl Graphics libraries |
3430 dnl ---------------------- | 3278 dnl ---------------------- |
3431 | 3279 |
4734 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) | 4582 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) |
4735 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) | 4583 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) |
4736 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS) | 4584 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS) |
4737 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module) | 4585 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module) |
4738 | 4586 |
4587 | |
4739 dnl Compute lists of Makefiles and subdirs | 4588 dnl Compute lists of Makefiles and subdirs |
4740 AC_SUBST(SRC_SUBDIR_DEPS) | 4589 AC_SUBST(SRC_SUBDIR_DEPS) |
4741 XE_APPEND(src, MAKE_SUBDIR) | 4590 XE_APPEND(src, MAKE_SUBDIR) |
4591 | |
4592 dnl Autodetect dll support | |
4593 dnl This must come before the detection code for anything that is in a module | |
4594 if test "$with_modules" != "no"; then | |
4595 AC_CHECKING(for module support) | |
4596 | |
4597 dnl Check for MS-Windows | |
4598 if test "$with_msw" = "yes"; then | |
4599 have_dl=yes; | |
4600 else | |
4601 case "$opsys" in | |
4602 darwin ) have_dl=yes; AC_DEFINE(HAVE_DYLD) ;; | |
4603 * ) | |
4604 dnl Find headers and libraries | |
4605 AC_CHECK_HEADER(dlfcn.h, [ | |
4606 AC_MSG_CHECKING([for dlopen in -lc]) | |
4607 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
4608 [dlopen ("", 0);], [ have_dl=yes ], [ | |
4609 AC_MSG_CHECKING([for dlopen in -ldl]) | |
4610 ac_save_LIBS="$LIBS" | |
4611 LIBS="-ldl $LIBS" | |
4612 AC_TRY_LINK([#include <dlfcn.h>],dnl | |
4613 [dlopen ("", 0);], [ have_dl=yes ], | |
4614 [LIBS="$ac_save_LIBS"]) | |
4615 ac_save_LIBS=])]) | |
4616 if test -n "$have_dl"; then | |
4617 AC_DEFINE(HAVE_DLOPEN) | |
4618 else | |
4619 AC_CHECK_LIB(dld, shl_load, [ | |
4620 libdl=dld have_dl=yes; | |
4621 AC_DEFINE(HAVE_SHL_LOAD)], [ | |
4622 AC_CHECK_LIB(dld, dld_init, [ | |
4623 libdl=dld have_dl=yes; | |
4624 AC_DEFINE(HAVE_DLD_INIT)])]) | |
4625 fi | |
4626 esac dnl end !darwin | |
4627 fi dnl end !MS-Windows | |
4628 | |
4629 if test -n "$have_dl"; then | |
4630 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared | |
4631 XE_SHLIB_STUFF | |
4632 fi | |
4633 | |
4634 if test "$can_build_shared" = "yes"; then | |
4635 AC_DEFINE(HAVE_SHLIB) | |
4636 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) | |
4637 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS) | |
4638 AC_CHECK_FUNCS(dlerror _dlerror) | |
4639 with_modules=yes | |
4640 MOD_CC="../../lib-src/ellcc" | |
4641 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src" | |
4642 INSTALLPATH="\$(moduledir)" | |
4643 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM} | |
4644 OBJECT_TO_BUILD="\$(MODNAME).ell" | |
4645 else | |
4646 if test "$with_modules" = "yes"; then | |
4647 XE_DIE("Required module support cannot be provided.") | |
4648 else | |
4649 echo " No module support." | |
4650 fi | |
4651 with_modules=no | |
4652 MOD_CC="$XEMACS_CC" | |
4653 MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src" | |
4654 INSTALLPATH="" | |
4655 MOD_INSTALL_PROGRAM="true" | |
4656 OBJECT_TO_BUILD="\$(MODNAME).o" | |
4657 fi | |
4658 fi | |
4659 MODARCHDIR= | |
4660 MAKE_DOCFILE="../../lib-src/make-docfile" | |
4661 AC_SUBST(with_modules) | |
4662 AC_SUBST(MOD_CC) | |
4663 AC_SUBST(MODARCHDIR) | |
4664 AC_SUBST(MAKE_DOCFILE) | |
4665 AC_SUBST(MODCFLAGS) | |
4666 AC_SUBST(INSTALLPATH) | |
4667 AC_SUBST(MOD_INSTALL_PROGRAM) | |
4668 AC_SUBST(OBJECT_TO_BUILD) | |
4669 | |
4670 | |
4671 dnl Autodetect LDAP | |
4672 AC_CHECKING(for LDAP) | |
4673 ldap_libs= | |
4674 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } | |
4675 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } | |
4676 if test "$with_ldap" != "no"; then | |
4677 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) | |
4678 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } | |
4679 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) } | |
4680 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) } | |
4681 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 | |
4682 fi | |
4683 if test "$with_ldap" = "yes"; then | |
4684 AC_DEFINE(HAVE_LDAP) | |
4685 if test "$with_ldap_nolber" = "yes" ; then | |
4686 XE_PREPEND(-lldap, ldap_libs) | |
4687 else | |
4688 if test "$with_ldap_krb" = "yes" ; then | |
4689 XE_PREPEND(-lkrb, ldap_libs) | |
4690 fi | |
4691 if test "$with_ldap_krbdes" = "yes" ; then | |
4692 XE_PREPEND(-ldes, ldap_libs) | |
4693 XE_PREPEND(-lkrb, ldap_libs) | |
4694 fi | |
4695 XE_PREPEND(-llber, ldap_libs) | |
4696 XE_PREPEND(-lldap, ldap_libs) | |
4697 fi | |
4698 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs" | |
4699 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) | |
4700 LIBS="$save_LIBS" | |
4701 XE_APPEND(modules/ldap, MAKE_SUBDIR) | |
4702 need_modules_common=yes | |
4703 if test "$with_modules" = "yes"; then | |
4704 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR) | |
4705 fi | |
4706 fi | |
4707 AC_SUBST(ldap_libs) | |
4708 | |
4709 dnl Autodetect PostgreSQL | |
4710 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr; | |
4711 dnl in this case, configure will easily detect it there. | |
4712 dnl | |
4713 dnl If PostgreSQL is installed into a different prefix, | |
4714 dnl (such as the default /usr/local/pgsql when building from source), | |
4715 dnl that prefix must be specified using the --site-prefixes flag. | |
4716 postgresql_libs= | |
4717 if test "$with_postgresql" != "no"; then | |
4718 AC_CHECKING(for PostgreSQL) | |
4719 | |
4720 dnl Look for these standard header file locations, known to be used on Linux | |
4721 for header_dir in "" "pgsql/" "postgresql/"; do | |
4722 AC_CHECK_HEADER(${header_dir}libpq-fe.h, | |
4723 libpq_fe_h_file=${header_dir}libpq-fe.h; break) | |
4724 done | |
4725 | |
4726 test -n "$libpq_fe_h_file" && { AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) } | |
4727 | |
4728 if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then | |
4729 with_postgresql=yes | |
4730 AC_DEFINE(HAVE_POSTGRESQL) | |
4731 AC_CHECK_LIB(pq,PQconnectStart, [ | |
4732 with_postgresqlv7=yes; | |
4733 AC_DEFINE(HAVE_POSTGRESQLV7)]) | |
4734 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") | |
4735 XE_PREPEND(-lpq, postgresql_libs) | |
4736 XE_APPEND(modules/postgresql, MAKE_SUBDIR) | |
4737 need_modules_common=yes | |
4738 if test "$with_modules" = "yes"; then | |
4739 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR) | |
4740 fi | |
4741 elif test "$with_postgresql" = "yes"; then | |
4742 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.") | |
4743 fi | |
4744 fi | |
4745 AC_SUBST(postgresql_libs) | |
4746 | |
4742 internal_makefile_list="Makefile.in" | 4747 internal_makefile_list="Makefile.in" |
4743 SUBDIR_MAKEFILES='' | 4748 SUBDIR_MAKEFILES='' |
4744 test -d lock || mkdir lock | 4749 test -d lock || mkdir lock |
4745 for dir in $MAKE_SUBDIR; do | 4750 for dir in $MAKE_SUBDIR; do |
4746 case "$dir" in */* ) dnl Implement mkdir -p | 4751 case "$dir" in */* ) dnl Implement mkdir -p |