Sync with the KDE CVS.

ver1_5_1
Christophe Teyssier 2004-09-22 21:09:11 +00:00
parent 2d2ead1531
commit 55ba4ef5d9
20 changed files with 5711 additions and 2861 deletions

View File

@ -17,6 +17,9 @@ apidox-am-yes:
echo "IMAGE_PATH = $(top_srcdir)/doc/api" >> Doxyfile ;\
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile; \
echo "HTML_OUTPUT = $(subdir)/html" >> Doxyfile; \
echo "HTML_HEADER = $(top_builddir)/apidocs/common/header.html" >> Doxyfile;\
echo "HTML_FOOTER = $(top_builddir)/apidocs/common/footer.html" >> Doxyfile;\
echo "HTML_STYLESHEET = $(top_builddir)/apidocs/common/doxygen.css" >> Doxyfile;\
echo "LATEX_OUTPUT = $(subdir)/latex" >> Doxyfile; \
echo "RTF_OUTPUT = $(subdir)/rtf" >> Doxyfile; \
echo "MAN_OUTPUT = $(subdir)/man" >> Doxyfile; \
@ -24,7 +27,17 @@ apidox-am-yes:
echo "GENERATE_MAN = $(GENERATE_FLAG)" >> Doxyfile ;\
echo "GENERATE_LATEX = $(GENERATE_FLAG)" >> Doxyfile ;\
if test -n "$(DOXYGEN_EXCLUDE)"; then \
echo "EXCLUDE_PATTERNS += $(DOXYGEN_EXCLUDE)" >> Doxyfile; \
patterns= ;\
dirs= ;\
for item in `echo "$(DOXYGEN_EXCLUDE)"`; do \
if test -d "$(srcdir)/$$item"; then \
dirs="$$dirs $(srcdir)/$$item/" ;\
else \
patterns="$$patterns $$item" ;\
fi ;\
done ;\
echo "EXCLUDE_PATTERNS += $$patterns" >> Doxyfile; \
echo "EXCLUDE += $$dirs" >> Doxyfile ;\
fi ;\
echo "TAGFILES = \\" >> Doxyfile; \
tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
@ -45,7 +58,7 @@ apidox-am-yes:
fi ;\
fi ;\
done ;\
echo "GENERATE_TAGFILE = $(top_builddir)/apidocs/$(subdir)/$(subdir).tag" >> Doxyfile ;\
echo "GENERATE_TAGFILE = $(top_builddir)/apidocs/$(subdir)/`basename $(subdir)`.tag" >> Doxyfile ;\
echo "IGNORE_PREFIX = K" >> Doxyfile ;\
echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\
$(DOXYGEN) Doxyfile ;\
@ -65,9 +78,9 @@ install-apidox:
fi; \
if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\
for file in $$list; do \
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
done; \
fi; \
rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
@ -76,9 +89,9 @@ install-apidox:
if test -d $(top_builddir)/apidocs; then \
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
list=`cd $(top_builddir)/apidocs && ls -1`; \
echo "installing $(top_builddir)/apidocs/$$file" ;\
for file in $$list; do \
if test -f $(top_builddir)/apidocs/$$file; then \
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
fi; \
done ; fi; \
@ -126,8 +139,8 @@ apidox-am-toplevel-no:
apidox-am-toplevel-yes:
@echo "*** Creating API documentation main page"; \
cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
echo "PROJECT_NAME = $(DOXYGEN_PROJECT_NAME)" >> Doxyfile ; \
echo "PROJECT_NUMBER = $(DOXYGEN_PROJECT_NUMBER)" >> Doxyfile ; \
echo "PROJECT_NAME = \"$(DOXYGEN_PROJECT_NAME)\"" >> Doxyfile ; \
echo "PROJECT_NUMBER = \"$(DOXYGEN_PROJECT_NUMBER)\"" >> Doxyfile ; \
echo "INPUT = $(top_srcdir)" >> Doxyfile ; \
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile ; \
echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \
@ -158,6 +171,9 @@ apidox-am-toplevel-yes:
doxygen Doxyfile; \
rm -f Doxyfile
.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
# Local Variables:
# mode: makefile
# End:

View File

