Rename config-defs.h to mozilla-config.h. Always generate mozilla-config.h and install it with the rest of the headers so that embeddors can use it instead of duplicating the flags on the commandline.

Bug #163929 r=bryner
This commit is contained in:
seawood%netscape.com 2002-08-22 00:50:51 +00:00
Родитель 617cbb77a3
Коммит 86234c6b5a
3 изменённых файлов: 537 добавлений и 549 удалений

Просмотреть файл

@ -281,7 +281,7 @@ endif
GARBAGE_DIRS += dist GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \ DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \ dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
unallmakefiles \ unallmakefiles mozilla-config.h \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
ifeq ($(BUILD_MODULES),all) ifeq ($(BUILD_MODULES),all)
@ -307,6 +307,8 @@ endif
endif endif
EXPORTS = mozilla-config.h
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
ifeq ($(BUILD_MODULES),all) ifeq ($(BUILD_MODULES),all)

1046
configure поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -625,7 +625,7 @@ if test "$GNU_CC"; then
_PEDANTIC=1 _PEDANTIC=1
_IGNORE_LONG_LONG_WARNINGS=1 _IGNORE_LONG_LONG_WARNINGS=1
_DEFINES_CFLAGS='-include $(DEPTH)/config-defs.h -DMOZILLA_CLIENT' _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT'
_USE_CPP_INCLUDE_FLAG=1 _USE_CPP_INCLUDE_FLAG=1
else else
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
@ -645,7 +645,7 @@ if test "$GNU_CXX"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS}" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS}"
fi fi
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/config-defs.h' _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h'
_USE_CPP_INCLUDE_FLAG=1 _USE_CPP_INCLUDE_FLAG=1
else else
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT $(ACDEFINES)' _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT $(ACDEFINES)'
@ -1037,8 +1037,8 @@ case "$target" in
USE_PTHREADS=1 USE_PTHREADS=1
_PEDANTIC= _PEDANTIC=
LIBS="$LIBS -lsocket -lstdc++" LIBS="$LIBS -lsocket -lstdc++"
_DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/config-defs.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' _DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506'
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/config-defs.h -D_POSIX_C_SOURCE=199506' _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/mozilla-config.h -D_POSIX_C_SOURCE=199506'
if test "$with_x" != "yes" if test "$with_x" != "yes"
then then
_PLATFORM_DEFAULT_TOOLKIT="photon" _PLATFORM_DEFAULT_TOOLKIT="photon"
@ -3887,13 +3887,6 @@ else
fi], fi],
AC_DEFINE(MOZ_USER_DIR,".mozilla") ) AC_DEFINE(MOZ_USER_DIR,".mozilla") )
dnl Need the contents of config-defs.h in the build logs
VERBOSE_CONFIG_DEFS=1
MOZ_ARG_ENABLE_BOOL(verbose-config-defs,
[ --disable-verbose-config-defs
Do not output the contents of config-defs.h],
VERBOSE_CONFIG_DEFS=)
dnl ======================================================== dnl ========================================================
dnl = Doxygen configuration dnl = Doxygen configuration
dnl ======================================================== dnl ========================================================
@ -4741,31 +4734,36 @@ dnl ========================================================
# Save the defines header file before autoconf removes it. # Save the defines header file before autoconf removes it.
# (Do not add AC_DEFINE calls after this line.) # (Do not add AC_DEFINE calls after this line.)
if test "$_USE_CPP_INCLUDE_FLAG"; then
_CONFIG_TMP=confdefs-tmp.h _CONFIG_TMP=confdefs-tmp.h
_CONFIG_DEFS_H=config-defs.h _CONFIG_DEFS_H=mozilla-config.h
cat > $_CONFIG_TMP <<\EOF cat > $_CONFIG_TMP <<\EOF
/* List of defines generated by configure. Included with preprocessor flag, /* List of defines generated by configure. Included with preprocessor flag,
* -include, to avoid long list of -D defines on the compile command-line. * -include, to avoid long list of -D defines on the compile command-line.
* Do not edit. * Do not edit.
*/ */
#ifndef _MOZILLA_CONFIG_H_
#define _MOZILLA_CONFIG_H_
EOF EOF
sort confdefs.h >> $_CONFIG_TMP sort confdefs.h >> $_CONFIG_TMP
# Only write config-defs.h when something changes (or it doesn't exist) cat >> $_CONFIG_TMP <<\EOF
#endif /* _MOZILLA_CONFIG_H_ */
EOF
# Only write mozilla-config.h when something changes (or it doesn't exist)
if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
rm $_CONFIG_TMP rm $_CONFIG_TMP
else else
AC_MSG_RESULT("creating $_CONFIG_DEFS_H") AC_MSG_RESULT("creating $_CONFIG_DEFS_H")
mv -f $_CONFIG_TMP $_CONFIG_DEFS_H mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
if test "$VERBOSE_CONFIG_DEFS"; then echo ==== $_CONFIG_DEFS_H =================================
echo ==== $_CONFIG_DEFS_H ================================= cat $_CONFIG_DEFS_H
cat $_CONFIG_DEFS_H
fi
fi fi
fi
AC_SUBST(MOZ_DEFINES) AC_SUBST(MOZ_DEFINES)