Location: hroptatyr@xxxxxxxxxxxxxxxxxxxx
http://www.math.tu-berlin.de/~freundt/archives/sxemacs/
Revision: sxemacs--hrop--22.1.9--patch-77
Archive: hroptatyr@xxxxxxxxxxxxxxxxxxxx
Creator: Sebastian Freundt <hroptatyr@xxxxxxxxxxx>
Date: Sun Jun 1 02:11:44 UTC 2008
Standard-date: 2008-06-01 02:11:44 GMT
Modified-files: configure.ac m4/sxe-aux.m4
m4/sxe-compiler.m4 src/Makefile.am src/ent.h
New-patches:
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-25
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-26
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-27
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-28
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-29
hroptatyr@xxxxxxxxxxxxxxxxxxxx/sxemacs--hrop--22.1.9--patch-77
Summary: minor, build cleaner on darwin
Keywords:
This changeset fixes some well-hidden build quirks, mainly arising on darwin
systems. Most importantly, sxemacs is only built with libmule.a and libsxedb.a
if there are actual objects in those archives. (Obviously darwin ar cannot
create empty archives).
* configure.ac: fix, report the right ENT feature set in installation summary
* m4/sxe-aux.m4 (__SXE_MAKE_ADDER): fix, also define a conditional
* m4/sxe-compiler.m4 (SXE_CHECK_CC_EXTERN_INLINE): fix, treat darwin specially
(SXE_CC_MAXOPT_GNU): fix, check for new compiler flags (don't use them though)
* src/Makefile.am (pdumplibs): fix, conditionally include library archives,
depending on whether or not the archive is empty
* src/ent.h: fix, do not declare symbols which we never define
* added files
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-25
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-26
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-27
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-28
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-29
{arch}/sxemacs/sxemacs--hrop/sxemacs--hrop--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxx/patch-log/patch-77
* modified files
--- orig/configure.ac
+++ mod/configure.ac
@@ -1946,7 +1946,7 @@
elif test "$ent_dijkstra" = "no yes"; then
## we didn't want GMP but we have it
## do nothing in that case
- have_ent_gmp="yes"
+ have_ent_gmp="no"
elif test "$ent_dijkstra" = "no no"; then
## great, we didnt opt for GMP and we're lucky, it's not there either
have_ent_gmp="no"
--- orig/m4/sxe-aux.m4
+++ mod/m4/sxe-aux.m4
@@ -69,6 +69,7 @@
m4_define([__SXE_MAKE_ADDER], [
## arg1 is the name to be used throughout m4
## arg2 is the library sans _la or _a to be used in the Makefiles
+ ## arg3 are comma-separated additional vars to substitute
## defines SXE_ADD_<arg1>_OBJ
## defines SXE_ADD_<arg1>_OBJS
## defines SXE_SUBST_<arg1>_OBJS
@@ -88,7 +89,13 @@
m4_define([SXE_SUBST_]$1[_OBJS], [
AC_SUBST($2_objs)
+ ## subst additional vars
+ m4_foreach_w([var], $3, [AC_SUBST(var)])
+ ## also define a conditional
+ AM_CONDITIONAL([NEED_]translit([$2], [-.a-z], [__A-Z]),
+ [test -n "$$2_objs"])
])dnl
+
])dnl __SXE_MAKE_ADDER
@@ -99,14 +106,7 @@
__SXE_MAKE_ADDER([CRUFT], [libcruft])
dnl creates SXE_ADD_DB_{OBJ,OBJS}
-__SXE_MAKE_ADDER([DB], [libsxedb])
-dnl redefine this
-AC_DEFUN([SXE_SUBST_DB_OBJS], [
- AC_SUBST([libsxedb_objs])
- AC_SUBST([DB_CPPFLAGS])
- AC_SUBST([DB_LDFLAGS])
- AC_SUBST([DB_LIBS])
-])dnl SXE_SUBST_DB_OBJS
+__SXE_MAKE_ADDER([DB], [libsxedb], [DB_CPPFLAGS DB_LDFLAGS DB_LIBS])
dnl creates SXE_ADD_ENT_{OBJ,OBJS}
__SXE_MAKE_ADDER([ENT], [libent])
--- orig/m4/sxe-compiler.m4
+++ mod/m4/sxe-compiler.m4
@@ -171,25 +171,26 @@
[sxe_cc_gnu89_extern_inline="no"])
SXE_RESTORE_LIBS
- if test "$GCC" = "yes"; then
- case "$ac_cv_build" in
- powerpc*-*-darwin*|i686*-*-darwin*)
- # For now we assume all MacOS compilers
- # are not able to handle EXTERN_INLINE
-
- # case "$compiler_version" in
- # gcc*4.0.1*)
- AC_DEFINE([SXE_STATIC_EXTERN_INLINE],
[1],
- [The MacOS gcc does not support
extern inline])
- sxe_cc_gnu89_extern_inline="no"
- # ;;
- # esac
- ;;
- esac
- fi
AC_MSG_RESULT([$sxe_cc_gnu89_extern_inline])
])dnl SXE_CHECK_CC_GNU89_EXTERN_INLINE
+AC_DEFUN([SXE_CHECK_CC_EXTERN_INLINE_DARWIN], [
+ AC_MSG_CHECKING([whether $CC supports `extern inline'])
+
+ case "$compiler_version" in
+ gcc*4.0.1* | * )
+ # For now we assume all MacOS compilers
+ # are not able to handle EXTERN_INLINE
+ AC_DEFINE([SXE_STATIC_EXTERN_INLINE], [1],
+ [The MacOS gcc does not support extern inline])
+ sxe_cc_gnu89_extern_inline="no"
+ ;;
+ esac
+
+ AC_MSG_RESULT([$sxe_cc_gnu89_extern_inline])
+])dnl SXE_CHECK_CC_EXTERN_INLINE_DARWIN
+
+
AC_DEFUN([SXE_CHECK_CC_GNU89_EXTERN_INLINE_ALLERGY], [dnl
## defines sxe_cc_gnu89_extern_inline_allergy
AC_MSG_CHECKING([whether $CC is allergic against gnu89 `extern inline'
in C99])
@@ -279,12 +280,20 @@
])dnl SXE_CHECK_CC_GNU89_EXTERN_INLINE_MEDICINE
AC_DEFUN([SXE_CHECK_CC_EXTERN_INLINE], [dnl
- ## we simply presume that extern inline is possible first
- SXE_CHECK_CC_GNU89_EXTERN_INLINE
- ## check if gcc dislikes gnu89 inlines in c99
- SXE_CHECK_CC_GNU89_EXTERN_INLINE_ALLERGY
- ## generally check if we support -fgnu89-inline
- SXE_CHECK_CC__FGNU89_INLINE
+
+ case "$ac_cv_build" in
+ *-*-darwin* )
+ ## don't bother at all ... just invoke the darwin handler
+ SXE_CHECK_CC_EXTERN_INLINE_DARWIN
+ ;;
+ *)
+ ## we simply presume that extern inline is possible first
+ SXE_CHECK_CC_GNU89_EXTERN_INLINE
+ ## check if gcc dislikes gnu89 inlines in c99
+ SXE_CHECK_CC_GNU89_EXTERN_INLINE_ALLERGY
+ ## generally check if we support -fgnu89-inline
+ SXE_CHECK_CC__FGNU89_INLINE
+ esac
if test "$sxe_cc_gnu89_extern_inline" = "yes" -a \
"$sxe_cc_gnu89_extern_inline_allergy" = "yes"; then
@@ -857,14 +866,20 @@
SXE_CHECK_PROC_FLAG([sse2])
SXE_CHECK_PROC_FLAG([sse3])
SXE_CHECK_PROC_FLAG([ssse3])
+ SXE_CHECK_PROC_FLAG([sse4])
+ SXE_CHECK_PROC_FLAG([sse5])
SXE_CHECK_COMPILER_FLAGS([-msse])
SXE_CHECK_COMPILER_FLAGS([-msse2])
SXE_CHECK_COMPILER_FLAGS([-msse3])
SXE_CHECK_COMPILER_FLAGS([-mssse])
SXE_CHECK_COMPILER_FLAGS([-mssse3])
+ SXE_CHECK_COMPILER_FLAGS([-msse4])
+ SXE_CHECK_COMPILER_FLAGS([-msse5])
SXE_CHECK_COMPILER_FLAGS([-mfpmath=sse])
+ SXE_CHECK_COMPILER_FLAGS([-msse -mfpmath=sse])
+ ## atm, the maximum SSE set we use is sse3
sxe_cv_c_flags__msse_added="no"
if test "$sxe_cv_proc_flag_ssse3" = "yes"; then
if test "$sxe_cv_c_flags__mssse3" = "yes"; then
@@ -897,8 +912,17 @@
if test "$sxe_cv_c_flags__mfpmath_sse" = "yes" -a \
"$sxe_cv_c_flags__msse_added" = "yes"; then
optiflags="$optiflags -mfpmath=sse"
+ elif test "$sxe_cv_c_flags__msse__mfpmath_sse" = "yes" -a \
+ "$sxe_cv_c_flags__msse_added" = "yes"; then
+ optiflags="$optiflags -mfpmath=sse"
fi
+ ## check for openmp support
+ SXE_CHECK_COMPILER_FLAGS([-fopenmp])
+ ## there are also: -xopenmp -openmp -mp -omp -qsmp=omp
+ ## ... do nothing at the moment
+ ## we had to add -fopenmp to optiflags and -lgomp to ldflags
+
# -malign-double for x86 systems
SXE_CHECK_COMPILER_FLAGS([-malign-double])
## won't add this one, since it is causing problems
--- orig/src/Makefile.am
+++ mod/src/Makefile.am
@@ -59,7 +59,14 @@
bin_SCRIPTS = sxemacs.dmp
archlib_DATA = config.values DOC
-pdumplibs = libsxecore.a libsxeui.a libsxeevents.a libent.a libmule.a libmm.a
libsxemem.a libsxedb.a
+pdumplibs = libsxecore.a libsxeui.a libsxeevents.a libent.a libmm.a libsxemem.a
+if NEED_LIBMULE
+pdumplibs += libmule.a
+endif
+if NEED_LIBSXEDB
+pdumplibs += libsxedb.a
+endif
+
nodumplibs = libcruft.a
if USE_MEMALLOC
nodumplibs += libmemalloc.a
--- orig/src/ent.h
+++ mod/src/ent.h
@@ -464,8 +464,11 @@
*/
extern_inline long unsigned int
__ase_flsl(long unsigned int x) __attribute__((always_inline));
+#if 0
+/* as long as it is undefined ... */
extern_inline unsigned int
__ase_fls(unsigned int x) __attribute__((always_inline));
+#endif
#if defined __x86_64__
extern_inline long unsigned int
pgp8_C1uEnstO.pgp
Description: PGP signature
|