@ -1,4 +1,4 @@
# Doxyfile 1.2.15
# Doxyfile 1.3.6
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@ -11,7 +11,7 @@
# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# General configuration options
# Project related configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
@ -23,7 +23,7 @@ PROJECT_NAME =
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = "Version 3.0"
PROJECT_NUMBER =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@ -36,12 +36,158 @@ OUTPUT_DIRECTORY = ../apidocs/
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese,
# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
# This tag can be used to specify the encoding used in the generated output.
# The encoding is not always determined by the language that is chosen,
# but also whether or not the output is meant for Windows or non-Windows users.
# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
# forces the Windows encoding (this is the default for the Windows binary),
# whereas setting the tag to NO uses a Unix-style encoding (the default for
# all platforms other than Windows).
USE_WINDOWS_ENCODING = NO
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = NO
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
# the brief description of a member or function before the detailed description.
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
# This tag implements a quasi-intelligent brief description abbreviator
# that is used to form the text in various listings. Each string
# in this list, if found as the leading text of the brief description, will be
# stripped from the text and the result after processing the whole list, is used
# as the annotated text. Otherwise, the brief description is used as-is. If left
# blank, the following values are used ("$name" is automatically replaced with the
# name of the entity): "The $name class" "The $name widget" "The $name file"
# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
ABBREVIATE_BRIEF =
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = YES
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
# members of a class in the documentation of that class as if those members were
# ordinary class members. Constructors, destructors and assignment operators of
# the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = NO
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user-defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. It is allowed to use relative paths in the argument list.
# If left blank the directory from which doxygen is run is used as the
# path to strip.
STRIP_FROM_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the JavaDoc
# comments will behave just like the Qt-style comments (thus requiring an
# explicit @brief command for a brief description.
JAVADOC_AUTOBRIEF = YES
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
# comments) as a brief description. This used to be the default behaviour.
# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = NO
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
# If set to NO, the detailed description appears after the member
# documentation.
DETAILS_AT_TOP = NO
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# re-implements.
INHERIT_DOCS = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
DISTRIBUTE_GROUP_DOC = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 4
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
# put the command \sideeffect (or @sideeffect) in the documentation, which
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES = obsolete=@deprecated
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = NO
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
# only. Doxygen will then generate output that is more tailored for Java.
# For instance, namespaces will be presented as packages, qualified scopes
# will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
# the same type (for instance a group of public functions) to be put as a
# subgroup of that type (e.g. under the Public Functions section). Set it to
# NO to prevent subgrouping. Alternatively, this can be done per class using
# the \nosubgrouping command.
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
@ -75,50 +221,24 @@ HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
# If set to NO (the default) these class will be included in the various
# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = YES
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
# friend (class|struct|union) declarations.
# If set to NO (the default) these declarations will be included in the
# documentation.
BRIEF_MEMBER_DESC = YES
HIDE_FRIEND_COMPOUNDS = NO
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
# the brief description of a member or function before the detailed description.
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
# documentation blocks found inside the body of a function.
# If set to NO (the default) these blocks will be appended to the
# function's detailed documentation block.
REPEAT_BRIEF = YES
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = YES
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
# members of a class in the documentation of that class as if those members were
# ordinary class members. Constructors, destructors and assignment operators of
# the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = NO
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. It is allowed to use relative paths in the argument list.
STRIP_FROM_PATH =
HIDE_IN_BODY_DOCS = NO
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
@ -127,58 +247,26 @@ STRIP_FROM_PATH =
INTERNAL_DOCS = NO
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
# file names in lower case letters. If set to YES upper case letters are also
# file names in lower-case letters. If set to YES upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# users are adviced to set this option to NO.
# users are advised to set this option to NO.
CASE_SENSE_NAMES = YES
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation
# will put a list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = YES
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the JavaDoc
# comments will behave just like the Qt-style comments (thus requiring an
# explict @brief command for a brief description.
JAVADOC_AUTOBRIEF = YES
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# reimplements.
INHERIT_DOCS = YES
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
@ -191,17 +279,22 @@ INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
# brief documentation of file, namespace and class members alphabetically
# by member name. If set to NO (the default) the members will appear in
# declaration order.
DISTRIBUTE_GROUP_DOC = NO
SORT_BRIEF_DOCS = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
# sorted by fully-qualified names, including namespaces. If set to
# NO (the default), the class list will be sorted only by class name,
# not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the
# alphabetical list.
TAB_SIZE = 4
SORT_BY_SCOPE_NAME = NO
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
@ -221,18 +314,11 @@ GENERATE_TESTLIST = NO
GENERATE_BUGLIST = YES
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
# put the command \sideeffect (or @sideeffect) in the documentation, which
# will result in a user defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
# disable (NO) the deprecated list. This list is created by putting
# \deprecated commands in the documentation.
ALIASES = libdoc=@mainpage \
sect=<p><b> \
reimplemented= \
"deprecated=<b>This class or method is obsolete, it is provided for compatibility only.</b>" \
obsolete=@deprecated
GENERATE_DEPRECATEDLIST= YES
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
@ -240,7 +326,7 @@ ALIASES = libdoc=@mainpage \
ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
# the initial value of a variable or define consist of for it to appear in
# the initial value of a variable or define consists of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
@ -249,20 +335,6 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C.
# For instance some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = NO
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
# only. Doxygen will then generate output that is more tailored for Java.
# For instance namespaces will be presented as packages, qualified scopes
# will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
@ -282,7 +354,7 @@ QUIET = YES
# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
WARNINGS = NO
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
@ -290,6 +362,13 @@ WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some
# parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES
# The WARN_FORMAT tag determines the format of the warning messages that
# doxygen can produce. The string should contain the $file, $line, and $text
# tags, which will be replaced by the file and line number from which the
@ -319,12 +398,17 @@ INPUT =
# and *.h) to filter out the source-files in the directories. If left
# blank the following patterns are tested:
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
# *.h++ *.idl *.odl
# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
FILE_PATTERNS = *.h \
*.cpp \
*.cc \
*.hpp
*.hpp \
*.dox \
*.c++ \
*.cxx \
*.h++ \
*.hh
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
@ -391,7 +475,7 @@ INPUT_FILTER =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse.
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = NO
@ -400,7 +484,9 @@ FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
# be generated. Documented entities will be cross-referenced with these sources.
# be generated. Documented entities will be cross-referenced with these sources.
# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = YES
@ -409,6 +495,12 @@ SOURCE_BROWSER = YES
INLINE_SOURCES = NO
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
# then for each documented function all documented
# functions referencing it will be listed.
@ -421,6 +513,12 @@ REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
@ -477,10 +575,12 @@ HTML_HEADER = ../apidocs/common/header.html
HTML_FOOTER = ../apidocs/common/footer.html
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet
# will generate a default style sheet. Note that doxygen will try to copy
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
HTML_STYLESHEET = ../apidocs/common/doxygen.css
@ -497,6 +597,20 @@ HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
# written to the html output directory.
CHM_FILE =
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
# the HTML help compiler on the generated index.hhp.
HHC_LOCATION =
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
@ -510,7 +624,7 @@ GENERATE_CHI = NO
BINARY_TOC = NO
# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the Html help documentation and to the tree view.
# to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = NO
@ -528,10 +642,9 @@ ENUM_VALUES_PER_LINE = 4
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
# or Internet explorer 4.0+). Note that for large projects the tree generation
# can take a very long time. In such cases it is better to disable this feature.
# Windows users are probably better off using the HTML help feature.
# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
# probably better off using the HTML help feature.
GENERATE_TREEVIEW = NO
@ -556,7 +669,8 @@ GENERATE_LATEX = NO
LATEX_OUTPUT =
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
@ -610,12 +724,18 @@ USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
# If LATEX_HIDE_INDICES is set to YES then doxygen will not
# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
# The RTF output is optimised for Word 97 and may not look very pretty with
# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
@ -642,7 +762,7 @@ COMPACT_RTF = NO
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# config file, i.e. a series of assigments. You only have to provide
# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
RTF_STYLESHEET_FILE =
@ -686,12 +806,35 @@ MAN_LINKS = YES
# If the GENERATE_XML tag is set to YES Doxygen will
# generate an XML file that captures the structure of
# the code including all documentation. Note that this
# feature is still experimental and incomplete at the
# moment.
# the code including all documentation.
GENERATE_XML = NO
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `xml' will be used as the default path.
XML_OUTPUT = xml
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
@ -704,6 +847,39 @@ GENERATE_XML = NO
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
# If the GENERATE_PERLMOD tag is set to YES Doxygen will
# generate a Perl module file that captures the structure of
# the code including all documentation. Note that this
# feature is still experimental and incomplete at the
# moment.
GENERATE_PERLMOD = NO
# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = NO
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
# nicely formatted so it can be parsed by a human reader. This is useful
# if you want to understand what is going on. On the other hand, if this
# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
PERLMOD_PRETTY = YES
# The names of the make variables in the generated doxyrules.make file
# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
# This is useful so different doxyrules.make files included by the same
# Makefile don't overwrite each other's variables.
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
@ -751,9 +927,11 @@ INCLUDE_FILE_PATTERNS =
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
PREDEFINED = QT_VERSION=305
PREDEFINED = QT_VERSION=320 \
__cplusplus \
Q_WS_X11
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
@ -762,16 +940,30 @@ EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line and do not end with a semicolon. Such function macros are typically
# used for boiler-plate code, and will confuse the parser if not removed.
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse the
# parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
# Configuration::additions related to external references
#---------------------------------------------------------------------------
# The TAGFILES tag can be used to specify one or more tagfiles.
# The TAGFILES option can be used to specify one or more tagfiles.
# Optionally an initial location of the external documentation
# can be added for each tagfile. The format of a tag file without
# this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
TAGFILES =
@ -802,13 +994,19 @@ PERL_PATH =
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
# super classes. Setting the tag to NO turns the diagrams off. Note that this
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
# recommended to install and use dot, since it yield more powerful graphs.
# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
# recommended to install and use dot, since it yields more powerful graphs.
CLASS_DIAGRAMS = YES
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = NO
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz, a graph visualization
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
@ -830,17 +1028,17 @@ CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
UML_LOOK = NO
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = YES
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = NO
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented
# file showing the direct and indirect include dependencies of the file with
@ -855,10 +1053,18 @@ INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
# generate a call dependency graph for every global function or class method.
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command.
CALL_GRAPH = NO
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = NO
GRAPHICAL_HIERARCHY = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
@ -893,6 +1099,17 @@ MAX_DOT_GRAPH_WIDTH = 800
MAX_DOT_GRAPH_HEIGHT = 1024
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
# graphs generated by dot. A depth value of 3 means that only nodes reachable
# from the root by following a path via at most 3 edges will be shown. Nodes that
# lay further from the root node will be omitted. Note that setting this option to
# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
# note that a graph may be further truncated if the graph's image dimensions are
# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
# If 0 is used for the depth value (the default), the graph is not depth-constrained.
MAX_DOT_GRAPH_DEPTH = 0
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
@ -900,51 +1117,16 @@ MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
# remove the intermedate dot files that are used to generate
# remove the intermediate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
# The CGI_NAME tag should be the name of the CGI script that
# starts the search engine (doxysearch) with the correct parameters.
# A script with this name will be generated by doxygen.
CGI_NAME =
# The CGI_URL tag should be the absolute URL to the directory where the
# cgi binaries are located. See the documentation of your http daemon for
# details.
CGI_URL =
# The DOC_URL tag should be the absolute URL to the directory where the
# documentation is located. If left blank the absolute path to the
# documentation, with file:// prepended to it, will be used.
DOC_URL =
# The DOC_ABSPATH tag should be the absolute path to the directory where the
# documentation is located. If left blank the directory on the local machine
# will be used.
DOC_ABSPATH =
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
# is installed.
BIN_ABSPATH =
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
# documentation generated for other projects. This allows doxysearch to search
# the documentation for these projects as well.
EXT_DOC_PATHS =

View File

@ -6,7 +6,7 @@
SHELL=/bin/sh
cvs dist cvs-clean configure.in configure.files subdirs package-messages package-merge:
cvs dist cvs-clean configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4:
@admindir=$(admindir); \
if test "x$$admindir" = x; then \
admindir=.; until test -f $$admindir/admin/cvs.sh; do \
@ -21,14 +21,14 @@ cvs dist cvs-clean configure.in configure.files subdirs package-messages package
fi; \
fi; \
if test "$@" = "package-merge"; then \
MAKE=$(MAKE) POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
$(SHELL) $$admindir/cvs.sh package-merge ;\
else MAKE=$(MAKE) $(SHELL) $$admindir/cvs.sh $@ ;\
else \
MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\
fi
# Celestia, we don't build configure.in from configure.in.in
# configure.in: configure.files $(shell test -f configure.files && cat configure.files) subdirs
# configure.files: subdirs
configure.in: configure.files subdirs
configure.files: subdirs
.SILENT:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

156
admin/bcheck.pl 100644
View File

@ -0,0 +1,156 @@
#!/usr/bin/perl -w
use DB_File;
use Fcntl ':flock';
if (!defined($ARGV[0])) {
print "usage: requires .class dump as parameter!\n";
exit;
}
sub bailout
{
untie %bcheckdb if(defined(%bcheckdb));
if(defined(MYLOCK)) {
flock MYLOCK, LOCK_UN;
close(MYLOCK);
}
print @_;
exit 5;
}
sub ask_user
{
my ($dbkey, $dbchunk) = @_;
if (defined($ENV{"BCHECK_UPDATE"})) {
$bcheckdb{$dbkey} = $dbchunk;
return;
}
&bailout("BC problem detected") if (! -t STDIN);
print "(I)gnore / (Q)uit / (U)pdate: ";
my $key;
while(defined(read STDIN, $key, 1)) {
$key = lc($key);
print "got: >$key<\n";
return if ($key eq 'i');
&bailout("BC problem. aborted") if ($key eq 'q');
if ($key eq 'u') {
$bcheckdb{$dbkey} = $dbchunk;
return;
}
print "\n(I)gnore / (Q)uit / (U)pdate: ";
}
}
sub diff_chunk($$)
{
my ($oldl, $newl) = @_;
my @old = split /^/m, $oldl;
my @new = split /^/m, $newl;
my $haschanges = 0;
my $max = $#old > $#new ? $#old : $#new;
die "whoops. key different" if ($old[0] ne $new[0]);
if ($#old != $#new) {
warn ("Structural difference.\n");
print @old;
print "-----------------------------------------------\n";
print @new;
$haschanges = 1;
return $haschanges;
}
print $old[0];
my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/);
my $c = 1;
while ($c < $max) {
my ($o, $n) = ($old[$c], $new[$c]);
chomp $o;
chomp $n;
$c++;
next if ($o eq $n);
if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) {
next if ($n eq "$1$class$2");
}
$haschanges = 1;
print "-$o\n+$n\n\n";
}
return $haschanges;
}
local $dblock = $ENV{"HOME"} . "/bcheck.lock";
my $dbfile = $ENV{"HOME"} . "/bcheck.db";
my $cdump = $ARGV[0];
die "file $cdump is not readable: $!" if (! -f $cdump);
# make sure the advisory lock exists
open(MYLOCK, ">$dblock");
print MYLOCK "";
flock MYLOCK, LOCK_EX;
tie %bcheckdb, 'DB_File', $dbfile;
my $chunk = "";
open (IN, "<$cdump") or die "cannot open $cdump: $!";
while (<IN>) {
chop;
s/0x[0-9a-fA-F]+/0x......../g;
s/base size=/size=/g;
s/base align=/align=/g;
$chunk .= $_ . "\n";
if(/^\s*$/) {
my @lines = split /^/m, $chunk;
my $key = $lines[0];
chomp $key;
if($key !~ /<anonymous struct>/ &&
$key !~ /<anonymous union>/) {
if(defined($bcheckdb{$key})) {
my $dbversion = $bcheckdb{$key};
if($dbversion ne $chunk) {
&ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk));
}
}
else {
$bcheckdb{$key} = $chunk;
print "NEW: $key\n";
}
}
$chunk = "";
next;
}
}
close(IN);
untie %bcheckdb;
flock MYLOCK, LOCK_UN;
close(MYLOCK);
exit 0;

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
# this script patches a config.status file, to use our own perl script
# in the main loop
@ -27,11 +27,12 @@
# later autoconf's
# 2. the big main loop which patches all Makefile.in's
use strict;
use File::Basename;
my $ac_aux_dir = dirname($0);
my ($flag);
local $ac_version = 0;
my $ac_version = 0;
my $vpath_seen = 0;
$flag = 0;
@ -78,6 +79,11 @@ while (<>) {
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1))
# end with: "rm -f conftest.s\*"
# on autoconf 250, it ends with '# CONFIG_HEADER section'
#
# gg: if a post-processing commands section is found first,
# stop there and insert a new loop to honour the case/esac.
# (pattern: /^\s+#\sRun the commands associated with the file./)
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
} else {
@ -94,9 +100,11 @@ while (<>) {
if ($ac_version != 2141) {
print STDERR "hmm, don't know autoconf version\n";
}
} elsif (/^\#\s*CONFIG_HEADER section.*/) {
} elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) {
$flag = 4;
my $commands = defined $2;
&insert_main_loop();
$commands && insert_command_loop();
if($ac_version != 250) {
print STDERR "hmm, something went wrong :-(\n";
}
@ -175,3 +183,9 @@ rm -f \$ac_cs_root.s*
EOF
return;
}
sub insert_command_loop {
print <<EOF;
for ac_file in .. \$CONFIG_FILES ; do
EOF
}

336
admin/config.guess vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2002-10-21'
timestamp='2004-06-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -98,14 +98,18 @@ trap 'exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# This shell variable is my proudest work .. or something. --bje
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
dummy=$tmpdir/dummy ;
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
@ -113,15 +117,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ;
unset files'
esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@ -178,21 +180,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
luna88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@ -223,71 +245,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
eval $set_cc_for_build
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
case `$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
1-0)
UNAME_MACHINE="alphaev5"
;;
1-1)
UNAME_MACHINE="alphaev56"
;;
1-101)
UNAME_MACHINE="alphapca56"
;;
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
3-1307)
UNAME_MACHINE="alphaev7"
;;
esac
fi
rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@ -310,6 +328,9 @@ EOF
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@ -327,6 +348,9 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@ -399,6 +423,9 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@ -439,8 +466,7 @@ EOF
EOF
$CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
&& exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
@ -449,7 +475,7 @@ EOF
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS)
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@ -524,8 +550,7 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@ -624,10 +649,20 @@ EOF
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy && rmdir $tmpdir
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
# avoid double evaluation of $set_cc_for_build
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@ -661,8 +696,7 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@ -720,21 +754,26 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@ -745,19 +784,7 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c && rmdir $tmpdir
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@ -768,14 +795,17 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
echo i386-pc-interix3
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@ -787,17 +817,28 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@ -818,8 +859,26 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
rm -f $dummy.c && rmdir $tmpdir
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@ -855,6 +914,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@ -912,9 +974,11 @@ EOF
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@ -932,6 +996,26 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@ -966,9 +1050,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@ -995,9 +1076,12 @@ EOF
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@ -1014,9 +1098,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@ -1098,7 +1179,11 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@ -1111,7 +1196,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@ -1134,11 +1219,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@ -1157,12 +1237,19 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms && exit 0 ;;
I*) echo ia64-dec-vms && exit 0 ;;
V*) echo vax-dec-vms && exit 0 ;;
esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@ -1283,8 +1370,7 @@ main ()
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# a script for use by autoconf to make the Makefiles
# from the Makefile.in's
#
@ -28,19 +28,28 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
use strict;
use File::Path;
my $ac_subs=$ARGV[0];
my $ac_sacfiles = $ARGV[1];
my $ac_given_srcdir=$ARGV[2];
my $ac_given_INSTALL=$ARGV[3];
my @comp_match;
my @comp_subs;
#print "ac_subs=$ac_subs\n";
#print "ac_sacfiles=$ac_sacfiles\n";
#print "ac_given_srcdir=$ac_given_srcdir\n";
#print "ac_given_INSTALL=$ac_given_INSTALL\n";
my $configure_input;
my ($srcdir, $top_srcdir);
my $INSTALL;
my $bad_perl = ($] < 5.005);
my $created_file_count = 0;
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
my @subs = <CF>;
@ -94,7 +103,7 @@ if ($bad_perl) {
push @comp_match, eval "qr/\Q$1\E/";
push @comp_subs, "";
} else {
die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
die "Uhh. Malformed pattern in $ac_subs ($pat)"
unless ( $pat =~ /^\s*$/ ); # ignore white lines
}
}
@ -130,7 +139,7 @@ foreach $ac_file (@ac_files) {
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
# The file is in a subdirectory.
if (! -d "$ac_dir") { mkdir "$ac_dir", 0777; }
if (! -d "$ac_dir") { mkpath "$ac_dir", 0, 0777; }
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
$ac_dir_suffix="/".$ac_dir_suffix;
# A "../" for each directory in $ac_dir_suffix.
@ -166,20 +175,20 @@ foreach $ac_file (@ac_files) {
my $ac_comsub="";
my $fname=$ac_file_in;
$fname =~ s%.*/%%;
my $configure_input="Generated automatically from $fname by config.pl.";
if ($ac_file =~ /.*[Mm]akefile.*/) {
$ac_comsub="# ".$configure_input."\n"; # for the first line in $ac_file
}
$configure_input="$ac_file. Generated from $fname by config.pl.";
my $ac_file_inputs;
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
patch_file($ac_file, $ac_file_inputs, $ac_comsub);
patch_file($ac_file, $ac_file_inputs);
++$created_file_count;
}
print "config.pl: fast created $created_file_count file(s).\n";
sub patch_file {
my ($outf, $infiles, $identline) = @_;
my ($outf, $infiles) = @_;
my $filedata;
my @infiles=split(' ', $infiles);
my $i=0;
@ -194,10 +203,6 @@ sub patch_file {
print STDERR "can't open $name: $!"."\n";
}
}
if ($identline) {
# Put the ident in the second line. For shitty automake 1.6x.
$filedata =~ s%\n%\n$identline%;
}
$filedata =~ s%\@configure_input\@%$configure_input%g;
$filedata =~ s%\@srcdir\@%$srcdir%g;
@ -223,11 +228,7 @@ sub patch_file {
sub make_closure {
my ($pat, $sub) = @_;
$pat =~ s/\@/\\@/g; # @bla@ -> \@bla\@
$pat =~ s/\$/\\\$/g; # $bla -> \$bla
$sub =~ s/\@/\\@/g;
$sub =~ s/\$/\\\$/g;
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%$pat%$sub%g; }";
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }";
if ($@) {
print "can't create CODE: $@\n";
}

172
admin/config.sub vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2002-09-05'
timestamp='2004-06-24'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -118,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -144,7 +145,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@ -228,14 +229,15 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| clipper \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -245,21 +247,24 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@ -294,16 +299,16 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| clipper-* | cydra-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@ -315,21 +320,27 @@ case $basic_machine in
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39 | mipstx39el \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@ -353,6 +364,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@ -367,6 +381,12 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@ -426,12 +446,24 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@ -632,10 +664,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -727,6 +755,10 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@ -758,18 +790,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
@ -828,6 +866,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@ -835,6 +877,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@ -901,10 +946,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
t3d)
basic_machine=alpha-cray
os=-unicos
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@ -913,14 +954,18 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39)
basic_machine=mipstx39-unknown
;;
@ -934,6 +979,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@ -977,10 +1026,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1011,6 +1056,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1027,13 +1075,13 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@ -1106,18 +1154,20 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1129,8 +1179,10 @@ case $os in
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=-nto-qnx
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@ -1139,6 +1191,9 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@ -1151,6 +1206,9 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@ -1172,6 +1230,9 @@ case $os in
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
@ -1194,6 +1255,9 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@ -1224,6 +1288,12 @@ case $os in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-none)
;;
*)
@ -1255,6 +1325,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1301,6 +1374,9 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@ -1433,9 +1509,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;

