X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=configure.ac;h=2a483f09891ace1ae5e4e9c0a683831d9386633f;hb=a27549ef3e349d1624e697acf1c33b22d26a85d6;hp=36fdae6b3c0e3c87ca5f63862f8eea15bcbef03c;hpb=11c5dc03a87e1c501ac4d231aadb8792b2ce4150;p=sxemacs diff --git a/configure.ac b/configure.ac index 36fdae6..2a483f0 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_COPYRIGHT( #### Copyright (C) 2005 Malcolm Purvis. #### Copyright (C) 2005, 2006, 2007 Steve Youngs. #### Copyright (C) 2006, 2007, 2008 Sebastian Freundt. +#### Copyright (C) 2007, 2010, 2011 Nelson Ferreira ### Don't edit this script! ### This script was automatically generated by the `autoconf' program @@ -873,6 +874,8 @@ AS_MESSAGE([Let's look for the entire C build chain]) SXE_CHECK_CC SXE_CHECK_CFLAGS +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + ## check machine chars AS_MESSAGE([Let's have a detailed glance at your machine]) SXE_PROC_CPUID @@ -1606,23 +1609,18 @@ dnl special pthread handling dnl AIX uses pthreads instead of pthread, and HP/UX uses cma dnl FreeBSD uses -pthread AC_CHECK_LIB(pthread, pthread_create) -if test $ac_cv_lib_pthread_pthread_create = yes; then - have_threads=yes - have_pthreads_opt=yes - case "`$CC -pthreads 2>&1`" in - *unrecognized\ option*) have_pthreads_opt=no ;; - esac - if test "$have_pthreads_opt" = "yes"; then - SXE_PREPEND_UNDUP(-pthreads, c_switch_site) - fi - have_pthread_opt=yes - case "`$CC -pthread 2>&1`" in - *unrecognized\ option*) have_pthread_opt=no ;; - esac - if test "$have_pthread_opt" = "yes"; then - SXE_PREPEND_UNDUP(-pthread, c_switch_site) - fi - SXE_PREPEND(-lpthread, MM_LIBS) +if test "${ac_cv_lib_pthread_pthread_create}" = "yes"; then + have_threads=yes + + SXE_CHECK_COMPILER_FLAGS([-pthreads]) + SXE_CHECK_COMPILER_FLAGS([-pthread]) + if test "${sxe_cv_c_flags__pthreads}" = "yes"; then + SXE_PREPEND_UNDUP([-pthreads], [c_switch_site]) + fi + if test "${sxe_cv_c_flags__pthread}" = "yes"; then + SXE_PREPEND_UNDUP([-pthread], [c_switch_site]) + fi + SXE_PREPEND([-lpthread], [MM_LIBS]) fi dnl test for AIX pthreads @@ -1800,12 +1798,17 @@ if test "$opsys" != "darwin"; then have_ase_perm="yes" have_ase_resclass="yes" fi - -if test "$with_modules_cl" = "yes" -a "$have_bison" = "yes"; then - have_modules_cl="yes" -fi -if test "$with_static_modules_cl" = "yes" -a "$have_bison" = "yes"; then - have_static_modules_cl="yes" +if test "$have_bison" = "yes"; then + if test "$with_modules_cl" = "yes" ; then + have_modules_cl="yes" + fi + if test "$with_static_modules_cl" = "yes"; then + have_static_modules_cl="yes" + fi +else + if test "$with_modules_cl" = "yes" -o "$with_static_modules_cl" = "yes"; then + AC_MSG_WARN([Sorry no bison means no cl module for you.]) + fi fi SXE_EMOD_STATMOD([cl]) @@ -3792,9 +3795,11 @@ fi if test -z "$with_package_path" && test -n "$with_package_prefix" ; then if test "$with_mule" = "yes" ; then - with_package_path="~/.sxemacs/site-packages:~/.sxemacs/xemacs-packages:~/.sxemacs/mule-packages:~/.sxemacs/sxemacs-packages:${with_package_prefix}/site-packages:${with_package_prefix}/xemacs-packages:${with_package_prefix}/mule-packages:${with_package_prefix}/sxemacs-packages" + with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages:~/.sxemacs/mule-packages" + with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages:${with_package_prefix}/mule-packages" else - with_package_path="~/.sxemacs/site-packages:~/.sxemacs/xemacs-packages:~/.sxemacs/sxemacs-packages:${with_package_prefix}/site-packages:${with_package_prefix}/xemacs-packages:${with_package_prefix}/sxemacs-packages" + with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages" + with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages" fi fi