Mercurial > hg > xemacs-beta
comparison src/config.h.in @ 4829:9987da5935bd
try to fix problems with link errors involving inlined functions
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 27 Dec 2009 20:16:57 -0600 |
parents | bc4f2511bbea |
children | 4dd2389173fc |
comparison
equal
deleted
inserted
replaced
4828:f31c12360354 | 4829:9987da5935bd |
---|---|
649 | 649 |
650 /* Define EXTERNAL_WIDGET to compile support for using the editor as a | 650 /* Define EXTERNAL_WIDGET to compile support for using the editor as a |
651 widget within another program. */ | 651 widget within another program. */ |
652 #undef EXTERNAL_WIDGET | 652 #undef EXTERNAL_WIDGET |
653 | 653 |
654 /* There are some special-case defines for gcc and lcc. */ | 654 /* There are some special-case defines for gcc, g++ and lcc. */ |
655 #undef USE_GCC | 655 #undef USE_GCC |
656 #undef USE_LCC | 656 #undef USE_GPLUSPLUS |
657 #undef USE_LCC /* #### Not currently set in configure */ | |
657 | 658 |
658 /* Compile in support for CDE (Common Desktop Environment) drag and drop? | 659 /* Compile in support for CDE (Common Desktop Environment) drag and drop? |
659 Requires libDtSvc, which typically must be present at runtime. */ | 660 Requires libDtSvc, which typically must be present at runtime. */ |
660 #undef HAVE_CDE | 661 #undef HAVE_CDE |
661 | 662 |
1073 Use `inline static' to define inline functions in .c files. | 1074 Use `inline static' to define inline functions in .c files. |
1074 See the Internals manual for examples and more information. */ | 1075 See the Internals manual for examples and more information. */ |
1075 | 1076 |
1076 #if (defined ( __STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ | 1077 #if (defined ( __STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ |
1077 || defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs) | 1078 || defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs) |
1079 # define INLINE_HEADERS_ARE_STATIC | |
1078 # define INLINE_HEADER inline static | 1080 # define INLINE_HEADER inline static |
1079 #elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS) | 1081 #elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS) |
1080 # define INLINE_HEADER inline | 1082 # define INLINE_HEADER inline |
1081 #else | 1083 #else |
1082 # define INLINE_HEADER inline extern | 1084 # define INLINE_HEADER inline extern |
1144 #define ERROR_CHECK_STRUCTURES | 1146 #define ERROR_CHECK_STRUCTURES |
1145 #define ERROR_CHECK_TEXT | 1147 #define ERROR_CHECK_TEXT |
1146 #define ERROR_CHECK_TYPES | 1148 #define ERROR_CHECK_TYPES |
1147 #endif /* ERROR_CHECK_ALL */ | 1149 #endif /* ERROR_CHECK_ALL */ |
1148 | 1150 |
1151 /* It's very tricky. In some circumstances, if we don't include the | |
1152 ERROR_CHECK_TYPES functions in xemacs.def.in.in, we get lots of | |
1153 undefined references from eldap.o and postgresql.o; but in other | |
1154 circumstances, if we DO include them, we get undefined references | |
1155 in xemacs-export.o to the same functions. We try here to grok when | |
1156 we need to include them in xemacs.def.in.in. I originally thought | |
1157 it was enough to condition on !defined (INLINE_HEADERS_ARE_STATIC) -- | |
1158 if they're static, they shouldn't lead to any external references | |
1159 in the modules, right? Wrong, under non-optimized builds. So now | |
1160 let's try conditioning on !C++ -- by examining inline.o with nm, | |
1161 it seems it's the C++ builds where inline.o doesn't get any inline | |
1162 functions compiled into it at all, which would lead to problems if | |
1163 we reference them in xemacs.def.in.in. | |
1164 | |
1165 #### FIXME Should we condition on GCC and defined(emacs), like we | |
1166 do (inverted) for INLINE_HEADERS_ARE_STATIC? --ben */ | |
1167 | |
1168 /* Checking for !defined (__cplusplus) doesn't work, because we typically | |
1169 aren't using the C++ preprocessor when processing xemacs.def.in.in | |
1170 even if we're using a C++ compiler. I suspect we only need this at | |
1171 all GCC is being used. */ | |
1172 #if defined (ERROR_CHECK_TYPES) && !defined (USE_GPLUSPLUS) | |
1173 /* #if !defined (INLINE_HEADERS_ARE_STATIC) */ | |
1174 #define NEED_ERROR_CHECK_TYPES_INLINES | |
1175 #endif | |
1176 | |
1149 #endif /* _SRC_CONFIG_H_ */ | 1177 #endif /* _SRC_CONFIG_H_ */ |