View File

@ -1,6 +1,24 @@
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
# And if kde doesn't know about the prefix yet
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
if test $? -ne 0; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""

View File

@ -7,7 +7,7 @@
# written by Oswald Buddenhagen <ossi@kde.org>
# inspired by the "old" cvs-clean target from Makefile.common
#
# This file is free software in terms of the BSD licence. That means
# This file is free software in terms of the BSD license. That means
# that you can do anything with it except removing this license or
# the above copyright notice. There is NO WARRANTY of any kind.
#

View File

@ -14,60 +14,62 @@ call_and_fix_autoconf()
\\n perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
\\\\\\n || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
\\n rm -f \\\$CONFIG_STATUS.bak\\nfi\
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/;" configure
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure
fi
}
strip_makefile()
{
if test -f $makefile_wo; then :; else
perl -e '$in=0; while ( <> ) { $in = 1 if ($_=~ m/^if /); print $_ unless ($in); $in = 0 if ($_ =~ m/^endif/); }' < Makefile.am.in > $makefile_wo
if test ! -f $makefile_wo; then
perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo
fi
}
check_autotool_versions()
{
AUTOCONF_VERSION=`$AUTOCONF --version | head -1`
required_autoconf_version="2.53 or newer"
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
case $AUTOCONF_VERSION in
Autoconf*2.5* | autoconf*2.5* ) : ;;
"" )
echo "*** AUTOCONF NOT FOUND!."
echo "*** KDE requires autoconf 2.52, 2.53 or 2.54"
echo "*** KDE requires autoconf $required_autoconf_version"
exit 1
;;
* )
echo "*** YOU'RE USING $AUTOCONF_VERSION."
echo "*** KDE requires autoconf 2.52, 2.53 or 2.54"
echo "*** KDE requires autoconf $required_autoconf_version"
exit 1
;;
esac
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -1`
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
case $AUTOHEADER_VERSION in
Autoconf*2.5* | autoheader*2.5* ) : ;;
"" )
echo "*** AUTOHEADER NOT FOUND!."
echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
echo "*** KDE requires autoheader $required_autoconf_version"
exit 1
;;
* )
echo "*** YOU'RE USING $AUTOHEADER_VERSION."
echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
echo "*** KDE requires autoheader $required_autoconf_version"
exit 1
;;
esac
AUTOMAKE_STRING=`$AUTOMAKE --version | head -1`
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
required_automake_version="1.6.1 or newer"
case $AUTOMAKE_STRING in
automake*1.5d* )
automake*1.5d* | automake*1.5* | automake*1.5-* )
echo "*** YOU'RE USING $AUTOMAKE_STRING."
echo "*** KDE requires automake 1.5"
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
automake*1.5* | automake*1.5-* | automake*1.6.* | automake*1.7* ) : ;;
automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9*) : ;;
"" )
echo "*** AUTOMAKE NOT FOUND!."
echo "*** KDE requires automake 1.5"
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
unsermake* ) :
@ -76,40 +78,47 @@ case $AUTOMAKE_STRING in
;;
* )
echo "*** YOU'RE USING $AUTOMAKE_STRING."
echo "*** KDE requires automake 1.5"
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
esac
unset required_automake_version
}
cvs()
{
check_autotool_versions
### Produce acinclude.m4
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
echo "*** Creating acinclude.m4"
rm -f acinclude.m4 configure.files
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
fi
acinclude_m4
### Make new subdirs and configure.in.
### The make calls could be optimized away here,
### with a little thought.
if test -r configure.in.in; then
rm -f subdirs configure.in
echo "*** Creating list of subdirectories"
subdirs
echo "*** Creating configure.in"
configure_files
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
rm -f configure.in
echo "*** Creating list of subdirectories"
create_subdirs
if test -r Makefile.am.in; then
echo "*** Creating Makefile.am"
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
else
Makefile_am
fi
fi
configure_files
echo "*** Creating configure.in"
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
else
configure_in
fi
fi
echo "*** Creating aclocal.m4"
$ACLOCAL -I macros || exit 1
$ACLOCAL $ACLOCALFLAGS || exit 1
echo "*** Creating configure"
call_and_fix_autoconf
@ -145,19 +154,33 @@ check_autotool_versions
###
### First build all of the files necessary to do just "make"
###
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
fi
acinclude_m4
if test -r configure.in.in; then
subdirs
rm -f configure.in
create_subdirs
if test -r Makefile.am.in; then
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
else
Makefile_am
fi
fi
configure_files
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
else
configure_in
fi
fi
$ACLOCAL
$AUTOHEADER
$AUTOMAKE --foreign --include-deps
$ACLOCAL $ACLOCALFLAGS
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
echo "*** Creating config.h template"
$AUTOHEADER || exit 1
fi
$AUTOMAKE --foreign
perl -w admin/am_edit
call_and_fix_autoconf
touch stamp-h.in
@ -184,11 +207,12 @@ fi
subdir_dist()
{
$ACLOCAL
$ACLOCAL $ACLOCALFLAGS
$AUTOHEADER
$AUTOMAKE --foreign --include-deps
perl -w ../admin/am_edit
$AUTOMAKE
perl -w ../admin/am_edit --path=../admin
call_and_fix_autoconf
touch stamp-h.in
}
configure_in()
@ -196,43 +220,63 @@ configure_in()
rm -f configure.in configure.in.new
kde_use_qt_param=
test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
cat `egrep -v "configure.in.bot" < configure.files` > configure.in.new
list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"`
: > configure.in.new
for file in $list; do
echo "dnl =======================================================" >> configure.in.new
echo "dnl FILE: $file" >> configure.in.new
echo "dnl =======================================================" >> configure.in.new
echo "" >> configure.in.new
cat $file >> configure.in.new
done
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
if test -f Makefile.am.in; then
subdirs=`cat subdirs`
for dir in $subdirs; do
dir=`echo $dir | sed -e "s,[-+.],_,g"`
echo "AM_CONDITIONAL($dir""_SUBDIR_included, test \"x\$$dir""_SUBDIR_included\" = xyes)" >> configure.in.new
vdir=`echo $dir | sed -e 's,[-+.@],_,g'`
echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new
if test -f "$dir/configure.in"; then
echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new
echo " AC_CONFIG_SUBDIRS($dir)" >> configure.in.new
echo "fi" >> configure.in.new
fi
done
fi
# echo "AC_OUTPUT( \\" >> configure.in.new
mfs=`find . -type d -print | fgrep -v "/." | \
sed -e "s#\./##" -e "/^debian/d" | sort`
for i in $mfs; do
topleveldir=`echo $i| sed -e "s#/.*##"`
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ Makefile.rules ])" >> configure.in.new
echo "AC_CONFIG_FILES([ Makefile.calls ])" >> configure.in.new
fi
if test -f inst-apps; then
topleveldirs=`cat inst-apps`
else
topleveldirs=
for dir in `ls -1d * | sort`; do
if test "$dir" != "debian" && test -d $dir; then
topleveldirs="$topleveldirs $dir"
fi
done
fi
for topleveldir in $topleveldirs; do
if test -f $topleveldir/configure.in; then
continue
fi
if test -f $i/Makefile.am; then :; else
if test -f $topleveldir/Makefile.am; then :; else
continue
fi
if test -s inst-apps; then
if grep "\"^$topleveldir\"" inst-apps > /dev/null 2>&1; then
continue
fi
fi
if test "$i" = "."; then
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
else
echo "AC_CONFIG_FILES([ $i/Makefile ])" >> configure.in.new
fi
if test -n "$UNSERMAKE"; then
if test "$i" = "."; then
echo "AC_CONFIG_FILES([ Makefile.rules ])" >> configure.in.new
else
echo "AC_CONFIG_FILES([ $i/Makefile.rules ])" >> configure.in.new
fi
fi
mfs=`find $topleveldir -follow -name Makefile.am -print | fgrep -v "/." | \
sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
for i in $mfs; do
echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ $i.rules ])" >> configure.in.new
echo "AC_CONFIG_FILES([ $i.calls ])" >> configure.in.new
fi
done
done
files=`cat configure.files`
@ -244,13 +288,17 @@ done
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ MakeVars ])" >> configure.in.new
fi
midfiles=`cat configure.files | fgrep "configure.in.mid"`
test -n "$midfiles" && cat $midfiles >> configure.in.new
echo "AC_OUTPUT" >> configure.in.new
modulename=
if test -f configure.in.in; then
if head -2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
fi
if head -2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
if test -n "$line"; then
modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
@ -261,7 +309,7 @@ if test -f configure.in.in; then
fi
fi
if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
VERSION="\"3.1.0\""
VERSION="\"3.3.0\""
fi
if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
modulename=`pwd`;
@ -284,30 +332,77 @@ rm -f configure.in.new
configure_files()
{
echo "*** Creating configure.files"
admindir=NO
for i in . .. ../.. ../../..; do
if test -x $i/admin; then admindir=$i/admin; break; fi
done
rm -f configure.files
touch configure.files
if test -f configure.in.in && head -2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
echo $admindir/configure.in.min >> configure.files
fi
test -f configure.in.in && echo configure.in.in >> configure.files
list=`find . -name "configure.in.in" -o -name "configure.in.bot" | sort`
# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs
if test -f inst-apps; then
inst=`cat inst-apps`
list=""
for i in $inst; do
list="$list `find $i/ -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`"
done
else
list=`find . -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`
fi
for i in $list; do if test -f $i && test `dirname $i` != "." ; then
echo $i >> configure.files
fi; done
test -f configure.in.mid && echo configure.in.mid >> configure.files
test -f configure.in.bot && echo configure.in.bot >> configure.files
if test ! -s configure.files; then
echo "There are no files to build a configure. Please check your checkout."
exit 1
fi
}
create_subdirs()
{
if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then
# as many modules contain rules to create subdirs without any
# dependencies make won't create it unless there is no file.
# so we check if that's a dummy rule or one that works
rm -f subdirs.cvs.sh.$$
if test -f subdirs; then
mv subdirs subdirs.cvs.sh.$$
fi
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1
if test -f subdirs.cvs.sh.$$; then
if test -s subdirs; then
rm subdirs.cvs.sh.$$
else
mv subdirs.cvs.sh.$$ subdirs
fi
fi
else
subdirs
fi
}
subdirs()
{
dirs=
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -1`
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -1`
for i in `ls -1`; do
idirs=
if test -f inst-apps; then
idirs=`cat inst-apps`
else
idirs=`ls -1 | sort`
fi
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
for i in $idirs; do
if test -f $i/Makefile.am; then
case " $compilefirst $compilelast " in
*" $i "*) ;;
@ -323,11 +418,11 @@ for d in $compilefirst; do
done
(for d in $dirs; do
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -1`
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
for s in $list; do
echo $s $d
done
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -1`
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
for s in $list; do
echo $d $s
done
@ -338,9 +433,47 @@ for d in $compilelast; do
echo $d >> ./_SUBDIRS
done
if test -r subdirs && cmp -s subdirs _SUBDIRS; then
rm -f _SUBDIRS
fi
test -r _SUBDIRS && mv _SUBDIRS subdirs || true
}
Makefile_am()
{
if test -f Makefile.am.in; then
cp Makefile.am.in Makefile.am
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
idirs=
dirs=
if test -f inst-apps; then
idirs=`cat inst-apps`
else
idirs=`cat subdirs`
fi
for i in $idirs; do
case " $compilefirst $compilelast " in
*" $i "*) ;;
*) dirs="$dirs $i"
esac
done
adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'`
if echo "$adds" | fgrep "*" >/dev/null ; then
adds=`ls -d -1 $adds 2>/dev/null`
fgrep -v '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds
str='$(top_srcdir)/acinclude.m4:'
for add in $adds; do
str="$str \$(top_srcdir)/$add"
done
echo $str >> Makefile.am.in.adds
else
cat Makefile.am.in > Makefile.am.in.adds
fi
if test -n "$UNSERMAKE"; then
cat Makefile.am.in.adds > Makefile.am
topsubdirs=
for i in $compilefirst $dirs $compilelast; do
vari=`echo $i | sed -e "s,[-+],_,g"`
@ -351,13 +484,35 @@ if test -f Makefile.am.in; then
done
echo "SUBDIRS=$topsubdirs" >> Makefile.am
else
cat Makefile.am.in.adds | \
sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am
echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
fi
rm Makefile.am.in.adds
fi
if test -r subdirs && diff subdirs _SUBDIRS > /dev/null; then
rm -f _SUBDIRS
fi
test -r _SUBDIRS && mv _SUBDIRS subdirs || true
}
acinclude_m4()
{
echo "*** Creating acinclude.m4"
adds=
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
strip_makefile
rm -f acinclude.m4
adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'`
if echo $adds | fgrep "*" >/dev/null ; then
adds=`ls -d -1 $adds 2>/dev/null`
else
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1
fi
else
rm -f acinclude.m4
fi
# if it wasn't created up to now, then we do it better
if test ! -f acinclude.m4; then
cat admin/acinclude.m4.in admin/libtool.m4.in $adds > acinclude.m4
fi
}
cvs_clean()
@ -396,7 +551,7 @@ mkdir po.backup
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
cp po/$i po.backup/backup_$i
cat po/$i > po.backup/backup_$i
touch -r po/$i po.backup/backup_$i
rm po/$i
done
@ -413,22 +568,27 @@ for subdir in $dirs; do
test -z "$VERBOSE" || echo "Making messages in $subdir"
(cd $subdir
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
$EXTRACTRC *.rc *.ui > rc.cpp
$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp
else
candidates=`ls -1 *.rc *.ui 2>/dev/null`
candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null`
if test -n "$candidates"; then
echo "$subdir has *.rc or *.ui files, but not correct messages line"
echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
fi
fi
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
if test -n "`find . -name \*.c\* -o -name \*.h\* | xargs grep -s KAboutData 2>/dev/null`"; then
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
else echo " " > _translatorinfo.cpp
fi
perl -e '$mes=0; while (<STDIN>) { next if (/^(if|else|endif)\s/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
$MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" \
XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x ${includedir:-$KDEDIR/include}/kde.pot" \
messages
XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -kaliasLocale -x $kdepotpath" messages
exit_code=$?
if test "$exit_code" != 0; then
echo "make exit code: $exit_code"
fi
) 2>&1 | grep -v '^make\[1\]' > $tmpname
test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
@ -440,10 +600,12 @@ for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v
test -f po/$i || echo "disappeared: $i"
done
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i
msgmerge -q -o po/$i po/$i po/$i
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
if test -f po.backup/$i && test -n "`diff temp.pot po.backup/$i`"; then
echo "will update $i"
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po.backup/backup_$i > po/$i.new && mv po/$i.new po.backup/backup_$i
msgmerge -q po.backup/backup_$i po/$i > temp.pot
mv temp.pot po/$i
else
@ -460,15 +622,22 @@ rm -f temp.pot
rm -rf po.backup
}
unset LC_ALL || :
unset LANG || :
unset LC_CTYPE || :
unset LANGUAGE || :
unset CDPATH || :
admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$admindir" = "x$0" && admindir=.
test "x$MAKE" = x && MAKE=make
makefile_am=Makefile.am
makefile_wo=Makefile.am
makefile_wo=Makefile.am.wo
if test -f Makefile.am.in; then
makefile_am=Makefile.am.in
makefile_wo=Makefile.am.in.wo
rm -f $makefile_wo
fi
# Suck in the AUTOCONF detection code
@ -481,7 +650,8 @@ fi
arg=`echo $1 | tr '\-.' __`
case $arg in
cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
cvs_clean | package_merge | package_messages ) $arg ;;
cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 ) $arg ;;
configure ) call_and_fix_autoconf ;;
* ) echo "Usage: cvs.sh <target>"
echo "Target can be one of:"
echo " cvs cvs-clean dist"
@ -492,8 +662,8 @@ case $arg in
exit 1 ;;
esac
if test -f Makefile.am.in.wo; then
rm Makefile.am.in.wo
if test -f $makefile_wo; then
rm $makefile_wo
fi
exit 0

View File

@ -7,108 +7,37 @@ use Cwd;
$origPwd = `pwd`;
chomp $origPwd;
$kde_confdir = "/etc/kde3";
$kde_prefix = "/usr";
$kde_bindir = "$kde_prefix/bin";
$kde_includedir = "$kde_prefix/include/kde";
$kde_libdir = "$kde_prefix/lib";
$kde_cgidir = "$kde_prefix/lib/cgi-bin";
$kde_moduledir = "$kde_prefix/lib/kde3";
$kde_appsdir = "$kde_prefix/share/applnk";
$kde_datadir = "$kde_prefix/share/apps";
$kde_htmldir = "$kde_prefix/share/doc/kde/HTML";
$kde_icondir = "$kde_prefix/share/icons";
$kde_locale = "$kde_prefix/share/locale";
$kde_mimedir = "$kde_prefix/share/mimelnk";
$kde_servicesdir = "$kde_prefix/share/services";
$kde_servicetypesdir = "$kde_prefix/share/servicetypes";
$kde_sounddir = "$kde_prefix/share/sounds";
$kde_templatesdir = "$kde_prefix/share/templates";
$kde_wallpaperdir = "$kde_prefix/share/wallpapers";
$kde_prefix = "/usr";
$sysconfdir = "/etc";
$kde_includedir = "$kde_prefix/include/kde";
$infodir = "$kde_prefix/share/info";
$mandir = "$kde_prefix/share/man";
$qtdir = "/usr/share/qt3";
$mandir = "$kde_prefix/share/man";
$infodir = "$kde_prefix/share/info";
$sysconfdir = "/etc";
$QTDIR = "/usr/share/qt3";
$IDL = "$kde_bindir/cuteidl";
$DCOPIDL = "$kde_bindir/dcopidl";
$DCOPIDL2CPP = "$kde_bindir/dcopidl2cpp";
$KDB2HTML = "$kde_bindir/kdb2html";
$MCOPIDL = "$kde_bindir/mcopidl";
$ARTSCCONFIG = "$kde_bindir/artsc-config";
$kde_cgidir = "$kde_prefix/lib/cgi-bin";
$kde_confdir = "$sysconfdir/kde3";
$kde_htmldir = "$kde_prefix/share/doc/kde/HTML";
if (defined $ENV{DEB_BUILD_OPTIONS} &&
$ENV{DEB_BUILD_OPTIONS} =~ /\bdebug\b/) {
$enable_debug="--enable-debug";
$enable_final="";
}
else {
$enable_debug="--disable-debug";
$enable_final="--enable-final";
$ENV{DEB_BUILD_OPTIONS} =~ /\bnostrip\b/) {
$enable_debug="--enable-debug=full";
} else {
$enable_debug="--disable-debug";
}
if (@ARGV && $ARGV[0] eq 'echodirs') {
print STDOUT "export kde_confdir=$kde_confdir\n";
print STDOUT "export kde_prefix=$kde_prefix\n";
print STDOUT "export kde_bindir=$kde_bindir\n";
print STDOUT "export kde_includedir=$kde_includedir\n";
print STDOUT "export kde_libdir=$kde_libdir\n";
print STDOUT "export kde_cgidir=$kde_cgidir\n";
print STDOUT "export kde_moduledir=$kde_moduledir\n";
print STDOUT "export kde_appsdir=$kde_appsdir\n";
print STDOUT "export kde_datadir=$kde_datadir\n";
print STDOUT "export kde_htmldir=$kde_htmldir\n";
print STDOUT "export kde_icondir=$kde_icondir\n";
print STDOUT "export kde_locale=$kde_locale\n";
print STDOUT "export kde_mimedir=$kde_mimedir\n";
print STDOUT "export kde_servicesdir=$kde_servicesdir\n";
print STDOUT "export kde_servicetypesdir=$kde_servicetypesdir\n";
print STDOUT "export kde_sounddir=$kde_sounddir\n";
print STDOUT "export kde_templatesdir=$kde_templatesdir\n";
print STDOUT "export kde_wallpaperdir=$kde_wallpaperdir\n";
print STDOUT "export mandir=$mandir\n";
print STDOUT "export infodir=$infodir\n";
print STDOUT "export sysconfdir=$sysconfdir\n";
print STDOUT "export kde_includedir=$kde_includedir\n";
print STDOUT "export infodir=$infodir\n";
print STDOUT "export mandir=$mandir\n";
print STDOUT "export qtdir=$qtdir\n";
print STDOUT "export QTDIR=$QTDIR\n";
print STDOUT "export IDL=$IDL\n";
print STDOUT "export DCOPIDL=$DCOPIDL\n";
print STDOUT "export DCOPIDL2CPP=$DCOPIDL2CPP\n";
print STDOUT "export KDB2HTML=$KDB2HTML\n";
print STDOUT "export MCOPIDL=$MCOPIDL\n";
print STDOUT "export ARTSCCONFIG=$ARTSCCONFIG\n";
print STDOUT "export INSTALL_DATA=install -p -c -m 644\n";
print STDOUT "export kde_cgidir=$kde_cgidir\n";
print STDOUT "export kde_confdir=$kde_confdir\n";
print STDOUT "export kde_htmldir=$kde_htmldir\n";
print STDOUT "configkde=$enable_debug $enable_final --disable-rpath --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --sysconfdir=\$(sysconfdir) --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
print STDOUT "configkdevelop=$enable_debug $enable_final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html\n";
print STDOUT "configkdepim=$enable_debug $enable_final --disable-rpath --with-extra-includes=/usr/include/libpisock --enable-shared --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
print STDOUT "configkde=$enable_debug --disable-rpath --prefix=\$(kde_prefix) --sysconfdir=\$(sysconfdir) --includedir=\$(kde_includedir) --infodir=\$(infodir) --mandir=\$(mandir) --with-qt-dir=\$(qtdir)\n";
exit
}
if (@ARGV && $ARGV[0] eq 'echoglobals') {
print STDOUT "[Directories]\n";
print STDOUT "dir_config=$kde_confdir\n";
print STDOUT "dir_tmp=/tmp\n";
print STDOUT "dir_socket=/tmp\n";
print STDOUT "dir_exe=$kde_bindir\n";
print STDOUT "dir_lib=$kde_libdir\n";
print STDOUT "dir_cgi=$kde_cgidir\n";
print STDOUT "dir_module=$kde_moduledir\n";
print STDOUT "dir_apps=$kde_appsdir\n";
print STDOUT "dir_data=$kde_datadir\n";
print STDOUT "dir_html=$kde_htmldir\n";
print STDOUT "dir_icon=$kde_icondir\n";
print STDOUT "dir_locale=$kde_locale\n";
print STDOUT "dir_mime=$kde_mimedir\n";
print STDOUT "dir_services=$kde_servicesdir\n";
print STDOUT "dir_servicetypes=$kde_servicetypesdir\n";
print STDOUT "dir_sound=$kde_sounddir\n";
print STDOUT "dir_templates=$kde_templatesdir\n";
print STDOUT "dir_wallpaper=$kde_wallpaperdir\n";
print STDOUT "[General]\n";
print STDOUT "TerminalApplication=x-terminal-emulator\n";
exit
}

View File

@ -197,6 +197,36 @@ aix)
rm -f "$tmpdepfile"
;;
icc)
# Must come before tru64.
# Intel's C compiler understands `-MD -MF file'. However
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.

View File

@ -5,61 +5,40 @@ AUTOCONF="autoconf"
AUTOHEADER="autoheader"
AUTOM4TE="autom4te"
AUTOMAKE="automake"
ACLOCAL="aclocal -I macros"
ACLOCAL="aclocal"
# Please add higher versions first. The last version number is the minimum
# needed to compile KDE. Do not forget to include the name/version #
# separator if one is present, e.g. -1.2 where - is the separator.
KDE_AUTOCONF_VERS="-2.58 -2.57 257 -2.54 -2.53a -2.53 -2.52 -2.5x"
KDE_AUTOMAKE_VERS="-1.7 17 -1.6"
# We don't use variable here for remembering the type ... strings.
# local variables are not that portable, but we fear namespace issues with
# our includer. The repeated type calls are not that expensive.
# We don't use variable here for remembering the type ... strings. Local
# variables are not that portable, but we fear namespace issues with our
# includer.
checkAutoconf()
{
if test -x "`$WHICH autoconf-2.5x`" ; then
AUTOCONF="`$WHICH autoconf-2.5x`"
elif test -x "`$WHICH autoconf-2.54`" ; then
AUTOCONF="`$WHICH autoconf-2.54`"
elif test -x "`$WHICH autoconf-2.53`" ; then
AUTOCONF="`$WHICH autoconf-2.53`"
elif test -x "`$WHICH autoconf-2.53a`" ; then
AUTOCONF="`$WHICH autoconf-2.53a`"
elif test -x "`$WHICH autoconf-2.52`" ; then
AUTOCONF="`$WHICH autoconf-2.52`"
elif test -x "`$WHICH autoconf2.50`" ; then
AUTOCONF="`$WHICH autoconf2.50`"
for kde_autoconf_version in $KDE_AUTOCONF_VERS; do
if test -x "`$WHICH $AUTOCONF$kde_autoconf_version 2>/dev/null`"; then
AUTOCONF="`$WHICH $AUTOCONF$kde_autoconf_version`"
AUTOHEADER="`$WHICH $AUTOHEADER$kde_autoconf_version`"
AUTOM4TE="`$WHICH $AUTOM4TE$kde_autoconf_version`"
break
fi
done
}
checkAutoheader()
checkAutomake ()
{
if test -x "`$WHICH autoheader-2.5x`" ; then
AUTOHEADER="`$WHICH autoheader-2.5x`"
AUTOM4TE="`$WHICH autom4te-2.5x`"
elif test -x "`$WHICH autoheader-2.54`" ; then
AUTOHEADER="`$WHICH autoheader-2.54`"
AUTOM4TE="`$WHICH autom4te-2.54`"
elif test -x "`$WHICH autoheader-2.53`" ; then
AUTOHEADER="`$WHICH autoheader-2.53`"
AUTOM4TE="`$WHICH autom4te-2.53`"
elif test -x "`$WHICH autoheader-2.53a`" ; then
AUTOHEADER="`$WHICH autoheader-2.53a`"
AUTOM4TE="`$WHICH autom4te-2.53a`"
elif test -x "`$WHICH autoheader-2.52`" ; then
AUTOHEADER="`$WHICH autoheader-2.52`"
elif test -x "`$WHICH autoheader2.50`" ; then
AUTOHEADER="`$WHICH autoheader2.50`"
for kde_automake_version in $KDE_AUTOMAKE_VERS; do
if test -x "`$WHICH $AUTOMAKE$kde_automake_version 2>/dev/null`"; then
AUTOMAKE="`$WHICH $AUTOMAKE$kde_automake_version`"
ACLOCAL="`$WHICH $ACLOCAL$kde_automake_version`"
break
fi
}
done
checkAutomakeAclocal ()
{
if test -z "$UNSERMAKE"; then
if test -x "`$WHICH automake-1.5`" ; then
AUTOMAKE="`$WHICH automake-1.5`"
ACLOCAL="`$WHICH aclocal-1.5`"
elif test -x "`$WHICH automake-1.6`" ; then
AUTOMAKE="`$WHICH automake-1.6`"
ACLOCAL="`$WHICH aclocal-1.6`"
fi
else
if test -n "$UNSERMAKE"; then
AUTOMAKE="$UNSERMAKE"
fi
}
@ -75,7 +54,6 @@ checkWhich ()
checkWhich
checkAutoconf
checkAutoheader
checkAutomakeAclocal
checkAutomake
export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL

View File

@ -56,7 +56,7 @@ dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
-c) instcmd=$cpprog
shift
continue;;
@ -79,7 +79,7 @@ while [ x"$1" != x ]; do
shift
continue;;
-s) stripcmd="$stripprog"
-s) stripcmd=$stripprog
shift
continue;;
@ -106,7 +106,7 @@ done
if [ x"$src" = x ]
then
echo "install: no input file specified"
echo "$0: no input file specified" >&2
exit 1
else
:
@ -115,8 +115,8 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
@ -125,20 +125,20 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "install: $src does not exist"
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
echo "$0: no destination specified" >&2
exit 1
else
:
@ -147,16 +147,16 @@ else
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
if [ -d "$dst" ]
then
dst="$dst"/`basename $src`
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
@ -165,69 +165,73 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
IFS="${IFS-$defaultIFS}"
oIFS="${IFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
pathcomp=$pathcomp$1
shift
if [ ! -d "${pathcomp}" ] ;
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "${pathcomp}"
$mkdirprog "$pathcomp"
else
:
fi
pathcomp="${pathcomp}/"
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
dstfile=`basename "$dst"`
else
dstfile=`basename $dst $transformbasename |
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
dstfile=`basename "$dst"`
else
:
fi
# Make a temp file name in the proper directory.
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
@ -235,17 +239,38 @@ else
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
exit 0
{
(exit 0); exit
}

1961
admin/libtool.m4.in vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

371
admin/nmcheck 100755
View File

@ -0,0 +1,371 @@
#!/usr/bin/perl -w
# Check namespace cleanness of a library.
# Allowed symbols are passed as arguments.
# They may have trailing * = wildcard.
# Wildcards may be also specified as *::* (e.g. K*::* for all KDE classes)
# Symbols are listed as full function unmangled names without arguments,
# e.g. 'foo bar* nspace::*' allows foo(), foo(int), bar(), barbar()
# and all symbols in namespace/class nspace.
# If an argument has comma in it, it's a filename of a file containing
# allowed symbols, one per line.
$thisProg = "$0"; # This programs name
$library = "";
$allowed_symbols = "";
$debug = 0;
$allowed_weak = "";
$weak_specified = 0;
while( defined( $ARGV[ 0 ] ))
{
$_ = shift;
if( /^--verbose$|^-v$/ )
{
$debug = 1;
}
elsif( /^--help$|^-h$/ )
{
print STDOUT "Usage $thisProg [OPTION] ... library [allowed symbols] ...\n",
"\n",
"Check if the given library has only allowed public symbols.\n",
"\n",
" --allowweak=[symbol] allow only these weak symbols\n",
" -v, --verbose verbosely list files processed\n",
" -h, --help print this help, then exit\n";
exit 0;
}
elsif( /^--allowweak=(.*)$/ )
{
$allowed_weak .= " " . $1;
$weak_specified = 1;
}
elsif( /^--allowweak$/ ) # simply list all weak
{
$allowed_weak .= " ";
$weak_specified = 1;
}
elsif( /^--*/ )
{
die "Invalid argument!\n";
}
else
{
if( ! $library )
{
$library = $_;
}
else
{
$allowed_symbols .= " " . $_;
}
}
}
if( ! $weak_specified )
{
$allowed_weak = "*";
# allow all weak symbols by default
# instances of templates and similar stuff - unfortunately includes also things from other libraries,
# so it cannot be on by default
}
print STDERR "library:" . $library . "\n" if $debug;
print STDERR "allowed_symbols:" . $allowed_symbols . "\n" if $debug;
print STDERR "allowed_weak:" . $allowed_weak . "\n" if $debug;
$default_symbols = "_fini _init"; # system symbols
# on my system, every .so has :
# A _DYNAMIC
# A _GLOBAL_OFFSET_TABLE_
# A __bss_start
# A _edata
# A _end
# T _fini
# T _init
# no need to list A symbols in $default_symbols
print STDERR "default_symbols: " . $default_symbols . "\n" if $debug;
print STDOUT "Namespace cleanness check for " . $library . " :\n";
$lib_file = "";
if( $library =~ /\.la$/ )
{
# get the real library file from .la
open( FILEIN, $library ) || die "Couldn't open $! !\n";
while( $line = <FILEIN> )
{
if( $line =~ /library_names=\'([^ ]*).*/o )
{
$lib_file = $1;
}
}
close( FILEIN );
if( ! $lib_file )
{
print STDERR "Library file not found in .la file!\n";
exit 1;
}
my $libpath = $library;
$libpath =~ s%[^/]*$%%;
if( -e $libpath . ".libs/" . $lib_file )
{
$lib_file = $libpath . ".libs/" . $lib_file;
}
else
{
$lib_file = $libpath . $lib_file;
}
}
else
{
$lib_file = $library;
}
print STDERR "libfile: ". $lib_file . "\n" if $debug;
$allowed_symbols .= " " . $default_symbols;
sub process_symbols($\@\%\@);
@wildcards = ();
%exacts = ();
@regwildcards = ();
process_symbols( $allowed_symbols, @wildcards, %exacts, @regwildcards );
@weak_wildcards = ();
%weak_exacts = ();
@weak_regwildcards = ();
process_symbols( $allowed_weak, @weak_wildcards, %weak_exacts, @weak_regwildcards );
# grep is for stripping not exported symbols, which don't have address (=first column)
$nm_command = "nm -BDCg " . $lib_file . " | grep -v '^ ' |";
# TODO how portable is this nmcheck stuff?
print STDERR "nm command:" . $nm_command . "\n" if $debug;
open( FILEIN, $nm_command ) || die "nm command failed\n";
my $exit_code = 0;
while( $line = <FILEIN> )
{
my $type;
my $symbol;
if( $line =~ /^[^ ]* (.) (.*)$/o )
{
$type = $1;
$symbol = $2;
}
else
{
die "Invalid line: " . $line . "\n";
}
print STDERR "Type: " . $type . " , symbol: " . $symbol . "\n" if $debug;
if( $type eq "A" )
{ # these should be system symbols, so ignore them
next;
}
my $orig_symbol = $symbol;
if( $symbol =~ /\(anonymous namespace\)/o )
{ # TODO tell to prefer named namespaces? (shorter symbols)
next;
}
# strip prefixes
# the :: appending is to make "CLASS::*" work also for "vtable for CLASS"
$symbol =~ s/^typeinfo for (.*)$/$1::/o;
$symbol =~ s/^typeinfo fn for (.*)$/$1::/o;
$symbol =~ s/^typeinfo name for (.*)$/$1::/o;
$symbol =~ s/^vtable for (.*)$/$1::/o;
$symbol =~ s/^guard variable for (.*)$/$1::/o;
$symbol =~ s/^reference temporary for (.*)$/$1::/o;
$symbol =~ s/^VTT for (.*)$/$1::/o;
$symbol =~ s/^virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^non-virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^covariant return thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^construction vtable thunk for (.*)$/$1::/o;
$symbol =~ s/^construction vtable for .*-in-(.*) [0-9]*$/$1::/o;
# templates seem to have also return types mangled in their name, and nm prints it too
# they have also template arguments in the symbol
# get rid of both of those
while( $symbol =~ /<.*>/o )
{
$symbol =~ s/<[^<>]*>//o; # strip innermost <>
}
if( $symbol !~ /operator\(\)/o )
{
$symbol =~ s/ ?\(.*\).*$//o; # strip () and all after it
}
else
{
$symbol =~ s/(^|:| )operator\(\) ?\(.*\).*$//o; # strip () and all after it
}
$symbol =~ s/\[.*\] *$//o; # strip [in-charge] etc.
if( $symbol =~ /(^|:| )operator /o )
{
$symbol =~ s/.* ([^\s]*)operator /$1/o; # strip everything before 'X::operator blah'
}
else
{
$symbol =~ s/.* ([^\s]+) *$/$1/o; # get last word (strip return type)
}
# print STDERR "Processed symbol: " . $symbol . "\n" if $debug;
my $found = 0;
if( $exacts{ $symbol } )
{
$found = 1;
}
if( ! $found )
{
for my $wild ( @wildcards )
{
if( index( $symbol, $wild ) == 0 )
{
$found = 1;
last;
}
}
}
if( ! $found )
{
for my $wild ( @regwildcards )
{
if( $symbol =~ /^$wild$/ )
{
$found = 1;
last;
}
}
}
if( ( ! $found ) && ( $type eq "W" || $type eq "V" ))
{
if( $weak_exacts{ $symbol } )
{
$found = 1;
}
if( ! $found )
{
for my $wild ( @weak_wildcards )
{
if( index( $symbol, $wild ) == 0 )
{
$found = 1;
last;
}
}
}
if( ! $found )
{
for my $wild ( @weak_regwildcards )
{
if( $symbol =~ /^$wild$/ )
{
$found = 1;
last;
}
}
}
}
if( ! $found )
{
print STDERR "Public symbol " . $orig_symbol . " is not allowed!\n";
$exit_code = 1;
}
}
close( FILEIN );
print STDOUT $exit_code == 0 ? "OK\n" : "FAILED\n";
exit $exit_code;
sub process_symbols($\@\%\@)
{
my $allowed_symbols = $_[ 0 ];
my $wildcards_ref = $_[ 1 ];
my $exacts_ref = $_[ 2 ];
my $regwildcards_ref = $_[ 3 ];
$allowed_symbols =~ s/^ *//o; # strip whitespace
$allowed_symbols =~ s/ *$//o;
if( $allowed_symbols eq "NONE" )
{
$allowed_symbols = "";
}
my @symbols1 = split( ' ', $allowed_symbols );
my $i = 0;
my @symbols2 = ();
while( defined( $symbols1[ $i ] ))
{
my $symbol = $symbols1[ $i ];
if( $symbol =~ /\./ ) # dot in name -> file
{
open( SYMIN, $symbol ) || die ( "Cannot open file " . $symbol . "!" );
while( $line = <SYMIN> )
{
$line =~ s/^\s*//o; # strip whitespace
$line =~ s/\s*$//o;
if( $line !~ /^$/o # empty line
&& $line !~ /^\s*#/ ) # comment line starting with #
{
$symbols2[ $#symbols2 + 1 ] = $line;
}
}
close( SYMIN );
}
else
{
$symbols2[ $#symbols2 + 1 ] = $symbol;
}
$i++;
}
$i = 0;
while( defined( $symbols2[ $i ] ))
{
my $symbol = $symbols2[ $i ];
if( $symbol =~ /__/
|| $symbol =~ /^_[A-Z]/ )
{ # ISO C++ 2.10.2
die "Symbols containing a double underscore or beginning with an underscore and an upper-case letter are reserved!\n";
}
elsif( $symbol eq "main"
|| $symbol eq "main*" )
{
die "Symbol main is not allowed!\n";
}
if( $symbol =~ /^([^\*]*)\*$/o # trailing * without any * before it
&& $symbol !~ /operator\*$/o )
{
print STDERR "wildcard:" . $symbol . "\n" if $debug;
$wildcards_ref->[ $#{$wildcards_ref} + 1 ] = $1;
}
elsif( $symbol =~ /\*$/o
&& ( $symbol =~ /\*::/o || $symbol =~ /::\*/o )
&& $symbol !~ /^\*/o
&& $symbol !~ /operator\*$/o )
{
print STDERR "regwildcard:" . $symbol . "\n" if $debug;
$symbol =~ s/\*/\.\*/go; # change * to .* (regexp)
$regwildcards_ref->[ $#{$regwildcards_ref} + 1 ] = $symbol;
}
else
{
print STDERR "exact:" . $symbol . "\n" if $debug;
$exacts_ref->{ $symbol } = 1;
}
$i++;
}
}