psiconv-0.9.8/0000777000175000017500000000000010336611562010221 500000000000000psiconv-0.9.8/lib/0000777000175000017500000000000010336611556010772 500000000000000psiconv-0.9.8/lib/psiconv/0000777000175000017500000000000010336611557012454 500000000000000psiconv-0.9.8/lib/psiconv/image.h0000644000175000017500000000352010336374727013630 00000000000000/* image.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This file contains definitions used internally by generate_image.c and parse_image.c */ #ifndef PSICONV_IMAGE_H #define PSICONV_IMAGE_H #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef psiconv_list psiconv_pixel_bytes; /* psiconv_u8 */ typedef psiconv_list psiconv_pixel_ints; /* of psiconv_u32 */ typedef struct psiconv_pixel_float_s { psiconv_u32 length; float *red; float *green; float *blue; } psiconv_pixel_floats_t; extern psiconv_pixel_floats_t psiconv_palet_none, psiconv_palet_color_4, psiconv_palet_color_8; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_IMAGE_H */ psiconv-0.9.8/lib/psiconv/configuration.h0000644000175000017500000000363410336374717015422 00000000000000/* configuration.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_CONFIG_H #define PSICONV_CONFIG_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef void psiconv_error_handler_t (int kind, psiconv_u32 off, const char *message); typedef struct psiconv_config_s { int verbosity; int colordepth; int redbits; /* Only needed when color is used and no palet */ int greenbits; /* Only needed when color is used and no palet */ int bluebits; /* Only needed when color is used and no palet */ psiconv_bool_t color; psiconv_error_handler_t *error_handler; psiconv_u8 unknown_epoc_char; psiconv_ucs2 unknown_unicode_char; psiconv_ucs2 unicode_table[0x100]; psiconv_bool_t unicode; } *psiconv_config; extern psiconv_config psiconv_config_default(void); extern void psiconv_config_read(const char *extra_config_files, psiconv_config *config); extern void psiconv_config_free(psiconv_config config); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PSICONV_ERROR_H */ psiconv-0.9.8/lib/psiconv/data.h0000644000175000017500000013012510336374662013457 00000000000000/* data.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This file contains the declarations of all types that are used to represent the Psion files. Variables of these types are written by the parse routines, and read by the generation routines. Mostly, the data structures reflect the file format documentation, as included in the formats directory. When in doubt, refer there. */ #ifndef PSICONV_DATA_H #define PSICONV_DATA_H #include #include /* All types which end on _t are plain types; all other types are pointers to structs. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Forward declaration (for psiconv_embedded_object_section) */ typedef struct psiconv_file_s *psiconv_file; /* Enums and simple types */ /* Floating point number representation */ typedef double psiconv_float_t; /* The supported file types. */ typedef enum psiconv_file_type { psiconv_unknown_file, psiconv_word_file, psiconv_texted_file, psiconv_mbm_file, psiconv_sketch_file, psiconv_clipart_file, psiconv_sheet_file } psiconv_file_type_t; /* String representation. A string is an array of UCS2 characters, terminated by a 0. So they are just like normal C strings, except that they are built of psiconv_ucs2 elements instead of char elements. The psiconv_ucs2 type holds 16 bits; see unicode.h for more information. */ typedef psiconv_ucs2 *psiconv_string_t; /* Represent lengths (in centimeters) and sizes (in points). In the Psion file, these are identical; but we translate them to more human-readable quantities */ typedef float psiconv_length_t; /* For offsets in centimeters */ typedef float psiconv_size_t; /* For sizes in points */ /* Represent booleans. As false is zero in the enum, you can still do things like { if (test) ... } instead of { if (test == psiconv_bool_true) ... }. Choose whatever style suits you best. */ typedef enum psiconv_bool { psiconv_bool_false, psiconv_bool_true } psiconv_bool_t; /* Some kind of three-valued boolean, used at several places. */ typedef enum psiconv_triple { psiconv_triple_on, psiconv_triple_off, psiconv_triple_auto } psiconv_triple_t; /* Text can be in superscript or subscript or neither, but never both superscript and subscript at once. Also, super-superscript and things like that do not exist in the Psion world. */ typedef enum psiconv_super_sub { psiconv_normalscript, psiconv_superscript, psiconv_subscript } psiconv_super_sub_t; /* Horizontal justification. */ typedef enum psiconv_justify_hor { psiconv_justify_left, psiconv_justify_centre, psiconv_justify_right, psiconv_justify_full } psiconv_justify_hor_t; /* Vertical justification. */ typedef enum psiconv_justify_ver { psiconv_justify_top, psiconv_justify_middle, psiconv_justify_bottom } psiconv_justify_ver_t; /* Borders around text fields. */ typedef enum psiconv_border_kind { psiconv_border_none, /* No border */ psiconv_border_solid, /* Single line */ psiconv_border_double, /* Double line */ psiconv_border_dotted, /* Dotted line: . . . . . */ psiconv_border_dashed, /* Dashed line: _ _ _ _ _ */ psiconv_border_dotdashed, /* Dotted/dashed line: _ . _ . _ */ psiconv_border_dotdotdashed /* Dotted/dashed line: . . _ . . _ */ } psiconv_border_kind_t; /* Though each printer driver has its own fonts for printing, they are represented on the Psion screen by a few built-in fonts. */ typedef enum psiconv_screenfont { psiconv_font_misc, /* Nonproportional symbols, like Wingbat? */ psiconv_font_sansserif, /* Proportional sans-serif, like Arial */ psiconv_font_nonprop, /* Nonproportional, like Courier */ psiconv_font_serif /* Proportional serifed, like Times */ } psiconv_screenfont_t; /* The kind of tab. Note that decimal tabs are not supported by the Psion. */ typedef enum psiconv_tab_kind { psiconv_tab_left, /* Left tab */ psiconv_tab_centre, /* Centre tab */ psiconv_tab_right /* Right tab */ } psiconv_tab_kind_t; /* When text has to be replaced, the kind of replacement to do (not yet implemented!) */ typedef enum psiconv_replacement_type { psiconv_replace_time, psiconv_replace_date, psiconv_replace_pagenr, psiconv_replace_nr_of_pages, psiconv_replace_filename } psiconv_replacement_type_t; /* Here starts the struct definitions */ /* The color of a single pixel, in RGB format. Black: 0x00 0x00 0x00 White: 0xff 0xff 0xff */ typedef struct psiconv_color_s { psiconv_u8 red; psiconv_u8 green; psiconv_u8 blue; } * psiconv_color; /* Complete font information: both a printer font and a corresponding screen font to display it. */ typedef struct psiconv_font_s { psiconv_string_t name; /* Printer font */ psiconv_screenfont_t screenfont; /* Screen font */ } *psiconv_font; /* Complete border information */ typedef struct psiconv_border_s { psiconv_border_kind_t kind; /* Border kind */ psiconv_size_t thickness; /* Set to 1/20 for non-solid lines */ psiconv_color color; /* Border color */ } *psiconv_border; /* Complete bullet information. The interaction of left and first line indentation and bullets is quite complicated. BULLET FIRST BULLET FIRST LINE NEXT LINES None = 0 - Left+First Left > 0 - Left+First Left < 0 - Left+First Left Indent Off = 0 Left Left(+Bullet) Left > 0 Left Left+First Left < 0 Left+First Left+First(+Bullet) Left Indent On = 0 Left Left(+Bullet) Left > 0 Left Left+First Left+First < 0 Left+First Left Left */ typedef struct psiconv_bullet_s { psiconv_bool_t on; /* Whether the bullet is shown */ psiconv_size_t font_size; /* Bullet font size */ psiconv_ucs2 character; /* Bullet character */ psiconv_bool_t indent; /* Whether to indent (see above */ psiconv_color color; /* Bullet color */ psiconv_font font; /* Bullet font */ } *psiconv_bullet; /* Complete single tab information */ typedef struct psiconv_tab_s { psiconv_length_t location; /* The indentation level */ psiconv_tab_kind_t kind; /* Tab kind */ } *psiconv_tab; /* A list of tabs */ typedef psiconv_list psiconv_tab_list; /* of struct psiconv_tab_s */ /* Information about all tabs. Normal tabs start after the rightmost extra tab */ typedef struct psiconv_all_tabs_s { psiconv_length_t normal; /* Normal tab distance */ psiconv_tab_list extras; /* Additional defined tabs */ } *psiconv_all_tabs; /* Character layout. This structure holds all layout information that can be applied on the character level (as opposed to layouts that only apply to whole paragraphs). Note that at all times, this structure holds the complete layout information; we do not use incremental layouts, unlike the Psion file format itself. So if an italic text is also underlined, the character_layout will have both set for that region. */ typedef struct psiconv_character_layout_s { psiconv_color color; /* Character color */ psiconv_color back_color; /* Background color */ psiconv_size_t font_size; /* Font size */ psiconv_bool_t italic; /* Use italics? */ psiconv_bool_t bold; /* Use bold? */ psiconv_super_sub_t super_sub; /* Use super/subscript? */ psiconv_bool_t underline; /* Underline? */ psiconv_bool_t strikethrough; /* Strike through? */ psiconv_font font; /* Character font */ } *psiconv_character_layout; /* Paragraph layout. This structure holds all layout information that can be applied on the paragraph level (as opposed to layouts that also apply to single characters). Note that at all times, this structure holds the complete layout information; we do not use incremental layouts, unlike the Psion file format itself. Linespacing is the amount of vertical space between lines. If linespacing_exact is set, this amount is used even if that would make text overlap; if it is not set, a greater distance is used if text would otherwise overlap. Several booleans determine where page breaks may be set. keep_together forbids page breaks in the middle of the paragraph; keep_with_next forbids page breaks between this and the next paragraph. on_next_page forces a pagebreak before the paragraph. no_widow_protection allows one single line of the paragraph on a page, and the rest on another page. Sheet cell text normally does not wrap; wrap_to_fit_cell allows this. */ typedef struct psiconv_paragraph_layout_s { psiconv_color back_color; /* Background color */ psiconv_length_t indent_left; /* Left indentation (except first line) */ psiconv_length_t indent_right; /* Right indentation */ psiconv_length_t indent_first; /* First line left indentation */ psiconv_justify_hor_t justify_hor; /* Horizontal justification */ psiconv_justify_ver_t justify_ver; /* Vertical justification */ psiconv_size_t linespacing; /* The linespacing */ psiconv_bool_t linespacing_exact; /* Is linespacing exact or the minimum? */ psiconv_size_t space_above; /* Vertical space before the paragraph */ psiconv_size_t space_below; /* Vertical space after the paragraph */ psiconv_bool_t keep_together; /* Keep lines on one page? */ psiconv_bool_t keep_with_next; /* Disallow pagebreak after paragraph? */ psiconv_bool_t on_next_page; /* Force page break before paragraph? */ psiconv_bool_t no_widow_protection; /* Undo widow protection? */ psiconv_bool_t wrap_to_fit_cell; /* Wrap sheet cell text? */ psiconv_length_t border_distance; /* Distance to borders */ psiconv_bullet bullet; /* Bullet information */ psiconv_border left_border; /* Left border information */ psiconv_border right_border; /* Right border information */ psiconv_border top_border; /* Top border information */ psiconv_border bottom_border; /* Bottom border information */ psiconv_all_tabs tabs; /* All tab information */ } *psiconv_paragraph_layout; /* A Header Section. It contains the three UIDs and the checksum, and the type of file. As the type of file uniquely defines the UIDs, and as the UIDs determine the checksum, this is never included in a regular psiconv_file structure. It can be used to read the header section separately, though. */ typedef struct psiconv_header_section_s { psiconv_u32 uid1; psiconv_u32 uid2; psiconv_u32 uid3; psiconv_u32 checksum; psiconv_file_type_t file; } *psiconv_header_section; /* A Section Table Section entry. Each entry has a UID and an offset. This is never included in a regular psiconv_file structure, as the information is too low-level. It is used internally, though. */ typedef struct psiconv_section_table_entry_s { psiconv_u32 id; /* Section UID */ psiconv_u32 offset; /* Section offset within the file */ } *psiconv_section_table_entry; /* A Section Table Section. A list of sections and their offsets. It is simply a list of Section Table Section Entries. This is never included in a regular psiconv_file structure, as the information is too low-level. It is used internally, though. */ typedef psiconv_list psiconv_section_table_section; /* Of struct psiconv_sectiontable_entry_s */ /* An Application ID Section. The type of file. Never included in a regular psiconv_file structure, because it is too low-level. You can always recover it if you know the file type. Used internally. The name should probably be case-insensitive. */ typedef struct psiconv_application_id_section_s { psiconv_u32 id; /* File type UID */ psiconv_string_t name; /* File type name */ } *psiconv_application_id_section; /* An Object Icon Section. The icon used for an embedded object. */ typedef struct psiconv_object_icon_section_s { psiconv_length_t icon_width; /* Icon width */ psiconv_length_t icon_height; /* Icon height */ psiconv_string_t icon_name; /* Icon name */ } *psiconv_object_icon_section; /* An Object Display Section. How an embedded icon should be displayed. The sizes are computed after cropping or resizing; if the object is shown as an icon, the icon sizes are used here. */ typedef struct psiconv_object_display_section_s { psiconv_bool_t show_icon; /* Show an icon or the whole file? */ psiconv_length_t width; /* Object display width */ psiconv_length_t height; /* Object display height */ } *psiconv_object_display_section; /* An Embedded Object Section. All data about an embedded object. An object is another psiconv_file, which is embedded in the current file. Objects can also be embedded in each other, of course. */ typedef struct psiconv_embedded_object_section_s { psiconv_object_icon_section icon; /* Icon information */ psiconv_object_display_section display; /* Display information */ psiconv_file object; /* The object itself */ } *psiconv_embedded_object_section; /* Inline character-level layout information. Information how some characters should be laid out. Note that, though you can choose specific layouts for an object, this will probably not affect the object's rendering. Usually, object will be NULL, and the object_width and object_height will be ignored. The object sizes are the same as in the Object Display Section, so this information seems to be redundant. */ typedef struct psiconv_in_line_layout_s { psiconv_character_layout layout; /* Layout information */ int length; /* Number of characters */ psiconv_embedded_object_section object; /* Embedded object or NULL */ psiconv_length_t object_width; /* Object display width */ psiconv_length_t object_height; /* Object display height */ } *psiconv_in_line_layout; /* Inline character information for a whole line. A list of inline character information */ typedef psiconv_list psiconv_in_line_layouts; /* of struct psiconv_in_line_layout_s */ /* What to replace where in text. Not yet implemented! (not yet implemented!) */ typedef struct psiconv_replacement_s { int offset; /* Offset in text */ int cur_len; /* Length of text to replace */ psiconv_replacement_type_t type; /* Kind of replacement */ } *psiconv_replacement; /* A list of replacements */ typedef psiconv_list psiconv_replacements; /* of struct psiconv_replacement_s */ /* A paragraph of text. Layout and actual paragraph text are combined here, even though they are seperated in the Psion file format. The base style is referred to, but the base_character and base_paragraph have all style settings already incorporated. The base style can be found using the psiconv_get_style function. The in_lines are either an empty list, or they should apply to exactly the number of characters in this paragraph */ typedef struct psiconv_paragraph_s { psiconv_string_t text; /* Paragraph text */ psiconv_character_layout base_character; /* Base character layout */ psiconv_paragraph_layout base_paragraph; /* Base paragraph layout */ psiconv_s16 base_style; /* Paragraph style */ psiconv_in_line_layouts in_lines; /* In-paragraph layout */ psiconv_replacements replacements; /* Replacements like the date */ } *psiconv_paragraph; /* A collection of text paragraphs */ typedef psiconv_list psiconv_text_and_layout; /* Of struct psiconv_paragraph_s */ /* A TextEd Section. Text and simple layout, without styles. */ typedef struct psiconv_texted_section_s { psiconv_text_and_layout paragraphs; } *psiconv_texted_section; /* A Page Header. All information about a page header or footer. An explicit base paragraph and character layout is found; this is used as a sort of base style, on which all further formatting is based */ typedef struct psiconv_page_header_s { psiconv_bool_t on_first_page; /* Display on first page? */ psiconv_paragraph_layout base_paragraph_layout; /* Base paragraph layout */ psiconv_character_layout base_character_layout; /* Base character layout */ psiconv_texted_section text; /* The actual text */ } *psiconv_page_header; /* A Page Layout Section All information about the layout of a page. Margins, page size, the header, the footer and page numbers */ typedef struct psiconv_page_layout_section_s { psiconv_u32 first_page_nr; /* Page numbers start counting here */ psiconv_length_t header_dist; /* Distance of header to text */ psiconv_length_t footer_dist; /* Distance of footer to text */ psiconv_length_t left_margin; /* Left margin */ psiconv_length_t right_margin; /* Right margin */ psiconv_length_t top_margin; /* Top margin */ psiconv_length_t bottom_margin; /* Bottom margin */ psiconv_length_t page_width; /* Page width */ psiconv_length_t page_height; /* Page height */ psiconv_page_header header; /* Header information */ psiconv_page_header footer; /* Footer information */ psiconv_bool_t landscape; /* Landscape orientation? */ } * psiconv_page_layout_section; /* A Word Status Section Settings of the Word program. Several whitespace and related characters can be explicitely shown. Embedded pictures and graphs can be iconized or displayed full. Toolbars can be shown or hidden. Long lines can be wrapped, or you have to use scrolling. The cursor position is the character number of the text. Zoom level: 1000 is "normal" */ typedef struct psiconv_word_status_section_s { psiconv_bool_t show_tabs; /* Show tabs? */ psiconv_bool_t show_spaces; /* Show spaces? */ psiconv_bool_t show_paragraph_ends; /* Show paragraph ends? */ psiconv_bool_t show_line_breaks; /* Show line breaks */ psiconv_bool_t show_hard_minus; /* Show hard dashes? */ psiconv_bool_t show_hard_space; /* Show hard spaces? */ psiconv_bool_t show_full_pictures; /* Show embedded pictures (or iconize)? */ psiconv_bool_t show_full_graphs; /* Show embedded graphs (or iconize)? */ psiconv_bool_t show_top_toolbar; /* Show top toolbar? */ psiconv_bool_t show_side_toolbar; /* Show side toolbar? */ psiconv_bool_t fit_lines_to_screen; /* Wrap lines? */ psiconv_u32 cursor_position; /* Cursor position (character number) */ psiconv_u32 display_size; /* Zooming level */ } *psiconv_word_status_section; /* A Word Style. All information about a single Style. A builtin style may not be changed in the Word program. Outline level is zero if unused. The name may be NULL for the normal style! */ typedef struct psiconv_word_style_s { psiconv_character_layout character; /* character-level layout */ psiconv_paragraph_layout paragraph; /* paragraph-level layout */ psiconv_ucs2 hotkey; /* The hotkey */ psiconv_string_t name; /* Style name */ psiconv_bool_t built_in; /* Builtin style? */ psiconv_u32 outline_level; /* Outline level */ } *psiconv_word_style; /* A list of Word Styles */ typedef psiconv_list psiconv_word_style_list; /* Of struct psiconv_word_style_s */ /* A Word Styles Section All information about styles. Note that the name of the normal style is NULL! */ typedef struct psiconv_word_styles_section_s { psiconv_word_style normal; /* The normal (unspecified) style */ psiconv_word_style_list styles; /* All other defined styles */ } *psiconv_word_styles_section; /* A Word File All information about a Word File. Note that a section can be NULL if it is not present. */ typedef struct psiconv_word_f_s { psiconv_page_layout_section page_sec; /* Page layout */ psiconv_text_and_layout paragraphs; /* Text and text layout */ psiconv_word_status_section status_sec; /* Internal Word program settings */ psiconv_word_styles_section styles_sec; /* Styles */ } *psiconv_word_f; /* A TextEd File All information about a TextEd File. Note that a section can be NULL if it is not present. */ typedef struct psiconv_texted_f_s { psiconv_page_layout_section page_sec; /* Page layout */ psiconv_texted_section texted_sec; /* Text and text layout */ } *psiconv_texted_f; /* A Jumptable Section. A simple list of offsets. This is never included in a regular psiconv_file structure, as the information is too low-level. It is used internally, though. */ typedef psiconv_list psiconv_jumptable_section; /* of psiconv_u32 */ /* A Paint Data Section A collection of pixels. Normalized values [0..1] for each color component. Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ typedef struct psiconv_paint_data_section_s { psiconv_u32 xsize; /* Number of pixels in a row */ psiconv_u32 ysize; /* Number of pixels in a column */ psiconv_length_t pic_xsize; /* 0 if not specified */ psiconv_length_t pic_ysize; /* 0 if not specified */ float *red; float *green; float *blue; } *psiconv_paint_data_section; /* A collection of Paint Data Sections */ typedef psiconv_list psiconv_pictures; /* of struct psiconv_paint_data_section_s */ /* A MBM file All information about a MBM file MBM files contain one or more pictures. */ typedef struct psiconv_mbm_f_s { psiconv_pictures sections; } *psiconv_mbm_f; /* Read the Psiconv file format documentation for a complete discription. Basic idea: a picture has a certain display size. Within it, the pixel data begins at a certain offset. Around it, there is an empty form. The first eight values are before magnification and cuts. Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 cuts everything away. */ typedef struct psiconv_sketch_section_s { psiconv_u16 displayed_xsize; psiconv_u16 displayed_ysize; psiconv_u16 picture_data_x_offset; psiconv_u16 picture_data_y_offset; psiconv_u16 form_xsize; psiconv_u16 form_ysize; psiconv_u16 displayed_size_x_offset; psiconv_u16 displayed_size_y_offset; float magnification_x; /* computed relative to first eight values */ float magnification_y; /* computed relative to first eight values */ float cut_left; /* computed relative to first eight values */ float cut_right; /* computed relative to first eight values */ float cut_top; /* computed relative to first eight values */ float cut_bottom; /* computed relative to first eight values */ psiconv_paint_data_section picture; } *psiconv_sketch_section; typedef struct psiconv_sketch_f_s { psiconv_sketch_section sketch_sec; } *psiconv_sketch_f; typedef struct psiconv_clipart_section_s { /* Perhaps later on some currently unknown stuff. */ psiconv_paint_data_section picture; } * psiconv_clipart_section; typedef psiconv_list psiconv_cliparts; /* of struct psiconv_clipart_section_s */ typedef struct psiconv_clipart_f_s { psiconv_cliparts sections; } *psiconv_clipart_f; typedef struct psiconv_sheet_ref_s { psiconv_s16 offset; psiconv_bool_t absolute; } psiconv_sheet_ref_t; typedef struct psiconv_sheet_cell_reference_s { psiconv_sheet_ref_t row; psiconv_sheet_ref_t column; } psiconv_sheet_cell_reference_t; typedef struct psiconv_sheet_cell_block_s { psiconv_sheet_cell_reference_t first; psiconv_sheet_cell_reference_t last; } psiconv_sheet_cell_block_t; typedef enum psiconv_cell_type { psiconv_cell_blank, psiconv_cell_int, psiconv_cell_bool, psiconv_cell_error, psiconv_cell_float, psiconv_cell_string } psiconv_cell_type_t; typedef enum psiconv_sheet_errorcode { psiconv_sheet_error_none, psiconv_sheet_error_null, psiconv_sheet_error_divzero, psiconv_sheet_error_value, psiconv_sheet_error_reference, psiconv_sheet_error_name, psiconv_sheet_error_number, psiconv_sheet_error_notavail } psiconv_sheet_errorcode_t; typedef enum psiconv_sheet_numberformat_code { psiconv_numberformat_general, psiconv_numberformat_fixeddecimal, psiconv_numberformat_scientific, psiconv_numberformat_currency, psiconv_numberformat_percent, psiconv_numberformat_triads, psiconv_numberformat_boolean, psiconv_numberformat_text, psiconv_numberformat_date_dmm, psiconv_numberformat_date_mmd, psiconv_numberformat_date_ddmmyy, psiconv_numberformat_date_mmddyy, psiconv_numberformat_date_yymmdd, psiconv_numberformat_date_dmmm, psiconv_numberformat_date_dmmmyy, psiconv_numberformat_date_ddmmmyy, psiconv_numberformat_date_mmm, psiconv_numberformat_date_monthname, psiconv_numberformat_date_mmmyy, psiconv_numberformat_date_monthnameyy, psiconv_numberformat_date_monthnamedyyyy, psiconv_numberformat_datetime_ddmmyyyyhhii, psiconv_numberformat_datetime_ddmmyyyyHHii, psiconv_numberformat_datetime_mmddyyyyhhii, psiconv_numberformat_datetime_mmddyyyyHHii, psiconv_numberformat_datetime_yyyymmddhhii, psiconv_numberformat_datetime_yyyymmddHHii, psiconv_numberformat_time_hhii, psiconv_numberformat_time_hhiiss, psiconv_numberformat_time_HHii, psiconv_numberformat_time_HHiiss } psiconv_sheet_numberformat_code_t; typedef struct psiconv_sheet_numberformat_s { psiconv_sheet_numberformat_code_t code; psiconv_u8 decimal; } *psiconv_sheet_numberformat; typedef struct psiconv_sheet_cell_layout_s { psiconv_character_layout character; psiconv_paragraph_layout paragraph; psiconv_sheet_numberformat numberformat; } * psiconv_sheet_cell_layout; typedef struct psiconv_sheet_cell_s { psiconv_u16 column; psiconv_u16 row; psiconv_cell_type_t type; union { psiconv_u32 dat_int; double dat_float; psiconv_string_t dat_string; psiconv_bool_t dat_bool; psiconv_sheet_errorcode_t dat_error; } data; psiconv_sheet_cell_layout layout; psiconv_bool_t calculated; psiconv_u32 ref_formula; } *psiconv_sheet_cell; typedef psiconv_list psiconv_sheet_cell_list; /* Of struct psiconv_sheet_cell_s */ typedef struct psiconv_sheet_status_section_s { psiconv_bool_t show_graph; psiconv_u32 cursor_row; psiconv_u32 cursor_column; psiconv_bool_t show_top_sheet_toolbar; psiconv_bool_t show_side_sheet_toolbar; psiconv_bool_t show_top_graph_toolbar; psiconv_bool_t show_side_graph_toolbar; psiconv_u32 sheet_display_size; psiconv_u32 graph_display_size; psiconv_triple_t show_horizontal_scrollbar; psiconv_triple_t show_vertical_scrollbar; } *psiconv_sheet_status_section; typedef enum psiconv_formula_type { psiconv_formula_unknown, psiconv_formula_op_lt, psiconv_formula_op_le, psiconv_formula_op_gt, psiconv_formula_op_ge, psiconv_formula_op_ne, psiconv_formula_op_eq, psiconv_formula_op_add, psiconv_formula_op_sub, psiconv_formula_op_mul, psiconv_formula_op_div, psiconv_formula_op_pow, psiconv_formula_op_pos, psiconv_formula_op_neg, psiconv_formula_op_not, psiconv_formula_op_and, psiconv_formula_op_or, psiconv_formula_op_con, psiconv_formula_op_bra, psiconv_formula_mark_eof, psiconv_formula_dat_float, psiconv_formula_dat_int, psiconv_formula_dat_var, psiconv_formula_dat_string, psiconv_formula_dat_cellref, psiconv_formula_dat_cellblock, psiconv_formula_dat_vcellblock, psiconv_formula_mark_opsep, psiconv_formula_mark_opend, psiconv_formula_fun_false, psiconv_formula_fun_if, psiconv_formula_fun_true, psiconv_formula_fun_cell, psiconv_formula_fun_errortype, psiconv_formula_fun_isblank, psiconv_formula_fun_iserr, psiconv_formula_fun_iserror, psiconv_formula_fun_islogical, psiconv_formula_fun_isna, psiconv_formula_fun_isnontext, psiconv_formula_fun_isnumber, psiconv_formula_fun_istext, psiconv_formula_fun_n, psiconv_formula_fun_type, psiconv_formula_fun_address, psiconv_formula_fun_column, psiconv_formula_fun_columns, psiconv_formula_fun_hlookup, psiconv_formula_fun_index, psiconv_formula_fun_indirect, psiconv_formula_fun_lookup, psiconv_formula_fun_offset, psiconv_formula_fun_row, psiconv_formula_fun_rows, psiconv_formula_fun_vlookup, psiconv_formula_fun_char, psiconv_formula_fun_code, psiconv_formula_fun_exact, psiconv_formula_fun_find, psiconv_formula_fun_left, psiconv_formula_fun_len, psiconv_formula_fun_lower, psiconv_formula_fun_mid, psiconv_formula_fun_proper, psiconv_formula_fun_replace, psiconv_formula_fun_rept, psiconv_formula_fun_right, psiconv_formula_fun_string, psiconv_formula_fun_t, psiconv_formula_fun_trim, psiconv_formula_fun_upper, psiconv_formula_fun_value, psiconv_formula_fun_date, psiconv_formula_fun_datevalue, psiconv_formula_fun_day, psiconv_formula_fun_hour, psiconv_formula_fun_minute, psiconv_formula_fun_month, psiconv_formula_fun_now, psiconv_formula_fun_second, psiconv_formula_fun_today, psiconv_formula_fun_time, psiconv_formula_fun_timevalue, psiconv_formula_fun_year, psiconv_formula_fun_abs, psiconv_formula_fun_acos, psiconv_formula_fun_asin, psiconv_formula_fun_atan, psiconv_formula_fun_atan2, psiconv_formula_fun_cos, psiconv_formula_fun_degrees, psiconv_formula_fun_exp, psiconv_formula_fun_fact, psiconv_formula_fun_int, psiconv_formula_fun_ln, psiconv_formula_fun_log10, psiconv_formula_fun_mod, psiconv_formula_fun_pi, psiconv_formula_fun_radians, psiconv_formula_fun_rand, psiconv_formula_fun_round, psiconv_formula_fun_sign, psiconv_formula_fun_sin, psiconv_formula_fun_sqrt, psiconv_formula_fun_sumproduct, psiconv_formula_fun_tan, psiconv_formula_fun_trunc, psiconv_formula_fun_cterm, psiconv_formula_fun_ddb, psiconv_formula_fun_fv, psiconv_formula_fun_irr, psiconv_formula_fun_npv, psiconv_formula_fun_pmt, psiconv_formula_fun_pv, psiconv_formula_fun_rate, psiconv_formula_fun_sln, psiconv_formula_fun_syd, psiconv_formula_fun_term, psiconv_formula_fun_combin, psiconv_formula_fun_permut, psiconv_formula_vfn_average, psiconv_formula_vfn_choose, psiconv_formula_vfn_count, psiconv_formula_vfn_counta, psiconv_formula_vfn_countblank, psiconv_formula_vfn_max, psiconv_formula_vfn_min, psiconv_formula_vfn_product, psiconv_formula_vfn_stdevp, psiconv_formula_vfn_stdev, psiconv_formula_vfn_sum, psiconv_formula_vfn_sumsq, psiconv_formula_vfn_varp, psiconv_formula_vfn_var } psiconv_formula_type_t; typedef psiconv_list psiconv_formula_list; /* Of struct psiconv_formula_s */ typedef struct psiconv_formula_s { psiconv_formula_type_t type; union { psiconv_u32 dat_int; double dat_float; psiconv_string_t dat_string; psiconv_sheet_cell_reference_t dat_cellref; psiconv_sheet_cell_block_t dat_cellblock; psiconv_formula_list fun_operands; psiconv_u32 dat_variable; } data; } *psiconv_formula; typedef struct psiconv_sheet_line_s { psiconv_u32 position; psiconv_sheet_cell_layout layout; } *psiconv_sheet_line; typedef psiconv_list psiconv_sheet_line_list; /* Of struct psiconv_sheet_line_s */ typedef struct psiconv_sheet_grid_size_s { psiconv_u32 line_number; psiconv_length_t size; } *psiconv_sheet_grid_size; typedef psiconv_list psiconv_sheet_grid_size_list; /* Of struct psiconv_sheet_grid_size_s */ typedef psiconv_list psiconv_sheet_grid_break_list; /* of psiconv_u32 */ typedef struct psiconv_sheet_grid_section_s { psiconv_bool_t show_column_titles; psiconv_bool_t show_row_titles; psiconv_bool_t show_vertical_grid; psiconv_bool_t show_horizontal_grid; psiconv_bool_t freeze_rows; psiconv_bool_t freeze_columns; psiconv_u32 frozen_rows; psiconv_u32 frozen_columns; psiconv_u32 first_unfrozen_row_displayed; psiconv_u32 first_unfrozen_column_displayed; psiconv_bool_t show_page_breaks; psiconv_u32 first_row; psiconv_u32 first_column; psiconv_u32 last_row; psiconv_u32 last_column; psiconv_length_t default_row_height; psiconv_length_t default_column_width; psiconv_sheet_grid_size_list row_heights; psiconv_sheet_grid_size_list column_heights; psiconv_sheet_grid_break_list row_page_breaks; psiconv_sheet_grid_break_list column_page_breaks; } *psiconv_sheet_grid_section; typedef struct psiconv_sheet_worksheet_s { psiconv_sheet_cell_layout default_layout; psiconv_sheet_cell_list cells; psiconv_bool_t show_zeros; psiconv_sheet_line_list row_default_layouts; psiconv_sheet_line_list col_default_layouts; psiconv_sheet_grid_section grid; } *psiconv_sheet_worksheet; typedef psiconv_list psiconv_sheet_worksheet_list; /* of struct psiconv_sheet_worksheet_s */ typedef enum psiconv_variable_type { psiconv_var_int, psiconv_var_float, psiconv_var_string, psiconv_var_cellref, psiconv_var_cellblock } psiconv_variable_type_t; typedef struct psiconv_sheet_variable_s { psiconv_u32 number; psiconv_string_t name; psiconv_variable_type_t type; union { psiconv_s32 dat_int; double dat_float; psiconv_string_t dat_string; psiconv_sheet_cell_reference_t dat_cellref; psiconv_sheet_cell_block_t dat_cellblock; } data; } *psiconv_sheet_variable; typedef psiconv_list psiconv_sheet_variable_list; /* of struct psiconv_sheet_variable_s */ typedef struct psiconv_sheet_name_section_s { psiconv_string_t name; } *psiconv_sheet_name_section; typedef struct psiconv_sheet_info_section_s { psiconv_bool_t auto_recalc; } *psiconv_sheet_info_section; typedef struct psiconv_sheet_workbook_section_s { psiconv_formula_list formulas; psiconv_sheet_worksheet_list worksheets; psiconv_sheet_variable_list variables; psiconv_sheet_info_section info; psiconv_sheet_name_section name; } *psiconv_sheet_workbook_section; typedef struct psiconv_sheet_f_s { psiconv_page_layout_section page_sec; psiconv_sheet_status_section status_sec; psiconv_sheet_workbook_section workbook_sec; } *psiconv_sheet_f; /* NB: psiconv_file is already defined above */ struct psiconv_file_s { psiconv_file_type_t type; void *file; }; /* UID1 */ #define PSICONV_ID_PSION5 0x10000037 #define PSICONV_ID_CLIPART 0x10000041 /* UID2 */ #define PSICONV_ID_DATA_FILE 0x1000006D #define PSICONV_ID_MBM_FILE 0x10000042 /* UID3 */ #define PSICONV_ID_WORD 0x1000007F #define PSICONV_ID_TEXTED 0x10000085 #define PSICONV_ID_SKETCH 0x1000007D #define PSICONV_ID_SHEET 0x10000088 /* Section table ids */ #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 #define PSICONV_ID_APPL_ID_SECTION 0x10000089 #define PSICONV_ID_TEXT_SECTION 0x10000106 #define PSICONV_ID_LAYOUT_SECTION 0x10000143 #define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 #define PSICONV_ID_PASSWORD_SECTION 0x100000CD #define PSICONV_ID_SKETCH_SECTION 0x1000007D #define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F #define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D #define PSICONV_ID_SHEET_GRAPH_SECTION 0x10000121 /* Other ids */ #define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd #define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e #define PSICONV_ID_TEXTED_BODY 0x1000005c #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 #define PSICONV_ID_TEXTED_TEXT 0x10000064 #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C #define PSICONV_ID_CLIPART_ITEM 0x10000040 #define PSICONV_ID_OBJECT 0x10000051 #define PSICONV_ID_OBJECT_DISPLAY_SECTION 0x10000146 #define PSICONV_ID_OBJECT_ICON_SECTION 0x1000012A #define PSICONV_ID_OBJECT_SECTION_TABLE_SECTION 0x10000144 /* Return a clean layout_status. You can modify it at will. Returns NULL if there is not enough memory. */ extern psiconv_character_layout psiconv_basic_character_layout(void); /* Return a clean layout_status. You can modify it at will. Returns NULL if there is not enough memory. */ extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); /* Clone a layout_status: the new copy is completely independent of the original one. Returns NULL if there is not enough memory. */ extern psiconv_paragraph_layout psiconv_clone_paragraph_layout (psiconv_paragraph_layout ls); extern psiconv_character_layout psiconv_clone_character_layout (psiconv_character_layout ls); /* Get a numbered style. Returns NULL if the style is unknown. */ extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); /* Return the number corresponding to the stylename. Returns 0 on success, an error code on failure. */ extern int psiconv_find_style(const psiconv_word_styles_section ss, const psiconv_ucs2 *name,int *nr); /* Get a numbered formula. Returns NULL if the style is unknown. */ extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); /* Return the default layout */ extern psiconv_sheet_cell_layout psiconv_get_default_layout (psiconv_sheet_line_list row_defaults, psiconv_sheet_line_list col_defaults, psiconv_sheet_cell_layout cell_default, int row,int col); extern void psiconv_free_color(psiconv_color color); extern void psiconv_free_border(psiconv_border border); extern void psiconv_free_bullet(psiconv_bullet bullet); extern void psiconv_free_font(psiconv_font font); extern void psiconv_free_tab(psiconv_tab tab); extern void psiconv_free_tabs(psiconv_all_tabs tabs); extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); extern void psiconv_free_character_layout(psiconv_character_layout layout); extern void psiconv_free_word_style(psiconv_word_style style); extern void psiconv_free_word_style_list(psiconv_word_style_list style_list); extern void psiconv_free_word_styles_section (psiconv_word_styles_section styles); extern void psiconv_free_formula(psiconv_formula formula); extern void psiconv_free_formula_list(psiconv_formula_list list); extern void psiconv_free_sheet_status_section (psiconv_sheet_status_section section); extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout); extern void psiconv_free_sheet_grid_break_list (psiconv_sheet_grid_break_list list); extern void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s); extern void psiconv_free_sheet_grid_size_list (psiconv_sheet_grid_size_list list); extern void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec); extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet); extern void psiconv_free_sheet_worksheet_list (psiconv_sheet_worksheet_list list); extern void psiconv_free_sheet_f(psiconv_sheet_f file); extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); extern void psiconv_free_sheet_numberformat (psiconv_sheet_numberformat numberformat); extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list); extern void psiconv_free_sheet_line(psiconv_sheet_line line); extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); extern void psiconv_free_sheet_workbook_section (psiconv_sheet_workbook_section section); extern void psiconv_free_header_section(psiconv_header_section header); extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); extern void psiconv_free_section_table_section (psiconv_section_table_section section); extern void psiconv_free_application_id_section (psiconv_application_id_section section); extern void psiconv_free_object_display_section (psiconv_object_display_section section); extern void psiconv_free_object_icon_section (psiconv_object_icon_section section); extern void psiconv_free_embedded_object_section (psiconv_embedded_object_section object); extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); extern void psiconv_free_replacement(psiconv_replacement replacement); extern void psiconv_free_replacements(psiconv_replacements replacements); extern void psiconv_free_paragraph(psiconv_paragraph paragraph); extern void psiconv_free_text_and_layout(psiconv_text_and_layout text); extern void psiconv_free_texted_section(psiconv_texted_section section); extern void psiconv_free_page_header(psiconv_page_header header); extern void psiconv_free_page_layout_section (psiconv_page_layout_section section); extern void psiconv_free_word_status_section (psiconv_word_status_section section); extern void psiconv_free_word_f(psiconv_word_f file); extern void psiconv_free_texted_f(psiconv_texted_f file); extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); extern void psiconv_free_pictures(psiconv_pictures section); extern void psiconv_free_jumptable_section (psiconv_jumptable_section section); extern void psiconv_free_mbm_f(psiconv_mbm_f file); extern void psiconv_free_sketch_section(psiconv_sketch_section sec); extern void psiconv_free_sketch_f(psiconv_sketch_f file); extern void psiconv_free_clipart_section(psiconv_clipart_section section); extern void psiconv_free_cliparts(psiconv_cliparts section); extern void psiconv_free_clipart_f(psiconv_clipart_f file); extern void psiconv_free_file(psiconv_file file); extern int psiconv_compare_color(const psiconv_color value1, const psiconv_color value2); extern int psiconv_compare_font(const psiconv_font value1, const psiconv_font value2); extern int psiconv_compare_border(const psiconv_border value1, const psiconv_border value2); extern int psiconv_compare_bullet(const psiconv_bullet value1, const psiconv_bullet value2); extern int psiconv_compare_tab(const psiconv_tab value1, const psiconv_tab value2); extern int psiconv_compare_all_tabs(const psiconv_all_tabs value1, const psiconv_all_tabs value2); extern int psiconv_compare_paragraph_layout (const psiconv_paragraph_layout value1, const psiconv_paragraph_layout value2); extern int psiconv_compare_character_layout (const psiconv_character_layout value1, const psiconv_character_layout value2); /* Get a newly allocated file with sensible defaults, ready to generate. */ extern psiconv_file psiconv_empty_file(psiconv_file_type_t type); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_DATA_H */ psiconv-0.9.8/lib/psiconv/parse.h0000644000175000017500000000416210336374670013660 00000000000000/* parse.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Declarations only needed for the parser. If you want to parse, just include this. */ #ifndef PSICONV_PARSE_H #define PSICONV_PARSE_H #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern psiconv_file_type_t psiconv_file_type(psiconv_config config, psiconv_buffer buf, int *length, psiconv_header_section *result); /* Parses a Psion file. If its return-value is non-zero, something has gone horribly wrong (badly corrupted file, or out of memory, usually), and *result is undefined and unallocated; in normal cases, memory is allocated to it and it is up to you to free it (using psiconv_free_file; this is valid even if (*result)->file equals NULL). Note that (*result)->file may be NULL if this file type is unknown or unsupported! */ extern int psiconv_parse(psiconv_config config, const psiconv_buffer buf,psiconv_file *result); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_PARSE_H */ psiconv-0.9.8/lib/psiconv/list.h0000644000175000017500000001220410336374667013523 00000000000000/* list.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* A generic list type. In C++, this would be much neater. All elements must be of the same size (solve it with pointers, if needed) */ #ifndef PSICONV_LIST_H #define PSICONV_LIST_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Always use psiconv_list, never struct psiconv_list */ /* No need to export the actual internal format */ typedef struct psiconv_list_s *psiconv_list; /* Before using a list, call list_new. It takes the size of a single element as its argument. Always compute it with a sizeof() expression, just to be safe. The returned list is empty. If there is not enough memory available, NULL is returned. You should always test for this explicitely, because the other functions do not like a psiconv_list argument that is equal to NULL */ extern psiconv_list psiconv_list_new(size_t element_size); /* This frees the list. If elements contain pointers that need to be freed separately, call list_free_el below. */ extern void psiconv_list_free(psiconv_list l); /* This calls free_el first for each element, before doing a list_free. Note that you should *not* do 'free(el)' at any time; that is taken care of automatically. */ extern void psiconv_list_free_el(psiconv_list l, void free_el(void *el)); /* Return the number of allocated elements */ extern psiconv_u32 psiconv_list_length(const psiconv_list l); /* Return 1 if the list is empty, 0 if not */ extern int psiconv_list_is_empty(const psiconv_list l); /* Empty a list. Note this does not reclaim any memory space! */ extern void psiconv_list_empty(psiconv_list l); /* Get an element from the list, and return a pointer to it. Note: you can directly modify this element, but be careful not to write beyond the element memory space. If indx is out of range, NULL is returned. */ extern void * psiconv_list_get(const psiconv_list l, psiconv_u32 indx); /* Add an element at the end of the list. The element is copied from the supplied element. Of course, this does not help if the element contains pointers. As the lists extends itself, it may be necessary to allocate new memory. If this fails, a negative error-code is returned. If everything, succeeds, 0 is returned. */ extern int psiconv_list_add(psiconv_list l, const void *el); /* Remove the last element from the list, and copy it to el. Note that this will not reduce the amount of space reserved for the list. An error code is returned, which will be 0 zero if everything succeeded. It is your own responsibility to make sure enough space is allocated to el. */ extern int psiconv_list_pop(psiconv_list l, void *el); /* Replace an element within the list. The element is copied from the supplied element. Fails if you try to write at or after the end of the list. */ extern int psiconv_list_replace(psiconv_list l, psiconv_u32 indx, const void *el); /* Do some action for each element. Note: you can directly modify the elements supplied to action, and they will be changed in the list, but never try a free(el)! */ extern void psiconv_list_foreach_el(psiconv_list l, void action(void *el)); /* Clone the list, that is, copy it. If elements contain pointers, you should call the next routine. If not enough memory is available, NULL is returned. */ extern psiconv_list psiconv_list_clone(const psiconv_list l); /* Read upto size_t elements from file f, and put them at the end of list l. Returned is the actual number of elements added. This assumes the file layout and the memory layout of elements is the same. Note that if not enough memory could be allocated, 0 is simply returned. */ extern size_t psiconv_list_fread(psiconv_list l,size_t size, FILE *f); /* Read the whole file f to list l. Returns 0 on succes, and an errorcode on failure. */ extern int psiconv_list_fread_all(psiconv_list l, FILE *f); /* Write the whole list l to the opened file f. Returns 0 on succes, and an errorcode on failure. */ extern int psiconv_list_fwrite_all(const psiconv_list l, FILE *f); /* Concatenate two lists. The element sized does not have to be the same, but the result may be quite unexpected if it is not. */ int psiconv_list_concat(psiconv_list l, const psiconv_list extra); #ifdef __cplusplus } #endif /* __cplusplus */ #endif psiconv-0.9.8/lib/psiconv/parse_routines.h0000644000175000017500000004774310336374677015633 00000000000000/* parse_routines.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_PARSE_ROUTINES_H #define PSICONV_PARSE_ROUTINES_H #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* ****************** * parse_simple.c * ****************** */ extern psiconv_u8 psiconv_read_u8(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *status); extern psiconv_u16 psiconv_read_u16(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *status); extern psiconv_u32 psiconv_read_u32(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *status); extern psiconv_s32 psiconv_read_sint(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, int *status); extern psiconv_u32 psiconv_read_S(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status); extern psiconv_u32 psiconv_read_X(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status); extern psiconv_length_t psiconv_read_length(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status); extern psiconv_size_t psiconv_read_size (const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status); extern psiconv_string_t psiconv_read_string(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off,int *length, int *status); extern psiconv_string_t psiconv_read_short_string(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length,int *status); extern psiconv_string_t psiconv_read_charlist(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int nrofchars, int *status); extern int psiconv_parse_bool(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_bool_t *result); extern psiconv_float_t psiconv_read_float(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status); /* ****************** * parse_layout.c * ****************** */ extern int psiconv_parse_color(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_color *result); extern int psiconv_parse_font(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_font *result); extern int psiconv_parse_border(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_border *result); extern int psiconv_parse_bullet(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_bullet *result); extern int psiconv_parse_tab(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_tab *result); /* Note: the next two are special, because they modify an existing layout structure! If it exits due to an unexpected error, part of the structure may be modified, but it is still safe to call psiconv_free_{paragraph,character}_layout_list on it (and that is the only safe thing to do!) */ extern int psiconv_parse_paragraph_layout_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_paragraph_layout result); extern int psiconv_parse_character_layout_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_character_layout result); /* **************** * parse_page.c * **************** */ extern int psiconv_parse_page_header(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_page_header *result); extern int psiconv_parse_page_layout_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_page_layout_section *result); /* ****************** * parse_common.c * ****************** */ extern int psiconv_parse_header_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_header_section *result); extern int psiconv_parse_section_table_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_section_table_section *result); extern int psiconv_parse_application_id_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_application_id_section *result); extern int psiconv_parse_text_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_text_and_layout *result); extern int psiconv_parse_styled_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, const psiconv_word_styles_section styles); extern int psiconv_parse_styleless_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para); extern int psiconv_parse_embedded_object_section (const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_embedded_object_section *result); extern int psiconv_parse_object_display_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_object_display_section *result); extern int psiconv_parse_object_icon_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_object_icon_section *result); /* ****************** * parse_texted.c * ****************** */ extern int psiconv_parse_texted_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_texted_section *result, psiconv_character_layout base_char, psiconv_paragraph_layout base_para); /* **************** * parse_word.c * **************** */ extern int psiconv_parse_word_status_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_word_status_section *result); extern int psiconv_parse_word_styles_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_word_styles_section *result); /* ***************** * parse_sheet.c * ***************** */ extern int psiconv_parse_sheet_status_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_status_section *result); extern int psiconv_parse_sheet_formula_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_formula_list *result); extern int psiconv_parse_formula(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_formula *result); extern int psiconv_parse_sheet_workbook_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_workbook_section *result); extern int psiconv_parse_sheet_cell(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell *result, const psiconv_sheet_cell_layout default_layout, const psiconv_sheet_line_list row_default_layouts, const psiconv_sheet_line_list col_default_layouts); extern int psiconv_parse_sheet_cell_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_list *result, const psiconv_sheet_cell_layout default_layout, const psiconv_sheet_line_list row_default_layouts, const psiconv_sheet_line_list col_default_layouts); extern int psiconv_parse_sheet_worksheet_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_worksheet_list *result); extern int psiconv_parse_sheet_worksheet(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_worksheet *result); extern int psiconv_parse_sheet_numberformat(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_numberformat result); extern int psiconv_parse_sheet_cell_layout(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_layout result); extern int psiconv_parse_sheet_line(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_line *result, const psiconv_sheet_cell_layout default_layout); extern int psiconv_parse_sheet_line_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_line_list *result, const psiconv_sheet_cell_layout default_layout); extern int psiconv_parse_sheet_name_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_name_section *result); extern int psiconv_parse_sheet_info_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_info_section *result); extern int psiconv_parse_sheet_variable(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_variable *result); extern int psiconv_parse_sheet_variable_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_variable_list *result); extern int psiconv_parse_sheet_grid_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_section *result); extern int psiconv_parse_sheet_grid_size_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_size_list *result); extern int psiconv_parse_sheet_grid_size(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_size *result); extern int psiconv_parse_sheet_grid_break_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_break_list *result); /* ***************** * parse_image.c * ***************** */ extern int psiconv_parse_paint_data_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, int isclipart, psiconv_paint_data_section *result); extern int psiconv_parse_jumptable_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_jumptable_section *result); extern int psiconv_parse_sketch_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sketch_section *result); extern int psiconv_parse_clipart_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_clipart_section *result); /* **************** * parse_driver.c * **************** */ extern int psiconv_parse_texted_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_texted_f *result); extern int psiconv_parse_word_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_word_f *result); extern int psiconv_parse_mbm_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_mbm_f *result); extern int psiconv_parse_sketch_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_sketch_f *result); extern int psiconv_parse_clipart_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_clipart_f *result); extern int psiconv_parse_sheet_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_sheet_f *result); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PSICONV_PARSE_ROUTINES_H */ psiconv-0.9.8/lib/psiconv/error.h0000644000175000017500000000410010336374710013662 00000000000000/* error.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_ERROR_H #define PSICONV_ERROR_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* These functions print error, warning, progress and debug information to * stderr */ extern void psiconv_fatal(psiconv_config config,int level, psiconv_u32 off, const char *format,...); extern void psiconv_error(psiconv_config config,int level, psiconv_u32 off, const char *format,...); extern void psiconv_warn(psiconv_config config,int level, psiconv_u32 off, const char *format,...); extern void psiconv_progress(psiconv_config config,int level, psiconv_u32 off, const char *format,...); extern void psiconv_debug(psiconv_config config,int level, psiconv_u32 off, const char *format,...); #define PSICONV_VERB_DEBUG 5 #define PSICONV_VERB_PROGRESS 4 #define PSICONV_VERB_WARN 3 #define PSICONV_VERB_ERROR 2 #define PSICONV_VERB_FATAL 1 #define PSICONV_E_OK 0 #define PSICONV_E_OTHER 1 #define PSICONV_E_NOMEM 2 #define PSICONV_E_PARSE 3 #define PSICONV_E_GENERATE 4 #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PSICONV_ERROR_H */ psiconv-0.9.8/lib/psiconv/generate_routines.h0000644000175000017500000002413110336374732016265 00000000000000/* generate_routines.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_GENERATE_ROUTINES_H #define PSICONV_GENERATE_ROUTINES_H #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* ********************* * generate_simple.c * ********************* */ extern int psiconv_write_u8(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_u8 value); extern int psiconv_write_u16(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_u16 value); extern int psiconv_write_u32(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_u32 value); extern int psiconv_write_S(const psiconv_config config, psiconv_buffer buf, int lev,const psiconv_u32 value); extern int psiconv_write_X(const psiconv_config config, psiconv_buffer buf, int lev,const psiconv_u32 value); extern int psiconv_write_length(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_length_t value); extern int psiconv_write_size(const psiconv_config config, psiconv_buffer buf, int lev,const psiconv_size_t value); extern int psiconv_write_bool(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_bool_t value); extern int psiconv_write_short_string(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_string_t value); extern int psiconv_write_string(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_string_t value); int psiconv_write_charlist(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_string_t value); extern int psiconv_write_offset(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_u32 id); /* ********************* * generate_layout.c * ********************* */ extern int psiconv_write_color(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_color value); extern int psiconv_write_font(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_font value); extern int psiconv_write_border(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_border value); extern int psiconv_write_bullet(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_bullet value); extern int psiconv_write_tab(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_tab value); extern int psiconv_write_paragraph_layout_list(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_paragraph_layout value, const psiconv_paragraph_layout base); extern int psiconv_write_character_layout_list(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_character_layout value, const psiconv_character_layout base); /* ******************* * generate_page.c * ******************* */ extern int psiconv_write_page_header(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_page_header value, psiconv_buffer *extra_buf); extern int psiconv_write_page_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_page_layout_section value); /* ********************* * generate_common.c * ********************* */ extern int psiconv_write_header_section(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_u32 uid1, psiconv_u32 uid2, psiconv_u32 uid3); extern int psiconv_write_section_table_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_section_table_section value); extern int psiconv_write_application_id_section(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_u32 id, const psiconv_string_t text); extern int psiconv_write_text_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value); extern int psiconv_write_styled_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value, const psiconv_word_styles_section styles); extern int psiconv_write_styleless_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para); extern int psiconv_write_embedded_object_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_embedded_object_section value); extern int psiconv_write_object_display_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_object_display_section value); extern int psiconv_write_object_icon_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_object_icon_section value); /* ******************** * generate_image.c * ******************** */ extern int psiconv_write_sketch_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_sketch_section value); extern int psiconv_write_paint_data_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_paint_data_section value, int is_clipart); extern int psiconv_write_jumptable_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_jumptable_section value); extern int psiconv_write_clipart_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_clipart_section value); /* ********************* * generate_texted.c * ********************* */ extern int psiconv_write_texted_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_texted_section value, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para, psiconv_buffer *extra_buf); /* ******************* * generate_word.c * ******************* */ extern int psiconv_write_word_status_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_word_status_section value); extern int psiconv_write_word_styles_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_word_styles_section value); /* ********************* * generate_driver.c * ********************* */ extern int psiconv_write_word_file(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_word_f value); extern int psiconv_write_texted_file(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_texted_f value); extern int psiconv_write_sketch_file(const psiconv_config config, psiconv_buffer buf,int lev,const psiconv_sketch_f value); extern int psiconv_write_mbm_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_mbm_f value); extern int psiconv_write_clipart_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_clipart_f value); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PSICONV_GENERATE_ROUTINES_H */ psiconv-0.9.8/lib/psiconv/generate.h0000644000175000017500000000330510336374735014340 00000000000000/* generate.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Declarations only needed for the parser. If you want to parse, just include this. */ #ifndef PSICONV_GENERATE_H #define PSICONV_GENERATE_H #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Generate a Psion file. If its return-value is non-zero, something has gone horribly wrong (badly corrupted data, or out of memory, usually), and *buf is undefined and unallocated; in normal cases, memory is allocated to it and it is up to you to free it. */ extern int psiconv_write(psiconv_config config, psiconv_buffer *buf, const psiconv_file value); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_GENERATE_H */ psiconv-0.9.8/lib/psiconv/common.h0000644000175000017500000000351010336374722014030 00000000000000/* common.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999, 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Declarations only needed for the parser. If you want to parse, just include this. */ #ifndef PSICONV_COMMON_H #define PSICONV_COMMON_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* *************** * misc.c * *************** */ /* This function returns a copy of a Unicode string, converted to plain ASCII. Anything codepage dependent (> 128) is sanitized away. You should free this string yourself when you are done with it. Returns NULL if there is not enough memory left. */ extern char *psiconv_make_printable(const psiconv_config config, const psiconv_string_t s); /* ************** * checkuid.c * ************** */ extern psiconv_u32 psiconv_checkuid(psiconv_u32 uid1, psiconv_u32 uid2,psiconv_u32 uid3); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_COMMON_H */ psiconv-0.9.8/lib/psiconv/buffer.h0000644000175000017500000001064410336374712014016 00000000000000/* buffer.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_BUFFER_H #define PSICONV_BUFFER_H /* A psiconv_buffer is a buffer of raw byte data. It is used when parsing or generating a Psion file. You can use references within it that are resolved at a later time. */ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Always use psiconv_buffer, never struct psiconv_buffer_s */ /* No need to export the actual internal format */ typedef struct psiconv_buffer_s *psiconv_buffer; /* Allocate a new buffer. Returns NULL when not enough memory is available. All other functions assume you have called this function first! */ extern psiconv_buffer psiconv_buffer_new(void); /* Free a buffer and reclaim its memory. Never use a buffer again after calling this (unless you do a psiconv_buffer_new on it first) */ extern void psiconv_buffer_free(psiconv_buffer buf); /* Get the length of the data */ extern psiconv_u32 psiconv_buffer_length(const psiconv_buffer buf); /* Get one byte of data. Returns NULL if you are trying to read past the end of the buffer. Do not use this; instead use psiconv_read_u8 and friends */ extern psiconv_u8 *psiconv_buffer_get(const psiconv_buffer buf, psiconv_u32 off); /* Add one byte of data to the end. Returns 0 on success, and an error code on failure. Do not use this; instead use psiconv_write_u8 and friends */ extern int psiconv_buffer_add(psiconv_buffer buf,psiconv_u8 data); /* Do an fread to the buffer. Returns the number of read bytes. See fread(3) for more information. */ extern size_t psiconv_buffer_fread(psiconv_buffer buf,size_t size, FILE *f); /* Read a complete file to the buffer. Returns 0 on success, and an error code on failure. */ extern int psiconv_buffer_fread_all(psiconv_buffer buf, FILE *f); /* Write a complete buffer to file. Returns 0 on success, and an error code on failure. */ extern int psiconv_buffer_fwrite_all(const psiconv_buffer buf, FILE *f); /* Concatenate two buffers: the second buffer is appended to the first. References are updated too. Buffer extra is untouched after this and must still be freed if you want to get rid of it. */ extern int psiconv_buffer_concat(psiconv_buffer buf, const psiconv_buffer extra); /* Add a target to the reference list. This does not really change the buffer data in any way. The id needs to be unique. The target is added at the current end of the buffer. */ extern int psiconv_buffer_add_target(psiconv_buffer buf, int id); /* Add a reference to a target to the reference list. The id does not need to be defined already, though it must be by the time you call psiconv_buffer_resolve. The reference is added to the current end of the buffer, and space is allocated for it. References are always longs (psiconv_u32). */ extern int psiconv_buffer_add_reference(psiconv_buffer buf,int id); /* Resolve all references and empty the reference list. */ extern int psiconv_buffer_resolve(psiconv_buffer buf); /* Get a unique reference id */ extern psiconv_u32 psiconv_buffer_unique_id(void); /* Extract part of a buffer and put it into a new buffer. Note that references and targets are not copied; you will have to resolve them beforehand (but as this function is meant for reading buffers, they will usually not be used). */ extern int psiconv_buffer_subbuffer(psiconv_buffer *buf, const psiconv_buffer org, psiconv_u32 offset, psiconv_u32 length); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* def PSICONV_BUFFER_H */ psiconv-0.9.8/lib/psiconv/unicode.h0000644000175000017500000000564310336374726014203 00000000000000/* unicode.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2003-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_UNICODE_H #define PSICONV_UNICODE_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* A simple unicode implementation, using UCS-2 (16-bit encoding). Unicode strings are arrays of psiconv_u16 characters, zero-terminated. Note that there is a lot in Unicode we do not support; for example, we assume a single Unicode codepoint corresponds with a single character. For EPOC, that should be enough */ extern int psiconv_unicode_select_characterset(const psiconv_config config, int charset); /* Translate a single character to a unicode character, using the translation tables in config */ extern psiconv_ucs2 psiconv_unicode_read_char(const psiconv_config config, psiconv_buffer buf, int lev,psiconv_u32 off, int *length, int *status); extern int psiconv_unicode_write_char(const psiconv_config config, psiconv_buffer buf, int lev, psiconv_ucs2 value); /* Compute the length of a unicode string */ extern int psiconv_unicode_strlen(const psiconv_ucs2 *input); /* Duplicate a unicode string */ extern psiconv_ucs2 *psiconv_unicode_strdup(const psiconv_ucs2 *input); /* Compare two unicode strings. Ordering as in Unicode codepoints! */ extern int psiconv_unicode_strcmp(const psiconv_ucs2 *str1, const psiconv_ucs2 *str2); /* Return a newly allocated empty string */ extern psiconv_ucs2 *psiconv_unicode_empty_string(void); /* Convert a psiconv_list of psiconv_ucs2 characters to a string */ extern psiconv_ucs2 *psiconv_unicode_from_list(psiconv_list input); /* Look for needle in haystack, return pointer to found location */ extern psiconv_ucs2 *psiconv_unicode_strstr(const psiconv_ucs2 *haystack, const psiconv_ucs2 *needle); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PSICONV_ERROR_H */ psiconv-0.9.8/lib/psiconv/general.h0000664000175000017500000000266110336413033014152 00000000000000/* data.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* All declarations which you may need to edit are here. At a later time, this will be superseded by some automatic configuration script. */ #ifndef PSICONV_GENERAL_H #define PSICONV_GENERAL_H /* Data types; s8 means `signed 8-bit integer', u32 means `unsigned 32-bits integer'. Configure figures out which types to use. */ typedef signed char psiconv_s8; typedef unsigned char psiconv_u8; typedef signed short psiconv_s16; typedef unsigned short psiconv_u16; typedef signed int psiconv_s32; typedef unsigned int psiconv_u32; typedef psiconv_u16 psiconv_ucs2; #endif /* def PSICONV_GENERAL_H */ psiconv-0.9.8/lib/psiconv/Makefile.am0000644000175000017500000000211410044276432014415 00000000000000INCLUDES=-I.. -I../../compat lib_LTLIBRARIES = libpsiconv.la libpsiconv_la_SOURCES = configuration.c error.c misc.c checkuid.c list.c \ buffer.c data.c image.c unicode.c \ parse_common.c parse_driver.c parse_formula.c \ parse_layout.c parse_image.c parse_page.c \ parse_simple.c parse_texted.c parse_word.c \ parse_sheet.c \ generate_simple.c generate_layout.c generate_driver.c \ generate_common.c generate_texted.c generate_page.c \ generate_word.c generate_image.c libpsiconv_la_LDFLAGS = -version-info 10:2:4 libpsiconv_la_LIBADD = ../../compat/libcompat.la libpsiconv_la_CFLAGS = -DPSICONVETCDIR=\"@PSICONVETCDIR@\" psiconvincludedir = $(includedir)/psiconv psiconvinclude_HEADERS = configuration.h data.h parse.h list.h \ parse_routines.h \ error.h generate_routines.h generate.h common.h \ buffer.h unicode.h general.h noinst_HEADERS = image.h psiconv-0.9.8/lib/psiconv/Makefile.in0000664000175000017500000034226710336413007014443 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libpsiconv_la_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = lib/psiconv DIST_COMMON = $(noinst_HEADERS) $(psiconvinclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/general.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = general.h am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(psiconvincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libpsiconv_la_DEPENDENCIES = ../../compat/libcompat.la am_libpsiconv_la_OBJECTS = libpsiconv_la-configuration.lo \ libpsiconv_la-error.lo libpsiconv_la-misc.lo \ libpsiconv_la-checkuid.lo libpsiconv_la-list.lo \ libpsiconv_la-buffer.lo libpsiconv_la-data.lo \ libpsiconv_la-image.lo libpsiconv_la-unicode.lo \ libpsiconv_la-parse_common.lo libpsiconv_la-parse_driver.lo \ libpsiconv_la-parse_formula.lo libpsiconv_la-parse_layout.lo \ libpsiconv_la-parse_image.lo libpsiconv_la-parse_page.lo \ libpsiconv_la-parse_simple.lo libpsiconv_la-parse_texted.lo \ libpsiconv_la-parse_word.lo libpsiconv_la-parse_sheet.lo \ libpsiconv_la-generate_simple.lo \ libpsiconv_la-generate_layout.lo \ libpsiconv_la-generate_driver.lo \ libpsiconv_la-generate_common.lo \ libpsiconv_la-generate_texted.lo \ libpsiconv_la-generate_page.lo libpsiconv_la-generate_word.lo \ libpsiconv_la-generate_image.lo libpsiconv_la_OBJECTS = $(am_libpsiconv_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libpsiconv_la-buffer.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-checkuid.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-configuration.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-data.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-error.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_common.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_driver.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_image.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_layout.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_page.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_simple.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_texted.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-generate_word.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-image.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-list.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-misc.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_common.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_driver.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_formula.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_image.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_layout.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_page.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_sheet.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_simple.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_texted.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-parse_word.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libpsiconv_la-unicode.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libpsiconv_la_SOURCES) DIST_SOURCES = $(libpsiconv_la_SOURCES) psiconvincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(noinst_HEADERS) $(psiconvinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I.. -I../../compat lib_LTLIBRARIES = libpsiconv.la libpsiconv_la_SOURCES = configuration.c error.c misc.c checkuid.c list.c \ buffer.c data.c image.c unicode.c \ parse_common.c parse_driver.c parse_formula.c \ parse_layout.c parse_image.c parse_page.c \ parse_simple.c parse_texted.c parse_word.c \ parse_sheet.c \ generate_simple.c generate_layout.c generate_driver.c \ generate_common.c generate_texted.c generate_page.c \ generate_word.c generate_image.c libpsiconv_la_LDFLAGS = -version-info 10:2:4 libpsiconv_la_LIBADD = ../../compat/libcompat.la libpsiconv_la_CFLAGS = -DPSICONVETCDIR=\"@PSICONVETCDIR@\" psiconvincludedir = $(includedir)/psiconv psiconvinclude_HEADERS = configuration.h data.h parse.h list.h \ parse_routines.h \ error.h generate_routines.h generate.h common.h \ buffer.h unicode.h general.h noinst_HEADERS = image.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/psiconv/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/psiconv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh general.h: $(top_builddir)/config.status $(srcdir)/general.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpsiconv.la: $(libpsiconv_la_OBJECTS) $(libpsiconv_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libpsiconv_la_LDFLAGS) $(libpsiconv_la_OBJECTS) $(libpsiconv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-checkuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-configuration.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_layout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_page.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_simple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_texted.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-generate_word.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_formula.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_layout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_page.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_sheet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_simple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_texted.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-parse_word.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpsiconv_la-unicode.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpsiconv_la-configuration.o: configuration.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-configuration.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-configuration.Tpo" -c -o libpsiconv_la-configuration.o `test -f 'configuration.c' || echo '$(srcdir)/'`configuration.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo" "$(DEPDIR)/libpsiconv_la-configuration.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='configuration.c' object='libpsiconv_la-configuration.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-configuration.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-configuration.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-configuration.o `test -f 'configuration.c' || echo '$(srcdir)/'`configuration.c libpsiconv_la-configuration.obj: configuration.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-configuration.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-configuration.Tpo" -c -o libpsiconv_la-configuration.obj `if test -f 'configuration.c'; then $(CYGPATH_W) 'configuration.c'; else $(CYGPATH_W) '$(srcdir)/configuration.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo" "$(DEPDIR)/libpsiconv_la-configuration.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='configuration.c' object='libpsiconv_la-configuration.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-configuration.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-configuration.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-configuration.obj `if test -f 'configuration.c'; then $(CYGPATH_W) 'configuration.c'; else $(CYGPATH_W) '$(srcdir)/configuration.c'; fi` libpsiconv_la-configuration.lo: configuration.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-configuration.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-configuration.Tpo" -c -o libpsiconv_la-configuration.lo `test -f 'configuration.c' || echo '$(srcdir)/'`configuration.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo" "$(DEPDIR)/libpsiconv_la-configuration.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-configuration.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='configuration.c' object='libpsiconv_la-configuration.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-configuration.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-configuration.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-configuration.lo `test -f 'configuration.c' || echo '$(srcdir)/'`configuration.c libpsiconv_la-error.o: error.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-error.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-error.Tpo" -c -o libpsiconv_la-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-error.Tpo" "$(DEPDIR)/libpsiconv_la-error.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-error.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='libpsiconv_la-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-error.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-error.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c libpsiconv_la-error.obj: error.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-error.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-error.Tpo" -c -o libpsiconv_la-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-error.Tpo" "$(DEPDIR)/libpsiconv_la-error.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-error.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='libpsiconv_la-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-error.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-error.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi` libpsiconv_la-error.lo: error.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-error.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-error.Tpo" -c -o libpsiconv_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-error.Tpo" "$(DEPDIR)/libpsiconv_la-error.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-error.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='libpsiconv_la-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-error.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-error.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c libpsiconv_la-misc.o: misc.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-misc.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-misc.Tpo" -c -o libpsiconv_la-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-misc.Tpo" "$(DEPDIR)/libpsiconv_la-misc.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-misc.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libpsiconv_la-misc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-misc.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-misc.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c libpsiconv_la-misc.obj: misc.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-misc.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-misc.Tpo" -c -o libpsiconv_la-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-misc.Tpo" "$(DEPDIR)/libpsiconv_la-misc.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-misc.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libpsiconv_la-misc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-misc.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-misc.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` libpsiconv_la-misc.lo: misc.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-misc.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-misc.Tpo" -c -o libpsiconv_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-misc.Tpo" "$(DEPDIR)/libpsiconv_la-misc.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-misc.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libpsiconv_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-misc.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-misc.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c libpsiconv_la-checkuid.o: checkuid.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-checkuid.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" -c -o libpsiconv_la-checkuid.o `test -f 'checkuid.c' || echo '$(srcdir)/'`checkuid.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" "$(DEPDIR)/libpsiconv_la-checkuid.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='checkuid.c' object='libpsiconv_la-checkuid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-checkuid.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-checkuid.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-checkuid.o `test -f 'checkuid.c' || echo '$(srcdir)/'`checkuid.c libpsiconv_la-checkuid.obj: checkuid.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-checkuid.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" -c -o libpsiconv_la-checkuid.obj `if test -f 'checkuid.c'; then $(CYGPATH_W) 'checkuid.c'; else $(CYGPATH_W) '$(srcdir)/checkuid.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" "$(DEPDIR)/libpsiconv_la-checkuid.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='checkuid.c' object='libpsiconv_la-checkuid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-checkuid.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-checkuid.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-checkuid.obj `if test -f 'checkuid.c'; then $(CYGPATH_W) 'checkuid.c'; else $(CYGPATH_W) '$(srcdir)/checkuid.c'; fi` libpsiconv_la-checkuid.lo: checkuid.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-checkuid.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" -c -o libpsiconv_la-checkuid.lo `test -f 'checkuid.c' || echo '$(srcdir)/'`checkuid.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo" "$(DEPDIR)/libpsiconv_la-checkuid.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-checkuid.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='checkuid.c' object='libpsiconv_la-checkuid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-checkuid.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-checkuid.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-checkuid.lo `test -f 'checkuid.c' || echo '$(srcdir)/'`checkuid.c libpsiconv_la-list.o: list.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-list.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-list.Tpo" -c -o libpsiconv_la-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-list.Tpo" "$(DEPDIR)/libpsiconv_la-list.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-list.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libpsiconv_la-list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-list.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-list.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c libpsiconv_la-list.obj: list.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-list.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-list.Tpo" -c -o libpsiconv_la-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-list.Tpo" "$(DEPDIR)/libpsiconv_la-list.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-list.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libpsiconv_la-list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-list.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-list.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` libpsiconv_la-list.lo: list.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-list.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-list.Tpo" -c -o libpsiconv_la-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-list.Tpo" "$(DEPDIR)/libpsiconv_la-list.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-list.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libpsiconv_la-list.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-list.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-list.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c libpsiconv_la-buffer.o: buffer.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-buffer.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-buffer.Tpo" -c -o libpsiconv_la-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo" "$(DEPDIR)/libpsiconv_la-buffer.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buffer.c' object='libpsiconv_la-buffer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-buffer.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-buffer.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c libpsiconv_la-buffer.obj: buffer.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-buffer.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-buffer.Tpo" -c -o libpsiconv_la-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo" "$(DEPDIR)/libpsiconv_la-buffer.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buffer.c' object='libpsiconv_la-buffer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-buffer.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-buffer.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi` libpsiconv_la-buffer.lo: buffer.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-buffer.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-buffer.Tpo" -c -o libpsiconv_la-buffer.lo `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo" "$(DEPDIR)/libpsiconv_la-buffer.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-buffer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buffer.c' object='libpsiconv_la-buffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-buffer.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-buffer.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-buffer.lo `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c libpsiconv_la-data.o: data.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-data.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-data.Tpo" -c -o libpsiconv_la-data.o `test -f 'data.c' || echo '$(srcdir)/'`data.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-data.Tpo" "$(DEPDIR)/libpsiconv_la-data.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-data.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data.c' object='libpsiconv_la-data.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-data.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-data.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-data.o `test -f 'data.c' || echo '$(srcdir)/'`data.c libpsiconv_la-data.obj: data.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-data.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-data.Tpo" -c -o libpsiconv_la-data.obj `if test -f 'data.c'; then $(CYGPATH_W) 'data.c'; else $(CYGPATH_W) '$(srcdir)/data.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-data.Tpo" "$(DEPDIR)/libpsiconv_la-data.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-data.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data.c' object='libpsiconv_la-data.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-data.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-data.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-data.obj `if test -f 'data.c'; then $(CYGPATH_W) 'data.c'; else $(CYGPATH_W) '$(srcdir)/data.c'; fi` libpsiconv_la-data.lo: data.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-data.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-data.Tpo" -c -o libpsiconv_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-data.Tpo" "$(DEPDIR)/libpsiconv_la-data.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-data.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data.c' object='libpsiconv_la-data.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-data.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-data.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c libpsiconv_la-image.o: image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-image.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-image.Tpo" -c -o libpsiconv_la-image.o `test -f 'image.c' || echo '$(srcdir)/'`image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-image.Tpo" "$(DEPDIR)/libpsiconv_la-image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image.c' object='libpsiconv_la-image.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-image.o `test -f 'image.c' || echo '$(srcdir)/'`image.c libpsiconv_la-image.obj: image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-image.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-image.Tpo" -c -o libpsiconv_la-image.obj `if test -f 'image.c'; then $(CYGPATH_W) 'image.c'; else $(CYGPATH_W) '$(srcdir)/image.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-image.Tpo" "$(DEPDIR)/libpsiconv_la-image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image.c' object='libpsiconv_la-image.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-image.obj `if test -f 'image.c'; then $(CYGPATH_W) 'image.c'; else $(CYGPATH_W) '$(srcdir)/image.c'; fi` libpsiconv_la-image.lo: image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-image.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-image.Tpo" -c -o libpsiconv_la-image.lo `test -f 'image.c' || echo '$(srcdir)/'`image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-image.Tpo" "$(DEPDIR)/libpsiconv_la-image.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image.c' object='libpsiconv_la-image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-image.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-image.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-image.lo `test -f 'image.c' || echo '$(srcdir)/'`image.c libpsiconv_la-unicode.o: unicode.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-unicode.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-unicode.Tpo" -c -o libpsiconv_la-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo" "$(DEPDIR)/libpsiconv_la-unicode.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='libpsiconv_la-unicode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-unicode.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-unicode.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c libpsiconv_la-unicode.obj: unicode.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-unicode.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-unicode.Tpo" -c -o libpsiconv_la-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo" "$(DEPDIR)/libpsiconv_la-unicode.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='libpsiconv_la-unicode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-unicode.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-unicode.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi` libpsiconv_la-unicode.lo: unicode.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-unicode.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-unicode.Tpo" -c -o libpsiconv_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo" "$(DEPDIR)/libpsiconv_la-unicode.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-unicode.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='libpsiconv_la-unicode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-unicode.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-unicode.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c libpsiconv_la-parse_common.o: parse_common.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_common.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" -c -o libpsiconv_la-parse_common.o `test -f 'parse_common.c' || echo '$(srcdir)/'`parse_common.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" "$(DEPDIR)/libpsiconv_la-parse_common.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_common.c' object='libpsiconv_la-parse_common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_common.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_common.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_common.o `test -f 'parse_common.c' || echo '$(srcdir)/'`parse_common.c libpsiconv_la-parse_common.obj: parse_common.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_common.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" -c -o libpsiconv_la-parse_common.obj `if test -f 'parse_common.c'; then $(CYGPATH_W) 'parse_common.c'; else $(CYGPATH_W) '$(srcdir)/parse_common.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" "$(DEPDIR)/libpsiconv_la-parse_common.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_common.c' object='libpsiconv_la-parse_common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_common.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_common.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_common.obj `if test -f 'parse_common.c'; then $(CYGPATH_W) 'parse_common.c'; else $(CYGPATH_W) '$(srcdir)/parse_common.c'; fi` libpsiconv_la-parse_common.lo: parse_common.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_common.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" -c -o libpsiconv_la-parse_common.lo `test -f 'parse_common.c' || echo '$(srcdir)/'`parse_common.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo" "$(DEPDIR)/libpsiconv_la-parse_common.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_common.c' object='libpsiconv_la-parse_common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_common.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_common.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_common.lo `test -f 'parse_common.c' || echo '$(srcdir)/'`parse_common.c libpsiconv_la-parse_driver.o: parse_driver.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_driver.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" -c -o libpsiconv_la-parse_driver.o `test -f 'parse_driver.c' || echo '$(srcdir)/'`parse_driver.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" "$(DEPDIR)/libpsiconv_la-parse_driver.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_driver.c' object='libpsiconv_la-parse_driver.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_driver.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_driver.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_driver.o `test -f 'parse_driver.c' || echo '$(srcdir)/'`parse_driver.c libpsiconv_la-parse_driver.obj: parse_driver.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_driver.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" -c -o libpsiconv_la-parse_driver.obj `if test -f 'parse_driver.c'; then $(CYGPATH_W) 'parse_driver.c'; else $(CYGPATH_W) '$(srcdir)/parse_driver.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" "$(DEPDIR)/libpsiconv_la-parse_driver.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_driver.c' object='libpsiconv_la-parse_driver.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_driver.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_driver.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_driver.obj `if test -f 'parse_driver.c'; then $(CYGPATH_W) 'parse_driver.c'; else $(CYGPATH_W) '$(srcdir)/parse_driver.c'; fi` libpsiconv_la-parse_driver.lo: parse_driver.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_driver.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" -c -o libpsiconv_la-parse_driver.lo `test -f 'parse_driver.c' || echo '$(srcdir)/'`parse_driver.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo" "$(DEPDIR)/libpsiconv_la-parse_driver.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_driver.c' object='libpsiconv_la-parse_driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_driver.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_driver.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_driver.lo `test -f 'parse_driver.c' || echo '$(srcdir)/'`parse_driver.c libpsiconv_la-parse_formula.o: parse_formula.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_formula.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" -c -o libpsiconv_la-parse_formula.o `test -f 'parse_formula.c' || echo '$(srcdir)/'`parse_formula.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" "$(DEPDIR)/libpsiconv_la-parse_formula.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_formula.c' object='libpsiconv_la-parse_formula.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_formula.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_formula.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_formula.o `test -f 'parse_formula.c' || echo '$(srcdir)/'`parse_formula.c libpsiconv_la-parse_formula.obj: parse_formula.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_formula.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" -c -o libpsiconv_la-parse_formula.obj `if test -f 'parse_formula.c'; then $(CYGPATH_W) 'parse_formula.c'; else $(CYGPATH_W) '$(srcdir)/parse_formula.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" "$(DEPDIR)/libpsiconv_la-parse_formula.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_formula.c' object='libpsiconv_la-parse_formula.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_formula.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_formula.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_formula.obj `if test -f 'parse_formula.c'; then $(CYGPATH_W) 'parse_formula.c'; else $(CYGPATH_W) '$(srcdir)/parse_formula.c'; fi` libpsiconv_la-parse_formula.lo: parse_formula.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_formula.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" -c -o libpsiconv_la-parse_formula.lo `test -f 'parse_formula.c' || echo '$(srcdir)/'`parse_formula.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo" "$(DEPDIR)/libpsiconv_la-parse_formula.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_formula.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_formula.c' object='libpsiconv_la-parse_formula.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_formula.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_formula.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_formula.lo `test -f 'parse_formula.c' || echo '$(srcdir)/'`parse_formula.c libpsiconv_la-parse_layout.o: parse_layout.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_layout.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" -c -o libpsiconv_la-parse_layout.o `test -f 'parse_layout.c' || echo '$(srcdir)/'`parse_layout.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" "$(DEPDIR)/libpsiconv_la-parse_layout.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_layout.c' object='libpsiconv_la-parse_layout.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_layout.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_layout.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_layout.o `test -f 'parse_layout.c' || echo '$(srcdir)/'`parse_layout.c libpsiconv_la-parse_layout.obj: parse_layout.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_layout.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" -c -o libpsiconv_la-parse_layout.obj `if test -f 'parse_layout.c'; then $(CYGPATH_W) 'parse_layout.c'; else $(CYGPATH_W) '$(srcdir)/parse_layout.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" "$(DEPDIR)/libpsiconv_la-parse_layout.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_layout.c' object='libpsiconv_la-parse_layout.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_layout.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_layout.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_layout.obj `if test -f 'parse_layout.c'; then $(CYGPATH_W) 'parse_layout.c'; else $(CYGPATH_W) '$(srcdir)/parse_layout.c'; fi` libpsiconv_la-parse_layout.lo: parse_layout.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_layout.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" -c -o libpsiconv_la-parse_layout.lo `test -f 'parse_layout.c' || echo '$(srcdir)/'`parse_layout.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo" "$(DEPDIR)/libpsiconv_la-parse_layout.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_layout.c' object='libpsiconv_la-parse_layout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_layout.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_layout.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_layout.lo `test -f 'parse_layout.c' || echo '$(srcdir)/'`parse_layout.c libpsiconv_la-parse_image.o: parse_image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_image.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" -c -o libpsiconv_la-parse_image.o `test -f 'parse_image.c' || echo '$(srcdir)/'`parse_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" "$(DEPDIR)/libpsiconv_la-parse_image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_image.c' object='libpsiconv_la-parse_image.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_image.o `test -f 'parse_image.c' || echo '$(srcdir)/'`parse_image.c libpsiconv_la-parse_image.obj: parse_image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_image.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" -c -o libpsiconv_la-parse_image.obj `if test -f 'parse_image.c'; then $(CYGPATH_W) 'parse_image.c'; else $(CYGPATH_W) '$(srcdir)/parse_image.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" "$(DEPDIR)/libpsiconv_la-parse_image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_image.c' object='libpsiconv_la-parse_image.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_image.obj `if test -f 'parse_image.c'; then $(CYGPATH_W) 'parse_image.c'; else $(CYGPATH_W) '$(srcdir)/parse_image.c'; fi` libpsiconv_la-parse_image.lo: parse_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_image.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" -c -o libpsiconv_la-parse_image.lo `test -f 'parse_image.c' || echo '$(srcdir)/'`parse_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo" "$(DEPDIR)/libpsiconv_la-parse_image.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_image.c' object='libpsiconv_la-parse_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_image.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_image.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_image.lo `test -f 'parse_image.c' || echo '$(srcdir)/'`parse_image.c libpsiconv_la-parse_page.o: parse_page.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_page.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" -c -o libpsiconv_la-parse_page.o `test -f 'parse_page.c' || echo '$(srcdir)/'`parse_page.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" "$(DEPDIR)/libpsiconv_la-parse_page.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_page.c' object='libpsiconv_la-parse_page.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_page.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_page.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_page.o `test -f 'parse_page.c' || echo '$(srcdir)/'`parse_page.c libpsiconv_la-parse_page.obj: parse_page.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_page.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" -c -o libpsiconv_la-parse_page.obj `if test -f 'parse_page.c'; then $(CYGPATH_W) 'parse_page.c'; else $(CYGPATH_W) '$(srcdir)/parse_page.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" "$(DEPDIR)/libpsiconv_la-parse_page.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_page.c' object='libpsiconv_la-parse_page.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_page.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_page.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_page.obj `if test -f 'parse_page.c'; then $(CYGPATH_W) 'parse_page.c'; else $(CYGPATH_W) '$(srcdir)/parse_page.c'; fi` libpsiconv_la-parse_page.lo: parse_page.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_page.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" -c -o libpsiconv_la-parse_page.lo `test -f 'parse_page.c' || echo '$(srcdir)/'`parse_page.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo" "$(DEPDIR)/libpsiconv_la-parse_page.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_page.c' object='libpsiconv_la-parse_page.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_page.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_page.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_page.lo `test -f 'parse_page.c' || echo '$(srcdir)/'`parse_page.c libpsiconv_la-parse_simple.o: parse_simple.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_simple.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" -c -o libpsiconv_la-parse_simple.o `test -f 'parse_simple.c' || echo '$(srcdir)/'`parse_simple.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" "$(DEPDIR)/libpsiconv_la-parse_simple.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_simple.c' object='libpsiconv_la-parse_simple.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_simple.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_simple.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_simple.o `test -f 'parse_simple.c' || echo '$(srcdir)/'`parse_simple.c libpsiconv_la-parse_simple.obj: parse_simple.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_simple.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" -c -o libpsiconv_la-parse_simple.obj `if test -f 'parse_simple.c'; then $(CYGPATH_W) 'parse_simple.c'; else $(CYGPATH_W) '$(srcdir)/parse_simple.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" "$(DEPDIR)/libpsiconv_la-parse_simple.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_simple.c' object='libpsiconv_la-parse_simple.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_simple.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_simple.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_simple.obj `if test -f 'parse_simple.c'; then $(CYGPATH_W) 'parse_simple.c'; else $(CYGPATH_W) '$(srcdir)/parse_simple.c'; fi` libpsiconv_la-parse_simple.lo: parse_simple.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_simple.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" -c -o libpsiconv_la-parse_simple.lo `test -f 'parse_simple.c' || echo '$(srcdir)/'`parse_simple.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo" "$(DEPDIR)/libpsiconv_la-parse_simple.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_simple.c' object='libpsiconv_la-parse_simple.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_simple.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_simple.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_simple.lo `test -f 'parse_simple.c' || echo '$(srcdir)/'`parse_simple.c libpsiconv_la-parse_texted.o: parse_texted.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_texted.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" -c -o libpsiconv_la-parse_texted.o `test -f 'parse_texted.c' || echo '$(srcdir)/'`parse_texted.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" "$(DEPDIR)/libpsiconv_la-parse_texted.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_texted.c' object='libpsiconv_la-parse_texted.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_texted.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_texted.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_texted.o `test -f 'parse_texted.c' || echo '$(srcdir)/'`parse_texted.c libpsiconv_la-parse_texted.obj: parse_texted.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_texted.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" -c -o libpsiconv_la-parse_texted.obj `if test -f 'parse_texted.c'; then $(CYGPATH_W) 'parse_texted.c'; else $(CYGPATH_W) '$(srcdir)/parse_texted.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" "$(DEPDIR)/libpsiconv_la-parse_texted.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_texted.c' object='libpsiconv_la-parse_texted.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_texted.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_texted.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_texted.obj `if test -f 'parse_texted.c'; then $(CYGPATH_W) 'parse_texted.c'; else $(CYGPATH_W) '$(srcdir)/parse_texted.c'; fi` libpsiconv_la-parse_texted.lo: parse_texted.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_texted.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" -c -o libpsiconv_la-parse_texted.lo `test -f 'parse_texted.c' || echo '$(srcdir)/'`parse_texted.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo" "$(DEPDIR)/libpsiconv_la-parse_texted.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_texted.c' object='libpsiconv_la-parse_texted.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_texted.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_texted.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_texted.lo `test -f 'parse_texted.c' || echo '$(srcdir)/'`parse_texted.c libpsiconv_la-parse_word.o: parse_word.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_word.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" -c -o libpsiconv_la-parse_word.o `test -f 'parse_word.c' || echo '$(srcdir)/'`parse_word.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" "$(DEPDIR)/libpsiconv_la-parse_word.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_word.c' object='libpsiconv_la-parse_word.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_word.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_word.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_word.o `test -f 'parse_word.c' || echo '$(srcdir)/'`parse_word.c libpsiconv_la-parse_word.obj: parse_word.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_word.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" -c -o libpsiconv_la-parse_word.obj `if test -f 'parse_word.c'; then $(CYGPATH_W) 'parse_word.c'; else $(CYGPATH_W) '$(srcdir)/parse_word.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" "$(DEPDIR)/libpsiconv_la-parse_word.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_word.c' object='libpsiconv_la-parse_word.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_word.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_word.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_word.obj `if test -f 'parse_word.c'; then $(CYGPATH_W) 'parse_word.c'; else $(CYGPATH_W) '$(srcdir)/parse_word.c'; fi` libpsiconv_la-parse_word.lo: parse_word.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_word.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" -c -o libpsiconv_la-parse_word.lo `test -f 'parse_word.c' || echo '$(srcdir)/'`parse_word.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo" "$(DEPDIR)/libpsiconv_la-parse_word.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_word.c' object='libpsiconv_la-parse_word.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_word.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_word.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_word.lo `test -f 'parse_word.c' || echo '$(srcdir)/'`parse_word.c libpsiconv_la-parse_sheet.o: parse_sheet.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_sheet.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" -c -o libpsiconv_la-parse_sheet.o `test -f 'parse_sheet.c' || echo '$(srcdir)/'`parse_sheet.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" "$(DEPDIR)/libpsiconv_la-parse_sheet.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_sheet.c' object='libpsiconv_la-parse_sheet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_sheet.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_sheet.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_sheet.o `test -f 'parse_sheet.c' || echo '$(srcdir)/'`parse_sheet.c libpsiconv_la-parse_sheet.obj: parse_sheet.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_sheet.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" -c -o libpsiconv_la-parse_sheet.obj `if test -f 'parse_sheet.c'; then $(CYGPATH_W) 'parse_sheet.c'; else $(CYGPATH_W) '$(srcdir)/parse_sheet.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" "$(DEPDIR)/libpsiconv_la-parse_sheet.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_sheet.c' object='libpsiconv_la-parse_sheet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_sheet.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_sheet.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_sheet.obj `if test -f 'parse_sheet.c'; then $(CYGPATH_W) 'parse_sheet.c'; else $(CYGPATH_W) '$(srcdir)/parse_sheet.c'; fi` libpsiconv_la-parse_sheet.lo: parse_sheet.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-parse_sheet.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" -c -o libpsiconv_la-parse_sheet.lo `test -f 'parse_sheet.c' || echo '$(srcdir)/'`parse_sheet.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo" "$(DEPDIR)/libpsiconv_la-parse_sheet.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-parse_sheet.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_sheet.c' object='libpsiconv_la-parse_sheet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-parse_sheet.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-parse_sheet.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-parse_sheet.lo `test -f 'parse_sheet.c' || echo '$(srcdir)/'`parse_sheet.c libpsiconv_la-generate_simple.o: generate_simple.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_simple.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" -c -o libpsiconv_la-generate_simple.o `test -f 'generate_simple.c' || echo '$(srcdir)/'`generate_simple.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" "$(DEPDIR)/libpsiconv_la-generate_simple.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_simple.c' object='libpsiconv_la-generate_simple.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_simple.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_simple.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_simple.o `test -f 'generate_simple.c' || echo '$(srcdir)/'`generate_simple.c libpsiconv_la-generate_simple.obj: generate_simple.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_simple.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" -c -o libpsiconv_la-generate_simple.obj `if test -f 'generate_simple.c'; then $(CYGPATH_W) 'generate_simple.c'; else $(CYGPATH_W) '$(srcdir)/generate_simple.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" "$(DEPDIR)/libpsiconv_la-generate_simple.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_simple.c' object='libpsiconv_la-generate_simple.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_simple.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_simple.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_simple.obj `if test -f 'generate_simple.c'; then $(CYGPATH_W) 'generate_simple.c'; else $(CYGPATH_W) '$(srcdir)/generate_simple.c'; fi` libpsiconv_la-generate_simple.lo: generate_simple.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_simple.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" -c -o libpsiconv_la-generate_simple.lo `test -f 'generate_simple.c' || echo '$(srcdir)/'`generate_simple.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo" "$(DEPDIR)/libpsiconv_la-generate_simple.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_simple.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_simple.c' object='libpsiconv_la-generate_simple.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_simple.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_simple.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_simple.lo `test -f 'generate_simple.c' || echo '$(srcdir)/'`generate_simple.c libpsiconv_la-generate_layout.o: generate_layout.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_layout.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" -c -o libpsiconv_la-generate_layout.o `test -f 'generate_layout.c' || echo '$(srcdir)/'`generate_layout.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" "$(DEPDIR)/libpsiconv_la-generate_layout.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_layout.c' object='libpsiconv_la-generate_layout.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_layout.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_layout.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_layout.o `test -f 'generate_layout.c' || echo '$(srcdir)/'`generate_layout.c libpsiconv_la-generate_layout.obj: generate_layout.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_layout.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" -c -o libpsiconv_la-generate_layout.obj `if test -f 'generate_layout.c'; then $(CYGPATH_W) 'generate_layout.c'; else $(CYGPATH_W) '$(srcdir)/generate_layout.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" "$(DEPDIR)/libpsiconv_la-generate_layout.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_layout.c' object='libpsiconv_la-generate_layout.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_layout.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_layout.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_layout.obj `if test -f 'generate_layout.c'; then $(CYGPATH_W) 'generate_layout.c'; else $(CYGPATH_W) '$(srcdir)/generate_layout.c'; fi` libpsiconv_la-generate_layout.lo: generate_layout.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_layout.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" -c -o libpsiconv_la-generate_layout.lo `test -f 'generate_layout.c' || echo '$(srcdir)/'`generate_layout.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo" "$(DEPDIR)/libpsiconv_la-generate_layout.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_layout.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_layout.c' object='libpsiconv_la-generate_layout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_layout.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_layout.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_layout.lo `test -f 'generate_layout.c' || echo '$(srcdir)/'`generate_layout.c libpsiconv_la-generate_driver.o: generate_driver.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_driver.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" -c -o libpsiconv_la-generate_driver.o `test -f 'generate_driver.c' || echo '$(srcdir)/'`generate_driver.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" "$(DEPDIR)/libpsiconv_la-generate_driver.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_driver.c' object='libpsiconv_la-generate_driver.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_driver.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_driver.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_driver.o `test -f 'generate_driver.c' || echo '$(srcdir)/'`generate_driver.c libpsiconv_la-generate_driver.obj: generate_driver.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_driver.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" -c -o libpsiconv_la-generate_driver.obj `if test -f 'generate_driver.c'; then $(CYGPATH_W) 'generate_driver.c'; else $(CYGPATH_W) '$(srcdir)/generate_driver.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" "$(DEPDIR)/libpsiconv_la-generate_driver.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_driver.c' object='libpsiconv_la-generate_driver.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_driver.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_driver.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_driver.obj `if test -f 'generate_driver.c'; then $(CYGPATH_W) 'generate_driver.c'; else $(CYGPATH_W) '$(srcdir)/generate_driver.c'; fi` libpsiconv_la-generate_driver.lo: generate_driver.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_driver.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" -c -o libpsiconv_la-generate_driver.lo `test -f 'generate_driver.c' || echo '$(srcdir)/'`generate_driver.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo" "$(DEPDIR)/libpsiconv_la-generate_driver.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_driver.c' object='libpsiconv_la-generate_driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_driver.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_driver.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_driver.lo `test -f 'generate_driver.c' || echo '$(srcdir)/'`generate_driver.c libpsiconv_la-generate_common.o: generate_common.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_common.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" -c -o libpsiconv_la-generate_common.o `test -f 'generate_common.c' || echo '$(srcdir)/'`generate_common.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" "$(DEPDIR)/libpsiconv_la-generate_common.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_common.c' object='libpsiconv_la-generate_common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_common.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_common.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_common.o `test -f 'generate_common.c' || echo '$(srcdir)/'`generate_common.c libpsiconv_la-generate_common.obj: generate_common.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_common.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" -c -o libpsiconv_la-generate_common.obj `if test -f 'generate_common.c'; then $(CYGPATH_W) 'generate_common.c'; else $(CYGPATH_W) '$(srcdir)/generate_common.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" "$(DEPDIR)/libpsiconv_la-generate_common.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_common.c' object='libpsiconv_la-generate_common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_common.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_common.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_common.obj `if test -f 'generate_common.c'; then $(CYGPATH_W) 'generate_common.c'; else $(CYGPATH_W) '$(srcdir)/generate_common.c'; fi` libpsiconv_la-generate_common.lo: generate_common.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_common.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" -c -o libpsiconv_la-generate_common.lo `test -f 'generate_common.c' || echo '$(srcdir)/'`generate_common.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo" "$(DEPDIR)/libpsiconv_la-generate_common.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_common.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_common.c' object='libpsiconv_la-generate_common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_common.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_common.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_common.lo `test -f 'generate_common.c' || echo '$(srcdir)/'`generate_common.c libpsiconv_la-generate_texted.o: generate_texted.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_texted.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" -c -o libpsiconv_la-generate_texted.o `test -f 'generate_texted.c' || echo '$(srcdir)/'`generate_texted.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" "$(DEPDIR)/libpsiconv_la-generate_texted.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_texted.c' object='libpsiconv_la-generate_texted.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_texted.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_texted.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_texted.o `test -f 'generate_texted.c' || echo '$(srcdir)/'`generate_texted.c libpsiconv_la-generate_texted.obj: generate_texted.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_texted.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" -c -o libpsiconv_la-generate_texted.obj `if test -f 'generate_texted.c'; then $(CYGPATH_W) 'generate_texted.c'; else $(CYGPATH_W) '$(srcdir)/generate_texted.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" "$(DEPDIR)/libpsiconv_la-generate_texted.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_texted.c' object='libpsiconv_la-generate_texted.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_texted.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_texted.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_texted.obj `if test -f 'generate_texted.c'; then $(CYGPATH_W) 'generate_texted.c'; else $(CYGPATH_W) '$(srcdir)/generate_texted.c'; fi` libpsiconv_la-generate_texted.lo: generate_texted.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_texted.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" -c -o libpsiconv_la-generate_texted.lo `test -f 'generate_texted.c' || echo '$(srcdir)/'`generate_texted.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo" "$(DEPDIR)/libpsiconv_la-generate_texted.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_texted.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_texted.c' object='libpsiconv_la-generate_texted.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_texted.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_texted.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_texted.lo `test -f 'generate_texted.c' || echo '$(srcdir)/'`generate_texted.c libpsiconv_la-generate_page.o: generate_page.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_page.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" -c -o libpsiconv_la-generate_page.o `test -f 'generate_page.c' || echo '$(srcdir)/'`generate_page.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" "$(DEPDIR)/libpsiconv_la-generate_page.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_page.c' object='libpsiconv_la-generate_page.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_page.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_page.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_page.o `test -f 'generate_page.c' || echo '$(srcdir)/'`generate_page.c libpsiconv_la-generate_page.obj: generate_page.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_page.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" -c -o libpsiconv_la-generate_page.obj `if test -f 'generate_page.c'; then $(CYGPATH_W) 'generate_page.c'; else $(CYGPATH_W) '$(srcdir)/generate_page.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" "$(DEPDIR)/libpsiconv_la-generate_page.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_page.c' object='libpsiconv_la-generate_page.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_page.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_page.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_page.obj `if test -f 'generate_page.c'; then $(CYGPATH_W) 'generate_page.c'; else $(CYGPATH_W) '$(srcdir)/generate_page.c'; fi` libpsiconv_la-generate_page.lo: generate_page.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_page.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" -c -o libpsiconv_la-generate_page.lo `test -f 'generate_page.c' || echo '$(srcdir)/'`generate_page.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo" "$(DEPDIR)/libpsiconv_la-generate_page.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_page.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_page.c' object='libpsiconv_la-generate_page.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_page.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_page.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_page.lo `test -f 'generate_page.c' || echo '$(srcdir)/'`generate_page.c libpsiconv_la-generate_word.o: generate_word.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_word.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" -c -o libpsiconv_la-generate_word.o `test -f 'generate_word.c' || echo '$(srcdir)/'`generate_word.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" "$(DEPDIR)/libpsiconv_la-generate_word.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_word.c' object='libpsiconv_la-generate_word.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_word.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_word.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_word.o `test -f 'generate_word.c' || echo '$(srcdir)/'`generate_word.c libpsiconv_la-generate_word.obj: generate_word.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_word.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" -c -o libpsiconv_la-generate_word.obj `if test -f 'generate_word.c'; then $(CYGPATH_W) 'generate_word.c'; else $(CYGPATH_W) '$(srcdir)/generate_word.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" "$(DEPDIR)/libpsiconv_la-generate_word.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_word.c' object='libpsiconv_la-generate_word.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_word.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_word.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_word.obj `if test -f 'generate_word.c'; then $(CYGPATH_W) 'generate_word.c'; else $(CYGPATH_W) '$(srcdir)/generate_word.c'; fi` libpsiconv_la-generate_word.lo: generate_word.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_word.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" -c -o libpsiconv_la-generate_word.lo `test -f 'generate_word.c' || echo '$(srcdir)/'`generate_word.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo" "$(DEPDIR)/libpsiconv_la-generate_word.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_word.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_word.c' object='libpsiconv_la-generate_word.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_word.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_word.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_word.lo `test -f 'generate_word.c' || echo '$(srcdir)/'`generate_word.c libpsiconv_la-generate_image.o: generate_image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_image.o -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" -c -o libpsiconv_la-generate_image.o `test -f 'generate_image.c' || echo '$(srcdir)/'`generate_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" "$(DEPDIR)/libpsiconv_la-generate_image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_image.c' object='libpsiconv_la-generate_image.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_image.o `test -f 'generate_image.c' || echo '$(srcdir)/'`generate_image.c libpsiconv_la-generate_image.obj: generate_image.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_image.obj -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" -c -o libpsiconv_la-generate_image.obj `if test -f 'generate_image.c'; then $(CYGPATH_W) 'generate_image.c'; else $(CYGPATH_W) '$(srcdir)/generate_image.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" "$(DEPDIR)/libpsiconv_la-generate_image.Po"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_image.c' object='libpsiconv_la-generate_image.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_image.Po' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_image.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_image.obj `if test -f 'generate_image.c'; then $(CYGPATH_W) 'generate_image.c'; else $(CYGPATH_W) '$(srcdir)/generate_image.c'; fi` libpsiconv_la-generate_image.lo: generate_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -MT libpsiconv_la-generate_image.lo -MD -MP -MF "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" -c -o libpsiconv_la-generate_image.lo `test -f 'generate_image.c' || echo '$(srcdir)/'`generate_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo" "$(DEPDIR)/libpsiconv_la-generate_image.Plo"; else rm -f "$(DEPDIR)/libpsiconv_la-generate_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_image.c' object='libpsiconv_la-generate_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libpsiconv_la-generate_image.Plo' tmpdepfile='$(DEPDIR)/libpsiconv_la-generate_image.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpsiconv_la_CFLAGS) $(CFLAGS) -c -o libpsiconv_la-generate_image.lo `test -f 'generate_image.c' || echo '$(srcdir)/'`generate_image.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-psiconvincludeHEADERS: $(psiconvinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(psiconvincludedir)" || $(mkdir_p) "$(DESTDIR)$(psiconvincludedir)" @list='$(psiconvinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(psiconvincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(psiconvincludedir)/$$f'"; \ $(psiconvincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(psiconvincludedir)/$$f"; \ done uninstall-psiconvincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(psiconvinclude_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(psiconvincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(psiconvincludedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(psiconvincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-psiconvincludeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ uninstall-psiconvincludeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man \ install-psiconvincludeHEADERS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES uninstall-psiconvincludeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/lib/psiconv/general.h.in0000644000175000017500000000273710336374664014601 00000000000000/* data.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* All declarations which you may need to edit are here. At a later time, this will be superseded by some automatic configuration script. */ #ifndef PSICONV_GENERAL_H #define PSICONV_GENERAL_H /* Data types; s8 means `signed 8-bit integer', u32 means `unsigned 32-bits integer'. Configure figures out which types to use. */ typedef signed @INT_8_BIT@ psiconv_s8; typedef unsigned @INT_8_BIT@ psiconv_u8; typedef signed @INT_16_BIT@ psiconv_s16; typedef unsigned @INT_16_BIT@ psiconv_u16; typedef signed @INT_32_BIT@ psiconv_s32; typedef unsigned @INT_32_BIT@ psiconv_u32; typedef psiconv_u16 psiconv_ucs2; #endif /* def PSICONV_GENERAL_H */ psiconv-0.9.8/lib/psiconv/configuration.c0000644000175000017500000002722310336374730015410 00000000000000/* configuration.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include "error.h" #include "unicode.h" #include #include #include #include #include #include #include #include #include "configuration.h" #ifdef DMALLOC #include #endif #ifndef CONFIGURATION_SEARCH_PATH #define CONFIGURATION_SEARCH_PATH PSICONVETCDIR "/psiconv.conf:~/.psiconv.conf" #endif static struct psiconv_config_s default_config = { PSICONV_VERB_WARN, 2, 0,0,0,psiconv_bool_false,NULL,'?','?',{ 0 },psiconv_bool_false }; static void psiconv_config_parse_statement(const char *filename, int linenr, const char *var, int value, psiconv_config *config); static void psiconv_config_parse_line(const char *filename, int linenr, const char *line, psiconv_config *config); static void psiconv_config_parse_file(const char *filename, psiconv_config *config); psiconv_config psiconv_config_default(void) { psiconv_config result; result = malloc(sizeof(*result)); *result = default_config; psiconv_unicode_select_characterset(result,1); return result; } void psiconv_config_free(psiconv_config config) { free(config); } void psiconv_config_parse_statement(const char *filename, int linenr, const char *var, int value, psiconv_config *config) { int charnr; if (!(strcasecmp(var,"verbosity"))) { if ((value >= 1) && (value <= 5)) (*config)->verbosity = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Verbosity should be between 1 and 5",filename,linenr); } else if (!(strcasecmp(var,"color"))) { if ((value == 0) || (value == 1)) (*config)->color = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Color should be 0 or 1",filename,linenr); } else if (!(strcasecmp(var,"colordepth"))) { if ((value > 0) && (value <= 32)) (*config)->colordepth = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "ColorDepth should be between 1 and 32",filename,linenr); } else if (!(strcasecmp(var,"redbits"))) { if ((value >= 0) && (value <= 32)) (*config)->redbits = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "RedBits should be between 1 and 32 or 0",filename,linenr); } else if (!(strcasecmp(var,"greenbits"))) { if ((value >= 0) && (value <= 32)) (*config)->greenbits = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "GreenBits should be between 1 and 32 or 0",filename,linenr); } else if (!(strcasecmp(var,"bluebits"))) { if ((value >= 0) && (value <= 32)) (*config)->bluebits = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "BlueBits should be between 1 and 32 or 0",filename,linenr); } else if (!(strcasecmp(var,"characterset"))) { if ((value >= 0) && (value <= 1)) psiconv_unicode_select_characterset(*config,value); else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "CharacterSet should be between 0 and 1", filename,linenr); } else if (!(strcasecmp(var,"unknownunicodechar"))) { if ((value >= 1) && (value < 0x10000)) (*config)->unknown_unicode_char = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "UnknownUnicodeChar should be between 1 and 65535", filename,linenr); } else if (!(strcasecmp(var,"unknownepocchar"))) { if ((value >= 1) && (value < 0x100)) (*config)->unknown_epoc_char = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "UnknownEPOCChar should be between 1 and 255", filename,linenr); } else if (sscanf(var,"char%d",&charnr) == strlen(var)) { if ((charnr < 0) || (charnr > 255)) psiconv_error(*config,0,0,"Configuration file %s, line %d: " "CharXXX should have XXX between 0 and 255", filename,linenr); if ((value >= 1) && (value <= 0x10000)) (*config)->unicode_table[charnr] = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " "CharXXX should be between 1 and 65535", filename,linenr); } else { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Unknown variable %s",filename,linenr,var); } psiconv_debug(*config,0,0,"Configuration file %s, line %d: " "Set variable %s to %d",filename,linenr,var,value); } void psiconv_config_parse_line(const char *filename, int linenr, const char *line, psiconv_config *config) { int sovar,eovar,soval,eoval,eol; char *var; long val; psiconv_debug(*config,0,0,"Going to parse line %d: %s",linenr,line); sovar = 0; while (line[sovar] && (line[sovar] < 32)) sovar ++; if (!line[sovar] || line[sovar] == '#') return; eovar = sovar; while (line[eovar] && (((line[eovar] >= 'A') && (line[eovar] <= 'Z')) || ((line[eovar] >= 'a') && (line[eovar] <= 'z')))) eovar ++; if (sovar == eovar) { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Syntax error (no variable found)",filename,linenr); return; } soval = eovar; while (line[soval] && (line[soval] <= 32)) soval ++; if (line[soval] != '=') { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Syntax error (no = token found)",filename,linenr); return; } soval ++; while (line[soval] && (line[soval] <= 32)) soval ++; eoval = soval; while (line[eoval] && ((line[eoval] >= '0') && (line[eoval] <= '9'))) eoval ++; if (eoval == soval) { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Syntax error (no value found)",filename,linenr); return; } if (soval - eoval > 7) { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Syntax error (value too large)",filename,linenr); return; } eol = eoval; while (line[eol] && (line[eol] < 32)) eol ++; if (line[eol]) { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Syntax error (trailing garbage)",filename,linenr); return; } var = malloc(eovar - sovar + 1); memcpy(var,line + sovar, eovar - sovar); var[eovar-sovar] = 0; val = atol(line + soval); psiconv_config_parse_statement(filename,linenr,var,val,config); free(var); } void psiconv_config_parse_file(const char *filename, psiconv_config *config) { int file,linenr; struct stat stat_buf; off_t filesize,bytes_left,bytes_read,sol,eol; char *filebuffer,*filebuffer_ptr; psiconv_progress(*config,0,0, "Going to access configuration file %s",filename); /* Try to open the file; it may fail, if it does not exist for example */ if ((file = open(filename,O_RDONLY)) == -1) goto ERROR0; /* Read the contents of the file into filebuffer. This may fail */ if (fstat(file,&stat_buf)) { if (close(file)) psiconv_error(*config,0,0,"Configuration file %s: " "Couldn't close file",filename); return; } filesize = stat_buf.st_size; if (!(filebuffer = malloc(filesize + 1))) { psiconv_error(*config,0,0,"Configuration file %s: " "Out of memory error",filename); goto ERROR1; } filebuffer_ptr = filebuffer; bytes_left = filesize; bytes_read = 1; /* Dummy for the first time through the loop */ while ((bytes_read > 0) && bytes_left) { bytes_read = read(file,filebuffer_ptr,bytes_left); if (bytes_read > 0) { filebuffer_ptr += bytes_read; bytes_left -= bytes_read; } } /* On NFS, the first read may fail and this is not fatal */ if (bytes_left && (bytes_left != filesize)) { psiconv_error(*config,0,0,"Configuration file %s: " "Couldn't read file into memory",filename); goto ERROR2; } if (close(file)) { psiconv_error(*config,0,0,"Configuration file %s: " "Couldn't close file",filename); file = -1; goto ERROR2; } file = -1; psiconv_progress(*config,0,0, "Going to parse configuration file %s: ",filename); /* Now we walk through the file to isolate lines */ linenr = 0; sol = 0; while (sol < filesize) { linenr ++; eol = sol; while ((eol < filesize) && (filebuffer[eol] != 13) && (filebuffer[eol] != 10) && (filebuffer[eol] != 0)) eol ++; if ((eol < filesize) && (filebuffer[eol] == 0)) { psiconv_error(*config,0,0,"Configuration file %s, line %d: " "Unexpected character \000 found",filename,linenr); goto ERROR2; } if ((eol < filesize + 1) && (((filebuffer[eol] == 13) && (filebuffer[eol+1] == 10)) || ((filebuffer[eol] == 10) && (filebuffer[eol+1] == 13)))) { filebuffer[eol] = 0; eol ++; } filebuffer[eol] = 0; psiconv_config_parse_line(filename,linenr,filebuffer + sol,config); sol = eol+1; } free(filebuffer); return; ERROR2: free(filebuffer); ERROR1: if ((file != -1) && close(file)) psiconv_error(*config,0,0,"Configuration file %s: " "Couldn't close file",filename); ERROR0: return; } void psiconv_config_read(const char *extra_config_files, psiconv_config *config) { char *path,*pathptr,*filename,*filename_old; const char *home; int filename_len; /* Make path be the complete search path, colon separated */ if (extra_config_files && strlen(extra_config_files)) { path = malloc(strlen(CONFIGURATION_SEARCH_PATH) + strlen(extra_config_files) + 2); strcpy(path,CONFIGURATION_SEARCH_PATH); strcat(path,":"); strcat(path,extra_config_files); } else { path = strdup(CONFIGURATION_SEARCH_PATH); } pathptr = path; while (strlen(pathptr)) { /* Isolate the next filename */ filename_len = (index(pathptr,':')?(index(pathptr,':') - pathptr): strlen(pathptr)); filename = malloc(filename_len + 1); filename = strncpy(filename,pathptr,filename_len); filename[filename_len] = 0; pathptr += filename_len; if (strlen(pathptr)) pathptr ++; /* Do ~ substitution */ if ((filename[0] == '~') && ((filename[1] == '/') || filename[1] == 0)) { home = getenv("HOME"); if (home) { filename_old = filename; filename = malloc(strlen(filename_old) + strlen(home)); strcpy(filename,home); strcpy(filename + strlen(filename),filename_old+1); free(filename_old); } } psiconv_config_parse_file(filename,config); free(filename); } free(path); } psiconv-0.9.8/lib/psiconv/error.c0000644000175000017500000001071010336374704013664 00000000000000/* error.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include #include #include "error.h" #ifdef DMALLOC #include #endif static void psiconv_default_error_handler(int kind, psiconv_u32 off, const char *message) { fprintf(stderr,"%s\n",message); } #define MAX_MESSAGE 1024 void psiconv_fatal(psiconv_config config, int level, psiconv_u32 off, const char *format,...) { char buffer[MAX_MESSAGE]; va_list ap; size_t curlen; va_start(ap,format); snprintf(buffer,MAX_MESSAGE,"Fatal error (offset %08x): ",off); curlen = strlen(buffer); vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); if (config->error_handler) config->error_handler(PSICONV_VERB_FATAL,off,buffer); else psiconv_default_error_handler(PSICONV_VERB_FATAL,off,buffer); va_end(ap); exit(1); } void psiconv_error(psiconv_config config, int level, psiconv_u32 off, const char *format,...) { char buffer[MAX_MESSAGE]; va_list ap; size_t curlen; va_start(ap,format); if (config->verbosity >= PSICONV_VERB_ERROR) { snprintf(buffer,MAX_MESSAGE,"ERROR (offset %08x): ",off); curlen = strlen(buffer); vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); if (config->error_handler) config->error_handler(PSICONV_VERB_ERROR,off,buffer); else psiconv_default_error_handler(PSICONV_VERB_ERROR,off,buffer); } va_end(ap); } void psiconv_warn(psiconv_config config, int level, psiconv_u32 off, const char *format,...) { char buffer[MAX_MESSAGE]; va_list ap; size_t curlen; va_start(ap,format); if (config->verbosity >= PSICONV_VERB_WARN) { snprintf(buffer,MAX_MESSAGE,"WARNING (offset %08x): ",off); curlen = strlen(buffer); vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); if (config->error_handler) config->error_handler(PSICONV_VERB_WARN,off,buffer); else psiconv_default_error_handler(PSICONV_VERB_WARN,off,buffer); } va_end(ap); } void psiconv_progress(psiconv_config config,int level, psiconv_u32 off, const char *format,...) { char buffer[MAX_MESSAGE]; va_list ap; size_t curlen; int i; va_start(ap,format); if (config->verbosity >= PSICONV_VERB_PROGRESS) { snprintf(buffer,MAX_MESSAGE,"%08x ",off); curlen = strlen(buffer); for (i = 0; (i < level) && (i+curlen+3 < MAX_MESSAGE); i++) buffer[i+curlen] = '='; curlen += i; buffer[curlen] = '>'; buffer[curlen+1] = ' '; buffer[curlen+2] = '\0'; curlen += 2; vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); if (config->error_handler) config->error_handler(PSICONV_VERB_PROGRESS,off,buffer); else psiconv_default_error_handler(PSICONV_VERB_PROGRESS,off,buffer); } va_end(ap); } void psiconv_debug(psiconv_config config, int level, psiconv_u32 off, const char *format,...) { char buffer[MAX_MESSAGE]; va_list ap; size_t curlen; int i; va_start(ap,format); if (config->verbosity >= PSICONV_VERB_DEBUG) { snprintf(buffer,MAX_MESSAGE,"%08x ",off); curlen = strlen(buffer); for (i = 0; (i < level) && (i+curlen+3 < MAX_MESSAGE); i++) buffer[i+curlen] = '-'; curlen += i; buffer[curlen] = '>'; buffer[curlen+1] = ' '; buffer[curlen+2] = '\0'; curlen += 2; vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); if (config->error_handler) config->error_handler(PSICONV_VERB_DEBUG,off,buffer); else psiconv_default_error_handler(PSICONV_VERB_DEBUG,off,buffer); } va_end(ap); } psiconv-0.9.8/lib/psiconv/misc.c0000644000175000017500000000273710336374711013476 00000000000000/* parse_aux.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include #include #include "common.h" #ifdef DMALLOC #include #endif char *psiconv_make_printable(const psiconv_config config, const psiconv_string_t input) { int i; char *output; if (!(output = malloc(sizeof(*output) * (psiconv_unicode_strlen(input) + 1)))) { return NULL; } for (i = 0; i < psiconv_unicode_strlen(input); i ++) if (input[i] < 0x20 || input[i] >= 0x7f) output[i] = '.'; else output[i] = input[i]; output[i] = 0; return output; } psiconv-0.9.8/lib/psiconv/checkuid.c0000644000175000017500000001451210336374656014324 00000000000000/* checkuid.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include "common.h" #ifdef DMALLOC #include #endif static psiconv_u32 uid1[32] = { /* bit 0 */ 0x000045A0, /* bit 1 */ 0x00008B40, /* bit 2 */ 0x000006A1, /* bit 3 */ 0x00000D42, /* bit 4 */ 0x00001A84, /* bit 5 */ 0x00003508, /* bit 6 */ 0x00006A10, /* bit 7 */ 0x0000D420, /* bit 8 */ 0x45A00000, /* bit 9 */ 0x8B400000, /* bit 10 */ 0x06A10000, /* bit 11 */ 0x0D420000, /* bit 12 */ 0x1A840000, /* bit 13 */ 0x35080000, /* bit 14 */ 0x6A100000, /* bit 15 */ 0xD4200000, /* bit 16 */ 0x0000AA51, /* bit 17 */ 0x00004483, /* bit 18 */ 0x00008906, /* bit 19 */ 0x0000022D, /* bit 20 */ 0x0000045A, /* bit 21 */ 0x000008B4, /* bit 22 */ 0x00001168, /* bit 23 */ 0x000022D0, /* bit 24 */ 0xAA510000, /* bit 25 */ 0x44830000, /* bit 26 */ 0x89060000, /* bit 27 */ 0x022D0000, /* bit 28 */ 0x045A0000, /* bit 29 */ 0x08B40000, /* bit 30 */ 0x11680000, /* bit 31 */ 0x22D00000}; static psiconv_u32 uid2[32] = { /* bit 0 */ 0x000076B4, /* bit 1 */ 0x0000ED68, /* bit 2 */ 0x0000CAF1, /* bit 3 */ 0x000085C3, /* bit 4 */ 0x00001BA7, /* bit 5 */ 0x0000374E, /* bit 6 */ 0x00006E9C, /* bit 7 */ 0x0000DD38, /* bit 8 */ 0x76B40000, /* bit 9 */ 0xED680000, /* bit 10 */ 0xCAF10000, /* bit 11 */ 0x85C30000, /* bit 12 */ 0x1BA70000, /* bit 13 */ 0x374E0000, /* bit 14 */ 0x6E9C0000, /* bit 15 */ 0xDD380000, /* bit 16 */ 0x00003730, /* bit 17 */ 0x00006E60, /* bit 18 */ 0x0000DCC0, /* bit 19 */ 0x0000A9A1, /* bit 20 */ 0x00004363, /* bit 21 */ 0x000086C6, /* bit 22 */ 0x00001DAD, /* bit 23 */ 0x00003B5A, /* bit 24 */ 0x37300000, /* bit 25 */ 0x6E600000, /* bit 26 */ 0xDCC00000, /* bit 27 */ 0xA9A10000, /* bit 28 */ 0x43630000, /* bit 29 */ 0x86C60000, /* bit 30 */ 0x1DAD0000, /* bit 31 */ 0x3B5A0000 }; static psiconv_u32 uid3[32] = { /* bit 0 */ 0x00003331, /* bit 1 */ 0x00006662, /* bit 2 */ 0x0000CCC4, /* bit 3 */ 0x000089A9, /* bit 4 */ 0x00000373, /* bit 5 */ 0x000006E6, /* bit 6 */ 0x00000DCC, /* bit 7 */ 0x00001B98, /* bit 8 */ 0x33310000, /* bit 9 */ 0x66620000, /* bit 10 */ 0xCCC40000, /* bit 11 */ 0x89A90000, /* bit 12 */ 0x03730000, /* bit 13 */ 0x06E60000, /* bit 14 */ 0x0DCC0000, /* bit 15 */ 0x1B980000, /* bit 16 */ 0x00001021, /* bit 17 */ 0x00002042, /* bit 18 */ 0x00004084, /* bit 19 */ 0x00008108, /* bit 20 */ 0x00001231, /* bit 21 */ 0x00002462, /* bit 22 */ 0x000048C4, /* bit 23 */ 0x00009188, /* bit 24 */ 0x10210000, /* bit 25 */ 0x20420000, /* bit 26 */ 0x40840000, /* bit 27 */ 0x81080000, /* bit 28 */ 0x12310000, /* bit 29 */ 0x24620000, /* bit 30 */ 0x48C40000, /* bit 31 */ 0x91880000 }; psiconv_u32 psiconv_checkuid(psiconv_u32 id1,psiconv_u32 id2,psiconv_u32 id3) { psiconv_u32 i; psiconv_u32 res = 0; for (i = 0; i < 32; i++) { if (id1 & (1 << i)) res = res ^ uid1[i]; if (id2 & (1 << i)) res = res ^ uid2[i]; if (id3 & (1 << i)) res = res ^ uid3[i]; } return res; } psiconv-0.9.8/lib/psiconv/list.c0000644000175000017500000001140610336374665013517 00000000000000/* list.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include #include #include "general.h" #include "list.h" #include "error.h" #ifdef DMALLOC #include #endif static int psiconv_list_resize(psiconv_list l,psiconv_u32 nr); struct psiconv_list_s { psiconv_u32 cur_len; psiconv_u32 max_len; size_t el_size; void *els; }; psiconv_list psiconv_list_new(size_t element_size) { psiconv_list l; l = malloc(sizeof(*l)); if (!l) return NULL; l->cur_len = 0; l->max_len = 0; l->el_size=element_size; l->els = NULL; return l; } void psiconv_list_free(psiconv_list l) { if (l->max_len) free(l->els); free(l); l = NULL; } void psiconv_list_free_el(psiconv_list l, void free_el(void *el)) { psiconv_list_foreach_el(l,free_el); psiconv_list_free(l); } psiconv_u32 psiconv_list_length(const psiconv_list l) { return l->cur_len; } int psiconv_list_is_empty(const psiconv_list l) { return l->cur_len == 0; } void psiconv_list_empty(psiconv_list l) { l->cur_len = 0; } void *psiconv_list_get(const psiconv_list l, psiconv_u32 indx) { if (indx >= l->cur_len) return NULL; else return ((char *) (l->els)) + indx * l->el_size; } int psiconv_list_add(psiconv_list l, const void *el) { int res; if ((res = psiconv_list_resize(l,l->cur_len + 1))) return res; memcpy(((char *) (l->els)) + l->cur_len * l->el_size, el, l->el_size); l->cur_len ++; return 0; } int psiconv_list_pop(psiconv_list l, void *el) { if (! l->cur_len) return -PSICONV_E_OTHER; l->cur_len --; memcpy(el,((char *)(l->els)) + l->cur_len * l->el_size,l->el_size); return -PSICONV_E_OK; } int psiconv_list_replace(psiconv_list l, psiconv_u32 indx, const void *el) { if (indx >= l->cur_len) return -PSICONV_E_OTHER; memcpy(((char *) (l->els)) + indx * l->el_size,el, l->el_size); return -PSICONV_E_OK; } void psiconv_list_foreach_el(psiconv_list l, void action(void *el)) { psiconv_u32 i; for (i = 0; i < l->cur_len; i ++) action(psiconv_list_get(l,i)); } psiconv_list psiconv_list_clone(const psiconv_list l) { psiconv_list l2; psiconv_u32 i; l2 = psiconv_list_new(l->el_size); if (!l2) return NULL; for (i = 0; i < l->cur_len; i ++) if (psiconv_list_add(l2,psiconv_list_get(l,i))) { psiconv_list_free(l2); return NULL; } return l2; } size_t psiconv_list_fread(psiconv_list l,size_t size, FILE *f) { size_t res; if (psiconv_list_resize(l,l->cur_len + size)) return 0; res = fread(((char *) (l->els)) + l->cur_len * l->el_size,l->el_size,size,f); l->cur_len += res; return res; } int psiconv_list_fread_all(psiconv_list l, FILE *f) { while (!feof(f)) { if (!psiconv_list_fread(l,1024,f) && !feof(f)) return -PSICONV_E_NOMEM; } return -PSICONV_E_OK; } int psiconv_list_fwrite_all(const psiconv_list l, FILE *f) { psiconv_u32 pos = 0; psiconv_u32 written; psiconv_u32 len = psiconv_list_length(l); while (pos < len) { if (!(written = fwrite(((char *)(l->els)) + pos * l->el_size,l->el_size, len - pos,f))) return -PSICONV_E_OTHER; pos += written; } return -PSICONV_E_OK; } int psiconv_list_resize(psiconv_list l,psiconv_u32 nr) { void * temp; if (nr > l->max_len) { l->max_len = 1.1 * nr; l->max_len += 16 - l->max_len % 16; temp = realloc(l->els,l->max_len * l->el_size); if (temp) { l->els = temp; return -PSICONV_E_OK; } else return -PSICONV_E_NOMEM; } return -PSICONV_E_OK; } int psiconv_list_concat(psiconv_list l, const psiconv_list extra) { int res; if (l->el_size != extra->el_size) return -PSICONV_E_OTHER; if ((res = psiconv_list_resize(l, l->cur_len + extra->cur_len))) return res; /* Unreadable but correct. */ memcpy(((char *) (l->els)) + l->cur_len * l->el_size,extra->els, extra->cur_len * extra->el_size); l->cur_len += extra->cur_len; return 0; } psiconv-0.9.8/lib/psiconv/buffer.c0000644000175000017500000001376710336374660014024 00000000000000/* buffer.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "list.h" #include "error.h" #include "buffer.h" #ifdef DMALLOC #include #endif typedef struct psiconv_relocation_s { psiconv_u32 offset; int id; } *psiconv_relocation; struct psiconv_buffer_s { psiconv_list reloc_target; /* of struct relocation_s */ psiconv_list reloc_ref; /* of struct relocation_s */ psiconv_list data; /* of psiconv_u8 */ }; static psiconv_u32 unique_id = 1; psiconv_u32 psiconv_buffer_unique_id(void) { return unique_id ++; } psiconv_buffer psiconv_buffer_new(void) { psiconv_buffer buf; if (!(buf = malloc(sizeof(*buf)))) goto ERROR1; if (!(buf->data = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR2; if (!(buf->reloc_target = psiconv_list_new( sizeof(struct psiconv_relocation_s)))) goto ERROR3; if (!(buf->reloc_ref = psiconv_list_new( sizeof(struct psiconv_relocation_s)))) goto ERROR4; return buf; ERROR4: psiconv_list_free(buf->reloc_target); ERROR3: psiconv_list_free(buf->data); ERROR2: free(buf); ERROR1: return NULL; } void psiconv_buffer_free(psiconv_buffer buf) { psiconv_list_free(buf->reloc_ref); psiconv_list_free(buf->reloc_target); psiconv_list_free(buf->data); free(buf); } psiconv_u32 psiconv_buffer_length(const psiconv_buffer buf) { return psiconv_list_length(buf->data); } psiconv_u8 *psiconv_buffer_get(const psiconv_buffer buf, psiconv_u32 off) { return psiconv_list_get(buf->data,off); } int psiconv_buffer_add(psiconv_buffer buf,psiconv_u8 data) { return psiconv_list_add(buf->data,&data); } size_t psiconv_buffer_fread(psiconv_buffer buf, size_t size, FILE *f) { return psiconv_list_fread(buf->data,size,f); } int psiconv_buffer_fread_all(psiconv_buffer buf, FILE *f) { return psiconv_list_fread_all(buf->data,f); } int psiconv_buffer_fwrite_all(const psiconv_buffer buf, FILE *f) { return psiconv_list_fwrite_all(buf->data,f); } int psiconv_buffer_subbuffer(psiconv_buffer *buf, const psiconv_buffer org, psiconv_u32 offset, psiconv_u32 length) { int i; int res; psiconv_u8 *data; if (! (*buf = psiconv_buffer_new())) { res = PSICONV_E_NOMEM; goto ERROR1; } for (i = 0; i < length; i++) { if (!(data = psiconv_buffer_get(org,offset+i))) { res = PSICONV_E_OTHER; goto ERROR2; } if ((res = psiconv_buffer_add(*buf,*data))) { goto ERROR2; } } return 0; ERROR2: psiconv_buffer_free(*buf); ERROR1: return res; } int psiconv_buffer_concat(psiconv_buffer buf, const psiconv_buffer extra) { int res; psiconv_u32 i; psiconv_relocation reloc; for (i = 0; i < psiconv_list_length(extra->reloc_target); i++) { if (!(reloc = psiconv_list_get(extra->reloc_target,i))) return -PSICONV_E_OTHER; reloc->offset += psiconv_list_length(buf->data); if ((res=psiconv_list_add(buf->reloc_target,reloc))) return res; } for (i = 0; i < psiconv_list_length(extra->reloc_ref); i++) { if (!(reloc = psiconv_list_get(extra->reloc_ref,i))) return -PSICONV_E_OTHER; reloc->offset += psiconv_list_length(buf->data); if ((res = psiconv_list_add(buf->reloc_ref,reloc))) return res; } return psiconv_list_concat(buf->data,extra->data); } int psiconv_buffer_resolve(psiconv_buffer buf) { int res; psiconv_u32 i,j,temp; psiconv_relocation target,ref; for (i = 0; i < psiconv_list_length(buf->reloc_ref);i++) { if (!(ref = psiconv_list_get(buf->reloc_ref,i))) return -PSICONV_E_OTHER; for (j = 0; j < psiconv_list_length(buf->reloc_target);j++) { if (!(target = psiconv_list_get(buf->reloc_target,j))) return -PSICONV_E_OTHER; if (ref->id == target->id) { temp = target->offset & 0xff; if ((res = psiconv_list_replace(buf->data,ref->offset,&temp))) return -PSICONV_E_OTHER; temp = (target->offset >> 8) & 0xff; if ((res = psiconv_list_replace(buf->data,ref->offset + 1,&temp))) return -PSICONV_E_OTHER; temp = (target->offset >> 16) & 0xff; if ((res = psiconv_list_replace(buf->data,ref->offset + 2,&temp))) return -PSICONV_E_OTHER; temp = (target->offset >> 24) & 0xff; if ((res = psiconv_list_replace(buf->data,ref->offset + 3,&temp))) return -PSICONV_E_OTHER; break; } } if (j == psiconv_list_length(buf->reloc_target)) return -PSICONV_E_OTHER; } psiconv_list_empty(buf->reloc_target); psiconv_list_empty(buf->reloc_ref); return -PSICONV_E_OK; } int psiconv_buffer_add_reference(psiconv_buffer buf,int id) { struct psiconv_relocation_s reloc; int res,i; psiconv_u8 data; reloc.offset = psiconv_list_length(buf->data); reloc.id = id; if ((res = psiconv_list_add(buf->reloc_ref,&reloc))) return res; data = 0x00; for (i = 0; i < 4; i++) if ((res = psiconv_list_add(buf->data,&data))) return res; return -PSICONV_E_OK; } int psiconv_buffer_add_target(psiconv_buffer buf, int id) { struct psiconv_relocation_s reloc; reloc.offset = psiconv_list_length(buf->data); reloc.id = id; return psiconv_list_add(buf->reloc_target,&reloc); } psiconv-0.9.8/lib/psiconv/data.c0000644000175000017500000012010510336374661013446 00000000000000/* data.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "data.h" #include "list.h" #include "unicode.h" #include "error.h" #ifdef DMALLOC #include #endif static psiconv_color clone_color(psiconv_color color); static psiconv_font clone_font(psiconv_font font); static psiconv_border clone_border(psiconv_border border); static psiconv_bullet clone_bullet(psiconv_bullet bullet); static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); static void psiconv_free_style_aux(void *style); static void psiconv_free_in_line_layout_aux(void * layout); static void psiconv_free_paragraph_aux(void * paragraph); static void psiconv_free_paint_data_section_aux(void * section); static void psiconv_free_clipart_section_aux(void * section); static void psiconv_free_formula_aux(void *data); static void psiconv_free_sheet_worksheet_aux (void *data); static void psiconv_free_sheet_variable_aux(void * variable); static void psiconv_free_sheet_cell_aux(void *cell); static void psiconv_free_sheet_line_aux(void *line); static void psiconv_free_sheet_worksheet_aux (void *data); static psiconv_word_styles_section psiconv_empty_word_styles_section(void); static psiconv_text_and_layout psiconv_empty_text_and_layout(void); static psiconv_texted_section psiconv_empty_texted_section(void); static psiconv_page_header psiconv_empty_page_header(void); static psiconv_page_layout_section psiconv_empty_page_layout_section(void); static psiconv_word_status_section psiconv_empty_word_status_section(void); static psiconv_word_f psiconv_empty_word_f(void); static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void); static psiconv_formula_list psiconv_empty_formula_list(void); static psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void); static psiconv_sheet_f psiconv_empty_sheet_f(void); static psiconv_texted_f psiconv_empty_texted_f(void); static psiconv_paint_data_section psiconv_empty_paint_data_section(void); static psiconv_pictures psiconv_empty_pictures(void); static psiconv_mbm_f psiconv_empty_mbm_f(void); static psiconv_sketch_section psiconv_empty_sketch_section(void); static psiconv_sketch_f psiconv_empty_sketch_f(void); static psiconv_clipart_f psiconv_empty_clipart_f(void); static psiconv_cliparts psiconv_empty_cliparts(void); /* Note: these defaults seem to be hard-coded somewhere outside the files themself. */ psiconv_character_layout psiconv_basic_character_layout(void) { /* Make the structures static, to oblige IRIX */ static struct psiconv_color_s black = { 0x00, /* red */ 0x00, /* green */ 0x00, /* blue */ }; static struct psiconv_color_s white = { 0xff, /* red */ 0xff, /* green */ 0xff, /* blue */ }; static psiconv_ucs2 font_times[16] = { 'T','i','m','e','s',' ', 'N','e','w',' ', 'R','o','m','a','n',0 }; static struct psiconv_font_s font = { font_times, /* name */ 3 /* screenfont */ }; struct psiconv_character_layout_s cl = { &black, /* color */ &white, /* back_color */ 10.0, /* font_size */ psiconv_bool_false, /* italic */ psiconv_bool_false, /* bold */ psiconv_normalscript, /* super_sub */ psiconv_bool_false, /* underline */ psiconv_bool_false, /* strikethrough */ &font, /* font */ }; return psiconv_clone_character_layout(&cl); } /* Note: these defaults seem to be hard-coded somewhere outside the files themself. */ psiconv_paragraph_layout psiconv_basic_paragraph_layout(void) { static psiconv_ucs2 font_times[16] = { 'T','i','m','e','s',' ', 'N','e','w',' ', 'R','o','m','a','n',0 }; static struct psiconv_font_s font = { font_times, /* name */ 2 /* screenfont */ }; static struct psiconv_color_s black = { 0x00, /* red */ 0x00, /* green */ 0x00, /* blue */ }; static struct psiconv_color_s white = { 0xff, /* red */ 0xff, /* green */ 0xff, /* blue */ }; static struct psiconv_border_s no_border = { psiconv_border_none, /* kind */ 1, /* thickness */ &black /* color */ }; static struct psiconv_bullet_s bullet = { psiconv_bool_false, /* on */ 10.0, /* font_size */ 0x201d, /* character */ psiconv_bool_true, /* indent */ &black, /* color */ &font, /* font */ }; static struct psiconv_all_tabs_s tabs = { 0.64, /* normal */ NULL /* kind */ }; struct psiconv_paragraph_layout_s pl = { &white, /* back_color */ 0.0, /* indent_left */ 0.0, /* indent_right */ 0.0, /* indent_first */ psiconv_justify_left, /* justify_hor */ psiconv_justify_middle,/* justify_ver */ 10.0, /* linespacing */ psiconv_bool_false, /* linespacing_exact */ 0.0, /* space_above */ 0.0, /* space_below */ psiconv_bool_false, /* keep_together */ psiconv_bool_false, /* keep_with_next */ psiconv_bool_false, /* on_next_page */ psiconv_bool_false, /* no_widow_protection */ psiconv_bool_false, /* wrap_to_fit_cell */ 0.0, /* left_margin */ &bullet, /* bullet */ &no_border, /* left_border */ &no_border, /* right_border */ &no_border, /* top_border */ &no_border, /* bottom_border */ &tabs, /* tabs */ }; psiconv_paragraph_layout res; if (!(pl.tabs->extras = psiconv_list_new(sizeof(struct psiconv_tab_s)))) return NULL; res = psiconv_clone_paragraph_layout(&pl); psiconv_list_free(pl.tabs->extras); return res; } psiconv_color clone_color(psiconv_color color) { psiconv_color result; if (!(result = malloc(sizeof(*result)))) return NULL; *result = *color; return result; } psiconv_font clone_font(psiconv_font font) { psiconv_font result; if(!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *font; if (!(result->name = psiconv_unicode_strdup(result->name))) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_border clone_border(psiconv_border border) { psiconv_border result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *border; if(!(result->color = clone_color(result->color))) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_bullet clone_bullet(psiconv_bullet bullet) { psiconv_bullet result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *bullet; if (!(result->font = clone_font(result->font))) goto ERROR2; if (!(result->color = clone_color(result->color))) goto ERROR3; return result; ERROR3: psiconv_free_font(result->font); ERROR2: free(result); ERROR1: return NULL; } psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs) { psiconv_all_tabs result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *all_tabs; if (!(result->extras = psiconv_list_clone(result->extras))) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_character_layout psiconv_clone_character_layout (psiconv_character_layout ls) { psiconv_character_layout result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *ls; if (!(result->color = clone_color(result->color))) goto ERROR2; if (!(result->back_color = clone_color(result->back_color))) goto ERROR3; if (!(result->font = clone_font(result->font))) goto ERROR4; return result; ERROR4: psiconv_free_color(result->back_color); ERROR3: psiconv_free_color(result->color); ERROR2: free(result); ERROR1: return NULL; } psiconv_paragraph_layout psiconv_clone_paragraph_layout (psiconv_paragraph_layout ls) { psiconv_paragraph_layout result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; *result = *ls; if (!(result->back_color = clone_color(result->back_color))) goto ERROR2; if (!(result->bullet = clone_bullet(result->bullet))) goto ERROR3; if (!(result->left_border = clone_border(result->left_border))) goto ERROR4; if (!(result->right_border = clone_border(result->right_border))) goto ERROR5; if (!(result->top_border = clone_border(result->top_border))) goto ERROR6; if (!(result->bottom_border = clone_border(result->bottom_border))) goto ERROR7; if (!(result->tabs = clone_all_tabs(result->tabs))) goto ERROR8; return result; ERROR8: psiconv_free_border(result->bottom_border); ERROR7: psiconv_free_border(result->top_border); ERROR6: psiconv_free_border(result->right_border); ERROR5: psiconv_free_border(result->left_border); ERROR4: psiconv_free_bullet(result->bullet); ERROR3: psiconv_free_color(result->back_color); ERROR2: free(result); ERROR1: return NULL; } psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr) { if (nr == 0) return ss->normal; else return psiconv_list_get(ss->styles,0xff - nr); } int psiconv_find_style(const psiconv_word_styles_section ss, const psiconv_ucs2 *name, int *nr) { const psiconv_ucs2 value_normal[] = { 'N','o','r','m','a','l',0 }; psiconv_word_style style; int i; if (!nr) return PSICONV_E_OTHER; if(!psiconv_unicode_strcmp(value_normal,name)) { *nr = 0; return 0; } for (i = 0; i < psiconv_list_length(ss->styles);i++) { if (!(style = psiconv_list_get(ss->styles,i))) return PSICONV_E_NOMEM; if (!psiconv_unicode_strcmp(style->name,name)) { *nr = 0xff - i; return 0; } } *nr = 0; return PSICONV_E_OTHER; } psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr) { return psiconv_list_get(ss,psiconv_list_length(ss)-nr-1); } /* TODO: What if a cell is both in a default row and a default column?!? */ psiconv_sheet_cell_layout psiconv_get_default_layout (psiconv_sheet_line_list row_defaults, psiconv_sheet_line_list col_defaults, psiconv_sheet_cell_layout cell_default, int row,int col) { int i; psiconv_sheet_line line; for (i = 0;i < psiconv_list_length(row_defaults);i++) { line = psiconv_list_get(row_defaults,i); if (line->position == row) return line->layout; } for (i = 0;i < psiconv_list_length(col_defaults);i++) { line = psiconv_list_get(col_defaults,i); if (line->position == col) return line->layout; } return cell_default; } void psiconv_free_color (psiconv_color color) { if (color) free(color); } void psiconv_free_border(psiconv_border border) { if (border) { psiconv_free_color(border->color); free(border); } } void psiconv_free_font(psiconv_font font) { if (font) { if (font->name) free(font->name); free(font); } } void psiconv_free_bullet(psiconv_bullet bullet) { if (bullet) { psiconv_free_color(bullet->color); psiconv_free_font(bullet->font); free(bullet); } } void psiconv_free_character_layout(psiconv_character_layout layout) { if (layout) { psiconv_free_color(layout->color); psiconv_free_color(layout->back_color); psiconv_free_font(layout->font); free(layout); } } void psiconv_free_tab(psiconv_tab tab) { if (tab) free(tab); } void psiconv_free_tabs(psiconv_all_tabs tabs) { if (tabs) { psiconv_list_free(tabs->extras); free(tabs); } } void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout) { if (layout) { psiconv_free_color(layout->back_color); psiconv_free_bullet(layout->bullet); psiconv_free_border(layout->left_border); psiconv_free_border(layout->right_border); psiconv_free_border(layout->top_border); psiconv_free_border(layout->bottom_border); psiconv_free_tabs(layout->tabs); free(layout); } } void psiconv_free_style_aux(void *style) { if(((psiconv_word_style) style)->name) free(((psiconv_word_style) style)->name); psiconv_free_character_layout(((psiconv_word_style) style)->character); psiconv_free_paragraph_layout(((psiconv_word_style) style)->paragraph); } void psiconv_free_word_style(psiconv_word_style style) { if (style) { psiconv_free_style_aux(style); free(style); } } void psiconv_free_word_style_list(psiconv_word_style_list style_list) { if (style_list) psiconv_list_free_el(style_list,psiconv_free_style_aux); } void psiconv_free_word_styles_section(psiconv_word_styles_section styles) { if (styles) { psiconv_free_word_style(styles->normal); psiconv_free_word_style_list(styles->styles); free(styles); } } void psiconv_free_header_section(psiconv_header_section header) { if (header) free(header); } void psiconv_free_section_table_entry(psiconv_section_table_entry entry) { if (entry) free(entry); } void psiconv_free_section_table_section(psiconv_section_table_section section) { if (section) psiconv_list_free(section); } void psiconv_free_application_id_section(psiconv_application_id_section section) { if (section) { if (section->name) free(section->name); free(section); } } void psiconv_free_object_icon_section(psiconv_object_icon_section section) { if (section) { if (section->icon_name) free(section->icon_name); free(section); } } void psiconv_free_object_display_section(psiconv_object_display_section section) { if (section) free(section); } void psiconv_free_embedded_object_section (psiconv_embedded_object_section object) { if (object) { psiconv_free_object_icon_section(object->icon); psiconv_free_object_display_section(object->display); psiconv_free_file(object->object); free(object); } } void psiconv_free_in_line_layout_aux(void * layout) { psiconv_free_character_layout(((psiconv_in_line_layout) layout)->layout); psiconv_free_embedded_object_section (((psiconv_in_line_layout) layout)->object); } void psiconv_free_in_line_layout(psiconv_in_line_layout layout) { if (layout) { psiconv_free_in_line_layout_aux(layout); free(layout); } } void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts) { if (layouts) psiconv_list_free_el(layouts,&psiconv_free_in_line_layout_aux); } void psiconv_free_replacement(psiconv_replacement replacement) { if (replacement) free(replacement); } void psiconv_free_replacements(psiconv_replacements replacements) { if (replacements) psiconv_list_free(replacements); } void psiconv_free_paragraph_aux(void * paragraph) { if(((psiconv_paragraph) paragraph)->text) free(((psiconv_paragraph) paragraph)->text); psiconv_free_character_layout(((psiconv_paragraph) paragraph) ->base_character); psiconv_free_paragraph_layout(((psiconv_paragraph) paragraph) ->base_paragraph); psiconv_free_in_line_layouts(((psiconv_paragraph) paragraph) ->in_lines); psiconv_free_replacements(((psiconv_paragraph) paragraph) ->replacements); } void psiconv_free_paragraph(psiconv_paragraph paragraph) { if (paragraph) { psiconv_free_paragraph_aux(paragraph); free(paragraph); } } void psiconv_free_text_and_layout(psiconv_text_and_layout text) { if (text) psiconv_list_free_el(text,&psiconv_free_paragraph_aux); } void psiconv_free_texted_section(psiconv_texted_section section) { if (section) { psiconv_free_text_and_layout(section->paragraphs); free(section); } } void psiconv_free_page_header(psiconv_page_header header) { if (header) { psiconv_free_character_layout(header->base_character_layout); psiconv_free_paragraph_layout(header->base_paragraph_layout); psiconv_free_texted_section(header->text); free(header); } } void psiconv_free_page_layout_section(psiconv_page_layout_section section) { if (section) { psiconv_free_page_header(section->header); psiconv_free_page_header(section->footer); free(section); } } void psiconv_free_word_status_section(psiconv_word_status_section section) { if (section) free(section); } void psiconv_free_word_f(psiconv_word_f file) { if (file) { psiconv_free_page_layout_section(file->page_sec); psiconv_free_text_and_layout(file->paragraphs); psiconv_free_word_status_section(file->status_sec); psiconv_free_word_styles_section(file->styles_sec); free(file); } } void psiconv_free_sheet_status_section(psiconv_sheet_status_section section) { if (section) free(section); } void psiconv_free_sheet_numberformat(psiconv_sheet_numberformat numberformat) { if (numberformat) free(numberformat); } void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout) { psiconv_free_paragraph_layout(layout->paragraph); psiconv_free_character_layout(layout->character); psiconv_free_sheet_numberformat(layout->numberformat); } void psiconv_free_sheet_cell_aux(void *cell) { psiconv_sheet_cell data = cell; psiconv_free_sheet_cell_layout(data->layout); if ((data->type == psiconv_cell_string) && (data->data.dat_string)) free(data->data.dat_string); } void psiconv_free_sheet_cell(psiconv_sheet_cell cell) { if (cell) { psiconv_free_sheet_cell_aux(cell); free(cell); } } void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) { if (list) psiconv_list_free_el(list,psiconv_free_sheet_cell_aux); } void psiconv_free_sheet_line_aux(void *line) { psiconv_sheet_line data = line; psiconv_free_sheet_cell_layout(data->layout); } void psiconv_free_sheet_line(psiconv_sheet_line line) { if (line) { psiconv_free_sheet_line_aux(line); free(line); } } void psiconv_free_sheet_line_list(psiconv_sheet_line_list list) { if (list) psiconv_list_free_el(list,psiconv_free_sheet_line_aux); } void psiconv_free_sheet_grid_break_list(psiconv_sheet_grid_break_list list) { if (list) psiconv_list_free(list); } void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s) { if (s) free(s); } void psiconv_free_sheet_grid_size_list(psiconv_sheet_grid_size_list list) { if (list) psiconv_list_free(list); } void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec) { if (sec) { psiconv_free_sheet_grid_size_list(sec->row_heights); psiconv_free_sheet_grid_size_list(sec->column_heights); psiconv_free_sheet_grid_break_list(sec->row_page_breaks); psiconv_free_sheet_grid_break_list(sec->column_page_breaks); free(sec); } } void psiconv_free_sheet_worksheet_aux (void *data) { psiconv_sheet_worksheet section = data; psiconv_free_sheet_cell_layout(section->default_layout); psiconv_free_sheet_cell_list(section->cells); psiconv_free_sheet_line_list(section->row_default_layouts); psiconv_free_sheet_line_list(section->col_default_layouts); psiconv_free_sheet_grid_section(section->grid); } void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet) { if (sheet) { psiconv_free_sheet_worksheet_aux(sheet); free(sheet); } } void psiconv_free_sheet_worksheet_list(psiconv_sheet_worksheet_list list) { if (list) psiconv_list_free_el(list,psiconv_free_sheet_worksheet_aux); } void psiconv_free_formula_aux(void *data) { psiconv_formula formula; formula = data; if (formula->type == psiconv_formula_dat_string) free(formula->data.dat_string); else if ((formula->type != psiconv_formula_dat_int) && (formula->type != psiconv_formula_dat_var) && (formula->type != psiconv_formula_dat_float) && (formula->type != psiconv_formula_dat_cellref) && (formula->type != psiconv_formula_dat_cellblock) && (formula->type != psiconv_formula_dat_vcellblock) && (formula->type != psiconv_formula_mark_opsep) && (formula->type != psiconv_formula_mark_opend) && (formula->type != psiconv_formula_mark_eof) && (formula->type != psiconv_formula_unknown)) psiconv_free_formula_list(formula->data.fun_operands); } void psiconv_free_formula(psiconv_formula formula) { if (formula) { psiconv_free_formula_aux(formula); free(formula); } } void psiconv_free_formula_list(psiconv_formula_list list) { if (list) psiconv_list_free_el(list,psiconv_free_formula_aux); } void psiconv_free_sheet_name_section(psiconv_sheet_name_section section) { if (section) { if(section->name) free(section->name); free(section); } } void psiconv_free_sheet_info_section(psiconv_sheet_info_section section) { if (section) { free(section); } } void psiconv_free_sheet_variable_aux(void * variable) { psiconv_sheet_variable var = variable; if (var->name) free(var->name); if (var->type == psiconv_var_string) free(var->data.dat_string); } void psiconv_free_sheet_variable(psiconv_sheet_variable var) { if (var) { psiconv_free_sheet_variable_aux(var); free(var); } } void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list) { if (list) psiconv_list_free_el(list,psiconv_free_sheet_variable_aux); } void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) { if (section) { psiconv_free_formula_list(section->formulas); psiconv_free_sheet_worksheet_list(section->worksheets); psiconv_free_sheet_name_section(section->name); psiconv_free_sheet_info_section(section->info); psiconv_free_sheet_variable_list(section->variables); free(section); } } void psiconv_free_sheet_f(psiconv_sheet_f file) { if (file) { psiconv_free_page_layout_section(file->page_sec); psiconv_free_sheet_status_section(file->status_sec); psiconv_free_sheet_workbook_section(file->workbook_sec); free(file); } } void psiconv_free_texted_f(psiconv_texted_f file) { if (file) { psiconv_free_page_layout_section(file->page_sec); psiconv_free_texted_section(file->texted_sec); free(file); } } void psiconv_free_paint_data_section_aux(void * section) { if (((psiconv_paint_data_section) section)->red) free(((psiconv_paint_data_section)section) -> red); if (((psiconv_paint_data_section) section)->green) free(((psiconv_paint_data_section)section) -> green); if (((psiconv_paint_data_section) section)->blue) free(((psiconv_paint_data_section)section) -> blue); } void psiconv_free_paint_data_section(psiconv_paint_data_section section) { if (section) { psiconv_free_paint_data_section_aux(section); free(section); } } void psiconv_free_pictures(psiconv_pictures section) { if (section) psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux); } void psiconv_free_jumptable_section (psiconv_jumptable_section section) { if (section) psiconv_list_free(section); } void psiconv_free_mbm_f(psiconv_mbm_f file) { if (file) { psiconv_free_pictures(file->sections); free(file); } } void psiconv_free_sketch_section(psiconv_sketch_section sec) { if (sec) { psiconv_free_paint_data_section(sec->picture); free(sec); } } void psiconv_free_sketch_f(psiconv_sketch_f file) { if (file) { psiconv_free_sketch_section(file->sketch_sec); free(file); } } void psiconv_free_clipart_section_aux(void *section) { if (section) psiconv_free_paint_data_section(((psiconv_clipart_section) section)->picture); } void psiconv_free_clipart_section(psiconv_clipart_section section) { if (section) { psiconv_free_clipart_section_aux(section); free(section); } } void psiconv_free_cliparts(psiconv_cliparts section) { if (section) psiconv_list_free_el(section,&psiconv_free_clipart_section_aux); } void psiconv_free_clipart_f(psiconv_clipart_f file) { if (file) { psiconv_free_cliparts(file->sections); free(file); } } void psiconv_free_file(psiconv_file file) { if (file) { if (file->type == psiconv_word_file) psiconv_free_word_f((psiconv_word_f) file->file); else if (file->type == psiconv_texted_file) psiconv_free_texted_f((psiconv_texted_f) file->file); else if (file->type == psiconv_mbm_file) psiconv_free_mbm_f((psiconv_mbm_f) file->file); else if (file->type == psiconv_sketch_file) psiconv_free_sketch_f((psiconv_sketch_f) file->file); else if (file->type == psiconv_clipart_file) psiconv_free_clipart_f((psiconv_clipart_f) file->file); else if (file->type == psiconv_sheet_file) psiconv_free_sheet_f((psiconv_sheet_f) file->file); free(file); } } int psiconv_compare_color(const psiconv_color value1, const psiconv_color value2) { if (!value1 || !value2) return 1; if ((value1->red == value2->red) && (value1->green == value2->green) && (value1->blue == value2->blue)) return 0; else return 1; } int psiconv_compare_font(const psiconv_font value1, const psiconv_font value2) { if (!value1 || !value2 || !value1->name || !value2->name) return 1; if ((value1->screenfont == value2->screenfont) && !psiconv_unicode_strcmp(value1->name,value2->name)) return 0; else return 1; } int psiconv_compare_border(const psiconv_border value1, const psiconv_border value2) { if (!value1 || !value2) return 1; if ((value1->kind == value2->kind) && (value1->thickness == value2->thickness) && !psiconv_compare_color(value1->color,value2->color)) return 0; else return 1; } int psiconv_compare_bullet(const psiconv_bullet value1, const psiconv_bullet value2) { if (!value1 || !value2) return 1; if ((value1->on == value2->on) && (value1->font_size == value2->font_size) && (value1->character == value2->character) && (value1->indent == value2->indent) && !psiconv_compare_color(value1->color,value2->color) && !psiconv_compare_font(value1->font,value2->font)) return 0; else return 1; } int psiconv_compare_tab(const psiconv_tab value1, const psiconv_tab value2) { if (!value1 || !value2) return 1; if ((value1->location == value2->location) && (value1->kind == value2->kind)) return 0; else return 1; } int psiconv_compare_all_tabs(const psiconv_all_tabs value1, const psiconv_all_tabs value2) { int i; if (!value1 || !value2 || !value1->extras || !value2->extras) return 1; if ((value1->normal != value2->normal) || psiconv_list_length(value1->extras) != psiconv_list_length(value2->extras)) return 1; for (i = 0; i < psiconv_list_length(value1->extras); i++) if (psiconv_compare_tab(psiconv_list_get(value1->extras,i), psiconv_list_get(value2->extras,i))) return 1; return 0; } int psiconv_compare_paragraph_layout(const psiconv_paragraph_layout value1, const psiconv_paragraph_layout value2) { if (!value1 || !value2) return 1; if ((value1->indent_left == value2->indent_left) && (value1->indent_right == value2->indent_right) && (value1->indent_first == value2->indent_first) && (value1->justify_hor == value2->justify_hor) && (value1->justify_ver == value2->justify_ver) && (value1->linespacing == value2->linespacing) && (value1->space_above == value2->space_above) && (value1->space_below == value2->space_below) && (value1->keep_together == value2->keep_together) && (value1->keep_with_next == value2->keep_with_next) && (value1->on_next_page == value2->on_next_page) && (value1->no_widow_protection == value2->no_widow_protection) && (value1->border_distance == value2->border_distance) && !psiconv_compare_color(value1->back_color,value2->back_color) && !psiconv_compare_bullet(value1->bullet,value2->bullet) && !psiconv_compare_border(value1->left_border,value2->left_border) && !psiconv_compare_border(value1->right_border,value2->right_border) && !psiconv_compare_border(value1->top_border,value2->top_border) && !psiconv_compare_border(value1->bottom_border,value2->bottom_border) && !psiconv_compare_all_tabs(value1->tabs,value2->tabs)) return 0; else return 1; } int psiconv_compare_character_layout(const psiconv_character_layout value1, const psiconv_character_layout value2) { if (!value1 || !value2) return 1; if ((value1->font_size == value2->font_size) && (value1->italic == value2->italic) && (value1->bold == value2->bold) && (value1->super_sub == value2->super_sub) && (value1->underline == value2->underline) && (value1->strikethrough == value2->strikethrough) && !psiconv_compare_color(value1->color,value2->color) && !psiconv_compare_color(value1->back_color,value2->back_color) && !psiconv_compare_font(value1->font,value2->font)) return 0; else return 1; } psiconv_word_styles_section psiconv_empty_word_styles_section(void) { psiconv_word_styles_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->styles = psiconv_list_new(sizeof(struct psiconv_word_style_s)))) goto ERROR2; if (!(result->normal = malloc(sizeof(struct psiconv_word_style_s)))) goto ERROR3; if (!(result->normal->character = psiconv_basic_character_layout())) goto ERROR4; if (!(result->normal->paragraph = psiconv_basic_paragraph_layout())) goto ERROR5; result->normal->hotkey = 'N'; result->normal->name = NULL; result->normal->built_in = psiconv_bool_true; result->normal->outline_level = 0; return result; ERROR5: psiconv_free_character_layout(result->normal->character); ERROR4: free(result->normal); ERROR3: psiconv_list_free(result->styles); ERROR2: free(result); ERROR1: return NULL; } psiconv_text_and_layout psiconv_empty_text_and_layout(void) { return psiconv_list_new(sizeof(struct psiconv_paragraph_s)); } psiconv_texted_section psiconv_empty_texted_section(void) { psiconv_texted_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->paragraphs = psiconv_empty_text_and_layout())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_page_header psiconv_empty_page_header(void) { psiconv_page_header result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; result->on_first_page = psiconv_bool_true; if (!(result->base_paragraph_layout = psiconv_basic_paragraph_layout())) goto ERROR2; if (!(result->base_character_layout = psiconv_basic_character_layout())) goto ERROR3; if (!(result->text = psiconv_empty_texted_section())) goto ERROR4; return result; ERROR4: psiconv_free_character_layout(result->base_character_layout); ERROR3: psiconv_free_paragraph_layout(result->base_paragraph_layout); ERROR2: free(result); ERROR1: return NULL; } psiconv_page_layout_section psiconv_empty_page_layout_section(void) { psiconv_page_layout_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; result->first_page_nr = 1; result->header_dist = result->footer_dist = 1.27; result->left_margin = result->right_margin = 3.175; result->top_margin = result->bottom_margin = 2.54; result->page_width = 21.0; result->page_height = 29.7; result->landscape = psiconv_bool_false; if (!(result->header = psiconv_empty_page_header())) goto ERROR2; if (!(result->footer = psiconv_empty_page_header())) goto ERROR3; return result; ERROR3: psiconv_free_page_header(result->header); ERROR2: free(result); ERROR1: return NULL; } psiconv_word_status_section psiconv_empty_word_status_section(void) { psiconv_word_status_section result; if (!(result = malloc(sizeof(*result)))) return NULL; result->show_tabs = result->show_spaces = result->show_paragraph_ends = result->show_hard_minus = result->show_hard_space = result->fit_lines_to_screen = psiconv_bool_false; result->show_full_pictures = result->show_full_graphs = result->show_top_toolbar = result->show_side_toolbar = psiconv_bool_true; result->cursor_position = 0; result->display_size = 1000; return result; } psiconv_word_f psiconv_empty_word_f(void) { psiconv_word_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->page_sec = psiconv_empty_page_layout_section())) goto ERROR2; if (!(result->paragraphs = psiconv_empty_text_and_layout())) goto ERROR3; if (!(result->status_sec = psiconv_empty_word_status_section())) goto ERROR4; if (!(result->styles_sec = psiconv_empty_word_styles_section())) goto ERROR5; return result; ERROR5: psiconv_free_word_status_section(result->status_sec); ERROR4: psiconv_free_text_and_layout(result->paragraphs); ERROR3: psiconv_free_page_layout_section(result->page_sec); ERROR2: free(result); ERROR1: return NULL; } psiconv_sheet_status_section psiconv_empty_sheet_status_section(void) { psiconv_sheet_status_section result; if (!(result = malloc(sizeof(*result)))) return NULL; result->show_horizontal_scrollbar = result->show_vertical_scrollbar = psiconv_triple_auto; result->show_graph = psiconv_bool_false; result->show_top_sheet_toolbar = result->show_side_sheet_toolbar = result->show_top_graph_toolbar = result->show_side_graph_toolbar = psiconv_bool_true; result->cursor_row = result->cursor_column = 0; result->sheet_display_size = result->graph_display_size = 1000; return result; } psiconv_formula_list psiconv_empty_formula_list(void) { return psiconv_list_new(sizeof(struct psiconv_formula_s)); } psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void) { psiconv_sheet_workbook_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->formulas = psiconv_empty_formula_list())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_sheet_f psiconv_empty_sheet_f(void) { psiconv_sheet_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->page_sec = psiconv_empty_page_layout_section())) goto ERROR2; if (!(result->status_sec = psiconv_empty_sheet_status_section())) goto ERROR3; if (!(result->workbook_sec = psiconv_empty_sheet_workbook_section())) goto ERROR4; return result; ERROR4: psiconv_free_sheet_status_section(result->status_sec); ERROR3: psiconv_free_page_layout_section(result->page_sec); ERROR2: free(result); ERROR1: return NULL; } psiconv_texted_f psiconv_empty_texted_f(void) { psiconv_texted_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->page_sec = psiconv_empty_page_layout_section())) goto ERROR2; if (!(result->texted_sec = psiconv_empty_texted_section())) goto ERROR3; return result; ERROR3: psiconv_free_page_layout_section(result->page_sec); ERROR2: free(result); ERROR1: return NULL; } psiconv_paint_data_section psiconv_empty_paint_data_section(void) { psiconv_paint_data_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; /* Is this correct? */ result->xsize = result->ysize = result->pic_xsize = result->pic_ysize = 0; /* Probably forbidden... */ if (!(result->red = malloc(0))) goto ERROR2; if (!(result->green = malloc(0))) goto ERROR3; if (!(result->blue = malloc(0))) goto ERROR4; return result; ERROR4: free(result->green); ERROR3: free(result->red); ERROR2: free(result); ERROR1: return NULL; } psiconv_pictures psiconv_empty_pictures(void) { psiconv_pictures result; psiconv_paint_data_section pds; if (!(result = psiconv_list_new(sizeof(struct psiconv_paint_data_section_s)))) goto ERROR1; if (!(pds = psiconv_empty_paint_data_section())) goto ERROR2; if (psiconv_list_add(result,pds)) goto ERROR3; free(pds); return result; ERROR3: psiconv_free_paint_data_section(pds); ERROR2: psiconv_list_free(result); ERROR1: return NULL; } psiconv_mbm_f psiconv_empty_mbm_f(void) { psiconv_mbm_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->sections = psiconv_empty_pictures())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_sketch_section psiconv_empty_sketch_section(void) { psiconv_sketch_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; result->displayed_xsize = 320; result->displayed_ysize = 200; result->picture_data_x_offset = result->picture_data_y_offset = result->form_xsize = result->form_ysize = result->displayed_size_x_offset = result->displayed_size_y_offset = 0; result->magnification_x = result->magnification_y = 1.0; result->cut_left = result->cut_right = result->cut_top = result->cut_bottom = 0.0; if (!(result->picture = psiconv_empty_paint_data_section())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_sketch_f psiconv_empty_sketch_f(void) { psiconv_sketch_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->sketch_sec = psiconv_empty_sketch_section())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_cliparts psiconv_empty_cliparts(void) { /* Is this correct? */ return psiconv_list_new(sizeof(struct psiconv_clipart_section_s)); } psiconv_clipart_f psiconv_empty_clipart_f(void) { psiconv_clipart_f result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->sections = psiconv_empty_cliparts())) goto ERROR2; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_file psiconv_empty_file(psiconv_file_type_t type) { psiconv_file result; if (!(result = malloc(sizeof(*result)))) return NULL; result->type = type; if (type == psiconv_word_file) { if (!(result->file = psiconv_empty_word_f())) goto ERROR; } else if (type == psiconv_sheet_file) { if (!(result->file = psiconv_empty_sheet_f())) goto ERROR; } else if (type == psiconv_texted_file) { if (!(result->file = psiconv_empty_texted_f())) goto ERROR; } else if (type == psiconv_mbm_file) { if (!(result->file = psiconv_empty_mbm_f())) goto ERROR; } else if (type == psiconv_sketch_file) { if (!(result->file = psiconv_empty_sketch_f())) goto ERROR; } else if (type == psiconv_clipart_file) { if (!(result->file = psiconv_empty_clipart_f())) goto ERROR; } else goto ERROR; return result; ERROR: free(result); return NULL; } psiconv-0.9.8/lib/psiconv/image.c0000644000175000017500000004400610336374714013623 00000000000000/* image.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2003-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This file contains definitions used internally by generate_image.c and parse_image.c */ #include "config.h" #include "compat.h" #include #define PALET_NONE_LEN 0 psiconv_pixel_floats_t psiconv_palet_none = { PALET_NONE_LEN, NULL, NULL, NULL }; #define PALET_COLOR_4_LEN 16 static float palet_color_4_red[PALET_COLOR_4_LEN] = { 0x00/255.0, 0x55/255.0, 0x80/255.0, 0x80/255.0, /* 0x00 */ 0x00/255.0, 0xff/255.0, 0x00/255.0, 0xff/255.0, /* 0x04 */ 0xff/255.0, 0x00/255.0, 0x00/255.0, 0x80/255.0, /* 0x08 */ 0x00/255.0, 0x00/255.0, 0xaa/255.0, 0xff/255.0 /* 0x0c */ }; static float palet_color_4_green[PALET_COLOR_4_LEN] = { 0x00/255.0, 0x55/255.0, 0x00/255.0, 0x80/255.0, /* 0x00 */ 0x80/255.0, 0x00/255.0, 0xff/255.0, 0xff/255.0, /* 0x04 */ 0x00/255.0, 0xff/255.0, 0xff/255.0, 0x00/255.0, /* 0x08 */ 0x00/255.0, 0x80/255.0, 0xaa/255.0, 0xff/255.0 /* 0x0c */ }; static float palet_color_4_blue[PALET_COLOR_4_LEN] = { 0x00/255.0, 0x55/255.0, 0x00/255.0, 0x00/255.0, /* 0x00 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x04 */ 0xff/255.0, 0x00/255.0, 0xff/255.0, 0x80/255.0, /* 0x08 */ 0x80/255.0, 0x80/255.0, 0xaa/255.0, 0xff/255.0 /* 0x0c */ }; psiconv_pixel_floats_t psiconv_palet_color_4 = { PALET_COLOR_4_LEN, palet_color_4_red, palet_color_4_green, palet_color_4_blue, }; #define PALET_COLOR_8_LEN 256 static float palet_color_8_red[PALET_COLOR_8_LEN] = { 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x00 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x04 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x08 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x0c */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x10 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x14 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x18 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x1c */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x20 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x24 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x28 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x2c */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x30 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x34 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x38 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x3c */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x40 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x44 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x48 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x4c */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x50 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x54 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x58 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x5c */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x60 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x64 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x68 */ 0x11/255.0, 0x22/255.0, 0x44/255.0, 0x55/255.0, /* 0x6c */ 0x77/255.0, 0x11/255.0, 0x22/255.0, 0x44/255.0, /* 0x70 */ 0x55/255.0, 0x77/255.0, 0x00/255.0, 0x00/255.0, /* 0x74 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x78 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x7c */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x80 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x84 */ 0x00/255.0, 0x00/255.0, 0x88/255.0, 0xaa/255.0, /* 0x88 */ 0xbb/255.0, 0xdd/255.0, 0xee/255.0, 0x88/255.0, /* 0x8c */ 0xaa/255.0, 0xbb/255.0, 0xdd/255.0, 0xee/255.0, /* 0x90 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0x94 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0x98 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0x9c */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xa0 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xa4 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xa8 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xac */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xb0 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xb4 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xb8 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xbc */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xc0 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xc4 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xc8 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xcc */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xd0 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xd4 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xd8 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xdc */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xe0 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xe4 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xe8 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xec */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0, /* 0xf0 */ 0x00/255.0, 0x33/255.0, 0x66/255.0, 0x99/255.0, /* 0xf4 */ 0xcc/255.0, 0xff/255.0, 0x00/255.0, 0x33/255.0, /* 0xf8 */ 0x66/255.0, 0x99/255.0, 0xcc/255.0, 0xff/255.0 /* 0xfc */ }; static float palet_color_8_green[PALET_COLOR_8_LEN] = { 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x00 */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0x04 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x08 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x0c */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0x10 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x14 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0x18 */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0x1c */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0x20 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x24 */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0x28 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x2c */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x30 */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0x34 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x38 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0x3c */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0x40 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0x44 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x48 */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0x4c */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x50 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x54 */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0x58 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x5c */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0x60 */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0x64 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0x68 */ 0x11/255.0, 0x22/255.0, 0x44/255.0, 0x55/255.0, /* 0x6c */ 0x77/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x70 */ 0x00/255.0, 0x00/255.0, 0x11/255.0, 0x22/255.0, /* 0x74 */ 0x44/255.0, 0x55/255.0, 0x77/255.0, 0x00/255.0, /* 0x78 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x7c */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x80 */ 0x00/255.0, 0x88/255.0, 0xaa/255.0, 0xbb/255.0, /* 0x84 */ 0xdd/255.0, 0xee/255.0, 0x00/255.0, 0x00/255.0, /* 0x88 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x88/255.0, /* 0x8c */ 0xaa/255.0, 0xbb/255.0, 0xdd/255.0, 0xee/255.0, /* 0x90 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x94 */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0x98 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x9c */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0xa0 */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0xa4 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xa8 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xac */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0xb0 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xb4 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0xb8 */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0xbc */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0xc0 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0xc4 */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0xc8 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xcc */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xd0 */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0xd4 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xd8 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0xdc */ 0x00/255.0, 0x00/255.0, 0x33/255.0, 0x33/255.0, /* 0xe0 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0xe4 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0xe8 */ 0x66/255.0, 0x66/255.0, 0x99/255.0, 0x99/255.0, /* 0xec */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xf0 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xf4 */ 0xcc/255.0, 0xcc/255.0, 0xff/255.0, 0xff/255.0, /* 0xf8 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xfc */ }; static float palet_color_8_blue[PALET_COLOR_8_LEN] = { 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x00 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x04 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x08 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x0c */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x10 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x14 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x18 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x1c */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x20 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x24 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x28 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x2c */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x30 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x34 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x38 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x3c */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x40 */ 0x33/255.0, 0x33/255.0, 0x33/255.0, 0x33/255.0, /* 0x44 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x48 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x4c */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x50 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x54 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x58 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x5c */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x60 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x64 */ 0x66/255.0, 0x66/255.0, 0x66/255.0, 0x66/255.0, /* 0x68 */ 0x11/255.0, 0x22/255.0, 0x44/255.0, 0x55/255.0, /* 0x6c */ 0x77/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x70 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x74 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x11/255.0, /* 0x78 */ 0x22/255.0, 0x44/255.0, 0x55/255.0, 0x77/255.0, /* 0x7c */ 0x88/255.0, 0xaa/255.0, 0xbb/255.0, 0xdd/255.0, /* 0x80 */ 0xee/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x84 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0, /* 0x88 */ 0x00/255.0, 0x00/255.0, 0x00/255.0, 0x88/255.0, /* 0x8c */ 0xaa/255.0, 0xbb/255.0, 0xdd/255.0, 0xee/255.0, /* 0x90 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x94 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x98 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0x9c */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xa0 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xa4 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xa8 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xac */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xb0 */ 0x99/255.0, 0x99/255.0, 0x99/255.0, 0x99/255.0, /* 0xb4 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xb8 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xbc */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xc0 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xc4 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xc8 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xcc */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xd0 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xd4 */ 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, 0xcc/255.0, /* 0xd8 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xdc */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xe0 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xe4 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xe8 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xec */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xf0 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xf4 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xf8 */ 0xff/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0, /* 0xfc */ }; psiconv_pixel_floats_t psiconv_palet_color_8 = { PALET_COLOR_8_LEN, palet_color_8_red, palet_color_8_green, palet_color_8_blue, }; psiconv-0.9.8/lib/psiconv/unicode.c0000644000175000017500000002007610336374721014166 00000000000000/* unicode.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2003-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include "error.h" #include "unicode.h" #include "parse_routines.h" #include "generate_routines.h" #include #include #ifdef DMALLOC #include #endif psiconv_ucs2 table_cp1252[0x100] = { /* 0x00 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0006, 0x0007, /* 0x08 */ 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, /* 0x10 */ 0x00a0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x18 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x20 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, /* 0x28 */ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, /* 0x30 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, /* 0x38 */ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, /* 0x40 */ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, /* 0x48 */ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, /* 0x50 */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, /* 0x58 */ 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, /* 0x60 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, /* 0x68 */ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, /* 0x70 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, /* 0x78 */ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000, /* 0x80 */ 0x20ac, 0x0000, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x88 */ 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017d, 0x0000, /* 0x90 */ 0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x98 */ 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x0000, 0x017e, 0x0178, /* 0xa0 */ 0x0000, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, /* 0xa8 */ 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, /* 0xb0 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xb8 */ 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, /* 0xc0 */ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, /* 0xd8 */ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* 0xd0 */ 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, /* 0xe8 */ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, /* 0xe0 */ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, /* 0xc8 */ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* 0xf0 */ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, /* 0xf8 */ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }; /* TODO: Check the charset number, select the correct one */ extern int psiconv_unicode_select_characterset(const psiconv_config config, int charset) { switch(charset) { case 0: config->unicode = psiconv_bool_true; break; case 1: config->unicode = psiconv_bool_false; memcpy(config->unicode_table,table_cp1252, sizeof(psiconv_ucs2) * 0x100); break; default: return -1; } return 0; } psiconv_ucs2 psiconv_unicode_read_char(const psiconv_config config, psiconv_buffer buf, int lev,psiconv_u32 off, int *length,int *status) { psiconv_u8 char1,char2,char3; psiconv_ucs2 result=0; int res; int len=0; char1 = psiconv_read_u8(config,buf,lev,off+len,&res); if (res) goto ERROR; len ++; if (config->unicode) { if (char1 >= 0xf0) { res = PSICONV_E_PARSE; goto ERROR; } else if (char1 < 0x80) result = char1; else { char2 = psiconv_read_u8(config,buf,lev,off+len,&res); len ++; if ((char2 & 0xc0) != 0x80) { res = PSICONV_E_PARSE; goto ERROR; } if (char1 < 0xe0) result = ((char1 & 0x1f) << 6) | (char2 & 0x3f); else { char3 = psiconv_read_u8(config,buf,lev,off+len,&res); len ++; if ((char3 & 0xc0) != 0x80) { res = PSICONV_E_PARSE; goto ERROR; } result = ((char1 & 0x0f) << 12) | ((char2 & 0x3f) << 6) | (char3 & 0x3f); } } } else result = config->unicode_table[char1]?config->unicode_table[char1]: config->unknown_unicode_char; ERROR: if (length) *length = len; if (status) *status = res; return result; } int psiconv_unicode_write_char(const psiconv_config config, psiconv_buffer buf, int lev, psiconv_ucs2 value) { int i; int res=0; if (config->unicode) { if (value < 0x80) { if ((res = psiconv_write_u8(config,buf,lev,value))) goto ERROR; } else if (value < 0x800) { if ((res = psiconv_write_u8(config,buf,lev,0xc0 | (value >> 6)))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev,0x80 | (value & 0x3f)))) goto ERROR; } else { if ((res = psiconv_write_u8(config,buf,lev,0xe0 | (value >> 12)))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev,0x80 | ((value >> 6) & 0x3f)))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev,0x80 | (value & 0x3f)))) goto ERROR; } } else { for (i = 0; i < 256; i++) if (config->unicode_table[i] == value) break; if ((res = psiconv_write_u8(config,buf,lev, i == 256?config->unknown_epoc_char:i))) goto ERROR; } ERROR: return res; } int psiconv_unicode_strlen(const psiconv_ucs2 *input) { int i = 0; while (input[i]) i++; return i; } psiconv_ucs2 *psiconv_unicode_strdup(const psiconv_ucs2 *input) { psiconv_ucs2 *output; int i = 0; if (!(output = malloc(sizeof(*output) * (1 + psiconv_unicode_strlen(input))))) return NULL; while ((output[i] = input[i])) i++; return output; } int psiconv_unicode_strcmp(const psiconv_ucs2 *str1, const psiconv_ucs2 *str2) { int i = 0; while (str1[i] && str2[i]) { if (str1[i] < str2[i]) return -1; if (str1[i] > str2[i]) return 1; i++; } if (str1[i] < str2[i]) return -1; else if (str1[i] > str2[i]) return 1; else return 0; } psiconv_ucs2 *psiconv_unicode_empty_string(void) { psiconv_ucs2 *result; result = malloc(sizeof(psiconv_ucs2)); if (result) result[0] = 0; return result; } psiconv_ucs2 *psiconv_unicode_from_list(psiconv_list input) { psiconv_ucs2 *result; int i; psiconv_ucs2 *character; if (!(result = malloc(sizeof(psiconv_ucs2) * (psiconv_list_length(input)+1)))) goto ERROR1; for (i = 0; i < psiconv_list_length(input); i++) { if (!(character = psiconv_list_get(input,i))) goto ERROR2; result[i] = *character; } result[i] = 0; return result; ERROR2: free(result); ERROR1: return NULL; } psiconv_ucs2 *psiconv_unicode_strstr(const psiconv_ucs2 *haystack, const psiconv_ucs2 *needle) { int i,j,haystack_len,needle_len; haystack_len = psiconv_unicode_strlen(haystack); needle_len = psiconv_unicode_strlen(needle); for (i = 0; i < haystack_len - needle_len + 1; i++) { for (j = 0; j < needle_len; j++) if (haystack[i+j] != needle[j]) break; if (j == needle_len) return (psiconv_ucs2 *) haystack+i; } return NULL; } psiconv-0.9.8/lib/psiconv/parse_common.c0000644000175000017500000012604010336374671015224 00000000000000/* parse_common.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif static int psiconv_parse_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, psiconv_word_styles_section styles, int with_styles); static psiconv_file_type_t psiconv_determine_embedded_object_type (const psiconv_config config, const psiconv_buffer buf,int lev, int *status); int psiconv_parse_header_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_header_section *result) { int res=0; int len=0; psiconv_u32 temp; psiconv_progress(config,lev+1,off+len,"Going to read the header section"); if (!((*result) = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read UID1 to UID3"); (*result)->uid1 = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"UID1: %08x",(*result)->uid1); if ((*result)->uid1 == PSICONV_ID_CLIPART) { /* That's all folks... */ (*result)->file = psiconv_clipart_file; (*result)->uid2 = 0; (*result)->uid3 = 0; (*result)->checksum = 0; len += 4; psiconv_debug(config,lev+2,off+len,"File is a Clipart file"); goto DONE; } if ((*result)->uid1 != PSICONV_ID_PSION5) { psiconv_error(config,lev+2,off+len, "UID1 has unknown value. This is probably " "not a (parsable) Psion 5 file"); res = -PSICONV_E_PARSE; goto ERROR2; } len += 4; (*result)->uid2 = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"UID2: %08x",(*result)->uid2); len += 4; (*result)->uid3 = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"UID3: %08x",(*result)->uid3); len += 4; (*result)->file = psiconv_unknown_file; if ((*result)->uid1 == PSICONV_ID_PSION5) { if ((*result)->uid2 == PSICONV_ID_DATA_FILE) { if ((*result)->uid3 == PSICONV_ID_WORD) { (*result)->file = psiconv_word_file; psiconv_debug(config,lev+2,off+len,"File is a Word file"); } else if ((*result)->uid3 == PSICONV_ID_TEXTED) { (*result)->file = psiconv_texted_file; psiconv_debug(config,lev+2,off+len,"File is a TextEd file"); } else if ((*result)->uid3 == PSICONV_ID_SKETCH) { (*result)->file = psiconv_sketch_file; psiconv_debug(config,lev+2,off+len,"File is a Sketch file"); } else if ((*result)->uid3 == PSICONV_ID_SHEET) { (*result)->file = psiconv_sheet_file; psiconv_debug(config,lev+2,off+len,"File is a Sheet file"); } } else if ((*result)->uid2 == PSICONV_ID_MBM_FILE) { (*result)->file = psiconv_mbm_file; if ((*result)->uid3 != 0x00) psiconv_warn(config,lev+2,off+len,"UID3 set in MBM file?!?"); psiconv_debug(config,lev+2,off+len,"File is a MBM file"); } } if ((*result)->file == psiconv_unknown_file) { psiconv_warn(config,lev+2,off+len,"Unknown file type"); (*result)->file = psiconv_unknown_file; } psiconv_progress(config,lev+2,off+len,"Checking UID4"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == psiconv_checkuid((*result)->uid1,(*result)->uid2, (*result)->uid3)) psiconv_debug(config,lev+2,off+len,"Checksum %08x is correct",temp); else { psiconv_error(config,lev+2,off+len,"Checksum failed, file corrupted!"); psiconv_debug(config,lev+2,off+len,"Expected checksum %08x, found %08x", psiconv_checkuid((*result)->uid1,(*result)->uid2, (*result)->uid3),temp); res = -PSICONV_E_PARSE; goto ERROR2; } len += 4; DONE: if (length) *length = len; psiconv_progress(config,lev+1,off+len-1, "End of Header Section (total length: %08x)",len); return res; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Header Section failed"); if (length) *length = 0; if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_section_table_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_section_table_section *result) { int res=0; int len=0; psiconv_section_table_entry entry; int i; psiconv_u8 nr; psiconv_progress(config,lev+1,off+len,"Going to read the section table section"); if (!(*result = psiconv_list_new(sizeof(*entry)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the section table length"); nr = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Length: %08x",nr); if (nr & 0x01) { psiconv_warn(config,lev+2,off+len, "Section table length odd - ignoring last entry"); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the section table entries"); entry = malloc(sizeof(*entry)); for (i = 0; i < nr / 2; i++) { entry->id = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off + len,"Entry %d: ID = %08x",i,entry->id); len += 0x04; entry->offset = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off +len,"Entry %d: Offset = %08x",i,entry->offset); len += 0x04; if ((res=psiconv_list_add(*result,entry))) goto ERROR3; } free(entry); if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of section table section " "(total length: %08x)", len); return 0; ERROR3: free(entry); ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Section Table Section failed"); if (length) *length = 0; if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_application_id_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_application_id_section *result) { int res=0; int len=0; int leng; psiconv_progress(config,lev+1,off,"Going to read the application id section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the type identifier"); (*result)->id = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Identifier: %08x",(*result)->id); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the application id string"); (*result)->name = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; len += leng; if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of application id section " "(total length: %08x", len); return res; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Application ID Section failed"); if (length) *length = 0; if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_text_section(const psiconv_config config, const psiconv_buffer buf,int lev,psiconv_u32 off, int *length,psiconv_text_and_layout *result) { int res = 0; int len=0; psiconv_u32 text_len; psiconv_paragraph para; psiconv_ucs2 temp; psiconv_list line; int nr; int i,leng; char *str_copy; psiconv_progress(config,lev+1,off,"Going to parse the text section"); if(!(*result = psiconv_list_new(sizeof(*para)))) goto ERROR1; if (!(para = malloc(sizeof(*para)))) goto ERROR2; psiconv_progress(config,lev+2,off,"Reading the text length"); text_len = psiconv_read_X(config,buf,lev+2,off,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off,"Length: %08x",text_len); len += leng; if (!(line = psiconv_list_new(sizeof(psiconv_ucs2)))) goto ERROR3; i = 0; nr = 0; while (i < text_len) { temp = psiconv_unicode_read_char(config,buf,lev+2,off+len+i,&leng,&res); if (res) goto ERROR4; if (i + leng > text_len) { psiconv_error(config,lev+2,off+len+i,"Malformed text section"); res = PSICONV_E_PARSE; goto ERROR4; } if ((temp == 0x06) || (i + leng == text_len)) { if (!(para->text = psiconv_unicode_from_list(line))) goto ERROR4; if (!(str_copy = psiconv_make_printable(config,para->text))) goto ERROR5; psiconv_debug(config,lev+2,off+i+len,"Line %d: %d characters",nr, strlen(str_copy) +1); psiconv_debug(config,lev+2,off+i+len,"Line %d: `%s'",nr,str_copy); free(str_copy); i += leng; if (!(para->in_lines = psiconv_list_new(sizeof( struct psiconv_in_line_layout_s)))) goto ERROR5; if (!(para->replacements = psiconv_list_new(sizeof( struct psiconv_replacement_s)))) goto ERROR6; if (!(para->base_character = psiconv_basic_character_layout())) goto ERROR7; if (!(para->base_paragraph = psiconv_basic_paragraph_layout())) goto ERROR8; para->base_style = 0; if ((res = psiconv_list_add(*result,para))) goto ERROR9; psiconv_progress(config,lev+2,off+len+i,"Starting a new line"); psiconv_list_empty(line); nr ++; } else { if ((res = psiconv_list_add(line,&temp))) goto ERROR4; i += leng; } } psiconv_list_free(line); free(para); len += text_len; if (length) *length = len; psiconv_progress(config,lev+1,off+len-1, "End of text section (total length: %08x", len); return res; ERROR9: psiconv_free_paragraph_layout(para->base_paragraph); ERROR8: psiconv_free_character_layout(para->base_character); ERROR7: psiconv_list_free(para->replacements); ERROR6: psiconv_list_free(para->in_lines); ERROR5: free(para->text); ERROR4: psiconv_list_free(line); ERROR3: free(para); ERROR2: psiconv_free_text_and_layout(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Text Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } /* First do a parse_text_section, or you will get into trouble here */ int psiconv_parse_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, psiconv_word_styles_section styles, int with_styles) { int res = 0; int len = 0; psiconv_u32 temp; int parse_styles,nr,i,j,total,leng,line_length; typedef struct anon_style_s { int nr; psiconv_s16 base_style; psiconv_character_layout character; psiconv_paragraph_layout paragraph; } *anon_style; typedef psiconv_list anon_style_list; /* of struct anon_style */ anon_style_list anon_styles; struct anon_style_s anon; anon_style anon_ptr=NULL; psiconv_character_layout temp_char; psiconv_paragraph_layout temp_para; psiconv_word_style temp_style; psiconv_paragraph para; struct psiconv_in_line_layout_s in_line; int *inline_count; psiconv_progress(config,lev+1,off,"Going to read the layout section"); psiconv_progress(config,lev+2,off,"Going to read the section type"); temp = psiconv_read_u16(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,off+len,"Type: %02x",temp); parse_styles = with_styles; if ((temp == 0x0001) && !with_styles) { psiconv_warn(config,lev+2,off+len,"Styleless layout section expected, " "but styled section found!"); parse_styles = 1; } else if ((temp == 0x0000) && (with_styles)) { psiconv_warn(config,lev+2,off+len,"Styled layout section expected, " "but styleless section found!"); parse_styles = 0; } else if ((temp != 0x0000) && (temp != 0x0001)) { psiconv_warn(config,lev+2,off+len, "Layout section type indicator has unknown value!"); } len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read paragraph type list"); if (!(anon_styles = psiconv_list_new(sizeof(anon)))) goto ERROR1; psiconv_progress(config,lev+3,off+len,"Going to read paragraph type list length"); nr = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+3,off+len,"Length: %02x",nr); len ++; psiconv_progress(config,lev+3,off+len, "Going to read the paragraph type list elements"); for (i = 0; i < nr; i ++) { psiconv_progress(config,lev+3,off+len,"Element %d",i); anon.nr = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+4,off+len,"Number: %08x",anon.nr); len += 0x04; psiconv_progress(config,lev+4,off,"Going to determine the base style"); if (parse_styles) { temp = psiconv_read_u32(config,buf,lev+4, off+len,&res); if (res) goto ERROR3; anon.base_style = psiconv_read_u8(config,buf,lev+3, off+len+4+temp,&res); if (res) goto ERROR3; psiconv_debug(config,lev+4,off+len+temp, "Style indicator: %02x",anon.base_style); } else anon.base_style = 0; if (!(temp_style = psiconv_get_style(styles,anon.base_style))) { psiconv_warn(config,lev+4,off,"Unknown Style referenced"); if (!(temp_style = psiconv_get_style(styles,anon.base_style))) { psiconv_warn(config,lev+4,off,"Base style unknown"); goto ERROR3; } } if (!(anon.paragraph = psiconv_clone_paragraph_layout (temp_style->paragraph))) goto ERROR3; if (!(anon.character = psiconv_clone_character_layout (temp_style->character))) goto ERROR3_1; psiconv_progress(config,lev+4,off+len,"Going to read the paragraph layout"); if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+4,off+len,&leng, anon.paragraph))) goto ERROR3_2; len += leng; if (parse_styles) len ++; psiconv_progress(config,lev+4,off+len,"Going to read the character layout"); if ((res = psiconv_parse_character_layout_list(config,buf,lev+4,off+len,&leng, anon.character))) goto ERROR3_2; len += leng; if ((res = psiconv_list_add(anon_styles,&anon))) goto ERROR3_2; } psiconv_progress(config,lev+2,off+len,"Going to parse the paragraph element list"); psiconv_progress(config,lev+3,off+len,"Going to read the number of paragraphs"); nr = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR3; if (nr != psiconv_list_length(result)) { psiconv_warn(config,lev+3,off+len, "Number of text paragraphs and paragraph elements does not match"); psiconv_debug(config,lev+3,off+len, "%d text paragraphs, %d paragraph elements", psiconv_list_length(result),nr); } psiconv_debug(config,lev+3,off+len,"Number of paragraphs: %d",nr); len += 4; if (!(inline_count = malloc(nr * sizeof(*inline_count)))) goto ERROR3; psiconv_progress(config,lev+3,off+len,"Going to read the paragraph elements"); for (i = 0; i < nr; i ++) { psiconv_progress(config,lev+3,off+len,"Element %d",i); if (i >= psiconv_list_length(result)) { psiconv_debug(config,lev+4,off+len,"Going to allocate a new element"); if (!(para = malloc(sizeof(*para)))) goto ERROR4; if (!(para->in_lines = psiconv_list_new(sizeof( struct psiconv_in_line_layout_s)))) goto ERROR4_1; para->base_style = 0; if (!(para->base_character = psiconv_basic_character_layout())) goto ERROR4_2; if (!(para->base_paragraph = psiconv_basic_paragraph_layout())) goto ERROR4_3; if ((res = psiconv_list_add(result,para))) goto ERROR4_4; free(para); } if (!(para = psiconv_list_get(result,i))) goto ERROR4; psiconv_progress(config,lev+4,off+len,"Going to read the paragraph length"); temp = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR4; if (temp != psiconv_unicode_strlen(para->text)+1) { psiconv_warn(config,lev+4,off+len, "Disagreement of the length of paragraph in layout section"); psiconv_debug(config,lev+4,off+len, "Paragraph length: layout section says %d, counted %d", temp,psiconv_unicode_strlen(para->text)+1); } else psiconv_debug(config,lev+4,off+len,"Paragraph length: %d",temp); len += 4; psiconv_progress(config,lev+4,off+len,"Going to read the paragraph type"); temp = psiconv_read_u8(config,buf,lev+4,off+len,&res); if (res) goto ERROR4; if (temp != 0x00) { psiconv_debug(config,lev+4,off+len,"Type: %02x",temp); for (j = 0; j < psiconv_list_length(anon_styles); j++) { if (!(anon_ptr = psiconv_list_get(anon_styles,j))) { psiconv_error(config,lev+4,off+len,"Data structure corruption"); goto ERROR4; } if (temp == anon_ptr->nr) break; } if (j == psiconv_list_length(anon_styles)) { psiconv_warn(config,lev+4,off+len,"Layout section paragraph type unknown"); psiconv_debug(config,lev+4,off+len,"Unknown type - using base styles instead"); para->base_style = 0; if (!(temp_style = psiconv_get_style(styles,0))) { psiconv_error(config,lev+4,off,"Base style unknown"); goto ERROR4; } if (!(temp_para = psiconv_clone_paragraph_layout (temp_style->paragraph))) goto ERROR4; psiconv_free_paragraph_layout(para->base_paragraph); para->base_paragraph = temp_para; if (!(temp_char = psiconv_clone_character_layout (temp_style->character))) goto ERROR4; psiconv_free_character_layout(para->base_character); para->base_character = temp_char; } else { para->base_style = anon_ptr->base_style; if (!(temp_para = psiconv_clone_paragraph_layout (anon_ptr->paragraph))) goto ERROR4; psiconv_free_paragraph_layout(para->base_paragraph); para->base_paragraph = temp_para; if (!(temp_char = psiconv_clone_character_layout (anon_ptr->character))) goto ERROR4; psiconv_free_character_layout(para->base_character); para->base_character = temp_char; } inline_count[i] = 0; len += 0x01; } else { psiconv_debug(config,lev+4,off+len,"Type: %02x (not based on a paragraph type)" ,temp); len += 0x01; if (parse_styles) { temp = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR4; psiconv_progress(config,lev+4,off+len+temp+4, "Going to read the paragraph element base style"); temp = psiconv_read_u8(config,buf,lev+4, off+len+temp+4,&res); if (res) goto ERROR4; psiconv_debug(config,lev+4,off+len+temp+4, "Style: %02x",temp); } else temp = 0x00; if (!(temp_style = psiconv_get_style (styles,temp))) { psiconv_warn(config,lev+4,off,"Unknown Style referenced"); if (!(temp_style = psiconv_get_style(styles,0))) { psiconv_error(config,lev+4,off,"Base style unknown"); goto ERROR4; } } if (!(temp_para = psiconv_clone_paragraph_layout(temp_style->paragraph))) goto ERROR4; psiconv_free_paragraph_layout(para->base_paragraph); para->base_paragraph = temp_para; if (!(temp_char = psiconv_clone_character_layout(temp_style->character))) goto ERROR4; psiconv_free_character_layout(para->base_character); para->base_character = temp_char; para->base_style = temp; psiconv_progress(config,lev+4,off+len,"Going to read paragraph layout"); if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+4,off+len,&leng, para->base_paragraph))) goto ERROR4; len += leng; if (parse_styles) len += 1; psiconv_progress(config,lev+4,off+len,"Going to read number of in-line " "layout elements"); inline_count[i] = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR4; psiconv_debug(config,lev+4,off+len,"Nr: %08x",inline_count[i]); len += 4; } } psiconv_progress(config,lev+2,off+len,"Going to read the text layout inline list"); psiconv_progress(config,lev+3,off+len,"Going to read the number of elements"); nr = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR4; psiconv_debug(config,lev+3,off+len,"Elements: %08x",nr); len += 0x04; psiconv_progress(config,lev+3,off+len, "Going to read the text layout inline elements"); total = 0; for (i = 0; i < psiconv_list_length(result); i++) { if (!(para = psiconv_list_get(result,i))) { psiconv_error(config,lev+3,off+len,"Data structure corruption"); goto ERROR4; } line_length = -1; for (j = 0; j < inline_count[i]; j++) { psiconv_progress(config,lev+3,off+len,"Element %d: Paragraph %d, element %d", total,i,j); if (total >= nr) { psiconv_warn(config,lev+3,off+len, "Layout section inlines: not enough element"); psiconv_debug(config,lev+3,off+len,"Can't read element!"); } else { total ++; in_line.object = NULL; in_line.layout = NULL; if (!(in_line.layout = psiconv_clone_character_layout (para->base_character))) goto ERROR4; psiconv_progress(config,lev+4,off+len,"Going to read the element type"); temp = psiconv_read_u8(config,buf,lev+4,len+off,&res); if (res) goto ERROR5; len += 1; psiconv_debug(config,lev+4,off+len,"Type: %02x",temp); psiconv_progress(config,lev+4,off+len, "Going to read the number of characters it applies to"); in_line.length = psiconv_read_u32(config,buf,lev+4,len+off,&res); if (res) goto ERROR5; psiconv_debug(config,lev+4,off+len,"Length: %02x",in_line.length); len += 4; psiconv_progress(config,lev+4,off+len,"Going to read the character layout"); if ((res = psiconv_parse_character_layout_list(config,buf,lev+4,off+len,&leng, in_line.layout))) goto ERROR5; len += leng; if (temp == 0x01) { psiconv_debug(config,lev+4,off+len,"Found an embedded object"); psiconv_progress(config,lev+4,off+len,"Going to read the object marker " "(0x%08x expected)",PSICONV_ID_OBJECT); temp = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR5; if (temp != PSICONV_ID_OBJECT) { psiconv_warn(config,lev+4,off+len,"Unknown id marks embedded object"); psiconv_debug(config,lev+4,off+len,"Marker: read %08x, expected %08x", temp,PSICONV_ID_OBJECT); } len += 4; psiconv_progress(config,lev+4,off+len, "Going to read the Embedded Object Section offset"); temp = psiconv_read_u32(config,buf,lev+4,off+len,&res); if (res) goto ERROR5; psiconv_debug(config,lev+4,off+len, "Offset: %08x",temp); len += 4; psiconv_progress(config,lev+4,off+len, "Going to parse the Embedded Object Section"); if ((res = psiconv_parse_embedded_object_section(config,buf,lev+4,temp, NULL,&(in_line.object)))) goto ERROR5; psiconv_progress(config,lev+4,off+len, "Going to read the object width"); in_line.object_width = psiconv_read_length(config,buf,lev+4,off+len, &leng,&res); if (res) goto ERROR5; psiconv_debug(config,lev+4,off+len,"Object width: %f cm", in_line.object_width); len += leng; psiconv_progress(config,lev+4,off+len, "Going to read the object height"); in_line.object_height = psiconv_read_length(config,buf,lev+4,off+len,&leng, &res); if (res) goto ERROR5; psiconv_debug(config,lev+4,off+len,"Object height: %f cm", in_line.object_height); len += leng; } else if (temp != 0x00) { psiconv_warn(config,lev+4,off+len,"Layout section unknown inline type"); } if (line_length + in_line.length > psiconv_unicode_strlen(para->text)) { psiconv_warn(config,lev+4,off+len, "Layout section inlines: line length mismatch"); res = -1; in_line.length = psiconv_unicode_strlen(para->text) - line_length; } line_length += in_line.length; if ((res = psiconv_list_add(para->in_lines,&in_line))) goto ERROR5; } } } if (total != nr) { psiconv_warn(config,lev+4,off+len, "Layout section too many inlines, skipping remaining"); } free(inline_count); for (i = 0 ; i < psiconv_list_length(anon_styles); i ++) { if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { psiconv_error(config,lev+4,off+len,"Data structure corruption"); goto ERROR2; } psiconv_free_character_layout(anon_ptr->character); psiconv_free_paragraph_layout(anon_ptr->paragraph); } psiconv_list_free(anon_styles); if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of layout section (total length: %08x)", len); return 0; ERROR4_4: psiconv_free_paragraph_layout(para->base_paragraph); ERROR4_3: psiconv_free_character_layout(para->base_character); ERROR4_2: psiconv_list_free(para->in_lines); ERROR4_1: free(para); goto ERROR4; ERROR3_2: psiconv_free_character_layout(anon.character); ERROR3_1: psiconv_free_paragraph_layout(anon.paragraph); goto ERROR3; ERROR5: if (in_line.layout) psiconv_free_character_layout(in_line.layout); if (in_line.object) psiconv_free_embedded_object_section(in_line.object); ERROR4: free(inline_count); ERROR3: for (i = 0; i < psiconv_list_length(anon_styles); i++) { if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { psiconv_error(config,lev+1,off,"Data structure corruption"); break; } psiconv_free_paragraph_layout(anon_ptr->paragraph); psiconv_free_character_layout(anon_ptr->character); } ERROR2: psiconv_list_free(anon_styles); ERROR1: psiconv_error(config,lev+1,off,"Reading of Layout Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_styled_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, psiconv_word_styles_section styles) { return psiconv_parse_layout_section(config,buf,lev,off,length,result,styles,1); } int psiconv_parse_styleless_layout_section(const psiconv_config config, const psiconv_buffer buf, int lev,psiconv_u32 off, int *length, psiconv_text_and_layout result, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para) { int res = 0; psiconv_word_styles_section styles_section; if (!(styles_section = malloc(sizeof(*styles_section)))) goto ERROR1; if (!(styles_section->normal = malloc(sizeof(*styles_section->normal)))) goto ERROR2; if (!(styles_section->normal->character = psiconv_clone_character_layout(base_char))) goto ERROR3; if (!(styles_section->normal->paragraph = psiconv_clone_paragraph_layout(base_para))) goto ERROR4; styles_section->normal->hotkey = 0; if (!(styles_section->normal->name = psiconv_unicode_empty_string())) goto ERROR5; if (!(styles_section->styles = psiconv_list_new(sizeof( struct psiconv_word_style_s)))) goto ERROR6; res = psiconv_parse_layout_section(config,buf,lev,off,length,result, styles_section,0); psiconv_free_word_styles_section(styles_section); return res; ERROR6: free(styles_section->normal->name); ERROR5: psiconv_free_paragraph_layout(styles_section->normal->paragraph); ERROR4: psiconv_free_character_layout(styles_section->normal->character); ERROR3: free(styles_section->normal); ERROR2: free(styles_section); ERROR1: psiconv_error(config,lev+1,off,"Reading of Styleless Layout Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_embedded_object_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_embedded_object_section *result) { int res=0; int len=0; int leng,i; psiconv_section_table_section table; psiconv_section_table_entry entry; psiconv_u32 icon_sec=0,display_sec=0,table_sec=0; psiconv_buffer subbuf; psiconv_progress(config,lev+1,off+len,"Going to read an Embedded Object"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the Embedded Object Section"); psiconv_parse_section_table_section(config,buf,lev+2,off+len,&leng,&table); len += leng; for (i = 0; i < psiconv_list_length(table); i++) { psiconv_progress(config,lev+2,off+len,"Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR2; if (entry->id == PSICONV_ID_OBJECT_DISPLAY_SECTION) { display_sec = entry->offset; psiconv_debug(config,lev+3,off+len,"Found the Object Display Section at %08x", display_sec); } else if (entry->id == PSICONV_ID_OBJECT_ICON_SECTION) { icon_sec = entry->offset; psiconv_debug(config,lev+3,off+len,"Found the Object Icon Section at %08x", icon_sec); } else if (entry->id == PSICONV_ID_OBJECT_SECTION_TABLE_SECTION) { table_sec = entry->offset; psiconv_debug(config,lev+3,off+len,"Found the Object Section Table Section at %08x", table_sec); } else { psiconv_warn(config,lev+3,off+len, "Found unknown section in the Object Display Section " "(ignoring)"); psiconv_debug(config,lev+3,off+len,"Section ID %08x, offset %08x", entry->id, entry->offset); } } psiconv_progress(config,lev+2,off+len,"Looking for the Object Display Section"); if (!icon_sec) { psiconv_warn(config,lev+2,off+len,"Object Display Section not found"); (*result)->display = NULL; } else { psiconv_debug(config,lev+2,off+len,"Object Display Section at offset %08x", display_sec); if ((res = psiconv_parse_object_display_section(config,buf,lev+2,display_sec,NULL, &(*result)->display))) goto ERROR2; } psiconv_progress(config,lev+2,off+len,"Looking for the Object Icon Section"); if (!icon_sec) { psiconv_warn(config,lev+2,off+len,"Object Icon Section not found"); (*result)->icon = NULL; } else { psiconv_debug(config,lev+2,off+len,"Object Icon Section at offset %08x",icon_sec); if ((res = psiconv_parse_object_icon_section(config,buf,lev+2,icon_sec,NULL, &(*result)->icon))) goto ERROR3; } psiconv_progress(config,lev+2,off+len, "Looking for the Section Table Offset Section"); if (!table_sec) { psiconv_warn(config,lev+2,off+len, "Embedded Section Table Offset Section not found"); (*result)->object = NULL; } else { psiconv_progress(config,lev+2,off+len, "Extracting object: add %08x to all following offsets", table_sec); /* We can't determine the length of the object, so we just take it all */ if ((res = psiconv_buffer_subbuffer(&subbuf,buf,table_sec, psiconv_buffer_length(buf)-table_sec))) goto ERROR4; if (!((*result)->object = malloc(sizeof(*(*result)->object)))) goto ERROR5; /* We need to find the file type, but we don't have a normal header */ /* So we try to find the Application ID Section and hope for the best */ psiconv_progress(config,lev+3,0,"Trying to determine the file type"); (*result)->object->type = psiconv_determine_embedded_object_type (config,subbuf,lev+3,&res); switch ((*result)->object->type) { case psiconv_word_file: if ((res = psiconv_parse_word_file(config,subbuf,lev+3,0, ((psiconv_word_f *) &(*result)->object->file)))) goto ERROR6; break; case psiconv_texted_file: if ((res = psiconv_parse_texted_file(config,subbuf,lev+3,0, ((psiconv_texted_f *) &(*result)->object->file)))) goto ERROR6; break; case psiconv_sheet_file: if ((res = psiconv_parse_sheet_file(config,subbuf,lev+3,0, ((psiconv_sheet_f *) &(*result)->object->file)))) goto ERROR6; break; case psiconv_sketch_file: if ((res = psiconv_parse_sketch_file(config,subbuf,lev+3,0, ((psiconv_sketch_f *) &(*result)->object->file)))) goto ERROR6; break; default: psiconv_warn(config,lev+3,0,"Can't parse embedded object (still continuing)"); (*result)->object->file = NULL; } } psiconv_buffer_free(subbuf); psiconv_free_section_table_section(table); if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of Embedded Object Section " "(total length: %08x)",len); return res; ERROR6: free((*result)->object); ERROR5: psiconv_buffer_free(subbuf); ERROR4: psiconv_free_object_icon_section((*result)->icon); ERROR3: psiconv_free_object_display_section((*result)->display); ERROR2: psiconv_free_section_table_section(table); ERROR1: psiconv_error(config,lev+1,off,"Reading Embedded Object failed"); if (length) *length = 0; if (res == 0) return -PSICONV_E_NOMEM; else return res; } psiconv_file_type_t psiconv_determine_embedded_object_type (const psiconv_config config, const psiconv_buffer buf,int lev, int *status) { psiconv_u32 off; psiconv_section_table_section table; int res,i; psiconv_file_type_t file_type = psiconv_unknown_file; psiconv_section_table_entry entry; psiconv_application_id_section applid; psiconv_progress(config,lev+1,0,"Going to determine embedded object file type"); psiconv_progress(config,lev+2,0,"Going to read the Section Table Offset Section"); off = psiconv_read_u32(config,buf,lev,0,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,0,"Offset: %08x",off); psiconv_progress(config,lev+2,off,"Going to read the Section Table Section"); if ((res = psiconv_parse_section_table_section(config,buf,lev+2,off,NULL,&table))) goto ERROR1; psiconv_progress(config,lev+2,off,"Going to search the Section Table Section " "for the Application ID Section"); for (i=0; i < psiconv_list_length(table); i++) { psiconv_progress(config,lev+3,off,"Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR2; if (entry->id == PSICONV_ID_APPL_ID_SECTION) { psiconv_progress(config,lev+3,off, "Found the Application ID Section at offset %08x", entry->offset); off = entry->offset; break; } } if (i == psiconv_list_length(table)) { psiconv_error(config,lev+2,off,"No Application ID Section found"); res = PSICONV_E_PARSE; goto ERROR2; } psiconv_progress(config,lev+2,off,"Going to read the Application ID Section"); if ((res = psiconv_parse_application_id_section(config,buf,lev+2,off,NULL,&applid))) goto ERROR2; switch (applid->id) { case PSICONV_ID_WORD: file_type = psiconv_word_file; psiconv_debug(config,lev+2,off,"Found a Word file"); break; case PSICONV_ID_TEXTED: file_type = psiconv_texted_file; psiconv_debug(config,lev+2,off,"Found a TextEd file"); break; case PSICONV_ID_SKETCH: file_type = psiconv_sketch_file; psiconv_debug(config,lev+2,off,"Found a Sketch file"); break; case PSICONV_ID_SHEET: file_type = psiconv_sheet_file; psiconv_debug(config,lev+2,off,"Found a Sheet file"); break; default: psiconv_warn(config,lev+2,off,"Found an unknown file type"); psiconv_debug(config,lev+2,off,"Found ID %08x",applid->id); } ERROR2: psiconv_free_application_id_section(applid); ERROR1: psiconv_free_section_table_section(table); if (status) *status = res; return file_type; } int psiconv_parse_object_display_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_object_display_section *result) { int res = 0; int len = 0; int leng; psiconv_u32 temp; psiconv_progress(config,lev+1,off,"Going to read the Object Display Section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the display as icon flag " "(expecting 0x00 or 0x01)"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == 0x00) { (*result)->show_icon = psiconv_bool_true; psiconv_debug(config,lev+2,off+len,"Displayed as icon"); } else if (temp == 0x01) { (*result)->show_icon = psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Displayed as full document"); } else { psiconv_warn(config,lev+2,off+len,"Unknown Object Display Section Icon Flag"); psiconv_debug(config,lev+2,off+len,"Icon flag found: %02x",temp); /* Improvise */ (*result)->show_icon = (temp & 0x01?psiconv_bool_false:psiconv_bool_true); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the display width"); (*result)->width = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Display width: %f cm",(*result)->width); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the display height"); (*result)->height = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Display length: %f cm",(*result)->height); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read unknown long (%08x expected)", 0); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (temp != 0) { psiconv_warn(config,lev+2,off+len,"Unknown Object Display Section final long"); psiconv_debug(config,lev+2,off+len,"Long read: %08x",temp); } len += 4; if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of Object Display Section " "(total length: %08x",len); return res; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off+len,"Reading of Object Display Section failed"); if (length) *length=0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_object_icon_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_object_icon_section *result) { int res = 0; int len = 0; int leng; psiconv_progress(config,lev+1,off,"Going to read the Object Icon Section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the icon name"); (*result)->icon_name = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the icon width"); (*result)->icon_width = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Icon width: %f cm",(*result)->icon_width); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the icon height"); (*result)->icon_height = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Icon length: %f cm",(*result)->icon_height); len += leng; if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of Object Icon Section" "(total length: %08x",len); return res; ERROR3: free((*result)->icon_name); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off+len,"Reading of Object Icon Section failed"); if (length) *length=0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_driver.c0000644000175000017500000007447510336374673015247 00000000000000/* parse_driver.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "parse.h" #include "parse_routines.h" #include "unicode.h" #ifdef DMALLOC #include #endif /* Compare whether application id names match. Sought must be lower case; the comparison is case insensitive */ static psiconv_bool_t applid_matches(psiconv_string_t found, const char *sought) { int i; if (psiconv_unicode_strlen(found) != strlen(sought)) return psiconv_bool_false; for (i = 0; i < strlen(sought); i++) if ((found[i] != sought[i]) && ((sought[i] < 'a') || (sought[i] > 'z') || (found[i] != sought[i] + 'A' - 'a'))) return psiconv_bool_false; return psiconv_bool_true; } psiconv_file_type_t psiconv_file_type(const psiconv_config config, psiconv_buffer buf,int *length, psiconv_header_section *result) { psiconv_header_section header; psiconv_file_type_t res; int leng; if ((psiconv_parse_header_section(config,buf,0,0,&leng,&header))) return psiconv_unknown_file; res = header->file; if (result) *result = header; else psiconv_free_header_section(header); if (length) *length = leng; return res; } int psiconv_parse(const psiconv_config config,const psiconv_buffer buf, psiconv_file *result) { int res=0; int lev=0; int off=0; int leng; if (!((*result) = malloc(sizeof(**result)))) goto ERROR1; (*result)->type = psiconv_file_type(config,buf,&leng,NULL); if ((*result)->type == psiconv_unknown_file) { psiconv_warn(config,lev+1,off,"Unknown file type: can't parse!"); (*result)->file = NULL; } else if ((*result)->type == psiconv_word_file) res = psiconv_parse_word_file(config,buf,lev+2,leng, (psiconv_word_f *)(&((*result)->file))); else if ((*result)->type == psiconv_texted_file) res = psiconv_parse_texted_file(config,buf,lev+2,leng, (psiconv_texted_f *)(&((*result)->file))); else if ((*result)->type == psiconv_mbm_file) res = psiconv_parse_mbm_file(config,buf,lev+2,leng, (psiconv_mbm_f *)(&((*result)->file))); else if ((*result)->type == psiconv_sketch_file) res = psiconv_parse_sketch_file(config,buf,lev+2,leng, (psiconv_sketch_f *)(&((*result)->file))); else if ((*result)->type == psiconv_clipart_file) res = psiconv_parse_clipart_file(config,buf,lev+2,leng, (psiconv_clipart_f *)(&((*result)->file))); else if ((*result)->type == psiconv_sheet_file) res = psiconv_parse_sheet_file(config,buf,lev+2,leng, (psiconv_sheet_f *)(&((*result)->file))); else { psiconv_warn(config,lev+1,off,"Can't parse this file yet!"); (*result)->file = NULL; } if (res) goto ERROR2; return 0; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Psion File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_clipart_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_clipart_f *result) { int res=0; int i; psiconv_jumptable_section table; psiconv_clipart_section clipart; psiconv_u32 *entry; psiconv_progress(config,lev+1,off,"Going to read a clipart file"); if (!((*result) = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off,"Going to read the MBM jumptable"); if ((res = psiconv_parse_jumptable_section(config,buf,lev+2,off, NULL,&table))) goto ERROR2; psiconv_progress(config,lev+2,off,"Going to read the clipart sections"); if (!((*result)->sections = psiconv_list_new(sizeof(*clipart)))) goto ERROR3; for (i = 0; i < psiconv_list_length(table); i ++) { if (!(entry = psiconv_list_get(table,i))) goto ERROR4; psiconv_progress(config,lev+3,off,"Going to read clipart section %i",i); if ((res = psiconv_parse_clipart_section(config,buf,lev+3,*entry,NULL,&clipart))) goto ERROR4; if ((res = psiconv_list_add((*result)->sections,clipart))) goto ERROR5; free(clipart); } psiconv_free_jumptable_section(table); psiconv_progress(config,lev+1,off,"End of clipart file"); return res; ERROR5: psiconv_free_clipart_section(clipart); ERROR4: for (i = 0; i < psiconv_list_length((*result)->sections); i++) { if (!(clipart = psiconv_list_get((*result)->sections,i))) { psiconv_error(config,lev+1,off,"Data structure corruption"); goto ERROR3; } psiconv_free_clipart_section(clipart); } psiconv_list_free((*result)->sections); ERROR3: psiconv_free_jumptable_section(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Clipart File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_mbm_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_mbm_f *result) { int res=0; int i; psiconv_jumptable_section table; psiconv_paint_data_section paint; psiconv_u32 *entry; psiconv_u32 sto; psiconv_progress(config,lev+1,off,"Going to read a mbm file"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off,"Going to read the offset of the MBM jumptable"); sto = psiconv_read_u32(config,buf,lev+2,off,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off,"Offset: %08x",sto); psiconv_progress(config,lev+2,off,"Going to read the MBM jumptable"); if ((res = psiconv_parse_jumptable_section(config,buf,lev+2,sto, NULL,&table))) goto ERROR2; psiconv_progress(config,lev+2,off,"Going to read the picture sections"); if (!((*result)->sections = psiconv_list_new(sizeof(*paint)))) goto ERROR3; for (i = 0; i < psiconv_list_length(table); i ++) { if (!(entry = psiconv_list_get(table,i))) goto ERROR4; psiconv_progress(config,lev+3,off,"Going to read picture section %i",i); if ((res = psiconv_parse_paint_data_section(config,buf,lev+3,*entry,NULL, 0,&paint))) goto ERROR4; if ((res = psiconv_list_add((*result)->sections,paint))) goto ERROR5; free(paint); } psiconv_free_jumptable_section(table); psiconv_progress(config,lev+1,off,"End of mbm file"); return 0; ERROR5: psiconv_free_paint_data_section(paint); ERROR4: for (i = 0; i < psiconv_list_length((*result)->sections); i++) { if (!(paint = psiconv_list_get((*result)->sections,i))) { psiconv_error(config,lev+1,off,"Data structure corruption"); goto ERROR3; } psiconv_free_paint_data_section(paint); } psiconv_list_free((*result)->sections); ERROR3: psiconv_free_jumptable_section(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of MBM File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sketch_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_sketch_f *result) { psiconv_section_table_section table; psiconv_application_id_section appl_id; psiconv_u32 applid_sec = 0; psiconv_u32 sketch_sec = 0; psiconv_u32 sto; psiconv_section_table_entry entry; int i; int res=0; char *temp_str; psiconv_progress(config,lev+1,off,"Going to read a sketch file"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off, "Going to read the offset of the section table section"); sto = psiconv_read_u32(config,buf,lev+2,off,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off,"Offset: %08x",sto); psiconv_progress(config,lev+2,sto, "Going to read the section table section"); if ((res = psiconv_parse_section_table_section(config,buf,lev+2,sto, NULL,&table))) goto ERROR2; for (i = 0; i < psiconv_list_length(table); i ++) { psiconv_progress(config,lev+2,sto, "Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR3; if (entry->id == PSICONV_ID_APPL_ID_SECTION) { applid_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Application ID section at %08x",applid_sec); } else if (entry->id == PSICONV_ID_SKETCH_SECTION) { sketch_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Sketch section at %08x",sketch_sec); } else { psiconv_warn(config,lev+3,sto, "Found unknown section in the Section Table (ignoring)"); psiconv_debug(config,lev+3,sto, "Section ID %08x, offset %08x",entry->id,entry->offset); } } psiconv_progress(config,lev+2,sto, "Looking for the Application ID section"); if (! applid_sec) { psiconv_error(config,lev+2,sto, "Application ID section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR3; } else { psiconv_debug(config,lev+2,sto, "Application ID section at offset %08x",applid_sec); if ((res = psiconv_parse_application_id_section(config,buf,lev+2,applid_sec,NULL, &appl_id))) goto ERROR3; } if ((appl_id->id != PSICONV_ID_SKETCH) || !applid_matches(appl_id->name,"paint.app")) { psiconv_warn(config,lev+2,applid_sec, "Application ID section contains unexpected data"); psiconv_debug(config,lev+2,applid_sec,"ID: %08x expected, %08x found", PSICONV_ID_SKETCH,appl_id->id); if (!(temp_str = psiconv_make_printable(config,appl_id->name))) goto ERROR4; psiconv_debug(config,lev+2,applid_sec,"Name: `%s' expected, `%s' found", "Paint.app",temp_str); free(temp_str); res = -PSICONV_E_PARSE; goto ERROR4; } psiconv_progress(config,lev+2,sto, "Looking for the Sketch section"); if (! sketch_sec) { psiconv_warn(config,lev+2,sto, "Sketch section not found in the section table"); } else { psiconv_debug(config,lev+2,sto, "Sketch section at offset %08x",applid_sec); if ((res = psiconv_parse_sketch_section(config,buf,lev+2,sketch_sec,NULL, &(*result)->sketch_sec))) goto ERROR4; } psiconv_free_application_id_section(appl_id); psiconv_free_section_table_section(table); psiconv_progress(config,lev+1,off,"End of sketch file"); return res; ERROR4: psiconv_free_application_id_section(appl_id); ERROR3: free(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sketch File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_texted_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_texted_f *result) { int res=0; psiconv_section_table_section table; psiconv_application_id_section appl_id; char *temp_str; psiconv_character_layout base_char; psiconv_paragraph_layout base_para; psiconv_u32 page_sec = 0; psiconv_u32 texted_sec = 0; psiconv_u32 applid_sec = 0; psiconv_u32 sto; psiconv_section_table_entry entry; int i; psiconv_progress(config,lev+1,off,"Going to read a texted file"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off, "Going to read the offset of the section table section"); sto = psiconv_read_u32(config,buf,lev+2,off,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off,"Offset: %08x",sto); psiconv_progress(config,lev+2,sto, "Going to read the section table section"); if ((res = psiconv_parse_section_table_section(config,buf,lev+2,sto, NULL,&table))) goto ERROR2; for (i = 0; i < psiconv_list_length(table); i ++) { psiconv_progress(config,lev+2,sto, "Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR3; if (entry->id == PSICONV_ID_APPL_ID_SECTION) { applid_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Application ID section at %08x",applid_sec); } else if (entry->id == PSICONV_ID_PAGE_LAYOUT_SECTION) { page_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Page Layout section at %08x",page_sec); } else if (entry->id == PSICONV_ID_TEXTED) { texted_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the TextEd section at %08x",texted_sec); } else { psiconv_warn(config,lev+3,sto, "Found unknown section in the Section Table (ignoring)"); psiconv_debug(config,lev+3,sto, "Section ID %08x, offset %08x",entry->id,entry->offset); } } psiconv_progress(config,lev+2,sto, "Looking for the Application ID section"); if (! applid_sec) { psiconv_error(config,lev+2,sto, "Application ID section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR3; } else { psiconv_debug(config,lev+2,sto, "Application ID section at offset %08x",applid_sec); if ((res = psiconv_parse_application_id_section(config,buf,lev+2,applid_sec,NULL, &appl_id))) goto ERROR3; } if ((appl_id->id != PSICONV_ID_TEXTED) || !applid_matches(appl_id->name,"texted.app")) { psiconv_warn(config,lev+2,applid_sec, "Application ID section contains unexpected data"); psiconv_debug(config,lev+2,applid_sec,"ID: %08x expected, %08x found", PSICONV_ID_TEXTED,appl_id->id); if (!(temp_str = psiconv_make_printable(config,appl_id->name))) goto ERROR4; psiconv_debug(config,lev+2,applid_sec,"Name: `%s' expected, `%s' found", "TextEd.app",temp_str); free(temp_str); res = -PSICONV_E_PARSE; goto ERROR4; } psiconv_progress(config,lev+2,sto, "Looking for the Page layout section"); if (! page_sec) { psiconv_error(config,lev+2,sto, "Page layout section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR4; } else { psiconv_debug(config,lev+2,sto, "Page layout section at offset %08x",page_sec); if ((res = psiconv_parse_page_layout_section(config,buf,lev+2,page_sec,NULL, &(*result)->page_sec))) goto ERROR4; } if (!(base_char = psiconv_basic_character_layout())) goto ERROR5; if (!(base_para = psiconv_basic_paragraph_layout())) goto ERROR6; psiconv_progress(config,lev+2,sto, "Looking for the TextEd section"); if (! texted_sec) { psiconv_error(config,lev+2,sto, "TextEd section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR7; } else { psiconv_debug(config,lev+2,sto, "TextEd section at offset %08x",texted_sec); if ((res = psiconv_parse_texted_section(config,buf,lev+2,texted_sec,NULL, &(*result)->texted_sec, base_char,base_para))) goto ERROR7; } psiconv_free_character_layout(base_char); psiconv_free_paragraph_layout(base_para); psiconv_free_application_id_section(appl_id); psiconv_free_section_table_section(table); psiconv_progress(config,lev+1,off,"End of TextEd file"); return 0; ERROR7: psiconv_free_paragraph_layout(base_para); ERROR6: psiconv_free_character_layout(base_char); ERROR5: psiconv_free_page_layout_section((*result)->page_sec); ERROR4: psiconv_free_application_id_section(appl_id); ERROR3: psiconv_free_section_table_section(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of TextEd File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_word_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_word_f *result) { int res=0; psiconv_section_table_section table; psiconv_application_id_section appl_id; char *temp_str; psiconv_u32 pwd_sec = 0; psiconv_u32 status_sec = 0; psiconv_u32 styles_sec = 0; psiconv_u32 page_sec = 0; psiconv_u32 text_sec = 0; psiconv_u32 layout_sec = 0; psiconv_u32 applid_sec = 0; psiconv_section_table_entry entry; psiconv_u32 sto; int i; psiconv_progress(config,lev+1,off,"Going to read a word file"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off, "Going to read the offset of the section table section"); sto = psiconv_read_u32(config,buf,lev+2,off,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off,"Offset: %08x",sto); psiconv_progress(config,lev+2,sto, "Going to read the section table section"); if ((res = psiconv_parse_section_table_section(config,buf,lev+2,sto, NULL,&table))) goto ERROR2; for (i = 0; i < psiconv_list_length(table); i ++) { psiconv_progress(config,lev+2,sto, "Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR3; if (entry->id == PSICONV_ID_APPL_ID_SECTION) { applid_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Application ID section at %08x",applid_sec); } else if (entry->id == PSICONV_ID_PAGE_LAYOUT_SECTION) { page_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Page Layout section at %08x",page_sec); } else if (entry->id == PSICONV_ID_TEXT_SECTION) { text_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Text section at %08x",text_sec); } else if (entry->id == PSICONV_ID_PASSWORD_SECTION) { pwd_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Password section at %08x",pwd_sec); psiconv_error(config,lev+3,sto, "Password section found - can't read encrypted data"); res = -PSICONV_E_PARSE; goto ERROR3; } else if (entry->id == PSICONV_ID_WORD_STATUS_SECTION) { status_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Word Status section at %08x",status_sec); } else if (entry->id == PSICONV_ID_WORD_STYLES_SECTION) { styles_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Word Styles section at %08x",styles_sec); } else if (entry->id == PSICONV_ID_LAYOUT_SECTION) { layout_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Layout section at %08x",layout_sec); } else { psiconv_warn(config,lev+3,sto, "Found unknown section in the Section Table (ignoring)"); psiconv_debug(config,lev+3,sto, "Section ID %08x, offset %08x",entry->id,entry->offset); } } psiconv_progress(config,lev+2,sto, "Looking for the Status section"); if (!status_sec) { psiconv_error(config,lev+2,sto, "Status section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR3; } else { psiconv_debug(config,lev+2,sto, "Status section at offset %08x",status_sec); if ((res = psiconv_parse_word_status_section(config,buf,lev+2,status_sec,NULL, &((*result)->status_sec)))) goto ERROR3; } psiconv_progress(config,lev+2,sto, "Looking for the Application ID section"); if (! applid_sec) { psiconv_error(config,lev+2,sto, "Application ID section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR4; } else { psiconv_debug(config,lev+2,sto, "Application ID section at offset %08x",applid_sec); if ((res = psiconv_parse_application_id_section(config,buf,lev+2,applid_sec,NULL, &appl_id))) goto ERROR4; } if ((appl_id->id != PSICONV_ID_WORD) || !applid_matches(appl_id->name,"word.app")) { psiconv_warn(config,lev+2,applid_sec, "Application ID section contains unexpected data"); psiconv_debug(config,lev+2,applid_sec,"ID: %08x expected, %08x found", PSICONV_ID_WORD,appl_id->id); if (!(temp_str = psiconv_make_printable(config,appl_id->name))) goto ERROR5; psiconv_debug(config,lev+2,applid_sec,"Name: `%s' expected, `%s' found", "Word.app",temp_str); free(temp_str); res = -PSICONV_E_PARSE; goto ERROR5; } psiconv_progress(config,lev+2,sto, "Looking for the Page layout section"); if (! page_sec) { psiconv_error(config,lev+2,sto, "Page layout section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR5; } else { psiconv_debug(config,lev+2,sto, "Page layout section at offset %08x",page_sec); if ((res = psiconv_parse_page_layout_section(config,buf,lev+2,page_sec,NULL, &(*result)->page_sec))) goto ERROR5; } psiconv_progress(config,lev+2,sto, "Looking for the Word Style section"); if (!styles_sec) { psiconv_error(config,lev+2,sto, "Word styles section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR6; } else { psiconv_debug(config,lev+2,sto, "Word styles section at offset %08x",styles_sec); if ((res = psiconv_parse_word_styles_section(config,buf,lev+2,styles_sec,NULL, &(*result)->styles_sec))) goto ERROR6; } psiconv_progress(config,lev+2,sto, "Looking for the Text section"); if (!text_sec) { psiconv_error(config,lev+2,sto, "Text section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR7; } else { psiconv_debug(config,lev+2,sto, "Text section at offset %08x",text_sec); if ((res = psiconv_parse_text_section(config,buf,lev+2,text_sec,NULL, &(*result)->paragraphs))) goto ERROR7; } psiconv_progress(config,lev+2,sto, "Looking for the Layout section"); if (!layout_sec) { psiconv_debug(config,lev+2,sto, "No layout section today"); } else { psiconv_debug(config,lev+2,sto, "Layout section at offset %08x",layout_sec); if ((res = psiconv_parse_styled_layout_section(config,buf,lev+2,layout_sec,NULL, (*result)->paragraphs, (*result)->styles_sec))) goto ERROR8; } psiconv_free_application_id_section(appl_id); psiconv_free_section_table_section(table); psiconv_progress(config,lev+1,off,"End of word file"); return 0; ERROR8: psiconv_free_text_and_layout((*result)->paragraphs); ERROR7: psiconv_free_word_styles_section((*result)->styles_sec); ERROR6: psiconv_free_page_layout_section((*result)->page_sec); ERROR5: psiconv_free_application_id_section(appl_id); ERROR4: psiconv_free_word_status_section((*result)->status_sec); ERROR3: psiconv_free_section_table_section(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Word File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_file(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, psiconv_sheet_f *result) { int res=0; psiconv_section_table_section table; psiconv_application_id_section appl_id; char *temp_str; psiconv_u32 pwd_sec = 0; psiconv_u32 status_sec = 0; psiconv_u32 page_sec = 0; psiconv_u32 applid_sec = 0; psiconv_u32 workbook_sec = 0; psiconv_section_table_entry entry; psiconv_u32 sto; int i; psiconv_progress(config,lev+1,off,"Going to read a sheet file"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off, "Going to read the offset of the section table section"); sto = psiconv_read_u32(config,buf,lev+2,off,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off,"Offset: %08x",sto); psiconv_progress(config,lev+2,sto, "Going to read the section table section"); if ((res = psiconv_parse_section_table_section(config,buf,lev+2,sto, NULL,&table))) goto ERROR2; for (i = 0; i < psiconv_list_length(table); i ++) { psiconv_progress(config,lev+2,sto, "Going to read entry %d",i); if (!(entry = psiconv_list_get(table,i))) goto ERROR3; if (entry->id == PSICONV_ID_APPL_ID_SECTION) { applid_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Application ID section at %08x",applid_sec); } else if (entry->id == PSICONV_ID_PAGE_LAYOUT_SECTION) { page_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Page Layout section at %08x",page_sec); } else if (entry->id == PSICONV_ID_PASSWORD_SECTION) { pwd_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Password section at %08x",pwd_sec); psiconv_error(config,lev+3,sto, "Password section found - can't read encrypted data"); res = -PSICONV_E_PARSE; goto ERROR3; } else if (entry->id == PSICONV_ID_SHEET_WORKBOOK_SECTION) { workbook_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Sheet Workbook section at %08x",workbook_sec); } else if (entry->id == PSICONV_ID_SHEET_STATUS_SECTION) { status_sec = entry->offset; psiconv_debug(config,lev+3,sto, "Found the Sheet Status section at %08x",status_sec); } else { psiconv_warn(config,lev+3,sto, "Found unknown section in the Section Table (ignoring)"); psiconv_debug(config,lev+3,sto, "Section ID %08x, offset %08x",entry->id,entry->offset); } } psiconv_progress(config,lev+2,sto, "Looking for the Status section"); if (!status_sec) { psiconv_error(config,lev+2,sto, "Status section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR3; } else { psiconv_debug(config,lev+2,sto, "Status section at offset %08x",status_sec); if ((res = psiconv_parse_sheet_status_section(config,buf,lev+2,status_sec,NULL, &((*result)->status_sec)))) goto ERROR3; } psiconv_progress(config,lev+2,sto, "Looking for the Application ID section"); if (! applid_sec) { psiconv_error(config,lev+2,sto, "Application ID section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR4; } else { psiconv_debug(config,lev+2,sto, "Application ID section at offset %08x",applid_sec); if ((res = psiconv_parse_application_id_section(config,buf,lev+2,applid_sec,NULL, &appl_id))) goto ERROR4; } if ((appl_id->id != PSICONV_ID_SHEET) || !applid_matches(appl_id->name,"sheet.app")) { psiconv_warn(config,lev+2,applid_sec, "Application ID section contains unexpected data"); psiconv_debug(config,lev+2,applid_sec,"ID: %08x expected, %08x found", PSICONV_ID_SHEET,appl_id->id); if (!(temp_str = psiconv_make_printable(config,appl_id->name))) goto ERROR5; psiconv_debug(config,lev+2,applid_sec,"Name: `%s' expected, `%s' found", "Sheet.app",temp_str); free(temp_str); res = -PSICONV_E_PARSE; goto ERROR5; } psiconv_progress(config,lev+2,sto, "Looking for the Page layout section"); if (! page_sec) { psiconv_error(config,lev+2,sto, "Page layout section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR5; } else { psiconv_debug(config,lev+2,sto, "Page layout section at offset %08x",page_sec); if ((res = psiconv_parse_page_layout_section(config,buf,lev+2,page_sec,NULL, &(*result)->page_sec))) goto ERROR5; } psiconv_progress(config,lev+2,sto, "Looking for the Sheet Workbook section"); if (! workbook_sec) { psiconv_error(config,lev+2,sto, "Sheet workbook section not found in the section table"); res = -PSICONV_E_PARSE; goto ERROR6; } else { psiconv_debug(config,lev+2,sto, "Sheet workbook section at offset %08x",page_sec); if ((res = psiconv_parse_sheet_workbook_section(config,buf,lev+2,workbook_sec,NULL, &(*result)->workbook_sec))) goto ERROR6; } psiconv_free_application_id_section(appl_id); psiconv_free_section_table_section(table); psiconv_progress(config,lev+1,off,"End of Sheet file"); return 0; ERROR6: psiconv_free_page_layout_section((*result)->page_sec); ERROR5: psiconv_free_application_id_section(appl_id); ERROR4: psiconv_free_sheet_status_section((*result)->status_sec); ERROR3: psiconv_free_section_table_section(table); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet File failed"); if (res == 0) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_formula.c0000644000175000017500000007314510336374724015407 00000000000000/* parse_formula.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2001-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif struct formula_element { psiconv_formula_type_t formula_type; int number_of_args; const char* name; }; static struct formula_element formula_elements[256] = { {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* 0 */ {psiconv_formula_op_lt,2,"<"}, {psiconv_formula_op_le,2,"<="}, {psiconv_formula_op_gt,2,">"}, {psiconv_formula_op_ge,2,">="}, {psiconv_formula_op_ne,2,"<>"}, {psiconv_formula_op_eq,2,"="}, {psiconv_formula_op_add,2,"+"}, {psiconv_formula_op_sub,2,"-"}, {psiconv_formula_op_mul,2,"*"}, {psiconv_formula_op_div,2,"/"}, {psiconv_formula_op_pow,2,"^"}, {psiconv_formula_op_pos,1,"+"}, {psiconv_formula_op_neg,1,"-"}, {psiconv_formula_op_not,1,"NOT"}, {psiconv_formula_op_and,2,"AND"}, {psiconv_formula_op_or,2,"OR"}, /* 10 */ {psiconv_formula_op_con,2,"&"}, {psiconv_formula_op_bra,1,"()"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_mark_eof,0,"End of formula"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_dat_float,0,"Floating point number"}, {psiconv_formula_dat_int,0,"Signed integer number"}, /* 20 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_dat_var,0,"Named variable"}, {psiconv_formula_dat_string,0,"String"}, {psiconv_formula_dat_cellref,0,"Cell reference"}, {psiconv_formula_dat_cellblock,0,"Cell block"}, {psiconv_formula_dat_vcellblock,0,"Cell block {varargs}"}, {psiconv_formula_mark_opsep,0,"Operand separator"}, {psiconv_formula_mark_opend,0,"Operand list end"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* 30 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_fun_false,0,"FALSE"}, {psiconv_formula_fun_if,3,"IF"}, {psiconv_formula_fun_true,0,"TRUE"}, {psiconv_formula_fun_cell,2,"CELL"}, {psiconv_formula_fun_errortype,0,"ERRORTYPE"}, {psiconv_formula_fun_isblank,1,"ISBLANK"}, {psiconv_formula_fun_iserr,1,"ISERR"}, {psiconv_formula_fun_iserror,1,"ISERROR"}, {psiconv_formula_fun_islogical,1,"ISLOGICAL"}, {psiconv_formula_fun_isna,1,"ISNA"}, {psiconv_formula_fun_isnontext,1,"ISNONTEXT"}, {psiconv_formula_fun_isnumber,1,"ISNUMBER"}, {psiconv_formula_fun_istext,1,"ISTEXT"}, {psiconv_formula_fun_n,1,"N"}, /* 40 */ {psiconv_formula_fun_type,1,"TYPE"}, {psiconv_formula_fun_address,2,"ADDRESS"}, {psiconv_formula_fun_column,1,"COLUMN"}, {psiconv_formula_fun_columns,1,"COLUMNS"}, {psiconv_formula_fun_hlookup,3,"HLOOKUP"}, {psiconv_formula_fun_index,3,"INDEX"}, {psiconv_formula_fun_indirect,1,"INDIRECT"}, {psiconv_formula_fun_lookup,3,"LOOKUP"}, {psiconv_formula_fun_offset,3,"OFFSET"}, {psiconv_formula_fun_row,1,"ROW"}, {psiconv_formula_fun_rows,1,"ROWS"}, {psiconv_formula_fun_vlookup,3,"VLOOKUP"}, {psiconv_formula_fun_char,1,"CHAR"}, {psiconv_formula_fun_code,1,"CODE"}, {psiconv_formula_fun_exact,2,"EXACT"}, {psiconv_formula_fun_find,3,"FIND"}, /* 50 */ {psiconv_formula_fun_left,2,"LEFT"}, {psiconv_formula_fun_len,1,"LEN"}, {psiconv_formula_fun_lower,1,"LOWER"}, {psiconv_formula_fun_mid,3,"MID"}, {psiconv_formula_fun_proper,1,"PROPER"}, {psiconv_formula_fun_replace,4,"REPLACE"}, {psiconv_formula_fun_rept,2,"REPT"}, {psiconv_formula_fun_right,2,"RIGHT"}, {psiconv_formula_fun_string,2,"STRING"}, {psiconv_formula_fun_t,1,"T"}, {psiconv_formula_fun_trim,1,"TRIM"}, {psiconv_formula_fun_upper,1,"UPPER"}, {psiconv_formula_fun_value,1,"VALUE"}, {psiconv_formula_fun_date,3,"DATE"}, {psiconv_formula_fun_datevalue,1,"DATEVALUE"}, {psiconv_formula_fun_day,1,"DAY"}, /* 60 */ {psiconv_formula_fun_hour,1,"HOUR"}, {psiconv_formula_fun_minute,1,"MINUTE"}, {psiconv_formula_fun_month,1,"MONTH"}, {psiconv_formula_fun_now,0,"NOW"}, {psiconv_formula_fun_second,1,"SECOND"}, {psiconv_formula_fun_today,0,"TODAY"}, {psiconv_formula_fun_time,3,"TIME"}, {psiconv_formula_fun_timevalue,1,"TIMEVALUE"}, {psiconv_formula_fun_year,1,"YEAR"}, {psiconv_formula_fun_abs,1,"ABS"}, {psiconv_formula_fun_acos,1,"ACOS"}, {psiconv_formula_fun_asin,1,"ASIN"}, {psiconv_formula_fun_atan,1,"ATAN"}, {psiconv_formula_fun_atan2,2,"ATAN2"}, {psiconv_formula_fun_cos,1,"COS"}, {psiconv_formula_fun_degrees,0,"DEGREES"}, /* 70 */ {psiconv_formula_fun_exp,1,"EXP"}, {psiconv_formula_fun_fact,1,"FACT"}, {psiconv_formula_fun_int,1,"INT"}, {psiconv_formula_fun_ln,1,"LN"}, {psiconv_formula_fun_log10,1,"LOG10"}, {psiconv_formula_fun_mod,2,"MOD"}, {psiconv_formula_fun_pi,0,"PI"}, {psiconv_formula_fun_radians,1,"RADIANS"}, {psiconv_formula_fun_rand,0,"RAND"}, {psiconv_formula_fun_round,2,"ROUND"}, {psiconv_formula_fun_sign,1,"SIGN"}, {psiconv_formula_fun_sin,1,"SIN"}, {psiconv_formula_fun_sqrt,1,"SQRT"}, {psiconv_formula_fun_sumproduct,2,"SUMPRODUCT"}, {psiconv_formula_fun_tan,1,"TAN"}, {psiconv_formula_fun_trunc,1,"TRUNC"}, /* 80 */ {psiconv_formula_fun_cterm,3,"CTERM"}, {psiconv_formula_fun_ddb,4,"DDB"}, {psiconv_formula_fun_fv,3,"FV"}, {psiconv_formula_fun_irr,2,"IRR"}, {psiconv_formula_fun_npv,2,"NPV"}, {psiconv_formula_fun_pmt,3,"PMT"}, {psiconv_formula_fun_pv,3,"PV"}, {psiconv_formula_fun_rate,3,"RATE"}, {psiconv_formula_fun_sln,3,"SLN"}, {psiconv_formula_fun_syd,4,"SYD"}, {psiconv_formula_fun_term,3,"TERM"}, {psiconv_formula_fun_combin,2,"COMBIN"}, {psiconv_formula_fun_permut,2,"PERMUT"}, {psiconv_formula_vfn_average,-1,"AVERAGE"}, {psiconv_formula_vfn_choose,-1,"CHOOSE"}, {psiconv_formula_vfn_count,-1,"COUNT"}, /* 90 */ {psiconv_formula_vfn_counta,-1,"COUNTA"}, {psiconv_formula_vfn_countblank,-1,"COUNTBLANK"}, {psiconv_formula_vfn_max,-1,"MAX"}, {psiconv_formula_vfn_min,-1,"MIN"}, {psiconv_formula_vfn_product,-1,"PRODUCT"}, {psiconv_formula_vfn_stdevp,-1,"STDEVP"}, {psiconv_formula_vfn_stdev,-1,"STDEV"}, {psiconv_formula_vfn_sum,-1,"SUM"}, {psiconv_formula_vfn_sumsq,-1,"SUMSQ"}, {psiconv_formula_vfn_varp,-1,"VARP"}, {psiconv_formula_vfn_var,-1,"VAR"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* A0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* B0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* C0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* D0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* E0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, /* F0 */ {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}, {psiconv_formula_unknown,0,"*UNKNOWN*"}}; static int psiconv_parse_sheet_ref(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_sheet_ref_t *result) { int res; psiconv_u16 temp; psiconv_progress(config,lev+1,off,"Going to read a sheet ref"); psiconv_progress(config,lev+2,off,"Going to read the offset encoding"); temp = psiconv_read_u16(config,buf,lev+2,off,&res); if (res) { if (length) *length = 0; return res; } psiconv_debug(config,lev+2,off,"Encoded word: %04x",temp); result->absolute = (temp & 0x4000)?psiconv_bool_true:psiconv_bool_false; result->offset = (temp & 0x3fff) * ((temp & 0x8000)?-1:1); psiconv_debug(config,lev+2,off,"Reference: %s offset %d", result->absolute?"absolute":"relative",result->offset); if (length) *length = 2; return 0; } static int psiconv_parse_sheet_cell_reference(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_reference_t *result) { int len = 0; int leng,res; psiconv_u8 temp; psiconv_progress(config,lev+1,off+len,"Going to read a sheet cell reference"); psiconv_progress(config,lev+2,off+len,"Going to read the row reference"); if ((res = psiconv_parse_sheet_ref(config,buf,lev+2,off+len,&leng,&result->row))) goto ERROR; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the column reference"); if ((res = psiconv_parse_sheet_ref(config,buf,lev+2,off+len,&leng,&result->column))) goto ERROR; len += leng; psiconv_progress(config,lev+2,off+len, "Going to read the trailing byte (%02x expected)",0); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR; if (temp != 0) { psiconv_warn(config,lev+2,off+len,"Unknown byte in cell reference (ignored"); psiconv_debug(config,lev+2,off+len,"Trailing byte: %02x",temp); } len ++; psiconv_progress(config,lev,off+len-1, "End of cell reference (total length: %08x)", len); if (length) *length = len; return 0; ERROR: if (length) *length = 0; return res; } static int psiconv_parse_sheet_cell_block(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_block_t *result) { int len = 0; int leng,res; psiconv_progress(config,lev+1,off+len,"Going to read a sheet cell block"); psiconv_progress(config,lev+2,off+len,"Going to read the first cell"); if ((res = psiconv_parse_sheet_cell_reference(config,buf,lev+2,off+len,&leng, &result->first))) goto ERROR; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the last cell"); if ((res = psiconv_parse_sheet_cell_reference(config,buf,lev+2,off+len,&leng, &result->last))) goto ERROR; len += leng; psiconv_progress(config,lev,off+len-1, "End of cell block (total length: %08x)", len); if (length) *length = len; return 0; ERROR: if (length) *length = 0; return res; } static int psiconv_parse_formula_element_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_formula *result, psiconv_u32 maxlen) { int res=0; int len=0; int leng; int eof = 0; psiconv_u8 marker,submarker,submarker2; psiconv_formula_list formula_stack; psiconv_formula formula,subformula,subformula1,subformula2, subformula3,subformula4; psiconv_u16 temp,nr_of_subs; psiconv_progress(config,lev+1,off,"Going to read a formula element list"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; if (!(formula_stack = psiconv_list_new(sizeof(struct psiconv_formula_s)))) goto ERROR2; if (!(formula = malloc(sizeof(*formula)))) goto ERROR3; /* By setting the type to unknown, we can safely call psiconv_free_formula */ formula->type = psiconv_formula_unknown; if (!(subformula1 = malloc(sizeof(*subformula1)))) goto ERROR4; subformula1->type = psiconv_formula_unknown; if (!(subformula2 = malloc(sizeof(*subformula2)))) goto ERROR5; subformula2->type = psiconv_formula_unknown; if (!(subformula3 = malloc(sizeof(*subformula3)))) goto ERROR6; subformula3->type = psiconv_formula_unknown; if (!(subformula4 = malloc(sizeof(*subformula4)))) goto ERROR7; subformula4->type = psiconv_formula_unknown; while (!eof && len+off < maxlen) { psiconv_progress(config,lev+3,off+len,"Going to read a formula item marker"); marker = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR8; psiconv_debug(config,lev+3,off+len,"Marker: %02x (%s)",marker, formula_elements[marker].name); len ++; if (formula_elements[marker].formula_type == psiconv_formula_unknown) { psiconv_error(config,lev+3,off+len,"Unknown formula marker found!"); goto ERROR8; } else if ((formula_elements[marker].formula_type == psiconv_formula_mark_eof) || (formula_elements[marker].formula_type == psiconv_formula_mark_opend) || (formula_elements[marker].formula_type == psiconv_formula_mark_opsep)) { len--; psiconv_progress(config,lev+3,off+len,"End of this formula list"); eof = 1; } else if (formula_elements[marker].formula_type == psiconv_formula_dat_int) { psiconv_progress(config,lev+3,off+len,"Next item: an integer"); formula->data.dat_int = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR8; formula->type = formula_elements[marker].formula_type; psiconv_debug(config,lev+3,off+len,"Value: %08x",formula->data.dat_int); len += 4; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if (formula_elements[marker].formula_type == psiconv_formula_dat_float) { psiconv_progress(config,lev+3,off+len,"Next item: a float"); formula->data.dat_float = psiconv_read_float(config,buf,lev+2,off+len,&leng, &res); if (res) goto ERROR8; formula->type = formula_elements[marker].formula_type; psiconv_debug(config,lev+3,off+len,"Value: %f",formula->data.dat_float); len += leng; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if (formula_elements[marker].formula_type == psiconv_formula_dat_cellref) { psiconv_progress(config,lev+3,off+len,"Next item: a cell reference"); if ((res = psiconv_parse_sheet_cell_reference(config,buf,lev+2,off+len,&leng, &formula->data.dat_cellref))) goto ERROR8; formula->type = formula_elements[marker].formula_type; len += leng; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if ((formula_elements[marker].formula_type == psiconv_formula_dat_cellblock) || (formula_elements[marker].formula_type == psiconv_formula_dat_vcellblock)) { psiconv_progress(config,lev+3,off+len,"Next item: a cell block"); if ((res = psiconv_parse_sheet_cell_block(config,buf,lev+2,off+len,&leng, &formula->data.dat_cellblock))) goto ERROR8; formula->type = formula_elements[marker].formula_type; len += leng; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if (formula_elements[marker].formula_type == psiconv_formula_dat_string) { psiconv_progress(config,lev+3,off+len,"Next item: a string"); formula->data.dat_string = psiconv_read_short_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR8; formula->type = formula_elements[marker].formula_type; len += leng; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if ((formula_elements[marker].formula_type == psiconv_formula_dat_var)) { psiconv_progress(config,lev+3,off+len,"Next item: a variable reference"); formula->data.dat_variable = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR8; formula->type = formula_elements[marker].formula_type; len += 4; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else if (formula_elements[marker].number_of_args == -1) { psiconv_progress(config,lev+3,off+len,"Going to parse a vararg function"); if (!(formula->data.fun_operands = psiconv_list_new(sizeof(*formula)))) goto ERROR8; formula->type = formula_elements[marker].formula_type; nr_of_subs = 0; do { nr_of_subs ++; psiconv_progress(config,lev+4,off+len,"Going to read vararg argument %d", nr_of_subs); if ((res = psiconv_parse_formula_element_list(config,buf,lev+4,off+len,&leng, &subformula,maxlen))) goto ERROR8; len += leng; if ((res = psiconv_list_add(formula->data.fun_operands,subformula))) { psiconv_free_formula(subformula); goto ERROR8; } free(subformula); psiconv_progress(config,lev+4,off+len,"Going to read the next marker"); submarker = psiconv_read_u8(config,buf,lev+4,off+len,&res); len ++; if (res) goto ERROR8; submarker2 = psiconv_read_u8(config,buf,lev+4,off+len,&res); if (res) goto ERROR8; } while ((formula_elements[submarker].formula_type == psiconv_formula_mark_opsep) && (formula_elements[submarker2].formula_type != psiconv_formula_mark_opend)); if ((formula_elements[submarker].formula_type == psiconv_formula_mark_opsep) && (formula_elements[submarker2].formula_type == psiconv_formula_mark_opend)) { submarker=submarker2; len++; } if (formula_elements[submarker].formula_type != psiconv_formula_mark_opend) { psiconv_error(config,lev+3,off+len,"Formula corrupted!"); psiconv_debug(config,lev+3,off+len,"Found unexpected marker %02x",submarker); goto ERROR8; } psiconv_progress(config,lev+3,off+len,"Going to read the repeated marker %02x", marker); submarker = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR8; if (submarker != marker) { psiconv_error(config,lev+3,off+len,"Formula corrupted!"); psiconv_debug(config,lev+3,off+len,"Expected marker %02x, found %02x", marker,submarker); goto ERROR8; } len++; psiconv_progress(config,lev+3,off+len, "Going to read the number of arguments (%d expected)", nr_of_subs); temp = psiconv_read_u16(config,buf,lev+3,off+len,&res); if (res) goto ERROR8; if (temp != nr_of_subs) { psiconv_error(config,lev+3,off+len,"Formula corrupted!"); psiconv_debug(config,lev+3,off+len, "Read %d arguments, but formula says there are %d", nr_of_subs,temp); goto ERROR8; } len += 2; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; formula->type = psiconv_formula_unknown; } else { if (formula_elements[marker].number_of_args > 0) if ((res = psiconv_list_pop(formula_stack,subformula1))) goto ERROR8; if (formula_elements[marker].number_of_args > 1) if ((res = psiconv_list_pop(formula_stack,subformula2))) goto ERROR8; if (formula_elements[marker].number_of_args > 2) if ((res = psiconv_list_pop(formula_stack,subformula3))) goto ERROR8; if (formula_elements[marker].number_of_args > 3) if ((res = psiconv_list_pop(formula_stack,subformula4))) goto ERROR8; if (!(formula->data.fun_operands = psiconv_list_new(sizeof(*formula)))) goto ERROR8; formula->type = formula_elements[marker].formula_type; if (formula_elements[marker].number_of_args > 3) if ((res = psiconv_list_add(formula->data.fun_operands,subformula4))) goto ERROR8; if (formula_elements[marker].number_of_args > 2) if ((res = psiconv_list_add(formula->data.fun_operands,subformula3))) goto ERROR8; if (formula_elements[marker].number_of_args > 1) if ((res = psiconv_list_add(formula->data.fun_operands,subformula2))) goto ERROR8; if (formula_elements[marker].number_of_args > 0) if ((res = psiconv_list_add(formula->data.fun_operands,subformula1))) goto ERROR8; if ((res = psiconv_list_add(formula_stack,formula))) goto ERROR8; subformula4->type = subformula3->type = subformula2->type = subformula1->type = formula->type = psiconv_formula_unknown; } } if ((len+off > maxlen) || !eof) { psiconv_error(config,lev+2,off+len,"Formula corrupted!"); psiconv_debug(config,lev+2,off+len,"Expected end: %04x, found end: %04x", maxlen,len+off); goto ERROR8; } if ((psiconv_list_length(formula_stack)) != 1) { psiconv_error(config,lev+2,off+len,"Formula corrupted!"); psiconv_debug(config,lev+2,off+len,"More than one item left on the stack (%d)", psiconv_list_length(formula_stack)); goto ERROR8; } if ((res = psiconv_list_pop(formula_stack,*result))) goto ERROR8; psiconv_list_free(formula_stack); free(formula); if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of formula element list (total length: %08x)", len); return 0; ERROR8: psiconv_free_formula(subformula4); ERROR7: psiconv_free_formula(subformula3); ERROR6: psiconv_free_formula(subformula2); ERROR5: psiconv_free_formula(subformula1); ERROR4: psiconv_free_formula(formula); ERROR3: psiconv_free_formula_list(formula_stack); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of formula element list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_formula(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_formula *result) { int res=0; int len=0; int leng; psiconv_u32 bytelen,formula_end; psiconv_u8 temp; psiconv_progress(config,lev+1,off,"Going to read a formula"); psiconv_progress(config,lev+2,off+len, "Going to read the formula byte length"); bytelen = psiconv_read_S(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,off+len,"Formula byte length: %d",bytelen); len += leng; bytelen += len; formula_end = off + bytelen; psiconv_progress(config,lev+2,off+len,"Going to read the formula elements list"); if ((res = psiconv_parse_formula_element_list(config,buf,lev+2,off+len,&leng, result,formula_end))) goto ERROR1; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the eof marker"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (formula_elements[temp].formula_type != psiconv_formula_mark_eof) { psiconv_error(config,lev+2,off+len,"Formula corrupted!"); psiconv_debug(config,lev+2,off+len,"Expected marker: %02x, found byte: %02x", 0x15,temp); goto ERROR2; } len ++; if (off+len != formula_end) { psiconv_error(config,lev+2,off+len,"Formula corrupted!"); psiconv_debug(config,lev+2,off+len,"Expected end: %04x, found end: %04x", formula_end,len+off); goto ERROR2; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of formula (total length: %08x)", len); return 0; ERROR2: psiconv_free_formula(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of formula failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_layout.c0000644000175000017500000006347710336374675015273 00000000000000/* parse_layout.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_parse_color(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_color *result) { int res = 0; int len = 0; psiconv_progress(config,lev+1,off,"Going to parse color"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; (*result)->red = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->green = psiconv_read_u8(config,buf,lev+2,off+len+1,&res); if (res) goto ERROR2; (*result)->blue = psiconv_read_u8(config,buf,lev+2,off+len+2,&res); if (res) goto ERROR2; len += 3; psiconv_debug(config,lev+2,off,"Color: red %02x, green %02x, blue %02x", (*result)->red, (*result)->green, (*result)->blue); if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of color (total length: %08x)",len); return 0; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Color failed"); if (length) *length = 0; if (res == 0) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_font(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_font *result) { int res = 0; char *str_copy; int len=0; int fontlen; psiconv_progress(config,lev+1,off,"Going to parse font"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; fontlen = psiconv_read_u8(config,buf,lev+2,off,&res); if (res) goto ERROR2; len = 1; (*result)->name = psiconv_read_charlist(config,buf,lev+2,off+len, fontlen-1,&res); if (res) goto ERROR2; len += fontlen - 1; (*result)->screenfont = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (!(str_copy = psiconv_make_printable(config,(*result)->name))) goto ERROR3; psiconv_debug(config,lev+2,off+len, "Found font `%s', displayed with screen font %02x", str_copy,(*result)->screenfont); free(str_copy); len ++; if (length) *length = len; psiconv_progress(config,lev+1,off + len - 1, "End of font (total length: %08x)",len); return 0; ERROR3: free ((*result)->name); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Font failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_border(const psiconv_config config, const psiconv_buffer buf,int lev,psiconv_u32 off, int *length, psiconv_border *result) { int res = 0; int len = 0; psiconv_u32 temp; int leng; psiconv_progress(config,lev+1,off,"Going to parse border data"); if (!(*result = malloc(sizeof(**result)))) { goto ERROR1; } psiconv_progress(config,lev+2,off+len,"Going to read border kind"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == 0x00) (*result)->kind = psiconv_border_none; else if (temp == 0x01) (*result)->kind = psiconv_border_solid; else if (temp == 0x02) (*result)->kind = psiconv_border_double; else if (temp == 0x03) (*result)->kind = psiconv_border_dotted; else if (temp == 0x04) (*result)->kind = psiconv_border_dashed; else if (temp == 0x05) (*result)->kind = psiconv_border_dotdashed; else if (temp == 0x06) (*result)->kind = psiconv_border_dotdotdashed; else { psiconv_warn(config,lev+2,off,"Unknown border kind (defaults to `none')"); (*result)->kind = psiconv_border_none; } psiconv_debug(config,lev+2,off+len,"Kind: %02x",temp); len ++; psiconv_progress(config,lev+2,off+len,"Going to read border thickness"); (*result)->thickness = psiconv_read_size(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; #if 0 /* This seems no longer necessary to test? */ if (((*result)->kind != psiconv_border_solid) && ((*result)->kind != psiconv_border_double) && ((*result)->thickness != 0.0) && (fabs((*result)->thickness - 1/20) >= 1/1000)) { psiconv_warn(config,lev+2,off, "Border thickness specified for unlikely border type"); } #endif psiconv_debug(config,lev+2,off+len,"Thickness: %f",(*result)->thickness); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the border color"); if ((psiconv_parse_color(config,buf,lev+2,off+len,&leng,&(*result)->color))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the final unknown byte " "(0x00 or 0x01 expected)"); temp = psiconv_read_u8(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; if ((temp != 0x01) && (temp != 0x00)) { psiconv_warn(config,lev+2,off,"Unknown last byte in border specification"); psiconv_debug(config,lev+2,off+len, "Last byte: read %02x, expected %02x or %02x", temp,0x00,0x01); } len ++; if (length) *length = len; psiconv_progress(config,lev+1,off + len - 1, "End of border (total length: %08x)",len); return 0; ERROR3: psiconv_free_color((*result)->color); ERROR2: free (result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Border failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_bullet(const psiconv_config config, const psiconv_buffer buf,int lev,psiconv_u32 off, int *length, psiconv_bullet *result) { int res = 0; int len = 0; int leng; int bullet_length; if (!(*result = malloc(sizeof(**result)))) goto ERROR1; (*result)->on = psiconv_bool_true; psiconv_progress(config,lev+1,off,"Going to parse bullet data"); psiconv_progress(config,lev+2,off+len,"Going to read bullet length"); bullet_length = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Length: %02x",bullet_length); len ++; psiconv_progress(config,lev+2,off+len,"Going to read bullet font size"); (*result)->font_size = psiconv_read_size(config,buf,lev+2,off+len, &leng,&res); if (res) goto ERROR2; len +=leng; psiconv_progress(config,lev+2,off+len,"Going to read bullet character"); (*result)->character = psiconv_unicode_read_char(config,buf,lev+2, off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Character: %02x",(*result)->character); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read indent on/off"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng,&(*result)->indent))) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Indent on: %02x",(*result)->indent); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read bullet color"); if ((res = psiconv_parse_color(config,buf,lev+2,off+len,&leng,&(*result)->color))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read bullet font"); if ((res = psiconv_parse_font(config,buf,lev+2,off+len,&leng,&(*result)->font))) goto ERROR3; len += leng; if (len != bullet_length + 1) { psiconv_warn(config,lev+2,off,"Bullet data structure length mismatch"); psiconv_debug(config,lev+2,off,"Length: specified %02x, found %02x", bullet_length,len-1); } psiconv_progress(config,lev+1,off + len - 1, "End of bullet data (total length: %08x)",len); if (length) *length = len; return 0; ERROR3: psiconv_free_color((*result)->color); ERROR2: free (result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Bullet failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_tab(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_tab *result) { int res = 0; int len = 0; int leng; psiconv_u8 temp; psiconv_progress(config,lev+1,off,"Going to parse tab"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off,"Going to read tab location"); (*result)->location = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the tab kind"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == 1) (*result)->kind = psiconv_tab_left; else if (temp == 2) (*result)->kind = psiconv_tab_centre; else if (temp == 3) (*result)->kind = psiconv_tab_right; else { psiconv_warn(config,lev+2,off+len,"Unknown tab kind argument"); psiconv_debug(config,lev+2,off+len,"Kind found: %02x (defaulted to left tab)", temp); (*result)->kind = psiconv_tab_left; } psiconv_debug(config,lev+2,off+len,"Kind: %02x",temp); len ++; if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of tab (total length: %08x)",len); return 0; ERROR2: free (result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Tab failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_paragraph_layout_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_paragraph_layout result) { int res=0; int len=0; int list_length,leng,nr; psiconv_u8 id; psiconv_u32 temp; psiconv_tab temp_tab; psiconv_color temp_color; psiconv_border temp_border; psiconv_bullet temp_bullet; psiconv_progress(config,lev+1,off,"Going to read paragraph layout list"); psiconv_progress(config,lev+2,off,"Going to read the list length"); list_length = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,off,"Length in bytes: %08x",list_length); len += 4; nr = 0; while(len - 4 < list_length) { psiconv_progress(config,lev+2,off+len,"Going to read element %d",nr); psiconv_progress(config,lev+3,off+len,"Going to read the element id"); id = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+3,off+len,"Id: %02x",id); len ++; switch(id) { case 0x01: psiconv_progress(config,lev+3,off+len,"Going to read background color"); if ((res = psiconv_parse_color(config,buf,lev+3,off+len,&leng,&temp_color))) goto ERROR1; psiconv_free_color(result->back_color); result->back_color = temp_color; len += leng; break; case 0x02: psiconv_progress(config,lev+3,off+len ,"Going to read indent left"); result->indent_left = psiconv_read_length(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x03: psiconv_progress(config,lev+3,off+len,"Going to read indent right"); result->indent_right = psiconv_read_length(config,buf,lev+2,off+len,&leng, &res); if (res) goto ERROR1; len += leng; break; case 0x04: psiconv_progress(config,lev+3,off+len,"Going to read indent left first line"); result->indent_first = psiconv_read_length(config,buf,lev+2,off+len, &leng, &res); if (res) goto ERROR1; len += leng; break; case 0x05: psiconv_progress(config,lev+3,off+len,"Going to read horizontal justify"); temp = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR1; if (temp == 0x00) result->justify_hor = psiconv_justify_left; else if (temp == 0x01) result->justify_hor = psiconv_justify_centre; else if (temp == 0x02) result->justify_hor = psiconv_justify_right; else if (temp == 0x03) result->justify_hor = psiconv_justify_full; else { psiconv_warn(config,lev+3,off+len, "Unknown horizontal justify argument " "in paragraph layout codes list"); result->justify_hor = psiconv_justify_left; } psiconv_debug(config,lev+3,off+len,"Justify: %02x",temp); len ++; break; case 0x06: psiconv_progress(config,lev+3,off+len,"Going to read vertical justify"); temp = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR1; if (temp == 0x00) result->justify_ver = psiconv_justify_top; else if (temp == 0x01) result->justify_ver = psiconv_justify_middle; else if (temp == 0x02) result->justify_ver = psiconv_justify_bottom; else { psiconv_warn(config,lev+3,off+len, "Unknown vertical justify argument " "in paragraph layout codes list"); result->justify_ver = psiconv_justify_bottom; } psiconv_debug(config,lev+3,off+len,"Justify: %02x",temp); len ++; break; case 0x07: psiconv_progress(config,lev+3,off+len,"Going to read linespacing distance"); result->linespacing = psiconv_read_size(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x08: psiconv_progress(config,lev+3,off+len,"Going to read linespacing exact"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->linespacing_exact))) goto ERROR1; len += leng; break; case 0x09: psiconv_progress(config,lev+3,off+len,"Going to read top space"); result->space_above = psiconv_read_size(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x0a: psiconv_progress(config,lev+3,off+len,"Going to read bottom space"); result->space_below = psiconv_read_size(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x0b: psiconv_progress(config,lev+3,off+len,"Going to read on one page"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->keep_together))) goto ERROR1; len += leng; break; case 0x0c: psiconv_progress(config,lev+3,off+len,"Going to read together with"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->keep_with_next))) goto ERROR1; len += leng; break; case 0x0d: psiconv_progress(config,lev+3,off+len,"Going to read on next page"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->on_next_page))) goto ERROR1; len += leng; break; case 0x0e: psiconv_progress(config,lev+3,off+len,"Going to read no widow protection"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->no_widow_protection))) goto ERROR1; len += leng; break; case 0x0f: psiconv_progress(config,lev+3,off+len,"Going to read wrap to fit cell limits"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->wrap_to_fit_cell))) goto ERROR1; len += leng; break; case 0x10: psiconv_progress(config,lev+3,off+len,"Going to read border distance to text"); result->border_distance = psiconv_read_length(config,buf,lev+3, off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x11: psiconv_progress(config,lev+3,off+len,"Going to read top border"); if ((res = psiconv_parse_border(config,buf,lev+3,off+len,&leng,&temp_border))) goto ERROR1; psiconv_free_border(result->top_border); result->top_border = temp_border; len += leng; break; case 0x12: psiconv_progress(config,lev+3,off+len,"Going to read bottom border"); if ((res = psiconv_parse_border(config,buf,lev+3,off+len,&leng,&temp_border))) goto ERROR1; psiconv_free_border(result->bottom_border); result->bottom_border = temp_border; len += leng; break; case 0x13: psiconv_progress(config,lev+3,off+len,"Going to read left border"); if ((res = psiconv_parse_border(config,buf,lev+3,off+len,&leng,&temp_border))) goto ERROR1; psiconv_free_border(result->left_border); result->left_border = temp_border; len += leng; break; case 0x14: psiconv_progress(config,lev+3,off+len,"Going to read right border"); if ((res = psiconv_parse_border(config,buf,lev+3,off+len,&leng,&temp_border))) goto ERROR1; psiconv_free_border(result->right_border); result->right_border = temp_border; len += leng; break; case 0x15: psiconv_progress(config,lev+3,off+len,"Going to read bullet"); if ((res = psiconv_parse_bullet(config,buf,lev+3,off+len,&leng,&temp_bullet))) goto ERROR1; psiconv_free_bullet(result->bullet); result->bullet = temp_bullet; len += leng; break; case 0x16: psiconv_progress(config,lev+3,off+len,"Going to read standard tabs"); result->tabs->normal = psiconv_read_length(config,buf,lev+3,off+len,&leng, &res); if (res) goto ERROR1; len += leng; break; case 0x17: psiconv_progress(config,lev+3,off+len,"Going to read extra tab"); if ((res = psiconv_parse_tab(config,buf,lev+3,off+len,&leng,&temp_tab))) goto ERROR1; if ((res = psiconv_list_add(result->tabs->extras,temp_tab))) { psiconv_free_tab(temp_tab); goto ERROR1; } psiconv_free_tab(temp_tab); len += leng; break; default: psiconv_warn(config,lev+3,off+len, "Unknown code in paragraph layout codes list"); psiconv_debug(config,lev+3,off+len,"Code: %02x",id); len ++; break; } nr ++; } if (len - 4 != list_length) { psiconv_error(config,lev+2,off+len, "Read past end of paragraph layout codes list. I probably lost track " "somewhere!"); psiconv_debug(config,lev+2,off+len,"Read %d characters instead of %d", len-4,list_length); res = PSICONV_E_PARSE; goto ERROR1; } len = list_length + 4; psiconv_progress(config,lev+1,off+len, "End of paragraph layout list (total length: %08x)",len); if (length) *length = len; return 0; ERROR1: psiconv_error(config,lev+1,off,"Reading of paragraph_layout_list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_character_layout_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_character_layout result) { int res=0; int len=0; int list_length,leng,nr; psiconv_u8 id; psiconv_u32 temp; psiconv_color temp_color; psiconv_font temp_font; psiconv_progress(config,lev+1,off,"Going to read character layout codes"); psiconv_progress(config,lev+2,off,"Going to read the list length"); list_length = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,off,"Length in bytes: %08x",list_length); len += 4; nr = 0; while(len-4 < list_length) { psiconv_progress(config,lev+2,off+len,"Going to read element %d",nr); psiconv_progress(config,lev+3,off+len,"Going to read the element id"); id = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+3,off+len,"Id: %02x",id); len ++; switch(id) { case 0x18: psiconv_progress(config,lev+3,off+len,"Going to skip an unknown setting"); len ++; break; case 0x19: psiconv_progress(config,lev+3,off+len,"Going to read text color"); if ((res = psiconv_parse_color(config,buf,lev+3,off+len, &leng,&temp_color))) goto ERROR1; psiconv_free_color(result->color); result->color = temp_color; len += leng; break; case 0x1a: psiconv_progress(config,lev+3,off+len,"Going to read background color (?)"); if ((res = psiconv_parse_color(config,buf,lev+2,off+len, &leng,&temp_color))) goto ERROR1; psiconv_free_color(result->back_color); result->back_color = temp_color; len += leng; break; case 0x1b: psiconv_progress(config,lev+3,off+len,"Going to skip an unknown setting"); len ++; break; case 0x1c: psiconv_progress(config,lev+3,off+len,"Going to read font size"); result->font_size = psiconv_read_size(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR1; len += leng; break; case 0x1d: psiconv_progress(config,lev+3,off+len,"Going to read italic"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng,&result->italic))) goto ERROR1; len += leng; break; case 0x1e: psiconv_progress(config,lev+3,off+len,"Going to read bold"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng,&result->bold))) goto ERROR1; len += leng; break; case 0x1f: psiconv_progress(config,lev+3,off+len,"Going to read super_sub"); temp = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR1; if (temp == 0x00) result->super_sub = psiconv_normalscript; else if (temp == 0x01) result->super_sub = psiconv_superscript; else if (temp == 0x02) result->super_sub = psiconv_subscript; else { psiconv_warn(config,lev+3,off+len, "Unknown super_sub argument in character layout codes list"); } psiconv_debug(config,lev+3,off+len,"Super_sub: %02x",temp); len ++; break; case 0x20: psiconv_progress(config,lev+3,off+len,"Going to read underline"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->underline))) goto ERROR1; len += leng; break; case 0x21: psiconv_progress(config,lev+3,off+len,"Going to read strikethrough"); if ((res = psiconv_parse_bool(config,buf,lev+3,off+len,&leng, &result->strikethrough))) goto ERROR1; len += leng; break; case 0x22: psiconv_progress(config,lev+3,off+len,"Going to read font"); if ((res = psiconv_parse_font(config,buf,lev+3,off+len, &leng, &temp_font))) goto ERROR1; psiconv_free_font(result->font); result->font = temp_font; len += leng; break; case 0x23: psiconv_progress(config,lev+3,off+len,"Going to skip an unknown setting"); len ++; break; case 0x24: psiconv_progress(config,lev+3,off+len, "Going to read unknown code 0x24 (%02x expected)", 0); temp = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR1; if (temp != 0) { psiconv_warn(config,lev+3,off+len, "Unknown code 0x24 value != 0x0 (0x%02x)", temp); } len ++; break; default: psiconv_warn(config,lev+3,off+len,"Unknown code in character layout list"); psiconv_debug(config,lev+3,off+len,"Code: %02x",id); len ++; break; } nr ++; } if (len - 4 != list_length) { psiconv_error(config,lev+2,off+len, "Read past end of character layout codes list. I probably lost track " "somewhere!"); psiconv_debug(config,lev+2,off+len,"Read %d characters instead of %d", len-4,list_length); res = PSICONV_E_PARSE; goto ERROR1; } len = list_length + 4; psiconv_progress(config,lev+1,off+len, "End of character layout list (total length: %08x)",len); if (length) *length = len; return res; ERROR1: psiconv_error(config,lev+1,off,"Reading of character_layout_list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_image.c0000644000175000017500000010342210336374674015020 00000000000000/* parse_image.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "parse_routines.h" #include "error.h" #include "image.h" #ifdef DMALLOC #include #endif /* Extreme debugging info */ #undef LOUD static int psiconv_decode_rle8 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded); static int psiconv_decode_rle12 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded); static int psiconv_decode_rle16 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded); static int psiconv_decode_rle24 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded); static int psiconv_bytes_to_pixel_data(const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes bytes, psiconv_pixel_ints *pixels, int colordepth, int xsize, int ysize); static int psiconv_pixel_data_to_floats (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_ints pixels, psiconv_pixel_floats_t *floats, int colordepth, int color, int redbits, int bluebits, int greenbits, const psiconv_pixel_floats_t palet); int psiconv_parse_jumptable_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_jumptable_section *result) { int res = 0; int len = 0; psiconv_u32 listlen,temp; int i; psiconv_progress(config,lev+1,off+len,"Going to read the jumptable section"); if (!((*result) = psiconv_list_new(sizeof(psiconv_u32)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the list length"); listlen = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"List length: %08x",listlen); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the list"); for (i = 0; i < listlen; i++) { temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if ((res = psiconv_list_add(*result,&temp))) goto ERROR2; psiconv_debug(config,lev+3,off+len,"Offset: %08x",temp); len += 4; } if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of jumptable section " "(total length: %08x)", len); return 0; ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Jumptable Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_paint_data_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length,int isclipart, psiconv_paint_data_section *result) { int res = 0; int len = 0; psiconv_u32 size,offset,picsize,temp,datasize,color, redbits,bluebits,greenbits; psiconv_u8 byte; int leng,i; psiconv_u32 bits_per_pixel,compression; psiconv_pixel_bytes bytes,decoded; psiconv_pixel_ints pixels; psiconv_pixel_floats_t floats,palet; psiconv_progress(config,lev+1,off,"Going to read a paint data section"); if (!((*result) = malloc(sizeof(**result)))) goto ERROR1; if (!(bytes = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR2; psiconv_progress(config,lev+2,off+len,"Going to read section size"); size = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Section size: %08x",size); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read pixel data offset"); offset = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (offset != 0x28) { psiconv_error(config,lev+2,off+len, "Paint data section data offset has unexpected value"); psiconv_debug(config,lev+2,off+len, "Data offset: read %08x, expected %08x",offset,0x28); res = -1; } len += 4; psiconv_progress(config,lev+2,off+len,"Going to read picture X size"); (*result)->xsize = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Picture X size: %08x:",(*result)->xsize); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read picture Y size"); (*result)->ysize = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Picture Y size: %08x:",(*result)->ysize); len += 4; picsize = (*result)->ysize * (*result)->xsize; psiconv_progress(config,lev+2,off+len,"Going to read the real picture x size"); (*result)->pic_xsize = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Picture x size: %f",(*result)->pic_xsize); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the real picture y size"); (*result)->pic_ysize = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Picture y size: %f",(*result)->pic_ysize); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the number of bits per pixel"); bits_per_pixel=psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Bits per pixel: %d",bits_per_pixel); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read whether this is a colour or greyscale picture"); color = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if ((color != 0) && (color != 1)) { psiconv_warn(config,lev+2,off+len, "Paint data section unknown color type (ignored)"); psiconv_debug(config,lev+2,off+len, "Color: read %08x, expected %08x or %08x",color,0,1); color = 1; } else { psiconv_debug(config,lev+2,off+len,"Color: %08x (%s picture)", color,(color?"color":"greyscale")); } len += 4; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (temp != 00) { psiconv_warn(config,lev+2,off+len, "Paint data section prologue has unknown values (ignored)"); psiconv_debug(config,lev+2,off+len, "read %08x, expected %08x",temp, 0x00); } len += 4; psiconv_progress(config,lev+2,off+len, "Going to read whether RLE compression is used"); compression=psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (compression > 4) { psiconv_warn(config,lev+2,off+len,"Paint data section has unknown " "compression type, assuming RLE"); psiconv_debug(config,lev+2,off+len,"Read compression type %d",compression); compression = 0; } psiconv_debug(config,lev+2,off+len,"Compression: %s", compression == 4?"RLE24":compression == 3?"RLE16": compression == 2?"RLE12":compression == 1?"RLE8":"none"); len += 4; if (isclipart) { psiconv_progress(config,lev+2,off+len,"Going to read an unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (temp != 0xffffffff) { psiconv_warn(config,lev+2,off+len, "Paint data section prologue has unknown values (ignoring)"); psiconv_debug(config,lev+2,off+len, "Read %08x, expected %08x",temp, 0xffffffff); } len += 4; psiconv_progress(config,lev+2,off+len,"Going to read a second unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; if (temp != 0x44) { psiconv_warn(config,lev+2,off+len, "Paint data section prologue has unknown values (ignoring)"); psiconv_debug(config,lev+2,off+len, "read %08x, expected %08x",temp, 0x44); } len += 4; } len = offset; datasize = size - len; if (isclipart) len += 8; if (color || (bits_per_pixel != 2)) psiconv_warn(config,lev+2,off+len, "All image types except 2-bit greyscale are experimental!"); psiconv_progress(config,lev+2,off+len,"Going to read the pixel data"); for (i = 0; i < datasize; i++) { byte = psiconv_read_u8(config,buf,lev+2,off+len+i,&res); #ifdef LOUD psiconv_debug(config,lev+2,off+len+i, "Pixel byte %04x of %04x has value %02x", i,datasize,byte); #endif if (res) goto ERROR3; psiconv_list_add(bytes,&byte); } len += datasize; switch(compression) { case 1: if ((res = psiconv_decode_rle8(config,lev+2,off+len,bytes,&decoded))) goto ERROR3; psiconv_list_free(bytes); bytes = decoded; break; case 2: if ((psiconv_decode_rle12(config,lev+2,off+len,bytes,&decoded))) goto ERROR3; psiconv_list_free(bytes); bytes = decoded; break; case 3: if ((psiconv_decode_rle16(config,lev+2,off+len,bytes,&decoded))) goto ERROR3; psiconv_list_free(bytes); bytes = decoded; break; case 4: if ((psiconv_decode_rle24(config,lev+2,off+len,bytes,&decoded))) goto ERROR3; psiconv_list_free(bytes); bytes = decoded; break; } if ((res = psiconv_bytes_to_pixel_data(config,lev+2,off+len,bytes, &pixels,bits_per_pixel, (*result)->xsize,(*result)->ysize))) goto ERROR3; /* Use some heuristics; things may get unexpected around here */ bluebits = redbits = greenbits = 0; palet = psiconv_palet_none; if (color) { if (bits_per_pixel == 4) palet = psiconv_palet_color_4; else if (bits_per_pixel == 8) palet = psiconv_palet_color_8; else { redbits = (bits_per_pixel+2) / 3; greenbits = (bits_per_pixel+2) / 3; bluebits = bits_per_pixel - redbits - greenbits; } } if ((res = psiconv_pixel_data_to_floats(config,lev+2,off+len,pixels, &floats,bits_per_pixel,color, redbits,greenbits,bluebits,palet))) goto ERROR4; (*result)->red = floats.red; (*result)->green = floats.green; (*result)->blue = floats.blue; psiconv_list_free(bytes); psiconv_list_free(pixels); if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of Paint Data Section (total length: %08x)", len); return 0; ERROR4: psiconv_list_free(pixels); ERROR3: psiconv_list_free(bytes); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Paint Data Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sketch_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sketch_section *result) { int res=0; int len=0; psiconv_u32 temp; int leng; psiconv_progress(config,lev+1,off,"Going to read the sketch section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the displayed hor. size"); (*result)->displayed_xsize = psiconv_read_u16(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Displayed hor. size: %04x", (*result)->displayed_xsize); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read displayed ver. size"); (*result)->displayed_ysize = psiconv_read_u16(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Displayed ver. size: %04x", (*result)->displayed_ysize); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the data hor. offset"); (*result)->picture_data_x_offset = psiconv_read_u16(config,buf,lev+2,off + len, &res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Data hor. offset: %04x", (*result)->picture_data_x_offset); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the data ver. offset"); (*result)->picture_data_y_offset = psiconv_read_u16(config,buf,lev+2,off + len, &res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Data ver. offset: %04x", (*result)->picture_data_y_offset); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the displayed hor. offset"); (*result)->displayed_size_x_offset = psiconv_read_u16(config,buf,lev+2,off + len, &res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Displayed hor. offset: %04x", (*result)->displayed_size_x_offset); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the displayed ver. offset"); (*result)->displayed_size_y_offset = psiconv_read_u16(config,buf,lev+2,off + len, &res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Displayed ver. offset: %04x", (*result)->displayed_size_y_offset); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the form hor. size"); (*result)->form_xsize = psiconv_read_u16(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Form hor. size: %04x", (*result)->form_xsize); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read form ver. size"); (*result)->form_ysize = psiconv_read_u16(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Form ver. size: %04x", (*result)->form_ysize); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to skip 1 word of zeros"); temp = psiconv_read_u16(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0) { psiconv_warn(config,lev+2,off+len, "Unexpected value in sketch section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %04x, expected %04x", temp,0); } off += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the picture data"); if ((res = psiconv_parse_paint_data_section(config,buf,lev+2,off+len,&leng,0, &((*result)->picture)))) goto ERROR2; off += leng; psiconv_progress(config,lev+2,off+len,"Going to read the hor. magnification"); (*result)->magnification_x = psiconv_read_u16(config,buf,lev+2,off+len,&res)/1000.0; if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Form hor. magnification: %f", (*result)->magnification_x); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the ver. magnification"); (*result)->magnification_y = psiconv_read_u16(config,buf,lev+2,off+len,&res)/1000.0; if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Form ver. magnification: %f", (*result)->magnification_y); len += 0x02; psiconv_progress(config,lev+2,off+len,"Going to read the left cut"); temp = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; (*result)->cut_left = (temp * 6.0) / (*result)->displayed_xsize; psiconv_debug(config,lev+2,off+len,"Left cut: raw %08x, real: %f", temp,(*result)->cut_left); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read the right cut"); temp = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; (*result)->cut_right = (temp * 6.0) / (*result)->displayed_xsize; psiconv_debug(config,lev+2,off+len,"Right cut: raw %08x, real: %f", temp,(*result)->cut_right); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read the top cut"); temp = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; (*result)->cut_top = (temp * 6.0) / (*result)->displayed_ysize; psiconv_debug(config,lev+2,off+len,"Top cut: raw %08x, real: %f", temp,(*result)->cut_top); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read the bottom cut"); temp = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR3; (*result)->cut_bottom = (temp * 6.0) / (*result)->displayed_ysize; psiconv_debug(config,lev+2,off+len,"Bottom cut: raw %08x, real: %f", temp,(*result)->cut_bottom); len += 0x04; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sketch section (total length: %08x)", len); return res; ERROR3: psiconv_free_paint_data_section((*result)->picture); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sketch Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_clipart_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_clipart_section *result) { int res=0; int len=0; int leng; psiconv_u32 temp; psiconv_progress(config,lev+1,off+len,"Going to read the clipart section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the section ID"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != PSICONV_ID_CLIPART_ITEM) { psiconv_warn(config,lev+2,off+len, "Unexpected value in clipart section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %08x, expected %08x",temp, PSICONV_ID_CLIPART_ITEM); } else psiconv_debug(config,lev+2,off+len,"Clipart ID: %08x", temp); off += 4; psiconv_progress(config,lev+2,off+len,"Going to read an unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Unexpected value in clipart section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %08x, expected %08x",temp, 0x02); } else psiconv_debug(config,lev+2,off+len,"First unknown long: %08x", temp); off += 4; psiconv_progress(config,lev+2,off+len,"Going to read a second unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0) { psiconv_warn(config,lev+2,off+len, "Unexpected value in clipart section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %08x, expected %08x",temp, 0); } else psiconv_debug(config,lev+2,off+len,"Second unknown long: %08x", temp); off += 4; psiconv_progress(config,lev+2,off+len,"Going to read a third unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0) { psiconv_warn(config,lev+2,off+len, "Unexpected value in clipart section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %08x, expected %08x",temp, 0); } else psiconv_debug(config,lev+2,off+len,"Third unknown long: %08x", temp); off += 4; psiconv_progress(config,lev+2,off+len,"Going to read a fourth unknown long"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if ((temp != 0x0c) && (temp != 0x08)) { psiconv_warn(config,lev+2,off+len, "Unexpected value in clipart section preamble (ignored)"); psiconv_debug(config,lev+2,off+len,"Read %08x, expected %08x or %08x",temp, 0x0c, 0x08); } else psiconv_debug(config,lev+2,off+len,"Fourth unknown long: %08x", temp); off += 4; psiconv_progress(config,lev+2,off+len,"Going to read the Paint Data Section"); if ((res = psiconv_parse_paint_data_section(config,buf,lev+2,off+len,&leng,1, &((*result)->picture)))) goto ERROR2; len += leng; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of clipart section (total length: %08x)", len); return 0; ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Font failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_decode_rle8 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded) { int res=0; psiconv_u8 *marker,*value; int i,j; psiconv_progress(config,lev+1,off,"Going to decode the RLE8 encoding"); if (!(*decoded = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR1; for (i = 0; i < psiconv_list_length(encoded);) { #ifdef LOUD psiconv_progress(config,lev+2,off,"Going to read marker byte at %04x",i); #endif if (!(marker = psiconv_list_get(encoded,i))) goto ERROR2; #ifdef LOUD psiconv_debug(config,lev+2,off,"Marker byte: %02x",*marker); #endif if (*marker < 0x80) { #ifdef LOUD psiconv_debug(config,lev+2,off,"Marker: repeat value byte %02x times", *marker+1); */ psiconv_progress(config,lev+2,off,"Going to read value byte at %04x",i+1); #endif if (!(value = psiconv_list_get(encoded,i+1))) goto ERROR2; #ifdef LOUD psiconv_debug(config,lev+2,off,"Value byte: %02x",*value); psiconv_progress(config,lev+2,off,"Adding %02x pixels %02x", *marker+1,*value); #endif for (j = 0; j < *marker + 1; j++) if ((res = psiconv_list_add(*decoded,value))) goto ERROR2; i += 2; } else { #ifdef LOUD psiconv_debug(config,lev+2,off,"Marker: %02x value bytes follow", 0x100 - *marker); #endif for (j = 0; j < (0x100 - *marker); j++) { #ifdef LOUD psiconv_progress(config,lev+2,off,"Going to read value byte at %04x", i+j+1); #endif if (!(value = psiconv_list_get(encoded,i+j+1))) goto ERROR2; #ifdef LOUD psiconv_debug(config,lev+2,off,"Value: %02x",*value); #endif if ((res = psiconv_list_add(*decoded,value))) goto ERROR2; } i += (0x100 - *marker) + 1; } } psiconv_progress(config,lev,off, "End of RLE8 decoding process"); return 0; ERROR2: psiconv_list_free(*decoded); ERROR1: psiconv_error(config,lev+1,off,"Decoding of RLE8 failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_decode_rle12 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded) { int res=0; psiconv_u8 *value0,*value1; psiconv_u32 value,repeat; int i,j; psiconv_progress(config,lev+1,off,"Going to decode the RLE12 encoding"); if (!(*decoded = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR1; for (i = 0; i < psiconv_list_length(encoded);) { psiconv_progress(config,lev+2,off,"Going to read data word at %04x",i); if (!(value0 = psiconv_list_get(encoded,i))) goto ERROR2; if (!(value1 = psiconv_list_get(encoded,i+1))) goto ERROR2; psiconv_debug(config,lev+2,off,"Data Word: %04x",*value0 + (*value1 << 8)); value = *value0 + ((*value1 & 0x0f) << 8); repeat = (*value1 >> 4) + 1; psiconv_progress(config,lev+2,off,"Adding %02x pixels %03x", repeat,value); for (j = 0; j < repeat; j ++) if ((res = psiconv_list_add(*decoded,&value))) goto ERROR2; i += 2; } psiconv_progress(config,lev,off, "End of RLE12 decoding process"); return 0; ERROR2: psiconv_list_free(*decoded); ERROR1: psiconv_error(config,lev+1,off,"Decoding of RLE12 failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_decode_rle16 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded) { int res=0; psiconv_u8 *marker,*value0,*value1; psiconv_u32 value; int i,j; psiconv_progress(config,lev+1,off,"Going to decode the RLE16 encoding"); if (!(*decoded = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR1; for (i = 0; i < psiconv_list_length(encoded);) { psiconv_progress(config,lev+2,off,"Going to read marker byte at %04x",i); if (!(marker = psiconv_list_get(encoded,i))) goto ERROR2; psiconv_debug(config,lev+2,off,"Marker byte: %02x",*marker); if (*marker < 0x80) { psiconv_debug(config,lev+2,off,"Marker: repeat value word %02x times", *marker+1); psiconv_progress(config,lev+2,off,"Going to read value word at %04x",i+1); if (!(value0 = psiconv_list_get(encoded,i+1))) goto ERROR2; if (!(value1 = psiconv_list_get(encoded,i+2))) goto ERROR2; value = *value0 + (*value1 << 8); psiconv_debug(config,lev+2,off,"Value word: %02x",value); psiconv_progress(config,lev+2,off,"Adding %02x pixels %04x", *marker+1,value); for (j = 0; j < *marker + 1; j++) if ((res = psiconv_list_add(*decoded,&value))) goto ERROR2; i += 3; } else { psiconv_debug(config,lev+2,off,"Marker: %02x value words follow", 0x100 - *marker); for (j = 0; j < (0x100 - *marker); j++) { psiconv_progress(config,lev+2,off,"Going to read value word at %04x", i+j*2+1); if (!(value0 = psiconv_list_get(encoded,i+j*2+1))) goto ERROR2; if (!(value1 = psiconv_list_get(encoded,i+j*2+2))) goto ERROR2; value = *value0 + (*value1 << 8); psiconv_debug(config,lev+2,off,"Value: %04x",value); if ((res = psiconv_list_add(*decoded,&value))) goto ERROR2; } i += (0x100 - *marker)*2 + 1; } } psiconv_progress(config,lev,off, "End of RLE16 decoding process"); return 0; ERROR2: psiconv_list_free(*decoded); ERROR1: psiconv_error(config,lev+1,off,"Decoding of RLE16 failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_decode_rle24 (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes encoded, psiconv_pixel_bytes *decoded) { int res=0; psiconv_u8 *marker,*value0,*value1,*value2; psiconv_u32 value; int i,j; psiconv_progress(config,lev+1,off,"Going to decode the RLE24 encoding"); if (!(*decoded = psiconv_list_new(sizeof(psiconv_u8)))) goto ERROR1; for (i = 0; i < psiconv_list_length(encoded);) { psiconv_progress(config,lev+2,off,"Going to read marker byte at %04x",i); if (!(marker = psiconv_list_get(encoded,i))) goto ERROR2; psiconv_debug(config,lev+2,off,"Marker byte: %02x",*marker); if (*marker < 0x80) { psiconv_debug(config,lev+2,off,"Marker: repeat value byte triplet %02x times", *marker+1); psiconv_progress(config,lev+2,off,"Going to read value byte triplet at %04x",i+1); if (!(value0 = psiconv_list_get(encoded,i+1))) goto ERROR2; if (!(value1 = psiconv_list_get(encoded,i+2))) goto ERROR2; if (!(value2 = psiconv_list_get(encoded,i+3))) goto ERROR2; value = *value0 + (*value1 << 8) + (*value2 << 16); psiconv_debug(config,lev+2,off,"Value byte triplet: %06x",value); psiconv_progress(config,lev+2,off,"Adding %02x pixels %06x", *marker+1,value); for (j = 0; j < *marker + 1; j++) if ((res = psiconv_list_add(*decoded,&value))) goto ERROR2; i += 4; } else { psiconv_debug(config,lev+2,off,"Marker: %02x value byte triplets follow", 0x100 - *marker); for (j = 0; j < (0x100 - *marker); j++) { psiconv_progress(config,lev+2,off,"Going to read value byte triplets at %04x", i+j*3+1); if (!(value0 = psiconv_list_get(encoded,i+j*3+1))) goto ERROR2; if (!(value1 = psiconv_list_get(encoded,i+j*3+2))) goto ERROR2; if (!(value2 = psiconv_list_get(encoded,i+j*3+3))) goto ERROR2; value = *value0 + (*value1 << 8) + (*value2 << 16); psiconv_debug(config,lev+2,off,"Value: %06x",value); if ((res = psiconv_list_add(*decoded,&value))) goto ERROR2; } i += (0x100 - *marker)*3 + 1; } } psiconv_progress(config,lev,off, "End of RLE24 decoding process"); return 0; ERROR2: psiconv_list_free(*decoded); ERROR1: psiconv_error(config,lev+1,off,"Decoding of RLE24 failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_bytes_to_pixel_data(const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_bytes bytes, psiconv_pixel_ints *pixels, int colordepth, int xsize, int ysize) { int res=0; int ibits,obits,x,y,bits; psiconv_u8 input; psiconv_u32 nr,output; psiconv_u8 *ientry; psiconv_progress(config,lev+1,off,"Going to convert the bytes to pixels"); if (!(*pixels = psiconv_list_new(sizeof(psiconv_u32)))) goto ERROR1; nr = 0; for (y = 0; y < ysize; y++) { /* New lines will start at longs */ while (nr % 4) nr ++; input = 0; ibits = 0; for (x= 0; x < xsize; x++) { #ifdef LOUD psiconv_progress(config,lev+2,off, "Processing pixel at (x,y) = (%04x,%04x)",x,y); #endif output = 0; obits = 0; while (obits < colordepth) { if (ibits == 0) { #ifdef LOUD psiconv_progress(config,lev+3,off, "Going to read byte %08x",nr); #endif if (!(ientry = psiconv_list_get(bytes,nr))) goto ERROR2; #ifdef LOUD psiconv_debug(config,lev+3,off,"Byte value: %02x",*ientry); #endif input = *ientry; ibits = 8; nr ++; } bits = ibits + obits > colordepth?colordepth-obits:ibits; output = output << bits; output |= input & ((1 << bits) - 1); input = input >> bits; ibits -= bits; obits += bits; } #ifdef LOUD psiconv_debug(config,lev+2,off,"Pixel value: %08x",output); #endif if ((res = psiconv_list_add(*pixels,&output))) goto ERROR2; } } psiconv_progress(config,lev,off, "Converting bytes to pixels completed"); return 0; ERROR2: psiconv_list_free(*pixels); ERROR1: psiconv_error(config,lev+1,off,"Converting bytes to pixels failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_pixel_data_to_floats (const psiconv_config config, int lev, psiconv_u32 off, const psiconv_pixel_ints pixels, psiconv_pixel_floats_t *floats, int colordepth, int color, int redbits, int bluebits, int greenbits, const psiconv_pixel_floats_t palet) { int res = 0; psiconv_u32 i; psiconv_u32 *pixel; psiconv_progress(config,lev+1,off,"Going to convert pixels to floats"); if (!((*floats).red = malloc(psiconv_list_length(pixels) * sizeof(*(*floats).red)))) goto ERROR1; if (!((*floats).green = malloc(psiconv_list_length(pixels) * sizeof(*(*floats).green)))) goto ERROR2; if (!((*floats).blue = malloc(psiconv_list_length(pixels) * sizeof(*(*floats).blue)))) goto ERROR3; (*floats).length = psiconv_list_length(pixels); for (i = 0; i < psiconv_list_length(pixels); i++) { if (!(pixel = psiconv_list_get(pixels,i))) goto ERROR4; #ifdef LOUD psiconv_progress(config,lev+2,off, "Handling pixel %04x (%04x)",i,*pixel); #endif if (!palet.length) { if (color) { (*floats).blue[i] = ((float) (*pixel & ((1 << bluebits) - 1))) / ((1 << bluebits) - 1); (*floats).green[i] = ((float) ((*pixel >> bluebits) & ((1 << greenbits) - 1))) / ((1 << greenbits) - 1); (*floats).red[i] = ((float) ((*pixel >> (bluebits+greenbits)) & ((1 << redbits) - 1))) / ((1 << redbits) - 1); } else { (*floats).red[i] = (*floats).green[i] = (*floats).blue[i] = ((float) *pixel) / ((1 << colordepth) - 1); } } else { if (*pixel >= palet.length) { psiconv_warn(config,lev+2,off, "Invalid palet color found (using color 0x00)"); (*floats).red[i] = palet.red[0]; (*floats).green[i] = palet.green[0]; (*floats).blue[i] = palet.blue[0]; } else { (*floats).red[i] = palet.red[*pixel]; (*floats).green[i] = palet.green[*pixel]; (*floats).blue[i] = palet.blue[*pixel]; } } #ifdef LOUD psiconv_debug(config,lev+2,off, "Pixel: Red (%f), green (%f), blue (%f)", (*floats).red[i],(*floats).green[i],(*floats).blue[i]); #endif } psiconv_progress(config,lev+1,off,"Finished converting pixels to floats"); return 0; ERROR4: free((*floats).blue); ERROR3: free((*floats).green); ERROR2: free((*floats).red); ERROR1: psiconv_error(config,lev+1,off,"Converting pixels to floats failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_page.c0000644000175000017500000002232010336374676014651 00000000000000/* parse_page.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_parse_page_header(const psiconv_config config, const psiconv_buffer buf,int lev,psiconv_u32 off, int *length,psiconv_page_header *result) { int res = 0; int len = 0; int i,leng,has_content; psiconv_u32 temp; psiconv_progress(config,lev+1,off,"Going to read a page header (or footer)"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the has_content flag"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == 0x00) has_content = 0; else if (temp == 0x01) has_content = 1; else { psiconv_warn(config,lev+2,off+len, "Page header has_content flag unknown value (assumed default)"); psiconv_debug(config,lev+2,off+len,"Flag: %02x",temp); has_content = 1; } psiconv_debug(config,lev+2,off+len,"Has_content flag: %02x",has_content); len += 1; psiconv_progress(config,lev+2,off+len,"Going to read displayed-on-first-page flag"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng, &(*result)->on_first_page))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read three zero bytes"); for (i = 0; i < 0x03; i++,len++) { temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Page Header unknown value in zero bytes section"); psiconv_debug(config,lev+2,off+len,"Byte %d: read %02x, expected %02x", i,temp,0x00); } } psiconv_progress(config,lev+2,off+len,"Going to read base paragraph layout"); if (!((*result)->base_paragraph_layout = psiconv_basic_paragraph_layout())) goto ERROR2; if (has_content) { if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+2,off+len,&leng, (*result)->base_paragraph_layout))) goto ERROR3; len += leng; } psiconv_progress(config,lev+2,off+len,"Going to read base character layout"); if (!((*result)->base_character_layout = psiconv_basic_character_layout())) goto ERROR3; if (has_content) { if ((res = psiconv_parse_character_layout_list(config,buf,lev+2,off+len,&leng, (*result)->base_character_layout))) goto ERROR4; } len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the TextEd section"); if (has_content) { if ((res = psiconv_parse_texted_section(config,buf,lev+2,off+len,&leng, &(*result)->text, (*result)->base_character_layout, (*result)->base_paragraph_layout))) goto ERROR4; len += leng; } else { (*result)->text = NULL; } if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of page header" "(total length: %08x", len); return res; ERROR4: psiconv_free_character_layout((*result)->base_character_layout); ERROR3: psiconv_free_paragraph_layout((*result)->base_paragraph_layout); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Page Header failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_page_layout_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_page_layout_section *result) { int res = 0; int len = 0; int leng; psiconv_u32 temp; psiconv_progress(config,lev+1,off,"Going to read the page layout section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read first page number"); (*result)->first_page_nr = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"First page: %d",(*result)->first_page_nr); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read header distance"); (*result)->header_dist = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Header distance: %6.3f",(*result)->header_dist); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read footer distance"); (*result)->footer_dist = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Footer distance: %6.3f",(*result)->footer_dist); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the left margin"); (*result)->left_margin = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Left margin: %6.3f",(*result)->left_margin); len += leng; psiconv_progress(config,lev+2,off+len,"Going read the to right margin"); (*result)->right_margin = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Right margin: %6.3f",(*result)->right_margin); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the top margin"); (*result)->top_margin = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Top margin: %6.3f",(*result)->top_margin); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the bottom margin"); (*result)->bottom_margin = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Bottom margin: %6.3f",(*result)->bottom_margin); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the header"); if ((res = psiconv_parse_page_header(config,buf,lev+2,off+len,&leng, &(*result)->header))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the footer"); if ((res = psiconv_parse_page_header(config,buf,lev+2,off+len,&leng, &(*result)->footer))) goto ERROR3; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read page dimensions id"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR4; if ((temp != PSICONV_ID_PAGE_DIMENSIONS1) && (temp != PSICONV_ID_PAGE_DIMENSIONS2)) { psiconv_warn(config,lev+2,off+len, "Page layout section page dimensions marker not found"); psiconv_debug(config,lev+2,off+len, "Page dimensions marker: read %08x, expected %08x or %08x", temp, PSICONV_ID_PAGE_DIMENSIONS1, PSICONV_ID_PAGE_DIMENSIONS2); } len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the page width"); (*result)->page_width = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR4; psiconv_debug(config,lev+2,off+len,"Page width: %6.3f",(*result)->page_width); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the page height"); (*result)->page_height = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR4; psiconv_debug(config,lev+2,off+len,"Page height: %6.3f",(*result)->page_height); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read page portrait/landscape"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng,&(*result)->landscape))) goto ERROR4; psiconv_debug(config,lev+2,off+len,"Landscape: %d",(*result)->landscape); len += leng; if (length) *length = len; psiconv_progress(config,lev,off+len-1,"End of page section (total length: %08x)", len); return res; ERROR4: psiconv_free_page_header((*result)->footer); ERROR3: psiconv_free_page_header((*result)->header); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Page Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_simple.c0000644000175000017500000003161210336374700015216 00000000000000/* parse_simple.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "parse_routines.h" #include "error.h" #include "unicode.h" #ifdef DMALLOC #include #endif static psiconv_float_t pow2(int n); static psiconv_string_t psiconv_read_string_aux(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off,int *length, int *status, int kind); /* Very inefficient, but good enough for now. By implementing it ourselves, we do not have to link with -lm */ psiconv_float_t pow2(int n) { psiconv_float_t res=1.0; int i; for (i = 0; i < (n<0?-n:n); i++) res *= 2.0; return n<0?1/res:res; } psiconv_u8 psiconv_read_u8(const psiconv_config config,const psiconv_buffer buf,int lev,psiconv_u32 off, int *status) { psiconv_u8 *ptr; ptr = psiconv_buffer_get(buf,off); if (!ptr) { psiconv_error(config,lev,off,"Trying byte read past the end of the file"); if (status) *status = -PSICONV_E_PARSE; return 0; } if (status) *status = 0; return *ptr; } psiconv_u16 psiconv_read_u16(const psiconv_config config,const psiconv_buffer buf,int lev,psiconv_u32 off, int *status) { psiconv_u8 *ptr0,*ptr1; ptr0 = psiconv_buffer_get(buf,off); ptr1 = psiconv_buffer_get(buf,off+1); if (!ptr0 || !ptr1) { psiconv_error(config,lev,off,"Trying word read past the end of the file"); if (status) *status = -PSICONV_E_PARSE; return 0; } if (status) *status = 0; return *ptr0 + (*ptr1 << 8); } psiconv_u32 psiconv_read_u32(const psiconv_config config,const psiconv_buffer buf,int lev,psiconv_u32 off, int *status) { psiconv_u8 *ptr0,*ptr1,*ptr2,*ptr3; ptr0 = psiconv_buffer_get(buf,off); ptr1 = psiconv_buffer_get(buf,off+1); ptr2 = psiconv_buffer_get(buf,off+2); ptr3 = psiconv_buffer_get(buf,off+3); if (!ptr0 || !ptr1 || !ptr2 || !ptr3) { psiconv_error(config,lev,off,"Trying long read past the end of the file"); if (status) *status = -PSICONV_E_PARSE; return 0; } if (status) *status = 0; return *ptr0 + (*ptr1 << 8) + (*ptr2 << 16) + (*ptr3 << 24); } psiconv_s32 psiconv_read_sint(const psiconv_config config,const psiconv_buffer buf,int lev,psiconv_u32 off, int *length,int *status) { int localstatus; psiconv_u32 temp; temp=psiconv_read_u32(config,buf,lev,off,&localstatus); if (status) *status = localstatus; if (length) *length = localstatus?0:4; return localstatus?0:(temp & 0x7fffffff)*(temp&0x80000000?-1:1); } psiconv_u32 psiconv_read_S(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length,int *status) { psiconv_u8 temp; psiconv_u32 res; int len,localstatus; psiconv_progress(config,lev+1,off,"Going to read a S length indicator"); temp = psiconv_read_u8(config,buf,lev+2,off,&localstatus); if (localstatus) goto ERROR; if ((temp & 0x03) == 0x02) { res = psiconv_read_u8(config,buf,lev+2,off,&localstatus) >> 2; if (localstatus) goto ERROR; len = 1; psiconv_debug(config,lev+2,off,"Indicator (1 byte): %02x",res); } else if ((temp & 0x07) == 0x05) { res = psiconv_read_u16(config,buf,lev+2,off,&localstatus) >> 3; if (localstatus) goto ERROR; len = 2; psiconv_debug(config,lev+2,off,"Indicator (2 bytes): %04x",res); } else { psiconv_error(config,lev+2,off,"S indicator: unknown encoding!"); psiconv_debug(config,lev+2,off,"Raw data first byte: %02x",temp); goto ERROR; } if (length) *length = len; if (status) *status = 0; psiconv_progress(config,lev+1,off+len-1, "End of S length indicator (total length: %08x)", len); return res; ERROR: psiconv_error(config,lev+1,off,"Reading of S indicator failed"); if (status) *status = localstatus; if (length) *length = 0; return 0; } psiconv_u32 psiconv_read_X(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { psiconv_u8 temp; psiconv_u32 res; int len,localstatus; psiconv_progress(config,lev+1,off,"Going to read a X length indicator"); temp = psiconv_read_u8(config,buf,lev+2,off,&localstatus); if (localstatus) goto ERROR; if ((temp & 0x01) == 0x00) { res = psiconv_read_u8(config,buf,lev+2,off,&localstatus) >> 1; if (localstatus) goto ERROR; len = 1; psiconv_debug(config,lev+2,off,"Indicator (1 byte): %02x",res); } else if ((temp & 0x03) == 0x01) { res = psiconv_read_u16(config,buf,lev+2,off,&localstatus) >> 2; if (localstatus) goto ERROR; len = 2; psiconv_debug(config,lev+2,off,"Indicator (2 bytes): %04x",res); } else if ((temp & 0x07) == 0x03) { res = psiconv_read_u32(config,buf,lev+2,off,&localstatus) >> 3; if (localstatus) goto ERROR; len = 4; psiconv_debug(config,lev+2,off,"Indicator (4 bytes): %08x",res); } else { psiconv_error(config,lev+2,off,"X indicator: unknown encoding!"); psiconv_debug(config,lev+2,off,"Raw data first byte: %02x",temp); goto ERROR; } if (length) *length = len; if (status) *status = 0; psiconv_progress(config,lev+1,off+len-1, "End of X length indicator (total length: %08x)", len); return res; ERROR: psiconv_error(config,lev+1,off,"Reading of X indicator failed"); if (status) *status = localstatus; if (length) *length = 0; return 0; } psiconv_length_t psiconv_read_length(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { psiconv_length_t res; int localstatus; res = (2.54/1440.0) * ((psiconv_s32) psiconv_read_u32(config,buf,lev,off, &localstatus)); if (localstatus) { psiconv_error(config,lev+1,off,"Reading of length failed"); if (length) *length = 0; if (status) *status = localstatus; return 0; } psiconv_debug(config,lev+1,off,"Length: %f",res); if (length) *length = 4; if (status) *status = 0; return res; } psiconv_size_t psiconv_read_size(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { psiconv_size_t res; int localstatus; res = ((psiconv_s32) psiconv_read_u32(config,buf,lev,off,&localstatus)) / 20.0; if (localstatus) { psiconv_error(config,lev+1,off,"Reading of size failed"); if (length) *length = 0; if (status) *status = localstatus; return 0; } psiconv_debug(config,lev+1,off,"Size: %f",res); if (status) *status = 0; if (length) *length = 4; return res; } int psiconv_parse_bool(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_bool_t *result) { psiconv_u8 temp; int localstatus; temp = psiconv_read_u8(config,buf,lev,off,&localstatus); if (localstatus) { psiconv_error(config,lev+1,off,"Reading of bool failed"); if (length) *length = 0; return localstatus; } if (length) *length = 1; if (temp == 0) { *result = psiconv_bool_false; return 0; } else if (temp == 1) { *result = psiconv_bool_true; return 0; } psiconv_warn(config,lev+1,off,"Unknown value for boolean"); psiconv_debug(config,lev+1,off,"Boolean value: %02x",temp); *result = psiconv_bool_true; return 0; } psiconv_string_t psiconv_read_string(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off,int *length, int *status) { return psiconv_read_string_aux(config,buf,lev,off,length,status,-1); } psiconv_string_t psiconv_read_short_string(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off,int *length, int *status) { return psiconv_read_string_aux(config,buf,lev,off,length,status,-2); } psiconv_string_t psiconv_read_charlist(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int nrofchars, int *status) { int length; if (nrofchars <= 0) { psiconv_error(config,lev,off, "psiconv_read_charlist called with non-positive nrofchars"); if (status) *status = -PSICONV_E_OTHER; return NULL; } return psiconv_read_string_aux(config,buf,lev,off,&length,status,nrofchars); } psiconv_string_t psiconv_read_string_aux(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off,int *length, int *status, int kind) { int bytecount,i,leng,len,localstatus; psiconv_string_t result; char *res_copy; psiconv_list string; psiconv_ucs2 nextchar; psiconv_ucs2 *nextcharptr; psiconv_progress(config,lev+1,off,"Going to read a string"); if (kind == -1) bytecount = psiconv_read_S(config,buf,lev+2,off,&leng,&localstatus); else if (kind == -2) { bytecount = psiconv_read_u8(config,buf,lev+2,off,&localstatus); leng = 1; } else { bytecount = kind; leng = 0; localstatus = 0; } if (localstatus) goto ERROR1; psiconv_debug(config,lev+2,off,"Length: %i",bytecount); len = leng; if (!(string = psiconv_list_new(sizeof(*result)))) goto ERROR1; /* Read the string into a temporary list */ i = 0; while (i < bytecount) { nextchar = psiconv_unicode_read_char(config,buf,lev,off+i+len, &leng,&localstatus); if (localstatus) goto ERROR2; if ((localstatus = psiconv_list_add(string,&nextchar))) goto ERROR2; i += leng; } if (i > bytecount) { psiconv_error(config,lev,off+i+len,"Malformed string"); localstatus = PSICONV_E_PARSE; goto ERROR2; } len += bytecount; /* Copy the list to the actual string */ if (!(result = malloc(sizeof(*result) * (psiconv_list_length(string) + 1)))) goto ERROR2; for (i = 0; i < psiconv_list_length(string); i++) { if (!(nextcharptr = psiconv_list_get(string,i))) { psiconv_error(config,lev,off+i+len,"Data structure corruption"); goto ERROR3; } result[i] = *nextcharptr; } result[i] = 0; res_copy = psiconv_make_printable(config,result); if (!res_copy) goto ERROR3; psiconv_debug(config,lev+2,off,"Contents: `%s'",res_copy); free(res_copy); psiconv_list_free(string); if (length) *length = len; if (status) *status = 0; psiconv_progress(config,lev+1,off+len-1,"End of string (total length: %08x)",len); return result; ERROR3: free(result); ERROR2: psiconv_list_free(string); ERROR1: psiconv_error(config,lev+1,off,"Reading of string failed"); if (status) *status = localstatus; if (length) *length = 0; return NULL; } psiconv_float_t psiconv_read_float(const psiconv_config config,const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { psiconv_float_t result,bitvalue; int res,bit; psiconv_u32 temp=0; psiconv_progress(config,lev+1,off,"Going to read a float"); bitvalue = 0.5; result = 1.0; for (bit = 0x33; bit > 0; bit--) { if ((bit == 0x33) || ((bit & 0x07) == 0x07)) temp = psiconv_read_u8(config,buf,lev+2,off+ (bit >> 3),&res); if (res) goto ERROR; if (temp & (0x01 << (bit & 0x07))) result += bitvalue; bitvalue /= 2.0; } temp = psiconv_read_u16(config,buf,lev+2,off+6,&res); if (res) goto ERROR; if (temp & 0x8000) result = -result; temp = (temp & 0x7ff0) >> 4; result *= pow2(((int) temp)-0x3ff); psiconv_debug(config,lev+1,off,"Float value: %f",result); if (length) *length = 8; if (*status) *status = res; return result; ERROR: psiconv_error(config,lev+1,off,"Reading of float failed"); if (length) *length = 0; if (*status) *status = res; return 0.0; } psiconv-0.9.8/lib/psiconv/parse_texted.c0000644000175000017500000001134710336374701015226 00000000000000/* parse_texted.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_parse_texted_section(const psiconv_config config, const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, psiconv_texted_section *result, psiconv_character_layout base_char, psiconv_paragraph_layout base_para) { int res = 0; int len = 0; psiconv_u32 layout_sec = 0; psiconv_u32 unknown_sec = 0; psiconv_u32 replacement_sec = 0; psiconv_u32 temp; int leng; psiconv_progress(config,lev+1,off,"Going to read a texted section"); if (!((*result) = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read section id"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != PSICONV_ID_TEXTED_BODY) { psiconv_error(config,lev+2,off+len, "Page header section body id not found"); psiconv_debug(config,lev+2,off+len, "Page body id: read %08x, expected %08x",temp, PSICONV_ID_TEXTED); res = -PSICONV_E_PARSE; goto ERROR2; } len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the section jumptable"); while (temp = psiconv_read_u32(config,buf,lev+3,off+len,&res), !res && temp != PSICONV_ID_TEXTED_TEXT) { len += 4; if (temp == PSICONV_ID_TEXTED_LAYOUT) { layout_sec = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+3,off+len,"Found Layout section at %08x",layout_sec); } else if (temp == PSICONV_ID_TEXTED_REPLACEMENT) { replacement_sec = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+3,off+len,"Found Replacement section at %08x", replacement_sec); } else if (temp == PSICONV_ID_TEXTED_UNKNOWN) { unknown_sec= psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR2; if (unknown_sec) { psiconv_warn(config,lev+3,off+len, "Unknown section in TextEd jumptable has real offset (ignoring)"); } psiconv_debug(config,lev+3,off+len,"Found Unknown section at %08x", unknown_sec); } else { psiconv_warn(config,lev+3,off+len, "Unknown section in TextEd jumptable (ignoring)"); psiconv_debug(config,lev+3,off+len,"Section ID %08x at offset %08x",temp, psiconv_read_u32(config,buf,lev+3,off+len,NULL)); } len += 4; } if (res) goto ERROR2; len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the text"); if ((res = psiconv_parse_text_section(config,buf,lev+2,off+len,&leng, &(*result)->paragraphs))) goto ERROR2; len += leng; if (layout_sec) { psiconv_progress(config,lev+2,off+len,"Going to read the layout"); if ((res = psiconv_parse_styleless_layout_section(config,buf,lev+2,layout_sec,NULL, (*result)->paragraphs, base_char,base_para))) goto ERROR3; } #if 0 if (replacement_sec) { psiconv_progress(config,lev+2,off+len,"Going to read the replacements"); /* WHATEVER */ } #endif if (length) *length = len; psiconv_progress(config,lev+1,off+len-1,"End of TextEd section " "(total length: %08x", len); return 0; ERROR3: psiconv_free_text_and_layout((*result)->paragraphs); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of TextEd Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_word.c0000644000175000017500000003341510336374703014706 00000000000000/* parse_word.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_parse_word_status_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_word_status_section *result) { int res=0; int len=0; psiconv_u32 temp; int leng; psiconv_progress(config,lev+1,off,"Going to read the word status section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Word status section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the first byte of display flags"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->show_tabs = temp&0x01 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show tabs: %02x",(*result)->show_tabs); (*result)->show_spaces = temp&0x02 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show spaces: %02x",(*result)->show_spaces); (*result)->show_paragraph_ends = temp &0x04 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show paragraph ends: %02x", (*result)->show_paragraph_ends); (*result)->show_line_breaks = temp & 0x08 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show line breaks: %02x", (*result)->show_line_breaks); (*result)->show_hard_minus = temp & 0x20 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show hard minus: %02x", (*result)->show_hard_minus); (*result)->show_hard_space = temp & 0x40 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show hard space: %02x", (*result)->show_hard_space); if (temp & 0x90) { psiconv_warn(config,lev+2,off+len,"Word status section first byte of display " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp & 0x90); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read second byte of display flags"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->show_full_pictures = temp & 0x01 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show full pictures: %02x", (*result)->show_full_pictures); (*result)->show_full_graphs = temp & 0x02 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show full graphs: %02x", (*result)->show_full_graphs); if (temp & 0xfc) { psiconv_warn(config,lev+2,off+len,"Word status section second byte of display " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp & 0xfc); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read top toolbar setting"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng, &(*result)->show_top_toolbar))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read side toolbar setting"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng, &(*result)->show_side_toolbar))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read operational flags"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->fit_lines_to_screen = temp & 0x08 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Fit lines to screen: %02x", (*result)->fit_lines_to_screen); if (temp & 0xf7) { psiconv_warn(config,lev+2,off+len,"Word status section operational flags " "contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp & 0xfc); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read cursor position"); (*result)->cursor_position = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cursor position: %08x", (*result)->cursor_position); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read display size"); (*result)->display_size = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Display size: %08x", (*result)->display_size); len += 0x04; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of word status section (total length: %08x)", len); return 0; ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Word Status Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_word_styles_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_word_styles_section *result) { int res=0; int len=0; int leng,i,nr,j; psiconv_word_style style; psiconv_u32 temp; psiconv_progress(config,lev+1,off,"Going to read the word styles section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read style normal"); if (!(style = malloc(sizeof(*style)))) goto ERROR2; style->name = NULL; if (!(style->paragraph = psiconv_basic_paragraph_layout())) goto ERROR2_1; psiconv_progress(config,lev+3,off+len,"Going to read the paragraph codes"); if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+3,off+len,&leng, style->paragraph))) goto ERROR2_2; len += leng; psiconv_progress(config,lev+3,off+len,"Going to read the character codes"); if (!(style->character = psiconv_basic_character_layout())) goto ERROR2_2; if ((res = psiconv_parse_character_layout_list(config,buf,lev+3,off+len,&leng, style->character))) goto ERROR2_3; len += leng; /* Ugly: I really don't know whether this is right for UTF8 */ psiconv_progress(config,lev+3,off+len,"Going to read the hotkey"); style->hotkey = psiconv_unicode_read_char(config,buf,lev+3,off+len,NULL,&res); psiconv_debug(config,lev+3,off+len,"Normal Hotkey value %08x",style->hotkey); if (res) goto ERROR2_3; len += 0x04; (*result)->normal = style; psiconv_progress(config,lev+2,off+len,"Going to read hotkeys list"); if (!((*result)->styles = psiconv_list_new(sizeof(*style)))) goto ERROR3; if (!(style = malloc(sizeof(*style)))) { goto ERROR3_1; } psiconv_progress(config,lev+3,off+len,"Going to read the number of entries"); nr = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR3_2; len ++; psiconv_debug(config,lev+3,off+len,"Nummer of hotkeys: %02x",nr); for (i = 0; i < nr; i ++) { /* Ugly: I really don't know whether this is right for UTF8 */ style->hotkey = psiconv_unicode_read_char(config,buf,lev+3,off+len, NULL,&res); psiconv_debug(config,lev+3,off+len,"Hotkey %d value %08x",i,style->hotkey); len += 0x04; if ((res = psiconv_list_add((*result)->styles,style))) goto ERROR3_2; } free(style); psiconv_progress(config,lev+2,off+len,"Going to read all other styles"); psiconv_progress(config,lev+2,off+len,"Going to read the number of styles"); nr = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR4; if (nr != psiconv_list_length((*result)->styles)) { psiconv_warn(config,lev+3,off+len,"Number of styles and hotkeys do not match"); psiconv_debug(config,lev+3,off+len,"%d hotkeys, %d styles", psiconv_list_length((*result)->styles), nr); } len ++; for (i = 0; i < nr; i++) { psiconv_progress(config,lev+2,off+len,"Next style: %d",i); if (i >= psiconv_list_length((*result)->styles)) { if (!(style = malloc(sizeof(*style)))) goto ERROR5; style->hotkey = 0; if (psiconv_list_add((*result)->styles,style)) { free(style); goto ERROR5; } psiconv_debug(config,lev+3,off+len,"New entry added in list"); free(style); } if (!(style = psiconv_list_get((*result)->styles,i))) goto ERROR5; psiconv_progress(config,lev+3,off+len,"Going to read the style name"); style->name = psiconv_read_string(config,buf,lev+3,off+len,&leng,&res); if (res) goto ERROR5; len += leng; psiconv_progress(config,lev+3,off+len, "Going to read whether this style is built-in"); temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR6; if (temp == PSICONV_ID_STYLE_BUILT_IN) { style->built_in = psiconv_bool_true; psiconv_debug(config,lev+3,off+len,"Built-in style"); } else if (temp == PSICONV_ID_STYLE_REMOVABLE) { style->built_in = psiconv_bool_false; psiconv_debug(config,lev+3,off+len,"Removable style"); } else { psiconv_warn(config,lev+3,off+len, "Word styles section unknown style id (treated as built-in)"); psiconv_debug(config,lev+3,off+len,"Unknown id: %08x",temp); style->built_in = psiconv_bool_false; } len += 4; psiconv_progress(config,lev+3,off+len,"Going to read outline level"); style->outline_level = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR6; psiconv_debug(config,lev+3,off+len,"Outline Level: %08x", style->outline_level); len += 4; psiconv_progress(config,lev+3,off+len,"Going to read the character codes"); if (!(style->character = psiconv_clone_character_layout((*result)->normal->character))) goto ERROR6; if ((res = psiconv_parse_character_layout_list(config,buf,lev+3,off+len,&leng, style->character))) goto ERROR7; len += leng; psiconv_progress(config,lev+3,off+len,"Going to read the paragraph codes"); if (!(style->paragraph = psiconv_clone_paragraph_layout((*result)->normal->paragraph))) goto ERROR7; if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+3,off+len,&leng, style->paragraph))) goto ERROR8; len += leng; } psiconv_progress(config,lev+2,off+len,"Reading trailing bytes"); for (i = 0; i < psiconv_list_length((*result)->styles); i++) { temp = psiconv_read_u8(config,buf,lev+3,off+len,&res); if (res) goto ERROR4; if (temp != 0xff) { psiconv_warn(config,lev+3,off+len,"Unknown trailing style byte"); psiconv_debug(config,lev+3,off+len,"Trailing byte: %02x expected, read %02x", 0xff,temp); } else psiconv_debug(config,lev+3,off+len,"Read trailing byte 0xff"); len++; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of word styles section (total length: %08x)", len); return res; ERROR3_2: free(style); ERROR3_1: psiconv_list_free((*result)->styles); goto ERROR3; ERROR2_3: psiconv_free_character_layout(style->character); ERROR2_2: psiconv_free_paragraph_layout(style->paragraph); ERROR2_1: free (style); goto ERROR2; ERROR8: psiconv_free_paragraph_layout(style->paragraph); ERROR7: psiconv_free_character_layout(style->character); ERROR6: free(style->name); ERROR5: for (j = 0; j < i ;j++) { if (!(style = psiconv_list_get((*result)->styles,j))) { psiconv_error(config,lev+1,off,"Data structure corruption"); goto ERROR4; } psiconv_free_character_layout(style->character); psiconv_free_paragraph_layout(style->paragraph); free(style->name); } ERROR4: psiconv_list_free((*result)->styles); ERROR3: psiconv_free_word_style((*result)->normal); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Word Status Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/parse_sheet.c0000644000175000017500000021472710336374736015060 00000000000000/* parse_sheet.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "parse_routines.h" #include "error.h" #ifdef DMALLOC #include #endif static psiconv_sheet_cell_layout psiconv_basic_cell_layout(void) { psiconv_sheet_cell_layout result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->character = psiconv_basic_character_layout())) goto ERROR2; if (!(result->paragraph = psiconv_basic_paragraph_layout())) goto ERROR3; if (!(result->numberformat = malloc(sizeof(*result->numberformat)))) goto ERROR4; result->numberformat->code = psiconv_numberformat_general; result->numberformat->decimal = 2; return result; ERROR4: psiconv_free_paragraph_layout(result->paragraph); ERROR3: psiconv_free_character_layout(result->character); ERROR2: free(result); ERROR1: return NULL; } static psiconv_sheet_cell_layout psiconv_clone_cell_layout (psiconv_sheet_cell_layout original) { psiconv_sheet_cell_layout result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; if (!(result->character = psiconv_clone_character_layout(original->character))) goto ERROR2; if (!(result->paragraph = psiconv_clone_paragraph_layout(original->paragraph))) goto ERROR3; if (!(result->numberformat = malloc(sizeof(*result->numberformat)))) goto ERROR4; result->numberformat->code = original->numberformat->code; result->numberformat->decimal = original->numberformat->decimal; return result; ERROR4: psiconv_free_paragraph_layout(result->paragraph); ERROR3: psiconv_free_character_layout(result->character); ERROR2: free(result); ERROR1: return NULL; } static psiconv_sheet_cell_reference_t psiconv_read_var_cellref (const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { int len=0; int res; psiconv_sheet_cell_reference_t result; psiconv_u32 temp; psiconv_progress(config,lev+1,off+len,"Going to read a sheet cell reference"); psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x00); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Sheet cell reference initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet cell row reference to unknown row (reset)"); } result.row.offset = temp; result.row.absolute = psiconv_bool_true; len += 4; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet cell column reference to unknown row (reset)"); } result.column.offset = temp; result.column.absolute = psiconv_bool_true; len += 4; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet column reference (total length: %08x)", len); return result; ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Column Reference failed"); if (length) *length = 0; if (status) *status = res?res:-PSICONV_E_NOMEM; return result; } static psiconv_sheet_cell_block_t psiconv_read_var_cellblock (const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, int *status) { int len=0; int res; psiconv_sheet_cell_block_t result; psiconv_u32 temp; psiconv_progress(config,lev+1,off+len,"Going to read a sheet cell block reference"); psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x00); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Sheet cell reference initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet block initial row reference to unknown row (reset)"); } result.first.row.offset = temp; result.first.row.absolute = psiconv_bool_true; len += 4; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet block initial column reference to unknown row (reset)"); } result.first.column.offset = temp; result.first.column.absolute = psiconv_bool_true; len += 4; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet block final row reference to unknown row (reset)"); } result.last.row.offset = temp; result.last.row.absolute = psiconv_bool_true; len += 4; temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp & 0xffff0000) { psiconv_warn(config,lev+2,off+len, "Sheet block final column reference to unknown row (reset)"); } result.last.column.offset = temp; result.last.column.absolute = psiconv_bool_true; len += 4; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet cell block reference (total length: %08x)", len); return result; ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Cell Block Reference failed"); if (length) *length = 0; if (status) *status = res?res:-PSICONV_E_NOMEM; return result; } int psiconv_parse_sheet_numberformat(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_numberformat result) { int res=0; int len=0; psiconv_u8 temp; psiconv_progress(config,lev+1,off,"Going to read a sheet numberformat"); psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet numberformat initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the code byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; psiconv_debug(config,lev+2,off+len,"Code: %02x",temp); if (temp == 0x00) result->code = psiconv_numberformat_general; else if (temp == 0x02) result->code = psiconv_numberformat_fixeddecimal; else if (temp == 0x04) result->code = psiconv_numberformat_scientific; else if (temp == 0x06) result->code = psiconv_numberformat_currency; else if (temp == 0x08) result->code = psiconv_numberformat_percent; else if (temp == 0x0A) result->code = psiconv_numberformat_triads; else if (temp == 0x0C) result->code = psiconv_numberformat_boolean; else if (temp == 0x0E) result->code = psiconv_numberformat_text; else if (temp == 0x10) result->code = psiconv_numberformat_date_dmm; else if (temp == 0x12) result->code = psiconv_numberformat_date_mmd; else if (temp == 0x14) result->code = psiconv_numberformat_date_ddmmyy; else if (temp == 0x16) result->code = psiconv_numberformat_date_mmddyy; else if (temp == 0x18) result->code = psiconv_numberformat_date_yymmdd; else if (temp == 0x1A) result->code = psiconv_numberformat_date_dmmm; else if (temp == 0x1C) result->code = psiconv_numberformat_date_dmmmyy; else if (temp == 0x1E) result->code = psiconv_numberformat_date_ddmmmyy; else if (temp == 0x20) result->code = psiconv_numberformat_date_mmm; else if (temp == 0x22) result->code = psiconv_numberformat_date_monthname; else if (temp == 0x24) result->code = psiconv_numberformat_date_mmmyy; else if (temp == 0x26) result->code = psiconv_numberformat_date_monthnameyy; else if (temp == 0x28) result->code = psiconv_numberformat_date_monthnamedyyyy; else if (temp == 0x2A) result->code = psiconv_numberformat_datetime_ddmmyyyyhhii; else if (temp == 0x2C) result->code = psiconv_numberformat_datetime_ddmmyyyyHHii; else if (temp == 0x2E) result->code = psiconv_numberformat_datetime_mmddyyyyhhii; else if (temp == 0x30) result->code = psiconv_numberformat_datetime_mmddyyyyHHii; else if (temp == 0x32) result->code = psiconv_numberformat_datetime_yyyymmddhhii; else if (temp == 0x34) result->code = psiconv_numberformat_datetime_yyyymmddHHii; else if (temp == 0x36) result->code = psiconv_numberformat_time_hhii; else if (temp == 0x38) result->code = psiconv_numberformat_time_hhiiss; else if (temp == 0x3A) result->code = psiconv_numberformat_time_HHii; else if (temp == 0x3C) result->code = psiconv_numberformat_time_HHiiss; else { psiconv_warn(config,lev+2,off+len,"Unknown number format (assumed general)"); result->code = psiconv_numberformat_general; } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the number of decimals"); result->decimal = psiconv_read_u8(config,buf,lev+2,off+len,&res) >> 1; if (res) goto ERROR1; psiconv_debug(config,lev+2,off+len,"Decimals: %d",result->decimal); len ++; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet number format (total length: %08x)", len); return 0; ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Number Format failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_status_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_status_section *result) { int res=0; int len=0; psiconv_u32 temp; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet status section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet status section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the cursor row"); (*result)->cursor_row = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cursor row: %08x", (*result)->cursor_row); len += 0x04; psiconv_progress(config,lev+2,off+len, "Going to read the cursor column"); (*result)->cursor_column = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cursor column: %08x", (*result)->cursor_column); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read initially display graph"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng, &(*result)->show_graph))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len, "Going to read the toolbar status byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->show_side_sheet_toolbar = temp&0x01 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show side sheet toolbar: %02x", (*result)->show_side_sheet_toolbar); (*result)->show_top_sheet_toolbar = temp&0x02 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show top sheet toolbar: %02x", (*result)->show_top_sheet_toolbar); (*result)->show_side_graph_toolbar = temp&0x04 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show side graph toolbar: %02x", (*result)->show_side_graph_toolbar); (*result)->show_top_graph_toolbar = temp&0x08 ? psiconv_bool_true : psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Show top graph toolbar: %02x", (*result)->show_top_graph_toolbar); if (temp & 0xf0) { psiconv_warn(config,lev+2,off+len,"Sheet status section toolbar byte " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp & 0xf0); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the scrollbar status byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if ((temp & 0x03) == 0x03) { psiconv_warn(config,lev+2,off+len,"Sheet status section scrollbar byte " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flag: %02x",temp & 0x03); } (*result)->show_horizontal_scrollbar = (temp&0x03) == 1? psiconv_triple_off : (temp&0x03) == 2? psiconv_triple_auto: psiconv_triple_on; psiconv_debug(config,lev+2,off+len,"Show horizontal scrollbar: %02x", (*result)->show_horizontal_scrollbar); if ((temp & 0x0c) == 0x0c) { psiconv_warn(config,lev+2,off+len,"Sheet status section scrollbar byte " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flag: %02x",temp & 0x0c); } (*result)->show_vertical_scrollbar = (temp&0x0c) ==0x04? psiconv_triple_off: (temp&0x0c) ==0x08? psiconv_triple_auto: psiconv_triple_on; psiconv_debug(config,lev+2,off+len,"Show vertical scrollbar: %02x", (*result)->show_vertical_scrollbar); if (temp & 0xf0) { psiconv_warn(config,lev+2,off+len,"Sheet status section scrollbar byte " "flags contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp & 0xf0); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read an unknown byte (%02x expected)",0x00); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Sheet status section unknown byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read sheet display size"); (*result)->sheet_display_size = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Sheet display size: %08x", (*result)->sheet_display_size); len += 0x04; psiconv_progress(config,lev+2,off+len,"Going to read graph display size"); (*result)->graph_display_size = psiconv_read_u32(config,buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Graph display size: %08x", (*result)->graph_display_size); len += 0x04; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet status section (total length: %08x)", len); return 0; ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Status Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_workbook_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_workbook_section *result) { int res=0,with_name; psiconv_u32 temp,formulas_off,worksheets_off,info_off,var_off,name_off=0; int len=0; psiconv_progress(config,lev+1,off,"Going to read the sheet workbook section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x or %02x expected)", 0x02,0x04); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if ((temp != 0x04) && temp !=0x02) { psiconv_warn(config,lev+2,off+len, "Sheet workbook section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } with_name = temp ==0x04; len ++; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the sheet info Section"); info_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Offset: %04x",info_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Formulas List"); formulas_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Offset: %04x",formulas_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Worksheet List"); worksheets_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Offset: %04x",worksheets_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Variable List"); var_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Offset: %04x",var_off); len += 4; if (with_name) { psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Name Section"); name_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Offset: %04x",name_off); len += 4; } psiconv_progress(config,lev+2,off+len,"Going to read the info section"); if ((res = psiconv_parse_sheet_info_section(config,buf,lev+2,info_off,NULL, &(*result)->info))) goto ERROR2; psiconv_progress(config,lev+2,off+len,"Going to read the variables list"); if ((res = psiconv_parse_sheet_variable_list(config,buf,lev+2,var_off,NULL, &(*result)->variables))) goto ERROR3; psiconv_progress(config,lev+2,off+len,"Going to read the formulas list"); if ((res = psiconv_parse_sheet_formula_list(config,buf,lev+2,formulas_off,NULL, &(*result)->formulas))) goto ERROR4; psiconv_progress(config,lev+2,off+len,"Going to read the worksheet list"); if ((res = psiconv_parse_sheet_worksheet_list(config,buf,lev+2,worksheets_off, NULL,&(*result)->worksheets))) goto ERROR5; if (with_name) { psiconv_progress(config,lev+2,off+len,"Going to read the name section"); if ((res = psiconv_parse_sheet_name_section(config,buf,lev+2,name_off,NULL, &(*result)->name))) goto ERROR6; } else (*result)->name = NULL; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet workbook section (total length: %08x)", len); return 0; ERROR6: psiconv_free_sheet_worksheet_list((*result)->worksheets); ERROR5: psiconv_free_formula_list((*result)->formulas); ERROR4: psiconv_free_sheet_variable_list((*result)->variables); ERROR3: psiconv_free_sheet_info_section((*result)->info); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Workbook Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_name_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_name_section *result) { int res=0; psiconv_u32 temp; int len=0,leng; psiconv_progress(config,lev+1,off,"Going to read the sheet name section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet name section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the sheet name"); (*result)->name = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; len += leng; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet name section (total length: %08x)", len); return 0; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Name Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_info_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_info_section *result) { int res=0; psiconv_u32 temp; int len=0,leng; psiconv_progress(config,lev+1,off,"Going to read the sheet info section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet info section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read an unknown Xint"); temp = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Value: %d\n",temp); len += leng; psiconv_progress(config,lev+2,off+len, "Going to read the flags byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->auto_recalc = temp & 0x01 ? psiconv_bool_true:psiconv_bool_false; psiconv_debug(config,lev+2,off+len,"Auto recalculation: %02x", (*result)->auto_recalc); if ((temp & 0xfe) != 0x02) { psiconv_warn(config,lev+2,off+len,"Sheet Info Section flags byte " "contains unknown flags (ignored)"); psiconv_debug(config,lev+2,off+len,"Unknown flags: %02x",temp &0xfe); } len ++; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet info section (total length: %08x)", len); return 0; ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Name Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_formula_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_formula_list *result) { int res=0; int len=0; psiconv_u32 temp; psiconv_formula formula; psiconv_u32 listlen,i; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet formula list"); if (!(*result = psiconv_list_new(sizeof(struct psiconv_formula_s)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet formula list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the number of formulas"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of formulas: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all formulas"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read formula %d",i); if ((res = psiconv_parse_formula(config,buf,lev+3,off+len,&leng,&formula))) goto ERROR2; if ((res = psiconv_list_add(*result,formula))) goto ERROR3; free(formula); len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet formula list (total length: %08x)", len); return 0; ERROR3: psiconv_free_formula(formula); ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Formula list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_cell(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell *result, const psiconv_sheet_cell_layout default_layout, const psiconv_sheet_line_list row_default_layouts, const psiconv_sheet_line_list col_default_layouts) { int res=0; int len=0; psiconv_u32 temp; psiconv_bool_t has_layout; int leng; char *auxstr; psiconv_progress(config,lev+1,off,"Going to read a sheet cell structure"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; (*result)->layout = NULL; (*result)->type = psiconv_cell_blank; psiconv_progress(config,lev+2,off+len,"Going to read the cell position"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; len ++; temp += psiconv_read_u8(config,buf,lev+2,off+len,&res) << 8; if (res) goto ERROR2; len ++; temp += psiconv_read_u8(config,buf,lev+2,off+len,&res) << 16; if (res) goto ERROR2; len ++; (*result)->column = (temp >> 2) & 0xFF; (*result)->row = (temp >> 10) & 0x3FFF; psiconv_debug(config,lev+2,off+len,"Cell position is col:%02x row:%04x", (*result)->column,(*result)->row); if (temp & 0x03) { psiconv_warn(config,lev+2,off+len,"Unknown flags in cell position (ignored)"); psiconv_debug(config,lev+2,off+len,"Flags: %02x",temp & 0x03); } psiconv_progress(config,lev+2,off+len,"Going to read the cell type"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; len ++; (*result)->type = (temp >> 5) & 0x07; (*result)->calculated = (temp & 0x08)?psiconv_bool_true:psiconv_bool_false; has_layout = (temp & 0x10)?psiconv_bool_true:psiconv_bool_false; psiconv_progress(config,lev+2,off+len,"Going to read the cell value"); if ((*result)->type == psiconv_cell_blank) { psiconv_debug(config,lev+2,off+len,"Cell type is blank: no value given."); } else if ((*result)->type == psiconv_cell_int) { psiconv_progress(config,lev+2,off+len,"Going to read an integer"); (*result)->data.dat_int = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; len += 4; psiconv_debug(config,lev+2,off+len,"Cell contents: %ld",(*result)->data.dat_int); } else if ((*result)->type == psiconv_cell_bool) { psiconv_progress(config,lev+2,off+len,"Going to read a boolean"); if ((res = psiconv_parse_bool(config,buf,lev+2,off+len,&leng, &(*result)->data.dat_bool))) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cell contents: %01x",temp); (*result)->data.dat_bool = temp?psiconv_bool_true:psiconv_bool_false; len += leng; } else if ((*result)->type == psiconv_cell_error) { psiconv_progress(config,lev+2,off+len,"Going to read the error code"); temp = psiconv_read_u16(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp == 0) (*result)->data.dat_error = psiconv_sheet_error_none; else if (temp == 1) (*result)->data.dat_error = psiconv_sheet_error_null; else if (temp == 2) (*result)->data.dat_error = psiconv_sheet_error_divzero; else if (temp == 3) (*result)->data.dat_error = psiconv_sheet_error_value; else if (temp == 4) (*result)->data.dat_error = psiconv_sheet_error_reference; else if (temp == 5) (*result)->data.dat_error = psiconv_sheet_error_name; else if (temp == 6) (*result)->data.dat_error = psiconv_sheet_error_number; else if (temp == 7) (*result)->data.dat_error = psiconv_sheet_error_notavail; else { psiconv_warn(config,lev+2,off+len,"Unknown error code (default assumed)"); psiconv_debug(config,lev+2,off+len,"Error code: %04x",temp); (*result)->data.dat_error = psiconv_sheet_error_none; } psiconv_debug(config,lev+2,off+len,"Cell contents: %04x", (*result)->data.dat_error); len += 2; } else if ((*result)->type == psiconv_cell_float) { psiconv_progress(config,lev+2,off+len,"Going to read a float"); (*result)->data.dat_float = psiconv_read_float(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cell contents: %f",(*result)->data.dat_float); len += leng; } else if ((*result)->type == psiconv_cell_string) { psiconv_progress(config,lev+2,off+len,"Going to read a string"); (*result)->data.dat_string = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; if (!(auxstr = psiconv_make_printable(config,(*result)->data.dat_string))) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cell contents: `%s'",auxstr); free(auxstr); len += leng; } else { psiconv_error(config,lev+2,off+len,"Unknown Sheet Cell type: %02x",(*result)->type); res = PSICONV_E_PARSE; goto ERROR2; } if (!((*result)->layout = psiconv_clone_cell_layout( psiconv_get_default_layout(row_default_layouts, col_default_layouts, default_layout, (*result)->row, (*result)->column)))) goto ERROR2; if (has_layout) { if ((res = psiconv_parse_sheet_cell_layout(config,buf,lev+2,off+len, &leng,(*result)->layout))) goto ERROR2; len += leng; } if ((*result)->calculated) { psiconv_progress(config,lev+2,off+len,"Going to read the cell formula reference"); temp = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Cell formula reference: %d",temp); len += leng; (*result)->ref_formula = temp; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet cell structure (total length: %08x)", len); return 0; ERROR2: psiconv_free_sheet_cell(*result); ERROR1: psiconv_warn(config,lev+1,off,"Reading of Sheet Cell Structure failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_cell_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_list *result, const psiconv_sheet_cell_layout default_layout, const psiconv_sheet_line_list row_default_layouts, const psiconv_sheet_line_list col_default_layouts) { int res=0; int len=0; psiconv_u32 temp; psiconv_sheet_cell cell; psiconv_u32 listlen,i; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet cell list"); if (!(*result = psiconv_list_new(sizeof(struct psiconv_sheet_cell_s)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet cell list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x00); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Sheet cell list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the number of defined cells"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of defined cells: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all cells"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read cell %d",i); if ((res = psiconv_parse_sheet_cell(config,buf,lev+3,off+len,&leng,&cell, default_layout,row_default_layouts, col_default_layouts))) goto ERROR2; if ((res = psiconv_list_add(*result,cell))) goto ERROR3; free(cell); len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet cell list (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_cell(cell); ERROR2: psiconv_free_sheet_cell_list(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Cells List failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_worksheet_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_worksheet_list *result) { psiconv_sheet_worksheet worksheet; int res=0; int len=0; psiconv_u8 temp; psiconv_u32 offset; int leng,i,nr; psiconv_progress(config,lev+1,off,"Going to read the worksheet list"); if (!(*result = psiconv_list_new(sizeof(*worksheet)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial bytes (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet worksheet list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the list length"); nr = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Length: %02x",nr); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the list"); for (i=0 ; i < nr; i++) { psiconv_progress(config,lev+3,off+len,"Going to read element %d",i); psiconv_progress(config,lev+4,off+len, "Going to read the initial byte (%02x expected)",0x00); temp = psiconv_read_u8(config,buf,lev+4,off+len,&res); if (res) goto ERROR2; if (temp != 0x00) { psiconv_warn(config,lev+4,off+len, "Sheet worksheet element initial byte unknown value (ignored)"); psiconv_debug(config,lev+4,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+4,off+len,"Going to read the worksheet offset"); offset = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+4,off+len,"Offset: %08x",offset); len += 4; if ((res = psiconv_parse_sheet_worksheet(config,buf,lev+4,offset,NULL, &worksheet))) goto ERROR2; if ((res = psiconv_list_add(*result,worksheet))) goto ERROR3; free(worksheet); } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of worksheet list (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_worksheet(worksheet); ERROR2: psiconv_free_sheet_worksheet_list(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of worksheet list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_cell_layout(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_cell_layout result) { int res=0; int len=0; int leng; psiconv_u8 temp; psiconv_progress(config,lev+1,off,"Going to read a sheet cell layout"); psiconv_progress(config,lev+2,off+len, "Going to read the first byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Worksheet section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the default formats flag"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR1; len ++; if (temp & 0x01) { psiconv_progress(config,lev+3,off+len,"Going to read the default paragraph codes"); if ((res = psiconv_parse_paragraph_layout_list(config,buf,lev+3,off+len,&leng, result->paragraph))) goto ERROR1; len += leng; } if (temp & 0x02) { psiconv_progress(config,lev+3,off+len,"Going to read the default character codes"); if ((res = psiconv_parse_character_layout_list(config,buf,lev+3,off+len,&leng, result->character))) goto ERROR1; len += leng; } if (temp & 0x04) { psiconv_progress(config,lev+3,off+len, "Going to read the default number format"); psiconv_parse_sheet_numberformat(config,buf,lev+3,off+len,&leng, result->numberformat); len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet cell layout (total length: %08x)", len); return 0; ERROR1: psiconv_error(config,lev+1,off,"Reading of sheet cell layout failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_worksheet(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_worksheet *result) { int res=0; psiconv_u32 temp,cells_off,grid_off,rows_off,cols_off,unknown_off; int len=0; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet worksheet section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial bytes (%02x expected)",0x04); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x04) { psiconv_warn(config,lev+2,off+len, "Worksheet section initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the flags byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Flags byte: %02x",temp); (*result)->show_zeros = (temp & 0x01)?psiconv_bool_true:psiconv_bool_false; if (temp & 0xfe) { psiconv_warn(config,lev+2,off+len, "Worksheet section flags byte unknown bits (ignored)"); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the default cell layout"); if (!((*result)->default_layout = psiconv_basic_cell_layout())) goto ERROR2; if ((res = psiconv_parse_sheet_cell_layout(config,buf,lev+2,off+len,&leng, (*result)->default_layout))) goto ERROR3; len += leng; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the row defaults Section"); rows_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Offset: %04x",rows_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the column defaults Section"); cols_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Offset: %04x",cols_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Cells List"); cells_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Offset: %04x",cells_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the Grid Section"); grid_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Offset: %04x",grid_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the offset of the 3rd ??? Section"); unknown_off = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Offset: %04x",unknown_off); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read a long of the 3rd ??? Section " "(%08x expected)",0x00); temp = psiconv_read_u32(config,buf,lev+2,unknown_off,&res); if (res) goto ERROR3; if (temp != 0x00) { psiconv_warn(config,lev+2,unknown_off, "Unknown worksheet subsection has unknown contents (ignored)"); psiconv_debug(config,lev+2,unknown_off,"Offset: %04x",temp); } len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the row defaults"); if ((res = psiconv_parse_sheet_line_list(config,buf,lev+2,rows_off,NULL, &(*result)->row_default_layouts, (*result)->default_layout))) goto ERROR3; psiconv_progress(config,lev+2,off+len,"Going to read the column defaults"); if ((res = psiconv_parse_sheet_line_list(config,buf,lev+2,cols_off,NULL, &(*result)->col_default_layouts, (*result)->default_layout))) goto ERROR4; psiconv_progress(config,lev+2,off+len,"Going to read the cells list"); if ((res = psiconv_parse_sheet_cell_list(config,buf,lev+2,cells_off,NULL, &(*result)->cells, (*result)->default_layout, (*result)->row_default_layouts, (*result)->col_default_layouts))) goto ERROR5; psiconv_progress(config,lev+2,off+len,"Going to read the grid section"); if ((res = psiconv_parse_sheet_grid_section(config,buf,lev+2,grid_off,NULL, &(*result)->grid))) goto ERROR6; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet worksheet section (total length: %08x)", len); return 0; ERROR6: psiconv_free_sheet_cell_list((*result)->cells); ERROR5: psiconv_free_sheet_line_list((*result)->col_default_layouts); ERROR4: psiconv_free_sheet_line_list((*result)->row_default_layouts); ERROR3: psiconv_free_sheet_cell_layout((*result)->default_layout); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Worksheet Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_line(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_line *result, const psiconv_sheet_cell_layout default_layout) { int res=0; int len=0; int leng; psiconv_progress(config,lev+1,off,"Going to read a sheet line"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len,"Going to read the line number"); (*result)->position = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Line number: %d\n",(*result)->position); len += leng; if (!((*result)->layout = psiconv_clone_cell_layout(default_layout))) goto ERROR2; if ((res = psiconv_parse_sheet_cell_layout(config,buf,lev+2,off+len, &leng,(*result)->layout))) goto ERROR3; len += leng; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of the sheet line (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_cell_layout((*result)->layout); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of the sheet line failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_line_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_line_list *result, const psiconv_sheet_cell_layout default_layout) { int res=0; int len=0; psiconv_u32 temp; psiconv_sheet_line line; psiconv_u32 listlen,i; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet line list"); if (!(*result = psiconv_list_new(sizeof(struct psiconv_sheet_line_s)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet line list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the number of defined lines"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of defined lines: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all lines"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read line %d",i); if ((res = psiconv_parse_sheet_line(config,buf,lev+3,off+len,&leng,&line, default_layout))) goto ERROR2; if ((res = psiconv_list_add(*result,line))) goto ERROR3; free(line); len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet line list (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_line(line); ERROR2: psiconv_free_sheet_line_list(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Line List failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_variable(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_variable *result) { int res=0; int len=0; psiconv_u32 marker; int leng; psiconv_progress(config,lev+1,off,"Going to read a sheet variable"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the variable name"); (*result)->name = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the type marker"); marker = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Marker: %02x",marker); len ++; if (marker == 0x00) { (*result)->type = psiconv_var_int; psiconv_progress(config,lev+2,off+len,"Going to read a signed integer"); (*result)->data.dat_int = psiconv_read_sint(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Value: %d",(*result)->data.dat_int); len += leng; } else if (marker == 0x01) { (*result)->type = psiconv_var_float; psiconv_progress(config,lev+2,off+len,"Going to read a floating point number"); (*result)->data.dat_float = psiconv_read_float(config,buf,lev+2,off+len,&leng, &res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Value: %f",(*result)->data.dat_float); len += leng; } else if (marker == 0x02) { (*result)->type = psiconv_var_string; psiconv_progress(config,lev+2,off+len,"Going to read a string"); (*result)->data.dat_string = psiconv_read_string(config,buf,lev+2,off+len, &leng, &res); if (res) goto ERROR3; len += leng; } else if (marker == 0x03) { (*result)->type = psiconv_var_cellref; psiconv_progress(config,lev+2,off+len,"Going to read a cell reference"); (*result)->data.dat_cellref = psiconv_read_var_cellref(config,buf,lev+2,off+len, &leng, &res); if (res) goto ERROR3; len += leng; } else if (marker == 0x04) { (*result)->type = psiconv_var_cellblock; psiconv_progress(config,lev+2,off+len,"Going to read a cell block reference"); (*result)->data.dat_cellblock = psiconv_read_var_cellblock(config,buf,lev+2, off+len, &leng, &res); if (res) goto ERROR3; len += leng; } else { psiconv_error(config,lev+2,off+len,"Sheet variable unknown type marker"); res = -PSICONV_E_PARSE; goto ERROR3; } psiconv_progress(config,lev+2,off+len,"Going to read the variable number"); (*result)->number = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR4; psiconv_debug(config,lev+2,off+len,"Number: %08x",(*result)->number); len += 4; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet variable (total length: %08x)", len); return 0; ERROR4: if ((*result)->type == psiconv_var_string) free((*result)->data.dat_string); ERROR3: free((*result)->name); ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Variable failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_variable_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_variable_list *result) { int res=0; int len=0; psiconv_u32 temp; psiconv_sheet_variable variable; psiconv_u32 listlen,i; int leng; psiconv_progress(config,lev+1,off,"Going to read the sheet variable list"); if (!(*result = psiconv_list_new(sizeof(struct psiconv_sheet_variable_s)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the initial byte (%02x expected)",0x02); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x02) { psiconv_warn(config,lev+2,off+len, "Sheet variable list initial byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Initial byte: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the number of variables"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of variables: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all variables"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read variable %d",i); if ((res = psiconv_parse_sheet_variable(config,buf,lev+3,off+len,&leng,&variable))) goto ERROR2; if ((res = psiconv_list_add(*result,variable))) goto ERROR3; len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet variabels list (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_variable(variable); ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Variable list failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_grid_section(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_section *result) { int res=0,i; int len=0,leng; psiconv_u32 temp; psiconv_progress(config,lev+1,off,"Going to read the sheet grid section"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the first flags byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->show_column_titles = temp&0x01?psiconv_bool_true: psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Show column titles: %s", (*result)->show_column_titles?"true":"false"); (*result)->show_row_titles = temp&0x02?psiconv_bool_true:psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Show row titles: %s", (*result)->show_row_titles?"true":"false"); (*result)->show_vertical_grid = temp&0x04?psiconv_bool_true: psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Show vertical grid: %s", (*result)->show_vertical_grid?"true":"false"); (*result)->show_horizontal_grid = temp&0x07?psiconv_bool_true: psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Show horizontal grid: %s", (*result)->show_horizontal_grid?"true":"false"); (*result)->freeze_rows = temp&0x80?psiconv_bool_true:psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Freeze rows: %s", (*result)->freeze_rows?"true":"false"); if ((temp & 0x70) != 0x30) { psiconv_warn(config,lev+2,off+len, "Grid section first flag byte has unknown bits (ignored)"); psiconv_debug(config,lev+2,off+len,"Bits: %02x (%02x expected)",temp&0x70,0x30); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the second flags byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->freeze_columns = temp&0x01?psiconv_bool_true:psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Freeze columns: %s", (*result)->freeze_columns?"true":"false"); if ((temp & 0xfe) != 0x80) { psiconv_warn(config,lev+2,off+len, "Grid section second flag byte has unknown bits (ignored)"); psiconv_debug(config,lev+2,off+len,"Bits: %02x (%02x expected)",temp&0xfe,0x80); } len ++; psiconv_progress(config,lev+2,off+len, "Going to an unknown byte (%02x expected)",0x90); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; if (temp != 0x90) { psiconv_warn(config,lev+2,off+len, "Grid section third byte unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Value: %02x",temp); } len ++; psiconv_progress(config,lev+2,off+len, "Going to read the fourth flags byte"); temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; (*result)->show_page_breaks = temp&0x04?psiconv_bool_true:psiconv_bool_false; psiconv_debug(config,lev+2,off+len, "Show page breaks: %s", (*result)->show_page_breaks?"true":"false"); if ((temp & 0xfc) != 0x00) { psiconv_warn(config,lev+2,off+len, "Grid section fourth flag byte has unknown bits (ignored)"); psiconv_debug(config,lev+2,off+len,"Bits: %02x (%02x expected)",temp&0xfc,0x00); } len ++; psiconv_progress(config,lev+2,off+len,"Going to read the first visible row"); (*result)->first_row = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"First row: %d",(*result)->first_row); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the first visible column"); (*result)->first_column = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"First column: %d",(*result)->first_column); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the last visible row"); (*result)->last_row = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Last row: %d",(*result)->last_row); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the last visible column"); (*result)->last_column = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Last column: %d",(*result)->last_column); len += 4; psiconv_progress(config,lev+2,off+len,"Going to read the default row height"); (*result)->default_row_height = psiconv_read_length(config,buf,lev+2,off+len, &leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Default row height: %f", (*result)->default_row_height); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the row heights list"); if ((res = psiconv_parse_sheet_grid_size_list(config,buf,lev+2,off+len,&leng, &(*result)->row_heights))) goto ERROR2; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the default column height"); (*result)->default_column_width = psiconv_read_length(config,buf,lev+2,off+len, &leng,&res); if (res) goto ERROR3; psiconv_debug(config,lev+2,off+len,"Default column width: %f", (*result)->default_column_width); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the column heights list"); if ((res = psiconv_parse_sheet_grid_size_list(config,buf,lev+2,off+len,&leng, &(*result)->column_heights))) goto ERROR3; len += leng; psiconv_progress(config,lev+2,off+len, "Going to read an unknown word (%04x expected)",0x00); temp = psiconv_read_u16(config,buf,lev+2,off+len,&res); if (res) goto ERROR4; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Grid section unknown word has unknown value (ignored)"); psiconv_debug(config,lev+2,off+len,"Value: %04x",temp); } len += 2; psiconv_progress(config,lev+2,off+len,"Going to read the row breaks list"); if ((res = psiconv_parse_sheet_grid_break_list(config,buf,lev+2,off+len,&leng, &(*result)->row_page_breaks))) goto ERROR4; len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the column breaks list"); if ((res = psiconv_parse_sheet_grid_break_list(config,buf,lev+2,off+len,&leng, &(*result)->column_page_breaks))) goto ERROR5; len += leng; psiconv_progress(config,lev+2,off+len, "Going to read 22 unknown bytes (%02x expected)",0x00); for (i = 0; i < 22 ; i++) { temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR6; if (temp != 0x00) { psiconv_warn(config,lev+2,off+len, "Grid section unknown byte %d has unknown value (ignored)", i); psiconv_debug(config,lev+2,off+len,"Value: %02x",temp); } len += 1; } if ((*result)->freeze_rows || (*result)->freeze_columns) { psiconv_progress(config,lev+2,off+len,"Going to read number of frozen rows"); (*result)->frozen_rows = psiconv_read_u32(config,buf,lev+2,off+len, &res); if (res) goto ERROR6; psiconv_debug(config,lev+2,off+len,"Number of frozen rows: %d", (*result)->frozen_rows); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read number of frozen columns"); (*result)->frozen_columns = psiconv_read_u32(config,buf,lev+2,off+len, &res); if (res) goto ERROR6; psiconv_debug(config,lev+2,off+len,"Number of frozen columns: %d", (*result)->frozen_columns); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read first unfrozen row"); (*result)->first_unfrozen_row_displayed = psiconv_read_u32(config,buf,lev+2, off+len, &res); if (res) goto ERROR6; psiconv_debug(config,lev+2,off+len,"First row: %d", (*result)->first_unfrozen_row_displayed); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read first unfrozen column"); (*result)->first_unfrozen_column_displayed = psiconv_read_u32(config,buf,lev+2, off+len,&res); if (res) goto ERROR6; psiconv_debug(config,lev+2,off+len,"First column: %d", (*result)->first_unfrozen_column_displayed); len += leng; } else (*result)->frozen_rows = (*result)->frozen_columns = (*result)->first_unfrozen_row_displayed = (*result)->first_unfrozen_column_displayed = 0; psiconv_progress(config,lev+2,off+len, "Going to read 3 unknown bytes (%02x expected)",0xff); for (i = 0; i < 3 ; i++) { temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR6; if (temp != 0xff) { psiconv_warn(config,lev+2,off+len, "Grid section unknown byte %d has unknown value (ignored)", i); psiconv_debug(config,lev+2,off+len,"Value: %02x",temp); } len ++; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet grid section (total length: %08x)", len); return 0; ERROR6: psiconv_free_sheet_grid_break_list((*result)->column_page_breaks); ERROR5: psiconv_free_sheet_grid_break_list((*result)->row_page_breaks); ERROR4: psiconv_free_sheet_grid_size_list((*result)->column_heights); ERROR3: psiconv_free_sheet_grid_size_list((*result)->row_heights); ERROR2: free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Grid Section failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_grid_size_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_size_list *result) { int res=0; int len=0,i; int leng,listlen; psiconv_sheet_grid_size size; psiconv_progress(config,lev+1,off,"Going to read a sheet grid size list"); if (!(*result = psiconv_list_new(sizeof(struct psiconv_sheet_grid_size_s)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the number of elements"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of elements: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all elements"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read element %d",i); if ((res = psiconv_parse_sheet_grid_size(config,buf,lev+3,off+len,&leng,&size))) goto ERROR2; if ((res = psiconv_list_add(*result,size))) goto ERROR3; free(size); len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet grid size list (total length: %08x)", len); return 0; ERROR3: psiconv_free_sheet_grid_size(size); ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Grid Size List failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_grid_size(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_size *result) { int res=0; int len=0; int leng; psiconv_progress(config,lev+1,off,"Going to read a sheet grid size"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the row or column number"); (*result)->line_number = psiconv_read_u32(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Line number: %d\n",(*result)->line_number); len += 4; psiconv_progress(config,lev+2,off+len, "Going to read the row or column height"); (*result)->size = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Size: %f\n",(*result)->size); len += leng; if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet grid size(total length: %08x)", len); return 0; ERROR2: free (*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Grid Size failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_parse_sheet_grid_break_list(const psiconv_config config, const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_sheet_grid_break_list *result) { int res=0; int len=0,i; int leng,listlen; psiconv_u32 nr; psiconv_progress(config,lev+1,off,"Going to read a sheet grid break list"); if (!(*result = psiconv_list_new(sizeof(psiconv_u32)))) goto ERROR1; psiconv_progress(config,lev+2,off+len, "Going to read the number of elements"); listlen = psiconv_read_X(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; psiconv_debug(config,lev+2,off+len,"Number of elements: %d",listlen); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read all elements"); for (i = 0; i < listlen; i++) { psiconv_progress(config,lev+3,off+len,"Going to read element %d",i); nr = psiconv_read_u32(config,buf,lev+3,off+len,&res); if (res) goto ERROR2; if ((res = psiconv_list_add(*result,&nr))) goto ERROR2; len += leng; } if (length) *length = len; psiconv_progress(config,lev,off+len-1, "End of sheet grid break list (total length: %08x)", len); return 0; ERROR2: psiconv_list_free(*result); ERROR1: psiconv_error(config,lev+1,off,"Reading of Sheet Grid break List failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } psiconv-0.9.8/lib/psiconv/generate_simple.c0000644000175000017500000002033710336374731015704 00000000000000/* generate_simple.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif static int psiconv_write_string_aux(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_string_t value,int kind); int psiconv_write_u8(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_u8 value) { int res; psiconv_progress(config,lev,0,"Writing u8"); psiconv_debug(config,lev+1,0,"Value: %02x",value); res = psiconv_buffer_add(buf,value); if (res) psiconv_error(config,lev,0,"Out of memory error"); return res; } int psiconv_write_u16(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_u16 value) { int res; psiconv_progress(config,lev,0,"Writing u16"); psiconv_debug(config,lev+1,0,"Value: %04x",value); if ((res = psiconv_buffer_add(buf,value & 0xff))) goto ERROR; if ((res = psiconv_buffer_add(buf,(value & 0xff00) >> 8))) goto ERROR; ERROR: if (res) psiconv_error(config,lev,0,"Out of memory error"); return res; } int psiconv_write_u32(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_u32 value) { int res; psiconv_progress(config,lev,0,"Writing u32"); psiconv_debug(config,lev+1,0,"Value: %08x",value); if ((res = psiconv_buffer_add(buf,value & 0xff))) goto ERROR; if ((res = psiconv_buffer_add(buf,(value & 0xff00) >> 8))) goto ERROR; if ((res = psiconv_buffer_add(buf,(value & 0xff0000) >> 16))) goto ERROR; if ((res = psiconv_buffer_add(buf,(value & 0xff000000) >> 24))) goto ERROR; ERROR: if (res) psiconv_error(config,lev,0,"Out of memory error"); return res; } int psiconv_write_S(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_u32 value) { int res; psiconv_progress(config,lev,0,"Writing S"); psiconv_debug(config,lev+1,0,"Value: %08x",value); if (value < 0x40) res = psiconv_write_u8(config,buf,lev+2,value * 4 + 2); else if (value < 0x2000) res = psiconv_write_u16(config,buf,lev+2,value * 8 + 3); else { psiconv_error(config,0,psiconv_buffer_length(buf), "Don't know how to write S value larger than 0x2000 " "(trying %x)",value); res = -PSICONV_E_GENERATE; } if (res) psiconv_error(config,lev,0,"Writing of S failed"); else psiconv_progress(config,lev,0,"End of S"); return res; } int psiconv_write_X(const psiconv_config config,psiconv_buffer buf, int lev, const psiconv_u32 value) { int res; psiconv_progress(config,lev,0,"Writing X"); psiconv_debug(config,lev+1,0,"Value: %08x",value); if (value < 0x80) res = psiconv_write_u8(config,buf,lev+2,value * 2); else if (value < 0x4000) res = psiconv_write_u16(config,buf,lev+2,value * 4 + 1); else if (value < 0x20000000) res = psiconv_write_u16(config,buf,lev+2,value * 8 + 3); else { psiconv_error(config,lev,0, "Don't know how to write X value larger than 0x20000000 " "(trying %x)",value); res = -PSICONV_E_GENERATE; } if (res) psiconv_error(config,lev,0,"Writing of X failed"); else psiconv_progress(config,lev,0,"End of X"); return res; } int psiconv_write_length(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_length_t value) { int res; psiconv_progress(config,lev,0,"Writing length"); psiconv_debug(config,lev+1,0,"Value: %f",value); res = psiconv_write_u32(config,buf,lev+2,value * (1440.0/2.54) + 0.5); if (res) psiconv_error(config,lev,0,"Writing of length failed"); else psiconv_progress(config,lev,0,"End of length"); return res; } int psiconv_write_size(const psiconv_config config,psiconv_buffer buf, int lev, psiconv_size_t value) { int res; psiconv_progress(config,lev,0,"Writing size"); psiconv_debug(config,lev+1,0,"Value: %f",value); res = psiconv_write_u32(config,buf,lev+2,value * 20.0 + 0.5); if (res) psiconv_error(config,lev,0,"Writing of size failed"); else psiconv_progress(config,lev,0,"End of size"); return res; } int psiconv_write_bool(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_bool_t value) { int res; psiconv_progress(config,lev,0,"Writing bool"); psiconv_debug(config,lev+1,0,"Value: %s", value == psiconv_bool_false?"False":"True"); if ((value != psiconv_bool_true) && (value != psiconv_bool_false)) psiconv_warn(config,0,psiconv_buffer_length(buf), "Boolean has non-enum value (found %d, used true)",value); res = psiconv_write_u8(config,buf,lev+2,value == psiconv_bool_false?0:1); if (res) psiconv_error(config,lev,0,"Writing of bool failed"); else psiconv_progress(config,lev,0,"End of bool"); return res; } int psiconv_write_string(const psiconv_config config,psiconv_buffer buf, int lev, const psiconv_string_t value) { int res; psiconv_progress(config,lev,0,"Writing string"); res = psiconv_write_string_aux(config,buf,lev+1,value,-1); if (res) psiconv_error(config,lev,0,"Writing of string failed"); else psiconv_progress(config,lev,0,"End of string"); return res; } int psiconv_write_short_string(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_string_t value) { int res; psiconv_progress(config,lev,0,"Writing short string"); res = psiconv_write_string_aux(config,buf,lev+1,value,-2); if (res) psiconv_error(config,lev,0,"Writing of short string failed"); else psiconv_progress(config,lev,0,"End of short string"); return res; } int psiconv_write_charlist(const psiconv_config config,psiconv_buffer buf, int lev,const psiconv_string_t value) { int res; psiconv_progress(config,lev,0,"Writing charlist"); res = psiconv_write_string_aux(config,buf,lev+1,value,0); if (res) psiconv_error(config,lev,0,"Writing of charlist failed"); else psiconv_progress(config,lev,0,"End of charlist"); return res; } int psiconv_write_string_aux(const psiconv_config config,psiconv_buffer buf, int lev, const psiconv_string_t value,int kind) { int res,i,len; char *printable; len = psiconv_unicode_strlen(value); if (!value) { psiconv_error(config,lev,0, "NULL string"); return -PSICONV_E_GENERATE; } if (!(printable = psiconv_make_printable(config,value))) { psiconv_error(config,lev,0,"Out of memory error"); return -PSICONV_E_NOMEM; } psiconv_debug(config,lev+1,0,"Value: %s",printable); free(printable); if (kind == -1) res = psiconv_write_S(config,buf,lev+2,len); else if (kind == -2) res = psiconv_write_u8(config,buf,lev+2,len); else res = 0; if (res) return res; for (i = 0; i < len; i++) if ((res = psiconv_unicode_write_char(config,buf,lev+2,value[i]))) return res; return -PSICONV_E_OK; } int psiconv_write_offset(const psiconv_config config,psiconv_buffer buf, int lev,psiconv_u32 id) { int res; psiconv_progress(config,lev,0,"Writing offset"); psiconv_debug(config,lev+1,0,"ID: %08x",id); res = psiconv_buffer_add_reference(buf,id); if (res) psiconv_error(config,lev,0,"Out of memory error"); return res; } psiconv-0.9.8/lib/psiconv/generate_layout.c0000644000175000017500000004412110336374734015730 00000000000000/* generate_layout.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_write_color(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_color value) { int res; psiconv_progress(config,lev,0,"Writing color"); if (!value) { psiconv_error(config,lev,0,"Null color"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_u8(config,buf,lev+1,value->red))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,value->green))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,value->blue))) goto ERROR; psiconv_progress(config,lev,0,"End of color"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of color failed"); return res; } int psiconv_write_font(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_font value) { int res,len; psiconv_progress(config,lev,0,"Writing font"); if (!value) { psiconv_error(config,0,psiconv_buffer_length(buf),"Null font"); res = -PSICONV_E_GENERATE; goto ERROR; } len = psiconv_unicode_strlen(value->name); if ((res = psiconv_write_u8(config,buf,lev+1,len+1))) goto ERROR; if ((res = psiconv_write_charlist(config,buf,lev+1,value->name))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,value->screenfont))) goto ERROR; psiconv_progress(config,lev,0,"End of font"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of font failed"); return res; } int psiconv_write_border(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_border value) { int res; psiconv_progress(config,lev,0,"Writing border"); if (!value) { psiconv_error(config,lev,0,"Null border"); res = -PSICONV_E_GENERATE; goto ERROR; } if (value->kind > psiconv_border_dotdotdashed) psiconv_warn(config,lev,0, "Unknown border kind (%d); assuming none",value->kind); if ((res =psiconv_write_u8(config,buf,lev+1, value->kind == psiconv_border_none?0: value->kind == psiconv_border_solid?1: value->kind == psiconv_border_double?2: value->kind == psiconv_border_dotted?3: value->kind == psiconv_border_dashed?4: value->kind == psiconv_border_dotdashed?5: value->kind == psiconv_border_dotdotdashed?6: 0))) goto ERROR; if ((res = psiconv_write_size(config,buf,lev+1, (value->kind == psiconv_border_solid) || (value->kind == psiconv_border_double) ? value->thickness:1.0/20.0))) goto ERROR; if ((res = psiconv_write_color(config,buf,lev+1,value->color))) goto ERROR; /* Unknown byte */ if ((res = psiconv_write_u8(config,buf,lev+1,1))) goto ERROR; psiconv_progress(config,lev,0,"End of border"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of border failed"); return res; } int psiconv_write_bullet(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_bullet value) { int res; psiconv_buffer extra_buf; psiconv_progress(config,lev,0,"Writing bullet"); if (!value) { psiconv_error(config,0,psiconv_buffer_length(buf),"Null bullet"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(extra_buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if ((res = psiconv_write_size(config,extra_buf,lev+1,value->font_size))) goto ERROR2; if ((res = psiconv_unicode_write_char(config,extra_buf,lev+1, value->character))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->indent))) goto ERROR2; if ((res = psiconv_write_color(config,extra_buf,lev+1,value->color))) goto ERROR2; if ((res = psiconv_write_font(config,extra_buf,lev+1,value->font))) goto ERROR2; if ((res = psiconv_write_u8(config,buf,lev+1,psiconv_buffer_length(extra_buf)))) goto ERROR2; if ((res = psiconv_buffer_concat(buf,extra_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } ERROR2: psiconv_buffer_free(extra_buf); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of bullet failed"); else psiconv_progress(config,lev,0,"End of bullet"); return res; } int psiconv_write_tab(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_tab value) { int res; psiconv_progress(config,lev,0,"Writing tab"); if (!value) { psiconv_error(config,lev,0,"Null tab"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_length(config,buf,lev+1,value->location))) goto ERROR; if ((value->kind != psiconv_tab_left) && (value->kind != psiconv_tab_right) && (value->kind != psiconv_tab_centre)) psiconv_warn(config,lev,0, "Unknown tab kind (%d); assuming left",value->kind); if ((res = psiconv_write_u8(config,buf,lev+1, value->kind == psiconv_tab_right?2: value->kind == psiconv_tab_centre?3:1))) goto ERROR; psiconv_progress(config,lev,0,"End of tab"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of tab failed"); return res; } int psiconv_write_paragraph_layout_list(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_paragraph_layout value, psiconv_paragraph_layout base) { int res,i; psiconv_buffer extra_buf; psiconv_tab tab; psiconv_progress(config,lev,0,"Writing paragraph layout list"); if (!value) { psiconv_error(config,lev,0,"Null paragraph layout list"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(extra_buf = psiconv_buffer_new())) { res = -PSICONV_E_NOMEM; goto ERROR1; } if (!base || psiconv_compare_color(base->back_color,value->back_color)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x01))) goto ERROR2; if ((res = psiconv_write_color(config,extra_buf,lev+1,value->back_color))) goto ERROR2; } if (!base || (value->indent_left != base->indent_left)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x02))) goto ERROR2; if ((res = psiconv_write_length(config,extra_buf,lev+1,value->indent_left))) goto ERROR2; } if (!base || (value->indent_right != base->indent_right)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x03))) goto ERROR2; if ((res = psiconv_write_length(config,extra_buf,lev+1,value->indent_right))) goto ERROR2; } if (!base || (value->indent_first != base->indent_first)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x04))) goto ERROR2; if ((res = psiconv_write_length(config,extra_buf,lev+1,value->indent_first))) goto ERROR2; } if (!base || (value->justify_hor != base->justify_hor)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x05))) goto ERROR2; if ((value->justify_hor < psiconv_justify_left) || (value->justify_hor > psiconv_justify_full)) psiconv_warn(config,lev,0, "Unknown horizontal justify (%d); assuming left", value->justify_hor); if ((res = psiconv_write_u8(config,extra_buf,lev+1, value->justify_hor == psiconv_justify_centre?1: value->justify_hor == psiconv_justify_right?2: value->justify_hor == psiconv_justify_full?3:0))) goto ERROR2; } if (!base || (value->justify_ver != base->justify_ver)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x06))) goto ERROR2; if ((value->justify_ver < psiconv_justify_top) || (value->justify_ver > psiconv_justify_bottom)) psiconv_warn(config,0,psiconv_buffer_length(buf), "Unknown vertical justify (%d); assuming middle", value->justify_ver); if ((res = psiconv_write_u8(config,extra_buf,lev+1, value->justify_ver == psiconv_justify_centre?1: value->justify_ver == psiconv_justify_right?2:0))) goto ERROR2; } if (!base || (value->linespacing != base->linespacing)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x07))) goto ERROR2; if ((res = psiconv_write_size(config,extra_buf,lev+1,value->linespacing))) goto ERROR2; } if (!base || (value->linespacing_exact != base->linespacing_exact)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x08))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->linespacing_exact))) goto ERROR2; } if (!base || (value->space_above != base->space_above)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x09))) goto ERROR2; if ((res = psiconv_write_size(config,extra_buf,lev+1,value->space_above))) goto ERROR2; } if (!base || (value->space_below != base->space_below)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0a))) goto ERROR2; if ((res = psiconv_write_size(config,extra_buf,lev+1,value->space_below))) goto ERROR2; } if (!base || (value->keep_together != base->keep_together)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0b))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->keep_together))) goto ERROR2; } if (!base || (value->keep_with_next != base->keep_with_next)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0c))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->keep_with_next))) goto ERROR2; } if (!base || (value->on_next_page != base->on_next_page)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0d))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->on_next_page))) goto ERROR2; } if (!base || (value->no_widow_protection != base->no_widow_protection)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0e))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->no_widow_protection))) goto ERROR2; } if (!base || (value->wrap_to_fit_cell != base->wrap_to_fit_cell)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x0f))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->wrap_to_fit_cell))) goto ERROR2; } if (!base || (value->border_distance != base->border_distance)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x10))) goto ERROR2; if ((res = psiconv_write_length(config,extra_buf,lev+1,value->border_distance))) goto ERROR2; } if (!base || psiconv_compare_border(value->top_border,base->top_border)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x11))) goto ERROR2; if ((res = psiconv_write_border(config,extra_buf,lev+1,value->top_border))) goto ERROR2; } if (!base || psiconv_compare_border(value->bottom_border, base->bottom_border)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x12))) goto ERROR2; if ((res = psiconv_write_border(config,extra_buf,lev+1,value->bottom_border))) goto ERROR2; } if (!base || psiconv_compare_border(value->left_border, base->left_border)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x13))) goto ERROR2; if ((res = psiconv_write_border(config,extra_buf,lev+1,value->left_border))) goto ERROR2; } if (!base || psiconv_compare_border(value->right_border, base->right_border)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x14))) goto ERROR2; if ((res = psiconv_write_border(config,extra_buf,lev+1,value->right_border))) goto ERROR2; } if (!base || psiconv_compare_bullet(value->bullet, base->bullet)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x15))) goto ERROR2; if ((res = psiconv_write_bullet(config,extra_buf,lev+1,value->bullet))) goto ERROR2; } if (!value->tabs || !value->tabs->extras) { psiconv_error(config,0,psiconv_buffer_length(buf),"Null tabs"); res = -PSICONV_E_GENERATE; goto ERROR2; } /* It is not entirely clear how tabs are inherited. For now, I assume if there is any difference at all, we will have to generate both the normal tab-interval, and all specific tabs */ if (!base || psiconv_compare_all_tabs(value->tabs,base->tabs)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x16))) goto ERROR2; if ((res = psiconv_write_length(config,extra_buf,lev+1,value->tabs->normal))) goto ERROR2; for (i = 0; i < psiconv_list_length(value->tabs->extras); i++) { if (!(tab = psiconv_list_get(value->tabs->extras,i))) { psiconv_error(config,lev+1,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x17))) goto ERROR2; if ((res = psiconv_write_tab(config,extra_buf,lev+1,tab))) goto ERROR2; } } if ((res = psiconv_write_u32(config,buf,lev+1,psiconv_buffer_length(extra_buf)))) goto ERROR2; if ((res = psiconv_buffer_concat(buf,extra_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } ERROR2: psiconv_buffer_free(extra_buf); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of paragraph layout list failed"); else psiconv_progress(config,lev,0,"End of paragraph layout list"); return res; } int psiconv_write_character_layout_list(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_character_layout value, psiconv_character_layout base) { int res; psiconv_buffer extra_buf; psiconv_progress(config,lev,0,"Writing character layout list"); if (!value) { psiconv_error(config,lev,0,"Null character layout list"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(extra_buf = psiconv_buffer_new())) { res = -PSICONV_E_NOMEM; goto ERROR1; } if (!base || psiconv_compare_color(base->color,value->color)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x19))) goto ERROR2; if ((res = psiconv_write_color(config,extra_buf,lev+1,value->color))) goto ERROR2; } if (!base || psiconv_compare_color(base->back_color,value->back_color)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x1a))) goto ERROR2; if ((res = psiconv_write_color(config,extra_buf,lev+1,value->back_color))) goto ERROR2; } if (!base || (value->font_size != base->font_size)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x1c))) goto ERROR2; if ((res = psiconv_write_size(config,extra_buf,lev+1,value->font_size))) goto ERROR2; } if (!base || (value->italic != base->italic)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x1d))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->italic))) goto ERROR2; } if (!base || (value->bold != base->bold)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x1e))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->bold))) goto ERROR2; } if (!base || (value->super_sub != base->super_sub)) { if ((value->super_sub != psiconv_superscript) && (value->super_sub != psiconv_subscript) && (value->super_sub != psiconv_normalscript)) psiconv_warn(config,lev,0,"Unknown supersubscript (%d); assuming normal", value->super_sub); if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x1f))) goto ERROR2; if ((res = psiconv_write_u8(config,extra_buf,lev+1, value->super_sub == psiconv_superscript?1: value->super_sub == psiconv_subscript?2:0))) goto ERROR2; } if (!base || (value->underline != base->underline)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x20))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->underline))) goto ERROR2; } if (!base || (value->strikethrough != base->strikethrough)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x21))) goto ERROR2; if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->strikethrough))) goto ERROR2; } if (!base || psiconv_compare_font(base->font,value->font)) { if ((res = psiconv_write_u8(config,extra_buf,lev+1,0x22))) goto ERROR2; if ((res = psiconv_write_font(config,extra_buf,lev+1,value->font))) goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,psiconv_buffer_length(extra_buf)))) goto ERROR2; res = psiconv_buffer_concat(buf,extra_buf); ERROR2: psiconv_buffer_free(extra_buf); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of character layout list failed"); else psiconv_progress(config,lev,0,"End of character layout list"); return res; } psiconv-0.9.8/lib/psiconv/generate_driver.c0000644000175000017500000004350310336374706015710 00000000000000/* generate_driver.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "error.h" #include "generate_routines.h" #ifdef DMALLOC #include #endif static psiconv_ucs2 unicode_paint[10] = { 'P','a','i','n','t','.','a','p','p',0 }; static psiconv_ucs2 unicode_texted[11] ={ 'T','e','x','t','E','d','.','a','p','p',0 }; static psiconv_ucs2 unicode_word[9] = { 'W','o','r','d','.','a','p','p',0 }; int psiconv_write(const psiconv_config config, psiconv_buffer *buf, const psiconv_file value) { int res; int lev = 0; if (!value) { psiconv_error(config,0,0,"Can't parse to an empty buffer!"); return -PSICONV_E_OTHER; } if (!(*buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); return -PSICONV_E_NOMEM; } if (value->type == psiconv_word_file) { if ((res = psiconv_write_header_section(config,*buf,lev+1,PSICONV_ID_PSION5, PSICONV_ID_DATA_FILE, PSICONV_ID_WORD))) goto ERROR; if ((res =psiconv_write_word_file(config,*buf,lev+1,(psiconv_word_f) (value->file)))) goto ERROR; } else if (value->type == psiconv_texted_file) { if ((res = psiconv_write_header_section(config,*buf,lev+1,PSICONV_ID_PSION5, PSICONV_ID_DATA_FILE, PSICONV_ID_TEXTED))) goto ERROR; if ((res =psiconv_write_texted_file(config,*buf,lev+1, (psiconv_texted_f) (value->file)))) goto ERROR; } else if (value->type == psiconv_sketch_file) { if ((res = psiconv_write_header_section(config,*buf,lev+1,PSICONV_ID_PSION5, PSICONV_ID_DATA_FILE, PSICONV_ID_SKETCH))) goto ERROR; if ((res =psiconv_write_sketch_file(config,*buf,lev+1, (psiconv_sketch_f) (value->file)))) goto ERROR; } else if (value->type == psiconv_mbm_file) { if ((res = psiconv_write_header_section(config,*buf,lev+1,PSICONV_ID_PSION5, PSICONV_ID_MBM_FILE, 0x00000000))) goto ERROR; if ((res =psiconv_write_mbm_file(config,*buf,lev+1, (psiconv_mbm_f) (value->file)))) goto ERROR; } else if (value->type == psiconv_clipart_file) { /* No complete header section, so we do it all in the below function */ if ((res =psiconv_write_clipart_file(config,*buf,lev+1, (psiconv_clipart_f) (value->file)))) goto ERROR; } else { psiconv_error(config,0,0,"Unknown or unsupported file type"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_buffer_resolve(*buf))) { psiconv_error(config,lev+1,0,"Internal error resolving buffer references"); goto ERROR; } return -PSICONV_E_OK; ERROR: psiconv_buffer_free(*buf); return res; } int psiconv_write_texted_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_texted_f value) { psiconv_character_layout base_char; psiconv_paragraph_layout base_para; int res; psiconv_section_table_section section_table; psiconv_section_table_entry entry; psiconv_u32 section_table_id; psiconv_buffer buf_texted; psiconv_progress(config,lev,0,"Writing texted file"); if (!value) { psiconv_error(config,lev,0,"Null TextEd file"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(section_table = psiconv_list_new(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(entry = malloc(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(base_char = psiconv_basic_character_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR3; } if (!(base_para = psiconv_basic_paragraph_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR4; } section_table_id = psiconv_buffer_unique_id(); if ((res = psiconv_write_offset(config,buf,lev+1,section_table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } entry->id = PSICONV_ID_APPL_ID_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res=psiconv_write_application_id_section(config,buf,lev+1, PSICONV_ID_TEXTED,unicode_texted))) goto ERROR5; entry->id = PSICONV_ID_PAGE_LAYOUT_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res = psiconv_write_page_layout_section(config,buf,lev+1,value->page_sec))) goto ERROR5; entry->id = PSICONV_ID_TEXTED; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if ((res = psiconv_write_texted_section(config,buf,lev+1,value->texted_sec, base_char,base_para,&buf_texted))) goto ERROR5; if ((res = psiconv_buffer_concat(buf,buf_texted))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_buffer_add_target(buf,section_table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } res = psiconv_write_section_table_section(config,buf,lev+1,section_table); ERROR6: psiconv_buffer_free(buf_texted); ERROR5: psiconv_free_paragraph_layout(base_para); ERROR4: psiconv_free_character_layout(base_char); ERROR3: free(entry); ERROR2: psiconv_list_free(section_table); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of texted file failed"); else psiconv_progress(config,lev,0,"End of texted file"); return res; } int psiconv_write_word_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_word_f value) { int res; psiconv_section_table_section section_table; psiconv_section_table_entry entry; psiconv_u32 section_table_id; psiconv_progress(config,lev,0,"Writing word file"); if (!value) { psiconv_error(config,lev,0,"Null Word file"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(section_table = psiconv_list_new(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(entry = malloc(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } section_table_id = psiconv_buffer_unique_id(); if ((res = psiconv_write_offset(config,buf,lev+1,section_table_id))) goto ERROR3; entry->id = PSICONV_ID_APPL_ID_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res=psiconv_write_application_id_section(config,buf,lev+1, PSICONV_ID_WORD,unicode_word))) goto ERROR3; entry->id = PSICONV_ID_WORD_STATUS_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_word_status_section(config,buf,lev+1,value->status_sec))) goto ERROR3; entry->id = PSICONV_ID_PAGE_LAYOUT_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_page_layout_section(config,buf,lev+1,value->page_sec))) goto ERROR3; entry->id = PSICONV_ID_WORD_STYLES_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_word_styles_section(config,buf,lev+1,value->styles_sec))) goto ERROR3; entry->id = PSICONV_ID_TEXT_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_text_section(config,buf,lev+1,value->paragraphs))) goto ERROR3; entry->id = PSICONV_ID_LAYOUT_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_styled_layout_section(config,buf,lev+1,value->paragraphs, value->styles_sec))) goto ERROR3; if ((res = psiconv_buffer_add_target(buf,section_table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } res = psiconv_write_section_table_section(config,buf,lev+1,section_table); ERROR3: free(entry); ERROR2: psiconv_list_free(section_table); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of word file failed"); else psiconv_progress(config,lev,0,"End of word file"); return res; } int psiconv_write_sketch_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_sketch_f value) { int res; psiconv_section_table_section section_table; psiconv_section_table_entry entry; psiconv_u32 section_table_id; psiconv_progress(config,lev,0,"Writing sketch file"); if (!value) { psiconv_error(config,lev,0,"Null Sketch file"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(section_table = psiconv_list_new(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(entry = malloc(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } section_table_id = psiconv_buffer_unique_id(); if ((res = psiconv_write_offset(config,buf,lev+1,section_table_id))) goto ERROR3; entry->id = PSICONV_ID_APPL_ID_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res=psiconv_write_application_id_section(config,buf,lev+1, PSICONV_ID_SKETCH,unicode_paint))) goto ERROR3; entry->id = PSICONV_ID_SKETCH_SECTION; entry->offset = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(section_table,entry))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(buf,entry->offset))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_sketch_section(config,buf,lev+1,value->sketch_sec))) goto ERROR3; if ((res = psiconv_buffer_add_target(buf,section_table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } res = psiconv_write_section_table_section(config,buf,lev+1,section_table); ERROR3: free(entry); ERROR2: psiconv_list_free(section_table); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of sketch file failed"); else psiconv_progress(config,lev,0,"End of sketch file"); return res; } int psiconv_write_mbm_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_mbm_f value) { int res,i; psiconv_jumptable_section jumptable; psiconv_u32 *entry,id,table_id; psiconv_paint_data_section section; psiconv_progress(config,lev,0,"Writing mbm file"); if (!value) { psiconv_error(config,lev,0,"Null MBM file"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(jumptable = psiconv_list_new(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } table_id = psiconv_buffer_unique_id(); if ((res = psiconv_buffer_add_reference(buf,table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } for (i = 0; i < psiconv_list_length(value->sections); i++) { if (!(section = psiconv_list_get(value->sections,i))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR2; } id = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(jumptable,&id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_buffer_add_target(buf,id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_paint_data_section(config,buf,lev+1,section,0))) goto ERROR2; } if ((res = psiconv_buffer_add_target(buf,table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_jumptable_section(config,buf,lev+1,jumptable))) goto ERROR2; ERROR2: psiconv_list_free(jumptable); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of mbm file failed"); else psiconv_progress(config,lev,0,"End of mbm file"); return res; } /* Note: this file is special, because it does not have a complete header! */ int psiconv_write_clipart_file(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_clipart_f value) { int res,i; psiconv_jumptable_section jumptable; psiconv_u32 *entry,id; psiconv_clipart_section section; psiconv_buffer sec_buf; psiconv_progress(config,lev,0,"Writing clipart file"); if (!value) { psiconv_error(config,lev,0,"Null Clipart file"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(jumptable = psiconv_list_new(sizeof(*entry)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(sec_buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_CLIPART))) goto ERROR3; for (i = 0; i < psiconv_list_length(value->sections); i++) { if (!(section = psiconv_list_get(value->sections,i))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR3; } id = psiconv_buffer_unique_id(); if ((res = psiconv_list_add(jumptable,&id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_add_target(sec_buf,id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_write_clipart_section(config,sec_buf, lev+1,section))) goto ERROR3; } if ((res = psiconv_write_jumptable_section(config,buf,lev+1,jumptable))) goto ERROR3; if ((res = psiconv_buffer_concat(buf,sec_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } ERROR3: psiconv_buffer_free(sec_buf); ERROR2: psiconv_list_free(jumptable); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of clipart file failed"); else psiconv_progress(config,lev,0,"End of clipart file"); return res; } psiconv-0.9.8/lib/psiconv/generate_common.c0000644000175000017500000005770210336374707015714 00000000000000/* generate_common.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif static int psiconv_write_layout_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_text_and_layout value, const psiconv_word_styles_section styles, int with_styles); /* Maybe use a psiconv_header_section variable instead? */ int psiconv_write_header_section(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_u32 uid1, psiconv_u32 uid2, psiconv_u32 uid3) { int res; psiconv_progress(config,lev,0,"Writing header section"); if ((res = psiconv_write_u32(config,buf,lev+1,uid1))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,uid2))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,uid3))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1, psiconv_checkuid(uid1,uid2,uid3)))) goto ERROR; psiconv_progress(config,lev,0,"End of header section"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of header section failed"); return res; } int psiconv_write_section_table_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_section_table_section value) { int res,i; psiconv_section_table_entry entry; psiconv_progress(config,lev,0,"Writing section table section"); if (!value) { psiconv_error(config,lev,0,"Null section table section"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_u8(config,buf,lev+1,2 * psiconv_list_length(value)))) goto ERROR; for (i = 0; i < psiconv_list_length(value); i++) { if (!(entry = psiconv_list_get(value,i))) { psiconv_error(config,lev+1,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR; } if ((res = psiconv_write_u32(config,buf,lev+1,entry->id))) goto ERROR; if ((res = psiconv_write_offset(config,buf,lev+1,entry->offset))) goto ERROR; } psiconv_progress(config,lev,0,"End of section table section"); return -PSICONV_E_OK; ERROR: psiconv_error(config,lev,0,"Writing of section table section failed"); return res; } int psiconv_write_application_id_section(const psiconv_config config, psiconv_buffer buf,int lev,psiconv_u32 id, const psiconv_string_t text) { int res; psiconv_progress(config,lev,0,"Writing application id section"); if ((res = psiconv_write_u32(config,buf,lev+1,id))) goto ERROR; if ((res = psiconv_write_string(config,buf,lev+1,text))) goto ERROR; psiconv_progress(config,lev,0,"End of application id section"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of application id section failed"); return res; } int psiconv_write_text_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value) { int res; psiconv_buffer extra_buf = NULL; int i,j; psiconv_paragraph paragraph; psiconv_progress(config,lev,0,"Writing text section"); if (!value) { psiconv_error(config,lev+1,0,"Null text section"); res = -PSICONV_E_GENERATE; goto ERROR; } if (psiconv_list_length(value)) { if (!(extra_buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR; } for (i = 0; i < psiconv_list_length(value); i++) { if (!(paragraph = psiconv_list_get(value,i))) { psiconv_error(config,lev+1,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR; } for (j = 0; j < psiconv_unicode_strlen(paragraph->text); j++) if ((res = psiconv_unicode_write_char(config,extra_buf,lev+1, paragraph->text[j]))) goto ERROR; psiconv_unicode_write_char(config,extra_buf,lev+1,0x06); } if ((res = psiconv_write_X(config,buf,lev+1,psiconv_buffer_length(extra_buf)))) goto ERROR; res = psiconv_buffer_concat(buf,extra_buf); } else /* Hack: empty text sections are just not allowed */ if ((res = psiconv_write_u16(config,buf,lev+1,0x0602))) goto ERROR; psiconv_progress(config,lev,0,"End of text section"); return 0; ERROR: if (extra_buf) psiconv_buffer_free(extra_buf); psiconv_error(config,lev,0,"Writing of text section failed"); return res; } int psiconv_write_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value, const psiconv_word_styles_section styles, int with_styles) { typedef struct psiconv_paragraph_type_list_s { psiconv_character_layout character; psiconv_paragraph_layout paragraph; psiconv_u8 style; psiconv_u8 nr; } *psiconv_paragraph_type_list; psiconv_u32 obj_id; psiconv_list paragraph_type_list; /* Of psiconv_paragraph_type_list_s */ psiconv_paragraph_type_list paragraph_type; struct psiconv_paragraph_type_list_s new_type; psiconv_buffer buf_types,buf_elements,buf_inlines,buf_objects; psiconv_paragraph paragraph; psiconv_in_line_layout in_line = NULL; psiconv_word_style style; psiconv_character_layout para_charlayout; int i,j,para_type,nr_of_inlines=0,res,ptl_length,pel_length,thislen,paralen; psiconv_progress(config,lev,0,"Writing layout section"); if (!value) { psiconv_error(config,lev,0,"Null text section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(paragraph_type_list = psiconv_list_new(sizeof(new_type)))) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(buf_types = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(buf_elements = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR3; } if (!(buf_inlines = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR4; } if (!(buf_objects = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR5; } for (i = 0; i < psiconv_list_length(value); i++) { if (!(paragraph = psiconv_list_get(value,i))) { psiconv_error(config,lev+1,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR6; } if ((res = psiconv_write_u32(config,buf_elements,lev+1, psiconv_unicode_strlen(paragraph->text)+1))) goto ERROR6; /* We need it for the next if-statement */ if (psiconv_list_length(paragraph->in_lines) == 1) if (!(in_line = psiconv_list_get(paragraph->in_lines,0))) { psiconv_error(config,lev+1,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR6; } if ((psiconv_list_length(paragraph->in_lines) > 1) || ((psiconv_list_length(paragraph->in_lines) == 1) && (in_line->object != NULL))) { /* Inline layouts, or an object, so we generate a paragraph element and inline elements */ if ((res = psiconv_write_u8(config,buf_elements,lev+1,0x00))) goto ERROR6; if (!(style = psiconv_get_style(styles,paragraph->base_style))) { psiconv_error(config,lev+1,0,"Unknown style"); res = -PSICONV_E_GENERATE; goto ERROR6; } if ((res = psiconv_write_paragraph_layout_list(config,buf_elements,lev+1, paragraph->base_paragraph, style->paragraph))) goto ERROR6; if (with_styles) if ((res = psiconv_write_u8(config,buf_elements,lev+1,paragraph->base_style))) goto ERROR6; if ((res = psiconv_write_u32(config,buf_elements,lev+1, psiconv_list_length(paragraph->in_lines)))) goto ERROR6; /* Generate the inlines. NB: Against what are all settings relative?!? */ paralen = 0; for (j = 0; j < psiconv_list_length(paragraph->in_lines); j++) { nr_of_inlines ++; if (!(in_line = psiconv_list_get(paragraph->in_lines,j))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR6; } if ((res = psiconv_write_u8(config,buf_inlines,lev+1,in_line->object?0x01:0x00))) goto ERROR6; thislen = in_line->length; paralen += thislen; /* If this is the last in_line, we need to make sure that the complete length of all inlines equals the text length */ if (j == psiconv_list_length(paragraph->in_lines)-1) { if (paralen > psiconv_unicode_strlen(paragraph->text)+1) { psiconv_error(config,lev+1,0,"Inline formatting data length and line length are inconsistent"); res = -PSICONV_E_GENERATE; goto ERROR6; } thislen += psiconv_unicode_strlen(paragraph->text)+1-paralen; } if ((res = psiconv_write_u32(config,buf_inlines,lev+1,thislen))) goto ERROR6; if ((res = psiconv_write_character_layout_list(config,buf_inlines,lev+1, in_line->layout, style->character))) goto ERROR6; if (in_line->object) { if ((res = psiconv_write_u32(config,buf_inlines,lev+1,PSICONV_ID_OBJECT))) goto ERROR6; obj_id = psiconv_buffer_unique_id(); if ((res = psiconv_buffer_add_reference(buf_inlines,obj_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_buffer_add_target(buf_objects,obj_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_write_embedded_object_section(config,buf_objects,lev+1, in_line->object))) goto ERROR6; if ((res = psiconv_write_length(config,buf_inlines,lev+1,in_line->object_width))) goto ERROR6; if ((res = psiconv_write_length(config,buf_inlines,lev+1,in_line->object_height))) goto ERROR6; } } } else { /* No inline layouts (or only 1), so we generate a paragraph type list */ para_type = 0; /* Set para_charlayout to the correct character-level layout */ if (psiconv_list_length(paragraph->in_lines) == 0) para_charlayout = paragraph->base_character; else { if (!(in_line = psiconv_list_get(paragraph->in_lines,0))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR6; } para_charlayout = in_line->layout; } for (j = 0; j < psiconv_list_length(paragraph_type_list); j++) { if (!(paragraph_type = psiconv_list_get(paragraph_type_list,j))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR6; } if ((paragraph->base_style == paragraph_type->style) && !psiconv_compare_character_layout(para_charlayout, paragraph_type->character) && !psiconv_compare_paragraph_layout(paragraph->base_paragraph, paragraph_type->paragraph)) { para_type = paragraph_type->nr; break; } } if (!para_type) { /* We need to add a new entry */ para_type = new_type.nr = j+1; /* No need to copy them, we won't change them anyway */ new_type.paragraph = paragraph->base_paragraph; new_type.character = para_charlayout; new_type.style = paragraph->base_style; paragraph_type = &new_type; if ((res = psiconv_list_add(paragraph_type_list,paragraph_type))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_write_u32(config,buf_types,lev+1,paragraph_type->nr))) goto ERROR6; if (!(style = psiconv_get_style(styles,paragraph_type->style))) { psiconv_error(config,lev,0,"Unknown style"); res = -PSICONV_E_GENERATE; goto ERROR6; } if ((res = psiconv_write_paragraph_layout_list(config,buf_types,lev+1, paragraph_type->paragraph,style->paragraph))) goto ERROR6; if (with_styles) if ((res = psiconv_write_u8(config,buf_types,lev+1,paragraph_type->style))) goto ERROR6; if ((res = psiconv_write_character_layout_list(config,buf_types,lev+1, paragraph_type->character,style->character))) goto ERROR6; } if ((res = psiconv_write_u8(config,buf_elements,lev+1,para_type))) goto ERROR6; } } /* HACK: special case: no paragraphs at all. We need to improvize. */ if (!psiconv_list_length(value)) { if ((res = psiconv_write_u32(config,buf_types,lev+1,1))) goto ERROR6; if ((res = psiconv_write_u32(config,buf_types,lev+1,0))) goto ERROR6; if (with_styles) if ((res = psiconv_write_u8(config,buf_types,lev+1,0))) goto ERROR6; if ((res = psiconv_write_u32(config,buf_types,lev+1,0))) goto ERROR6; if ((res = psiconv_write_u32(config,buf_elements,lev+1,1))) goto ERROR6; if ((res = psiconv_write_u8(config,buf_elements,lev+1,1))) goto ERROR6; pel_length = 1; ptl_length = 1; } else { pel_length = psiconv_list_length(value); ptl_length = psiconv_list_length(paragraph_type_list); } /* Now append everything */ if ((res = psiconv_write_u16(config,buf,lev+1,with_styles?0x0001:0x0000))) goto ERROR6; if ((res = psiconv_write_u8(config,buf,lev+1, ptl_length))) goto ERROR6; if ((res = psiconv_buffer_concat(buf,buf_types))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_write_u32(config,buf,lev+1,pel_length))) goto ERROR6; if ((res = psiconv_buffer_concat(buf,buf_elements))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_write_u32(config,buf,lev+1,nr_of_inlines))) goto ERROR6; if ((res = psiconv_buffer_concat(buf,buf_inlines))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } if ((res = psiconv_buffer_concat(buf,buf_objects))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } ERROR6: psiconv_buffer_free(buf_objects); ERROR5: psiconv_buffer_free(buf_inlines); ERROR4: psiconv_buffer_free(buf_elements); ERROR3: psiconv_buffer_free(buf_types); ERROR2: psiconv_list_free(paragraph_type_list); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of layout section failed"); else psiconv_progress(config,lev,0,"End of layout section"); return res; } int psiconv_write_styled_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, psiconv_text_and_layout result, psiconv_word_styles_section styles) { int res; psiconv_progress(config,lev,0,"Writing styled layout section"); res = psiconv_write_layout_section(config,buf,lev+1,result,styles,1); if (res) psiconv_error(config,lev,0,"Writing of styles layout section failed"); else psiconv_progress(config,lev,0,"End of styled layout section"); return res; } int psiconv_write_styleless_layout_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_text_and_layout value, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para) { int res = 0; psiconv_word_styles_section styles_section; psiconv_progress(config,lev,0,"Writing styleless layout section"); if (!(styles_section = malloc(sizeof(*styles_section)))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR1; } if (!(styles_section->normal = malloc(sizeof(*styles_section->normal)))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if (!(styles_section->normal->character = psiconv_clone_character_layout(base_char))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if (!(styles_section->normal->paragraph = psiconv_clone_paragraph_layout(base_para))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR4; } styles_section->normal->hotkey = 0; if (!(styles_section->normal->name = psiconv_unicode_empty_string())) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR5; } if (!(styles_section->styles = psiconv_list_new(sizeof( struct psiconv_word_style_s)))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR6; } res = psiconv_write_layout_section(config,buf,lev+1,value,styles_section,0); psiconv_free_word_styles_section(styles_section); psiconv_progress(config,lev,0,"End of styleless layout section"); return res; ERROR6: free(styles_section->normal->name); ERROR5: psiconv_free_paragraph_layout(styles_section->normal->paragraph); ERROR4: psiconv_free_character_layout(styles_section->normal->character); ERROR3: free(styles_section->normal); ERROR2: free(styles_section); ERROR1: psiconv_error(config,lev,0,"Writing of styleless layout section failed"); if (!res) return -PSICONV_E_NOMEM; else return res; } int psiconv_write_embedded_object_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_embedded_object_section value) { int res; psiconv_u32 display_id,icon_id,table_id; psiconv_buffer extra_buf; psiconv_progress(config,lev,0,"Writing embedded object section"); if (!value) { psiconv_error(config,lev,0,"Null Object"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(extra_buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } display_id = psiconv_buffer_unique_id(); icon_id = psiconv_buffer_unique_id(); table_id = psiconv_buffer_unique_id(); if ((res = psiconv_write_u8(config,buf,lev+1,0x06))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_OBJECT_DISPLAY_SECTION))) goto ERROR2; if ((res = psiconv_buffer_add_reference(buf,display_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_OBJECT_ICON_SECTION))) goto ERROR2; if ((res = psiconv_buffer_add_reference(buf,icon_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_OBJECT_SECTION_TABLE_SECTION))) goto ERROR2; if ((res = psiconv_buffer_add_reference(buf,table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_buffer_add_target(buf,display_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_object_display_section(config,buf,lev+1,value->display))) goto ERROR2; if ((res = psiconv_buffer_add_target(buf,icon_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if ((res = psiconv_write_object_icon_section(config,buf,lev+1,value->icon))) goto ERROR2; if ((res = psiconv_buffer_add_target(buf,table_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } switch(value->object->type) { case psiconv_word_file: if ((res = psiconv_write_word_file(config,extra_buf,lev+1, (psiconv_word_f) value->object->file))) goto ERROR2; break; case psiconv_sketch_file: if ((res = psiconv_write_sketch_file(config,extra_buf,lev+1, (psiconv_sketch_f) value->object->file))) goto ERROR2; break; /* case psiconv_sheet_file: if ((res = psiconv_write_sheet_file(config,extra_buf,lev+1, (psiconv_sheet_f) value->object->file))) goto ERROR2; break; */ default: psiconv_error(config,lev,0,"Unknown or unsupported object type"); res = -PSICONV_E_GENERATE; goto ERROR2; } if ((res = psiconv_buffer_resolve(extra_buf))) { psiconv_error(config,lev+1,0,"Internal error resolving buffer references"); goto ERROR2; } if ((res = psiconv_buffer_concat(buf,extra_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } psiconv_buffer_free(extra_buf); psiconv_progress(config,lev,0,"End of embedded object section"); return 0; ERROR2: psiconv_buffer_free(extra_buf); ERROR1: psiconv_error(config,lev,0,"Writing of embedded object section failed"); return res; } int psiconv_write_object_display_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_object_display_section value) { int res; psiconv_progress(config,lev,0,"Writing object display section"); if (!value) { psiconv_error(config,lev,0,"Null Object Display Section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if ((res = psiconv_write_u8(config,buf,lev+1,value->show_icon?0x00:0x01))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->width))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->height))) goto ERROR1; if ((res = psiconv_write_u32(config,buf,lev+1,0x00000000))) goto ERROR1; psiconv_progress(config,lev,0,"End of object display section"); return 0; ERROR1: psiconv_error(config,lev,0,"Writing of object display section failed"); return res; } int psiconv_write_object_icon_section(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_object_icon_section value) { int res; psiconv_progress(config,lev,0,"Writing object icon section"); if (!value) { psiconv_error(config,lev,0,"Null Object Icon Section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if ((res = psiconv_write_string(config,buf,lev+1,value->icon_name))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->icon_width))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->icon_height))) goto ERROR1; psiconv_progress(config,lev,0,"End of object icon section"); return 0; ERROR1: psiconv_error(config,lev,0,"Writing of object icon section failed"); return res; } psiconv-0.9.8/lib/psiconv/generate_texted.c0000644000175000017500000000654310336374737015721 00000000000000/* generate_texted.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_write_texted_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_texted_section value, const psiconv_character_layout base_char, const psiconv_paragraph_layout base_para, psiconv_buffer *extra_buf) { int res,with_layout_section=0; psiconv_u32 layout_id; psiconv_progress(config,lev,0,"Writing texted section"); if (!value) { psiconv_error(config,lev,0,"Null TextEd section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(*extra_buf = psiconv_buffer_new())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } layout_id = psiconv_buffer_unique_id(); if ((res = psiconv_buffer_add_target(*extra_buf,layout_id))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR2; } if (psiconv_list_length(value->paragraphs)) { with_layout_section = 1; if ((res = psiconv_write_styleless_layout_section(config,*extra_buf,lev+1, value->paragraphs, base_char,base_para))) goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_BODY))) goto ERROR2; /* Partly dummy TextEd Jumptable */ if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_REPLACEMENT))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,0))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_UNKNOWN))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,0))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_LAYOUT))) goto ERROR2; if (with_layout_section) { if ((res = psiconv_write_offset(config,buf,lev+1,layout_id))) goto ERROR2; } else { if ((res = psiconv_write_u32(config,buf,lev+1,0))) goto ERROR2; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_TEXT))) goto ERROR2; if ((res = psiconv_write_text_section(config,buf,lev+1,value->paragraphs))) goto ERROR2; psiconv_progress(config,lev,0,"End of texted section"); return 0; ERROR2: psiconv_buffer_free(*extra_buf); ERROR1: psiconv_error(config,lev,0,"Writing of texted section failed"); return res; } psiconv-0.9.8/lib/psiconv/generate_page.c0000644000175000017500000001223610336374723015327 00000000000000/* generate_page.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_write_page_header(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_page_header value, psiconv_buffer *extra_buf) { int res; psiconv_paragraph_layout basepara; psiconv_character_layout basechar; psiconv_progress(config,lev,0,"Writing page header"); if (!value) { psiconv_error(config,lev,0,"Null page header"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(basepara=psiconv_basic_paragraph_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(basechar=psiconv_basic_character_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } /* Unknown byte */ if ((res = psiconv_write_u8(config,buf,lev+1,0x01))) goto ERROR3; if ((res = psiconv_write_bool(config,buf,lev+1,value->on_first_page))) goto ERROR3; /* Three unknown bytes */ if ((res = psiconv_write_u8(config,buf,lev+1,0x00))) goto ERROR3; if ((res = psiconv_write_u8(config,buf,lev+1,0x00))) goto ERROR3; if ((res = psiconv_write_u8(config,buf,lev+1,0x00))) goto ERROR3; if ((res = psiconv_write_paragraph_layout_list(config,buf,lev+1, value->base_paragraph_layout,basepara))) goto ERROR3; if ((res = psiconv_write_character_layout_list(config,buf,lev+1, value->base_character_layout,basechar))) goto ERROR3; res = psiconv_write_texted_section(config,buf,lev+1,value->text, value->base_character_layout, value->base_paragraph_layout,extra_buf); ERROR3: psiconv_free_character_layout(basechar); ERROR2: psiconv_free_paragraph_layout(basepara); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of page header failed"); else psiconv_progress(config,lev,0,"End of page header"); return res; } int psiconv_write_page_layout_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_page_layout_section value) { int res; psiconv_buffer header_buf,footer_buf; psiconv_progress(config,lev,0,"Writing page layout section"); if (!value) { psiconv_error(config,lev,0,"Null page section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if ((res = psiconv_write_u32(config,buf,lev+1,value->first_page_nr))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->header_dist))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->footer_dist))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->left_margin))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->right_margin))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->top_margin))) goto ERROR1; if ((res = psiconv_write_length(config,buf,lev+1,value->bottom_margin))) goto ERROR1; if ((res = psiconv_write_page_header(config,buf,lev+1,value->header,&header_buf))) goto ERROR1; if ((res = psiconv_write_page_header(config,buf,lev+1,value->footer,&footer_buf))) goto ERROR2; if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_PAGE_DIMENSIONS2))) goto ERROR3; if ((res = psiconv_write_length(config,buf,lev+1,value->page_width))) goto ERROR3; if ((res = psiconv_write_length(config,buf,lev+1,value->page_height))) goto ERROR3; if ((res = psiconv_write_bool(config,buf,lev+1,value->landscape))) goto ERROR3; if ((res = psiconv_buffer_concat(buf,header_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } if ((res = psiconv_buffer_concat(buf,footer_buf))) { psiconv_error(config,lev+1,0,"Out of memory error"); goto ERROR3; } ERROR3: psiconv_buffer_free(footer_buf); ERROR2: psiconv_buffer_free(header_buf); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of page layout section failed"); else psiconv_progress(config,lev,0,"End of page layout section"); return res; } psiconv-0.9.8/lib/psiconv/generate_word.c0000644000175000017500000001523610336374740015370 00000000000000/* generate_word.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include #include "generate_routines.h" #include "error.h" #ifdef DMALLOC #include #endif int psiconv_write_word_status_section(const psiconv_config config, psiconv_buffer buf, int lev, psiconv_word_status_section value) { int res; psiconv_progress(config,lev,0,"Writing word status section"); if (!value) { psiconv_error(config,lev,0,"Null word status section"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_u8(config,buf,lev+1,0x02))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,(value->show_tabs?0x01:0x00) | (value->show_spaces?0x02:0x00) | (value->show_paragraph_ends?0x04:0x00) | (value->show_line_breaks?0x08:0x00) | (value->show_hard_minus?0x20:0x00) | (value->show_hard_space?0x40:0x00)))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,(value->show_full_pictures?0x01:0x00) | (value->show_full_graphs?0x02:0x00)))) goto ERROR; if ((res = psiconv_write_bool(config,buf,lev+1,value->show_top_toolbar))) goto ERROR; if ((res = psiconv_write_bool(config,buf,lev+1,value->show_side_toolbar))) goto ERROR; if ((res = psiconv_write_u8(config,buf,lev+1,(value->fit_lines_to_screen?0x08:0x00)))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,value->cursor_position))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,value->display_size))) goto ERROR; psiconv_progress(config,lev,0,"End of word status section"); return 0; ERROR: psiconv_error(config,lev,0,"Writing of word status section failed"); return res; } int psiconv_write_word_styles_section(const psiconv_config config, psiconv_buffer buf, int lev, psiconv_word_styles_section value) { int res,i,j; psiconv_word_style style; psiconv_paragraph_layout basepara; psiconv_character_layout basechar; psiconv_font font; psiconv_u32 buflen; psiconv_progress(config,lev,0,"Writing word styles section"); if (!value || !value->normal || !value->styles) { psiconv_error(config,lev,0,"Null word styles section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(basepara=psiconv_basic_paragraph_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR1; } if (!(basechar=psiconv_basic_character_layout())) { psiconv_error(config,lev+1,0,"Out of memory error"); res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_write_paragraph_layout_list(config,buf,lev+1, value->normal->paragraph, basepara))) goto ERROR3; /* Always generate the font for Normal */ font = basechar->font; basechar->font = NULL; res = psiconv_write_character_layout_list(config,buf,lev+1, value->normal->character, basechar); basechar->font = font; if (res) goto ERROR3; buflen = psiconv_buffer_length(buf); if ((res = psiconv_unicode_write_char(config,buf,lev+1, value->normal->hotkey))) goto ERROR3; for (j = psiconv_buffer_length(buf) - buflen; j < 4; j++) if ((res = psiconv_write_u8(config,buf,lev+1,0))) goto ERROR3; if ((res = psiconv_write_u8(config,buf,lev+1, psiconv_list_length(value->styles)))) goto ERROR3; for (i = 0; i < psiconv_list_length(value->styles); i++) { if (!(style = psiconv_list_get(value->styles,i))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR3; } buflen = psiconv_buffer_length(buf); if ((res = psiconv_unicode_write_char(config,buf,lev+1,style->hotkey))) goto ERROR3; for (j = psiconv_buffer_length(buf) - buflen; j < 4; j++) if ((res = psiconv_write_u8(config,buf,lev+1,0))) goto ERROR3; } if ((res = psiconv_write_u8(config,buf,lev+1,psiconv_list_length(value->styles)))) goto ERROR3; for (i = 0; i < psiconv_list_length(value->styles); i++) { if (!(style = psiconv_list_get(value->styles,i))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR3; } if (!style->name) { psiconv_error(config,lev,0,"Null style name"); res = -PSICONV_E_GENERATE; goto ERROR3; } if ((res = psiconv_write_string(config,buf,lev+1,style->name))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,style->built_in?PSICONV_ID_STYLE_BUILT_IN: PSICONV_ID_STYLE_REMOVABLE))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,style->outline_level))) goto ERROR3; if ((res = psiconv_write_character_layout_list(config,buf,lev+1,style->character, value->normal->character))) goto ERROR3; if ((res = psiconv_write_paragraph_layout_list(config,buf,lev+1,style->paragraph, value->normal->paragraph))) goto ERROR3; } for (i = 0; i < psiconv_list_length(value->styles); i++) if ((res = psiconv_write_u8(config,buf,lev+1,0xff))) goto ERROR3; res = -PSICONV_E_OK; ERROR3: psiconv_free_character_layout(basechar); ERROR2: psiconv_free_paragraph_layout(basepara); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of word styles section failed"); else psiconv_progress(config,lev,0,"End of word styles section"); return res; } psiconv-0.9.8/lib/psiconv/generate_image.c0000644000175000017500000007105110336374715015476 00000000000000/* generate_image.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include "generate_routines.h" #include "error.h" #include "list.h" #include "image.h" #ifdef DMALLOC #include #endif static int psiconv_collect_pixel_data(psiconv_pixel_ints *pixels, int xsize,int ysize, const psiconv_pixel_floats_t data, int colordepth,int color, int redbits,int greenbits,int bluebits, const psiconv_pixel_floats_t palet); static int psiconv_pixel_data_to_bytes(const psiconv_config config,int lev, psiconv_pixel_bytes *bytes, int xsize, int ysize, const psiconv_pixel_ints pixels, int colordepth); static int psiconv_encode_rle8(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes); static int psiconv_encode_rle12(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes); static int psiconv_encode_rle16(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes); static int psiconv_encode_rle24(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes); int psiconv_write_paint_data_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_paint_data_section value, int is_clipart) { int res,colordepth,i; psiconv_pixel_ints ints; psiconv_pixel_floats_t floats,palet; psiconv_list bytes,bytes_rle; psiconv_u8 *byteptr,encoding; psiconv_progress(config,lev,0,"Writing paint data section"); /* First, we check whether we can cope with the current configuration. If not, we stop at once */ if ((config->colordepth != 2) && (config->colordepth != 4) && (config->colordepth != 8) && (config->colordepth != 12) && (config->colordepth != 16) && (config->colordepth != 24)) { psiconv_error(config,lev,0, "Unsupported color depth (%d); try 2, 4, 8, 16 or 24", config->colordepth); res = -PSICONV_E_GENERATE; goto ERROR1; } if ((config->color) && (config->bluebits || config->redbits || config->greenbits) && (config->bluebits+config->redbits+config->greenbits!=config->colordepth)) { psiconv_error(config,lev,0, "Sum of red (%d), green (%d) and blue (%d) bits should be " "equal to the color depth (%d)", config->redbits,config->greenbits,config->bluebits, config->colordepth); res = -PSICONV_E_GENERATE; goto ERROR1; } if (config->color && !(config->redbits || config->greenbits || config->bluebits) && (config->colordepth != 4) && (config->colordepth != 8)) { psiconv_error(config,lev,0, "Current color depth (%d) has no palet associated with it", config->colordepth); res = -PSICONV_E_GENERATE; goto ERROR1; } if (config->color || (config->colordepth != 2)) psiconv_warn(config,lev,0, "All image types except 2-bit greyscale are experimental!"); if (!value) { psiconv_error(config,lev,0,"Null paint data section"); res = -PSICONV_E_GENERATE; goto ERROR1; } floats.red = value->red; floats.green = value->green; floats.blue = value->blue; floats.length = value->xsize * value->ysize; palet = psiconv_palet_none; if ((config->color) && (config->redbits == 0) && (config->greenbits == 0) && (config->bluebits == 0)) switch (config->colordepth) { case 4: palet = psiconv_palet_color_4; break; case 8: palet = psiconv_palet_color_8; break; default: palet = psiconv_palet_none; break; } if ((res = psiconv_collect_pixel_data(&ints,value->xsize, value->ysize,floats, config->colordepth,config->color, config->redbits,config->greenbits, config->bluebits,palet))) { psiconv_error(config,lev,0,"Error collecting pixel data"); goto ERROR1; } if ((res = psiconv_pixel_data_to_bytes(config,lev+1,&bytes,value->xsize, value->ysize,ints, config->colordepth))) { psiconv_error(config,lev,0,"Error translating pixel data to bytes"); goto ERROR2; } switch (config->colordepth) { case 2: case 4: case 8: encoding = 0x01; if ((res = psiconv_encode_rle8(config,bytes,&bytes_rle))) { psiconv_error(config,lev,0,"Error encoding RLE8"); goto ERROR3; } break; case 12: encoding = 0x02; if ((res = psiconv_encode_rle12(config,bytes,&bytes_rle))) { psiconv_error(config,lev,0,"Error encoding RLE12"); goto ERROR3; } break; case 16: encoding = 0x03; if ((res = psiconv_encode_rle16(config,bytes,&bytes_rle))) { psiconv_error(config,lev,0,"Error encoding RLE16"); goto ERROR3; } break; case 24: encoding = 0x04; if ((res = psiconv_encode_rle24(config,bytes,&bytes_rle))) { psiconv_error(config,lev,0,"Error encoding RLE24"); goto ERROR3; } break; default: encoding = 0x00; } if (encoding) { if (psiconv_list_length(bytes_rle) < psiconv_list_length(bytes)) { psiconv_list_free(bytes); bytes = bytes_rle; } else { psiconv_list_free(bytes_rle); encoding = 0x00; } } if ((res = psiconv_write_u32(config,buf,lev+1, 0x28+psiconv_list_length(bytes)))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,0x28))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,value->xsize))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,value->ysize))) goto ERROR3; if ((res = psiconv_write_length(config,buf,lev+1,value->pic_xsize))) goto ERROR3; if ((res = psiconv_write_length(config,buf,lev+1,value->pic_ysize))) goto ERROR3; colordepth = config->colordepth; if ((res = psiconv_write_u32(config,buf,lev+1,colordepth))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,(config->color?1:0)))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,0))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,encoding))) goto ERROR3; if (is_clipart) { if ((res = psiconv_write_u32(config,buf,lev+1,0xffffffff))) goto ERROR3; if ((res = psiconv_write_u32(config,buf,lev+1,0x00000044))) goto ERROR3; } for (i = 0; i < psiconv_list_length(bytes); i++) { if (!(byteptr = psiconv_list_get(bytes,i))) goto ERROR3; if ((res = psiconv_write_u8(config,buf,lev+1,*byteptr))) goto ERROR3; } ERROR3: psiconv_list_free(bytes); ERROR2: psiconv_list_free(ints); ERROR1: if (res) psiconv_error(config,lev,0,"Writing of paint data section failed"); else psiconv_progress(config,lev,0,"End of paint data section"); return res; } /* Translate the floating point RGB information into pixel values. The palet is optional; without it, we just use the colordepth. With a large palet this is not very fast, but it will do for now. For greyscale pictures, just use the palet. */ int psiconv_collect_pixel_data(psiconv_pixel_ints *pixels,int xsize,int ysize, const psiconv_pixel_floats_t data, int colordepth,int color, int redbits,int bluebits,int greenbits, const psiconv_pixel_floats_t palet) { int res,x,y,i; psiconv_u32 index,pixel; float p_red,p_green,p_blue,dist,new_dist; if (!(*pixels = psiconv_list_new(sizeof(psiconv_u32)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } for (y = 0; y < ysize; y++) { for (x = 0; x < xsize; x++) { index = y*xsize+x; p_red = data.red[index]; p_green = data.green[index]; p_blue = data.blue[index]; if (!palet.length) { if (color) pixel = (((psiconv_u32) (p_red * (1 << redbits) + 0.5)) << (greenbits+bluebits)) + (((psiconv_u32) (p_green * (1 << greenbits) + 0.5)) << bluebits) + ((psiconv_u32) (p_blue * (1 << bluebits) + 0.5)); else pixel = (0.212671 * p_red + 0.715160 * p_green + 0.072169 * p_blue) * ((1 << colordepth) * 0.999); } else { dist = 4; /* Max distance is 3, so this is safe */ pixel = -1; for (i = 0; i < palet.length; i++) { new_dist = (p_red - palet.red[i]) * (p_red - palet.red[i]) + (p_green - palet.green[i]) * (p_green - palet.green[i]) + (p_blue - palet.blue[i]) * (p_blue - palet.blue[i]); if (new_dist < dist) { pixel = i; dist = new_dist; } } } if ((res = psiconv_list_add(*pixels,&pixel))) goto ERROR2; } } return 0; ERROR2: psiconv_list_free(*pixels); ERROR1: return res; } int psiconv_pixel_data_to_bytes(const psiconv_config config,int lev, psiconv_pixel_bytes *bytes, int xsize, int ysize, const psiconv_pixel_ints pixels, int colordepth) { int res; int x,y; psiconv_u32 inputdata; psiconv_u8 outputbyte; psiconv_u32 *pixelptr; int inputbitsleft,outputbitnr,bitsfit,outputbytenr; if (!bytes) { psiconv_error(config,lev,0,"NULL pixel data"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!pixels) { psiconv_error(config,lev,0,"NULL pixel data"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (psiconv_list_length(pixels) != xsize * ysize) { psiconv_error(config,lev,0,"Pixel number is not correct"); res = -PSICONV_E_GENERATE; goto ERROR1; } if (!(*bytes = psiconv_list_new(sizeof(psiconv_u8)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } outputbitnr = 0; outputbyte = 0; for (y = 0; y < ysize; y++) { outputbytenr = 0; for (x = 0; x < xsize; x++) { if (!(pixelptr = psiconv_list_get(pixels,y*xsize+x))) { psiconv_error(config,lev,0,"Data structure corruption"); res = -PSICONV_E_NOMEM; goto ERROR2; } inputbitsleft = colordepth; inputdata = *pixelptr; while (inputbitsleft) { bitsfit = (inputbitsleft+outputbitnr<=8?inputbitsleft:8-outputbitnr); outputbyte |= (inputdata & ((1 << bitsfit) - 1)) << outputbitnr; inputdata = inputdata >> bitsfit; inputbitsleft -= bitsfit; outputbitnr += bitsfit; if (outputbitnr == 8) { if ((res = psiconv_list_add(*bytes,&outputbyte))) goto ERROR2; outputbitnr = 0; outputbyte = 0; outputbytenr ++; } } } /* Always end lines on a long border */ if (outputbitnr != 0) { if ((res = psiconv_list_add(*bytes,&outputbyte))) goto ERROR2; outputbitnr = 0; outputbyte = 0; outputbytenr ++; } while (outputbytenr % 0x04) { if ((res = psiconv_list_add(*bytes,&outputbyte))) goto ERROR2; outputbytenr ++; } } return 0; ERROR2: psiconv_list_free(*bytes); ERROR1: return res; } /* RLE8 encoding: Marker bytes followed by one or more data bytes. Marker value 0x00-0x7f: repeat the next data byte (marker+1) times Marker value 0xff-0x80: (0x100-marker) data bytes follow */ int psiconv_encode_rle8(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes) { int res,i,j,len; psiconv_u8 *entry,*next; psiconv_u8 temp; if (!(*encoded_bytes = psiconv_list_new(sizeof(*entry)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } for (i = 0; i < psiconv_list_length(plain_bytes);) { if (!(entry = psiconv_list_get(plain_bytes,i))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next = psiconv_list_get(plain_bytes,i+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (i == psiconv_list_length(plain_bytes) - 2) { temp = 0xfe; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next))) goto ERROR2; i +=2; } else if (*next == *entry) { len = 1; while ((*next == *entry) && (i+len + 2 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; if (!(next = psiconv_list_get(plain_bytes,i+len))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } temp = len - 1; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry))) goto ERROR2; i += len; } else { len = 1; while ((*next != *entry) && (i+len+1 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; entry = next; if (!(next = psiconv_list_get(plain_bytes,i+len))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } len --; temp = 0x100 - len; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; for (j = 0; j < len; j++) { if (!(next = psiconv_list_get(plain_bytes,i+j))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_list_add(*encoded_bytes,next))) goto ERROR2; } i += len; } } return 0; ERROR2: psiconv_list_free(*encoded_bytes); ERROR1: return res; } /* RLE12 encoding: Word based. The 12 least significant bits contain the pixel colors. the 4 most signigicant bits are the number of repetitions minus 1 */ int psiconv_encode_rle12(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes) { typedef psiconv_list psiconv_word_data; /* of psiconv_u16 */ psiconv_word_data data; int res,i,len,location; psiconv_u16 *word_entry,*word_next; psiconv_u16 word_data; psiconv_u8 byte_temp; psiconv_u8 *byte_entry; /* First extract the 12-bit values to encode */ if (!(data = psiconv_list_new(sizeof(psiconv_u16)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } for (i = 0; i < psiconv_list_length(plain_bytes); i++) { if (!(byte_entry = psiconv_list_get(plain_bytes,i))) { res = -PSICONV_E_NOMEM; goto ERROR2; } location = 0; if (location == 0) { word_data = *byte_entry; location ++; } else if (location == 1) { word_data = (word_data << 4) + (*byte_entry & 0x0f); if ((res = psiconv_list_add(data,&word_data))) goto ERROR2; word_data = *byte_entry >> 4; location ++; } else { word_data = (word_data << 8) + *byte_entry; if ((res = psiconv_list_add(data,&word_data))) goto ERROR2; location = 0; } } if (!(*encoded_bytes = psiconv_list_new(sizeof(psiconv_u8)))) { res = -PSICONV_E_NOMEM; goto ERROR2; } for (i = 0; i < psiconv_list_length(data);) { if (!(word_entry = psiconv_list_get(data,i))) { res = -PSICONV_E_NOMEM; goto ERROR3; } if (!(word_next = psiconv_list_get(data,i+1))) { res = -PSICONV_E_NOMEM; goto ERROR3; } if (i == psiconv_list_length(data) - 2) { byte_temp = *word_entry && 0xff; if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; byte_temp = *word_entry >> 8; if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; byte_temp = *word_next && 0xff; if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; byte_temp = *word_next >> 8; if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; i += 2; } len = 0; while ((*word_entry == *word_next) && (len < 16) && (i+len+1 < psiconv_list_length(data))) { len ++; if (!(word_next = psiconv_list_get(data,i+len))) { res = -PSICONV_E_NOMEM; goto ERROR3; } } byte_temp = *word_entry && 0xff; if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; byte_temp = (*word_entry >> 8) + ((len - 1) << 4); if ((res = psiconv_list_add(*encoded_bytes,&byte_temp))) goto ERROR3; i += len; } return 0; ERROR3: psiconv_list_free(*encoded_bytes); ERROR2: psiconv_list_free(data); ERROR1: return res; } /* RLE16 encoding: Marker bytes followed by one or more data words. Marker value 0x00-0x7f: repeat the next data word (marker+1) times Marker value 0xff-0x80: (0x100-marker) data words follow */ int psiconv_encode_rle16(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes) { int res,i,j,len; psiconv_u8 *entry1,*entry2,*next1,*next2; psiconv_u8 temp; if (!(*encoded_bytes = psiconv_list_new(sizeof(*entry1)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } for (i = 0; i < psiconv_list_length(plain_bytes);) { if (!(entry1 = psiconv_list_get(plain_bytes,i))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(entry2 = psiconv_list_get(plain_bytes,i+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next1 = psiconv_list_get(plain_bytes,i+2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+3))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (i == psiconv_list_length(plain_bytes) - 4) { temp = 0xfe; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry2))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next2))) goto ERROR2; i +=4; } else if ((*next1 == *entry1) && (*next2 == *entry2)) { len = 0; while (((*next1 == *entry1) && (*next2 == *entry2)) && (i+2*len + 4 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; if (!(next1 = psiconv_list_get(plain_bytes,i+len*2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+len*2+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } temp = len - 1; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry2))) goto ERROR2; i += len*2; } else { len = 1; while (((*next1 != *entry1) || (*next2 != *entry2))&& (i+len*2+4 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; entry1 = next1; entry2 = next2; if (!(next1 = psiconv_list_get(plain_bytes,i+len*2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+len*2+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } len --; temp = 0x100 - len; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; for (j = 0; j < len; j++) { if (!(next1 = psiconv_list_get(plain_bytes,i+j*2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+j*2+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_list_add(*encoded_bytes,next1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next2))) goto ERROR2; } i += len*2; } } return 0; ERROR2: psiconv_list_free(*encoded_bytes); ERROR1: return res; } /* RLE24 encoding: Marker bytes followed by one or more data byte-triplets. Marker value 0x00-0x7f: repeat the next data byte-triplets (marker+1) times Marker value 0xff-0x80: (0x100-marker) data byte-triplets follow */ int psiconv_encode_rle24(const psiconv_config config, const psiconv_pixel_bytes plain_bytes, psiconv_pixel_bytes *encoded_bytes) { int res,i,j,len; psiconv_u8 *entry1,*entry2,*entry3,*next1,*next2,*next3; psiconv_u8 temp; if (!(*encoded_bytes = psiconv_list_new(sizeof(*entry1)))) { res = -PSICONV_E_NOMEM; goto ERROR1; } for (i = 0; i < psiconv_list_length(plain_bytes);) { if (!(entry1 = psiconv_list_get(plain_bytes,i))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(entry2 = psiconv_list_get(plain_bytes,i+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(entry3 = psiconv_list_get(plain_bytes,i+2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next1 = psiconv_list_get(plain_bytes,i+3))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+4))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next3 = psiconv_list_get(plain_bytes,i+5))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (i == psiconv_list_length(plain_bytes) - 6) { temp = 0xfe; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry2))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry3))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next2))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next3))) goto ERROR2; i +=4; } else if ((*next1 == *entry1) && (*next2 == *entry2) && (*next3 == *entry3)) { len = 0; while (((*next1 == *entry1) && (*next2 == *entry2) && (*next3 == *entry3)) && (i+3*len + 6 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; if (!(next1 = psiconv_list_get(plain_bytes,i+len*3))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+len*3+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next3 = psiconv_list_get(plain_bytes,i+len*3+2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } temp = len - 1; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry2))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,entry3))) goto ERROR2; i += len*3; } else { len = 1; while (((*next1 != *entry1) || (*next2 != *entry2) || (*next3 != *entry3)) && (i+len*3+6 < psiconv_list_length(plain_bytes)) && len < 0x80) { len ++; entry1 = next1; entry2 = next2; entry3 = next3; if (!(next1 = psiconv_list_get(plain_bytes,i+len*3))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+len*3+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next3 = psiconv_list_get(plain_bytes,i+len*3+2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } } len --; temp = 0x100 - len; if ((res = psiconv_list_add(*encoded_bytes,&temp))) goto ERROR2; for (j = 0; j < len; j++) { if (!(next1 = psiconv_list_get(plain_bytes,i+j*3))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+j*3+1))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if (!(next2 = psiconv_list_get(plain_bytes,i+j*3+2))) { res = -PSICONV_E_NOMEM; goto ERROR2; } if ((res = psiconv_list_add(*encoded_bytes,next1))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next2))) goto ERROR2; if ((res = psiconv_list_add(*encoded_bytes,next3))) goto ERROR2; } i += len*3; } } return 0; ERROR2: psiconv_list_free(*encoded_bytes); ERROR1: return res; } int psiconv_write_sketch_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_sketch_section value) { int res; psiconv_progress(config,lev,0,"Writing sketch section"); if (!value) { psiconv_error(config,lev,0,"NULL sketch section"); res = -PSICONV_E_GENERATE; goto ERROR1; } if ((res = psiconv_write_u16(config,buf,lev+1,value->displayed_xsize))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->displayed_ysize))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->picture_data_x_offset))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->picture_data_y_offset))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->displayed_size_x_offset))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->displayed_size_y_offset))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->form_xsize))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->form_ysize))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,0x0000))) goto ERROR1; if ((res = psiconv_write_paint_data_section(config,buf,lev+1,value->picture,0))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->magnification_x * 0x03e8))) goto ERROR1; if ((res = psiconv_write_u16(config,buf,lev+1,value->magnification_y * 0x03e8))) goto ERROR1; if ((res = psiconv_write_u32(config,buf,lev+1,value->cut_left * 0x0c * value->displayed_xsize))) goto ERROR1; if ((res = psiconv_write_u32(config,buf,lev+1,value->cut_right * 0x0c * value->displayed_xsize))) goto ERROR1; if ((res = psiconv_write_u32(config,buf,lev+1,value->cut_top * 0x0c * value->displayed_ysize))) goto ERROR1; if ((res = psiconv_write_u32(config,buf,lev+1,value->cut_bottom * 0x0c * value->displayed_ysize))) goto ERROR1; ERROR1: if (res) psiconv_error(config,lev,0,"Writing of sketch section failed"); else psiconv_progress(config,lev,0,"End of sketch section"); return res; } int psiconv_write_clipart_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_clipart_section value) { int res; psiconv_progress(config,lev,0,"Writing clipart section"); if (!value) { psiconv_error(config,lev,0, "NULL Clipart Section"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_CLIPART_ITEM))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,0x00000002))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,0x00000000))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,0x00000000))) goto ERROR; if ((res = psiconv_write_u32(config,buf,lev+1,0x0000000C))) goto ERROR; if ((res = psiconv_write_paint_data_section(config,buf,lev+1,value->picture,1))) goto ERROR; ERROR: if (res) psiconv_error(config,lev,0,"Writing of clipart section failed"); else psiconv_progress(config,lev,0,"End of clipart section"); return res; } int psiconv_write_jumptable_section(const psiconv_config config, psiconv_buffer buf, int lev, const psiconv_jumptable_section value) { int res,i; psiconv_u32 *offset_ptr; psiconv_progress(config,lev,0,"Writing jumptable section"); if (!value) { psiconv_error(config,lev,0,"NULL Jumptable Section"); res = -PSICONV_E_GENERATE; goto ERROR; } if ((res = psiconv_write_u32(config,buf,lev+1,psiconv_list_length(value)))) goto ERROR; for (i = 0; i < psiconv_list_length(value); i++) { if (!(offset_ptr = psiconv_list_get(value,i))) { psiconv_error(config,lev,0,"Massive memory corruption"); res = -PSICONV_E_NOMEM; goto ERROR; } if ((res = psiconv_write_offset(config,buf,lev+1,*offset_ptr))) goto ERROR; } ERROR: if (res) psiconv_error(config,lev,0,"Writing of jumptable section failed"); else psiconv_progress(config,lev,0,"End of jumptable section"); return res; } psiconv-0.9.8/lib/Makefile.am0000644000175000017500000000002207655260342012737 00000000000000SUBDIRS = psiconv psiconv-0.9.8/lib/Makefile.in0000664000175000017500000003313010336413006012743 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = psiconv all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/program/0000777000175000017500000000000010336611560011666 500000000000000psiconv-0.9.8/program/psiconv-config/0000777000175000017500000000000010336611560014612 500000000000000psiconv-0.9.8/program/psiconv-config/Makefile.am0000644000175000017500000000032110012204517016545 00000000000000INCLUDES=-I../.. -I../../lib -I../../compat bin_SCRIPTS = psiconv-config BUILT_SOURCES = psiconv-config psiconv-config.man man1_MANS = psiconv-config.man EXTRA_DIST = psiconv-config.in psiconv-config.man.in psiconv-0.9.8/program/psiconv-config/Makefile.in0000664000175000017500000002763210336413010016575 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = program/psiconv-config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/psiconv-config.in $(srcdir)/psiconv-config.man.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = psiconv-config psiconv-config.man am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man1_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I../.. -I../../lib -I../../compat bin_SCRIPTS = psiconv-config BUILT_SOURCES = psiconv-config psiconv-config.man man1_MANS = psiconv-config.man EXTRA_DIST = psiconv-config.in psiconv-config.man.in all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu program/psiconv-config/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu program/psiconv-config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh psiconv-config: $(top_builddir)/config.status $(srcdir)/psiconv-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ psiconv-config.man: $(top_builddir)/config.status $(srcdir)/psiconv-config.man.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(SCRIPTS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-binSCRIPTS install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-info-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/program/psiconv-config/psiconv-config.in0000644000175000017500000000245410011534243017777 00000000000000#!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no usage() { cat <&2 fi lib_psiconv=yes while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo @VERSION@ exit 0 ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; psiconv) lib_psiconv=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_cflags" = "yes"; then echo -I@includedir@ fi if test "$echo_libs" = "yes"; then libsp="" if test "$lib_psiconv" = "yes"; then libsp="$libsp -lpsiconv" fi echo -L@libdir@ $libsp fi psiconv-0.9.8/program/psiconv-config/psiconv-config.man.in0000644000175000017500000000415510012205225020545 00000000000000.TH PSICONV 1 "10 February 2004" Version @VERSION@ .SH NAME psiconv-config - script to get information about the installed version of Psiconv .SH SYNOPSIS .B psiconv-config [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] [LIBRARIES] .SH DESCRIPTION .PP \fIpsiconv-config\fP is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use \fIpsiconv\fP. It is also used internally to the .m4 macros for GNU autoconf that are included with \fIpsiconv\fP. . .SH OPTIONS .l \fIpsiconv-config\fP accepts the following options: .TP 8 .B LIBRARIES \fIPsiconv\fP has one library 'psiconv'. If you specify one of them, only the appropriate things for that library will be printed. .TP 8 .B \-\-version Print the currently installed version of \fIpsiconv\fP on the standard output. .TP 8 .B \-\-libs Print the linker flags that are necessary to link a \fIpsiconv\fP program. .TP 8 .B \-\-cflags Print the compiler flags that are necessary to compile a \fIpsiconv\fP program. .TP 8 .B \-\-prefix=PREFIX If specified, use PREFIX instead of the installation prefix that \fIpsiconv\fP was built with when computing the output for the \-\-cflags and \-\-libs options. This option is also used for the exec prefix if \-\-exec\-prefix was not specified. This option must be specified before any \-\-libs or \-\-cflags options. .TP 8 .B \-\-exec\-prefix=PREFIX If specified, use PREFIX instead of the installation exec prefix that \fIpsiconv\fP was built with when computing the output for the \-\-cflags and \-\-libs options. This option must be specified before any \-\-libs or \-\-cflags options. .SH SEE ALSO .BR gtk-config (1), .BR gimp (1), .BR gimptool (1) .SH COPYRIGHT Copyright \(co 1998 Owen Taylor, Copyright \(co 2004 Frodo Looijaard. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. psiconv-0.9.8/program/Makefile.am0000644000175000017500000000004710012001541013616 00000000000000SUBDIRS = psiconv psiconv-config extra psiconv-0.9.8/program/Makefile.in0000664000175000017500000003317110336413007013652 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = program DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = psiconv psiconv-config extra all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu program/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu program/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/program/psiconv/0000777000175000017500000000000010336611560013347 500000000000000psiconv-0.9.8/program/psiconv/Makefile.am0000644000175000017500000000061710007511060015310 00000000000000INCLUDES=-I../.. -I../../lib -I../../compat bin_PROGRAMS = psiconv psiconv_SOURCES = psiconv.c general.c magick-aux.c \ gen_txt.c gen_image.c gen_xhtml.c gen_html4.c psiconv_LDADD = ../../lib/psiconv/libpsiconv.la @LIB_MAGICK@ @LIB_DMALLOC@ psiconv_noinstHEADERS = gen.h psiconv.h magick-aux.h general.h man1_MANS = psiconv.man EXTRA_DIST = gen.h psiconv.h magick-aux.h general.h psiconv.man psiconv-0.9.8/program/psiconv/Makefile.in0000664000175000017500000004164210336413010015327 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(psiconv_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ bin_PROGRAMS = psiconv$(EXEEXT) subdir = program/psiconv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_psiconv_OBJECTS = psiconv.$(OBJEXT) general.$(OBJEXT) \ magick-aux.$(OBJEXT) gen_txt.$(OBJEXT) gen_image.$(OBJEXT) \ gen_xhtml.$(OBJEXT) gen_html4.$(OBJEXT) psiconv_OBJECTS = $(am_psiconv_OBJECTS) psiconv_DEPENDENCIES = ../../lib/psiconv/libpsiconv.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gen_html4.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/gen_image.Po ./$(DEPDIR)/gen_txt.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/gen_xhtml.Po ./$(DEPDIR)/general.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/magick-aux.Po ./$(DEPDIR)/psiconv.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(psiconv_SOURCES) DIST_SOURCES = $(psiconv_SOURCES) man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man1_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I../.. -I../../lib -I../../compat psiconv_SOURCES = psiconv.c general.c magick-aux.c \ gen_txt.c gen_image.c gen_xhtml.c gen_html4.c psiconv_LDADD = ../../lib/psiconv/libpsiconv.la @LIB_MAGICK@ @LIB_DMALLOC@ psiconv_noinstHEADERS = gen.h psiconv.h magick-aux.h general.h man1_MANS = psiconv.man EXTRA_DIST = gen.h psiconv.h magick-aux.h general.h psiconv.man all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu program/psiconv/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu program/psiconv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done psiconv$(EXEEXT): $(psiconv_OBJECTS) $(psiconv_DEPENDENCIES) @rm -f psiconv$(EXEEXT) $(LINK) $(psiconv_LDFLAGS) $(psiconv_OBJECTS) $(psiconv_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_html4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_txt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_xhtml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magick-aux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psiconv.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am \ uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/program/psiconv/psiconv.c0000644000175000017500000002202010336374750015113 00000000000000/* psiconv.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Driver program */ #include "config.h" #include "compat.h" #include #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef IMAGEMAGICK #include "magick-aux.h" #endif #include #include #include #include #include "psiconv.h" #include "gen.h" static void print_help(void); static void print_version(void); static void strtoupper(char *str); void print_help(void) { fileformat ff; int i,j; puts("Syntax: psiconv [OPTIONS..] [FILE]"); puts("Convert the psion file FILE to other formats"); puts("If FILE is not specified, use stdin"); puts(" -c, --configfile=FILE Read extra configuration file after normal ones"); puts(" -e, --encoding=ENC Output encoding (default: UTF8)"); puts(" -h, --help Display this help and exit"); puts(" -n, --noise=LEVEL Select what to print on stderr (overrides psiconv.conf)"); puts(" -o, --outputfile Output to file instead of stdout"); puts(" -T, --type=FILETYPE Output type (default: XHTML or TIFF"); puts(" -V, --version Display the program version and exit"); puts(""); puts("The following encodings are currently supported:"); puts(" UTF8 Variable length Unicode encoding"); puts(" UCS2 Fixed 16-bit length Unicode encoding"); puts(" Psion The encoding your Psion uses (as in psiconv.conf)"); puts(" ASCII 7-bit ASCII (other symbols are substituted by '?')"); puts(""); puts("The following noise levels are currently supported:"); puts(" 1 or F: Fatal errors only"); puts(" 2 or E: Errors"); puts(" 3 or W: Warnings"); puts(" 4 or P: Progress indicators"); puts(" 5 or D: Debug data"); puts(""); puts("The following abbreviations are used in the output types list:"); puts(" C - processes ClipArt files"); puts(" c - processes ClipArt files containing only one image"); puts(" M - processes MBM files"); puts(" m - processes MBM files containing only one image"); puts(" S - processes Sketch files"); puts(" T - processes TextEd files"); puts(" W - processes Word files"); puts(""); puts("The following output types are known:"); for (i = 0; i < psiconv_list_length(fileformat_list); i ++) { ff = psiconv_list_get(fileformat_list,i); printf(" %s",ff->name); for (j = strlen(ff->name); j < 10; j++) putchar(' '); printf("[%c%c%c%c%c] ", ff->supported_format & FORMAT_CLIPART_MULTIPLE?'C': ff->supported_format & FORMAT_CLIPART_SINGLE?'c':' ', ff->supported_format & FORMAT_MBM_MULTIPLE?'M': ff->supported_format & FORMAT_MBM_SINGLE?'m':' ', ff->supported_format & FORMAT_SKETCH?'S':' ', ff->supported_format & FORMAT_TEXTED?'T':' ', ff->supported_format & FORMAT_WORD?'W':' '); puts(ff->description); } puts(""); puts("When using UTF8 with LaTeX type, the resulting LaTeX source should be converted"); puts(" to a suitable encoding for your LaTeX installation before being typeset"); } void print_version(void) { printf("Version %s\n",VERSION); } void strtoupper(char *str) { int i; for (i = 0; i < strlen(str); i ++) str[i] = toupper(str[i]); } int main(int argc, char *argv[]) { struct option long_options[] = { {"help",no_argument,NULL,'h'}, {"version",no_argument,NULL,'V'}, {"configfile",required_argument,NULL,'c'}, {"noise",required_argument,NULL,'n'}, {"outputfile",required_argument,NULL,'o'}, {"type",required_argument,NULL,'T'}, {"encoding",no_argument,NULL,'e'}, {0,0,0,0} }; const char* short_options = "hVn:o:e:T:c:"; int option_index; FILE * f; struct stat fbuf; const char *inputfilename = ""; const char *outputfilename = ""; const char *extra_configfile = NULL; char *type = NULL; encoding encoding_type=ENCODING_UTF8; psiconv_list outputlist; int verbosity = 0; psiconv_config config; int c,i,res; psiconv_buffer buf; psiconv_file file; fileformat ff = NULL; if (!(fileformat_list = psiconv_list_new(sizeof(struct fileformat_s)))) { fputs("Out of memory error",stderr); exit(1); } init_txt(); init_xhtml(); init_html4(); init_image(); while(1) { c = getopt_long(argc,argv,short_options, long_options, &option_index); if (c == -1) break; switch(c) { case 'h': print_help(); exit(0); case 'V': print_version(); exit(0); case 'n': switch(optarg[0]) { case '1': case 'F':case 'f': verbosity=PSICONV_VERB_FATAL; break; case '2': case 'E':case 'e': verbosity=PSICONV_VERB_ERROR; break; case '3': case 'W':case 'w': verbosity=PSICONV_VERB_WARN; break; case '4': case 'P':case 'p': verbosity=PSICONV_VERB_PROGRESS; break; case '5': case 'D':case 'd': verbosity=PSICONV_VERB_DEBUG; break; default: fputs("Unknown noise level\n",stderr); exit(1); } break; case 'o': outputfilename = strdup(optarg); break; case 'T': type = strdup(optarg); break; case 'e': if(!strcmp(optarg,"UTF8")) encoding_type = ENCODING_UTF8; else if (!strcmp(optarg,"UCS2")) encoding_type = ENCODING_UCS2; else if (!strcmp(optarg,"ASCII")) encoding_type = ENCODING_ASCII; else if (!strcmp(optarg,"Psion")) encoding_type = ENCODING_PSION; else { fputs("Unknown encoding type " "(try '-h' for more information\n",stderr); exit(1); } break; case 'c': extra_configfile = strdup(optarg); break; case '?': case ':': fputs("Try `-h' for more information\n",stderr); exit(1); default: fprintf(stderr,"Internal error: getopt_long returned character " "code 0%o ?? (contact the author)\n", c); exit(1); break; } } if (optind < argc-1) { fputs("I can only convert one file!\n" "Try `-h' for more information\n",stderr); exit(1); } else if (optind == argc-1) if (!(inputfilename = strdup(argv[optind]))) { fputs("Out of memory error",stderr); exit(1); } config = psiconv_config_default(); psiconv_config_read(extra_configfile,&config); if (verbosity) config->verbosity = verbosity; /* Open inputfile for reading */ if (strlen(inputfilename) != 0) { if(stat(inputfilename,&fbuf) < 0) { perror(inputfilename); exit(1); } f = fopen(inputfilename,"r"); if (! f) { perror(inputfilename); exit(1); } } else f = stdin; if (!(buf = psiconv_buffer_new())) { fputs("Out of memory error",stderr); exit(1); } if (psiconv_buffer_fread_all(buf,f)) { fprintf(stderr,"Failure reading file"); exit(1); } if (strlen(inputfilename) != 0) if (fclose(f)) { perror(inputfilename); exit(1); } if (psiconv_parse(config,buf,&file) || (file->type == psiconv_unknown_file)) { fprintf(stderr,"Parse error\n"); exit(1); } if (!type) { switch(file->type) { case psiconv_word_file: case psiconv_texted_file: default: type = "XHTML"; break; case psiconv_mbm_file: case psiconv_clipart_file: case psiconv_sketch_file: type = "TIFF"; break; } } else strtoupper(type); for (i = 0; i < psiconv_list_length(fileformat_list); i ++) { ff = psiconv_list_get(fileformat_list,i); if (! strcasecmp(type,ff->name)) { break; } } if (i == psiconv_list_length(fileformat_list)) { fprintf(stderr,"Unknown output type: `%s'\n",type); exit(1); } if (!(outputlist = psiconv_list_new(sizeof(psiconv_u8)))) { fputs("Out of memory error\n",stderr); exit(1); } res = ff->output(config,outputlist,file,type,encoding_type); if (res) { fprintf(stderr, "Output format `%s' not permitted for this file type\n",type); exit(1); } psiconv_free_file(file); if (strlen(outputfilename) != 0) { f = fopen(outputfilename,"w"); if (! f) { perror(inputfilename); exit(1); } } else f = stdout; psiconv_list_fwrite_all(outputlist,f); if (fclose(f)) { perror(inputfilename); exit(1); } psiconv_list_free(outputlist); exit(0); } psiconv-0.9.8/program/psiconv/general.c0000644000175000017500000001112310336374754015055 00000000000000/* general.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2003-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "compat.h" #include "psiconv.h" #include "general.h" #include #include #include #include #include /* Output a UCS2 character in one of the supported encodings. */ void output_char(psiconv_config config, psiconv_list list, psiconv_ucs2 character, encoding enc) { psiconv_u8 temp; psiconv_u8 *byteptr; int res,i; psiconv_buffer buf; #define TEMPSTR_LEN 80 char tempstr[TEMPSTR_LEN]; if (enc == ENCODING_UCS2) { temp = character >> 8; if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } temp = character & 0xff; if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } else if (enc == ENCODING_UTF8) { if (character < 0x80) { temp = character; if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } else if (character < 0x800) { temp = 0xc0 + (character >> 6); if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } temp = 0x80 + (character & 0x3f); if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } else { temp = 0xe0 + (character >> 12); if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } temp = 0x80 + ((character >> 6) & 0x3f); if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } temp = 0x80 + (character & 0x3f); if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } } else if (enc == ENCODING_ASCII) { if (character == 0xa0) temp = ' '; else if (character >= 0x80) temp = '?'; else temp = character; if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } else if (enc == ENCODING_ASCII_HTML) { if (character >= 0x80) { snprintf(tempstr,TEMPSTR_LEN,"&#x%x;",character); output_simple_chars(config,list,tempstr,enc); } else { temp = character; if ((res = psiconv_list_add(list,&temp))) { fputs("Out of memory error\n",stderr); exit(1); } } } else if (enc == ENCODING_PSION) { if (!(buf = psiconv_buffer_new())) { fputs("Out of memory error\n",stderr); exit(1); } psiconv_unicode_write_char(config,buf,0,character); for (i = 0; i < psiconv_buffer_length(buf); i++) { if (!(byteptr = psiconv_buffer_get(buf,i))) { fputs("Internal memory corruption\n",stderr); exit(1); } if ((res = psiconv_list_add(list,byteptr))) { fputs("Out of memory error\n",stderr); exit(1); } } psiconv_buffer_free(buf); } } void output_string(psiconv_config config, psiconv_list list, psiconv_ucs2 *string, encoding enc) { int i = 0; while (string[i]) { output_char(config,list,string[i],enc); i++; } } void output_simple_chars(psiconv_config config, psiconv_list list, char *string, encoding enc) { psiconv_ucs2 *ucs_string; int i; if (!(ucs_string = malloc(sizeof(*ucs_string) * (strlen(string) + 1)))) { fputs("Out of memory error",stderr); exit(1); } for (i = 0; i < strlen(string); i++) { if ((string[i] != '\n') && ((string[i] < 0x20) || (string[i] > 0x7e))) { fprintf(stderr,"output_simple_chars unknown char: %02x",string[i]); exit(1); } ucs_string[i] = string[i]; } ucs_string[i] = string[i]; output_string(config,list,ucs_string,enc); free(ucs_string); } psiconv-0.9.8/program/psiconv/magick-aux.c0000644000175000017500000000354710336374745015501 00000000000000/* magick-aux.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #if IMAGEMAGICK #include "magick-aux.h" #endif #ifdef DMALLOC #include "dmalloc.h" #endif #if IMAGEMAGICK /* This used to be very ugly, but nowadays it is much better */ #if IMAGEMAGICK_API == 1 || IMAGEMAGICK_API == 2 const MagickInfo * GetMagickFileList(void) { ExceptionInfo exc; GetExceptionInfo(&exc); OpenModules(&exc); return GetMagickInfo(NULL,&exc); } #elif IMAGEMAGICK_API == 3 const MagickInfo * GetMagickFileList(void) { MagickInfo **mi; unsigned long nr; int i; ExceptionInfo exc; GetExceptionInfo(&exc); OpenModules(&exc); mi = GetMagickInfoList("*",&nr); for (i = 0; i < nr-1; i++) { mi[i]->next = mi[i+1]; } return *mi; } #elif IMAGEMAGICK_API == 4 const MagickInfo * GetMagickFileList(void) { MagickInfo **mi; unsigned long nr; int i; ExceptionInfo exc; GetExceptionInfo(&exc); OpenModules(&exc); mi = GetMagickInfoList("*",&nr,&exc); for (i = 0; i < nr-1; i++) { mi[i]->next = mi[i+1]; } return *mi; } #endif #endif /* IMAGEMAGICK */ psiconv-0.9.8/program/psiconv/gen_txt.c0000644000175000017500000001412210336374747015114 00000000000000/* * gen_text.c - Part of psiconv, a PSION 5 file formats converter * Copyright (c) 1999 Andrew Johnson * Portions Copyright (c) 1999-2005 Frodo Looijaard * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include #include #include #include #include #include "general.h" #include "gen.h" #include "psiconv.h" #ifdef DMALLOC #include "dmalloc.h" #endif static void output_para(const psiconv_config config,psiconv_list list, const psiconv_paragraph para,encoding encoding_type); static void gen_word(const psiconv_config config, psiconv_list list, psiconv_word_f wf, encoding encoding_type); static void gen_texted(const psiconv_config config, psiconv_list list, psiconv_texted_f tf, encoding encoding_type); static int gen_txt(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding encoding_type); static struct fileformat_s ff = { "ASCII", "Plain text without much layout", FORMAT_WORD | FORMAT_TEXTED, gen_txt }; void output_para(const psiconv_config config,psiconv_list list, const psiconv_paragraph para,encoding encoding_type) { int i; if (para && para->base_paragraph && para->base_paragraph->bullet && para->base_paragraph->bullet->on) { output_char(config,list,para->base_paragraph->bullet->character, encoding_type); output_char(config,list,' ', encoding_type); output_char(config,list,' ', encoding_type); output_char(config,list,' ', encoding_type); } if (para && para->text) { for (i = 0; i < psiconv_unicode_strlen(para->text); i++) switch (para->text[i]) { case 0x06: case 0x07: case 0x08: output_char(config,list,'\n',encoding_type); break; case 0x09: case 0x0a: output_char(config,list,'\t',encoding_type); break; case 0x0b: case 0x0c: output_char(config,list,'-',encoding_type); break; case 0x0f: output_char(config,list,' ',encoding_type); break; case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x0e: case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1c: case 0x1d: case 0x1e: case 0x1f: break; default: output_char(config,list,para->text[i],encoding_type); break; } output_char(config,list,'\n',encoding_type); } } void gen_word(const psiconv_config config, psiconv_list list, psiconv_word_f wf, encoding encoding_type) { int i; psiconv_paragraph para; if (wf && wf->page_sec && wf->page_sec->header && wf->page_sec->header->text && wf->page_sec->header->text->paragraphs) { for (i=0; i < psiconv_list_length(wf->page_sec->header-> text->paragraphs); i++) { para = psiconv_list_get(wf->page_sec->header->text->paragraphs, i); output_para(config,list,para,encoding_type); } } output_char(config,list,'\n',encoding_type); if (wf && wf->paragraphs) for (i=0; i < psiconv_list_length(wf->paragraphs); i++) { para = psiconv_list_get(wf->paragraphs, i); output_para(config, list,para,encoding_type); } output_char(config,list,'\n',encoding_type); if (wf && wf->page_sec && wf->page_sec->footer && wf->page_sec->footer->text && wf->page_sec->footer->text->paragraphs) { for (i=0; i < psiconv_list_length(wf->page_sec->footer-> text->paragraphs); i++) { para = psiconv_list_get(wf->page_sec->footer->text->paragraphs, i); output_para(config,list,para,encoding_type); } } } void gen_texted(const psiconv_config config, psiconv_list list, psiconv_texted_f tf, encoding encoding_type) { int i; psiconv_paragraph para; if (tf && tf->page_sec && tf->page_sec->header && tf->page_sec->header->text && tf->page_sec->header->text->paragraphs) { for (i=0; i < psiconv_list_length(tf->page_sec->header-> text->paragraphs); i++) { para = psiconv_list_get(tf->page_sec->header->text->paragraphs, i); output_para(config,list,para,encoding_type); } } output_char(config,list,'\n',encoding_type); if (tf && tf->texted_sec && tf->texted_sec->paragraphs) for (i=0; i < psiconv_list_length(tf->texted_sec->paragraphs); i++) { para = psiconv_list_get(tf->texted_sec->paragraphs, i); output_para(config, list,para,encoding_type); } output_char(config,list,'\n',encoding_type); if (tf && tf->page_sec && tf->page_sec->footer && tf->page_sec->footer->text && tf->page_sec->footer->text->paragraphs) { for (i=0; i < psiconv_list_length(tf->page_sec->footer-> text->paragraphs); i++) { para = psiconv_list_get(tf->page_sec->footer->text->paragraphs, i); output_para(config,list,para,encoding_type); } } } int gen_txt(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding encoding_type) { if (file->type == psiconv_word_file) { gen_word(config,list,(psiconv_word_f) file->file,encoding_type); return 0; } else if (file->type == psiconv_texted_file) { gen_texted(config,list,(psiconv_texted_f) file->file,encoding_type); return 0; } else return -1; } void init_txt(void) { psiconv_list_add(fileformat_list,&ff); } psiconv-0.9.8/program/psiconv/gen_image.c0000644000175000017500000001636710336374743015370 00000000000000/* * gen_image.c - Part of psiconv, a PSION 5 file formats converter * Copyright (c) 1999-2005 Frodo Looijaard * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "psiconv/data.h" #include "gen.h" #include "psiconv.h" #include #include #ifdef IMAGEMAGICK #include "magick-aux.h" #endif #ifdef DMALLOC #include "dmalloc.h" #endif #ifdef IMAGEMAGICK static Image *get_paint_data_section(psiconv_paint_data_section sec); static void image_to_list(psiconv_list list,Image *image,const char *dest); static void gen_image_list(const psiconv_config config,psiconv_list list, const psiconv_list sections, const char *dest); static void gen_clipart(const psiconv_config config,psiconv_list list, const psiconv_clipart_f f, const char *dest); static void gen_mbm(const psiconv_config config,psiconv_list list, const psiconv_mbm_f f, const char *dest); static void gen_sketch(const psiconv_config config,psiconv_list list, const psiconv_sketch_f f, const char *dest); static int gen_image(psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding encoding_type); /* This is ridiculously simple using ImageMagick. Without it, it would be quite somewhat harder - it will be left for later on. Note that we ignore any errors. Dangerous... */ Image *get_paint_data_section(psiconv_paint_data_section sec) { Image *image; float *pixel, *p, *red, *green, *blue; int x,y; ExceptionInfo exc; GetExceptionInfo(&exc); red = sec->red; green = sec->green; blue = sec->blue; p = pixel = malloc(sec->xsize * sec->ysize * 3 * sizeof(float)); for (y = 0; y < sec->ysize; y++) { for (x = 0; x < sec->xsize; x++) { *p++ = *red++; *p++ = *green++; *p++ = *blue++; } } image = ConstituteImage(sec->xsize,sec->ysize,"RGB",FloatPixel,pixel,&exc); if (! image || (exc.severity != UndefinedException)) { MagickError(exc.severity,exc.reason,exc.description); exit(1); } free(pixel); DestroyExceptionInfo(&exc); return image; } void image_to_list(psiconv_list list,Image *image,const char *dest) { ImageInfo *image_info; ExceptionInfo exc; size_t length; char *data; int i; strcpy(image->magick,dest); image_info = CloneImageInfo(NULL); GetExceptionInfo(&exc); data = ImageToBlob(image_info,image,&length,&exc); if (!data || (exc.severity != UndefinedException)) { MagickError(exc.severity,exc.reason,exc.description); exit(1); } for (i = 0; i < length; i++) { if (psiconv_list_add(list,data+i)) { fprintf(stderr,"Out of memory error"); exit(1); } } DestroyExceptionInfo(&exc); DestroyImageInfo(image_info); } void gen_image_list(const psiconv_config config,psiconv_list list, const psiconv_list sections, const char *dest) { psiconv_paint_data_section section; const MagickInfo *mi; ImageInfo *image_info; Image *image = NULL; Image *last_image = NULL; Image *this_image, *images; ExceptionInfo exc; int i; GetExceptionInfo(&exc); mi = GetMagickInfo(dest,&exc); if (!mi || (exc.severity != UndefinedException)) { MagickError(exc.severity,exc.reason,exc.description); exit(1); } if ((psiconv_list_length(sections) < 1) || ((psiconv_list_length(sections)) > 1 && ! (mi->adjoin))) { fprintf(stderr,"This image type supports only one image\n"); exit(1); } for (i = 0; i < psiconv_list_length(sections); i++) { if (!(section = psiconv_list_get(sections,i))) { fprintf(stderr,"Internal data structures corrupted\n"); exit(1); } this_image = get_paint_data_section(section); if (! image) { image = this_image; } else { last_image->next=this_image; this_image->previous=last_image; } last_image = this_image; } image_info = CloneImageInfo(NULL); if (image->next) { images = CoalesceImages(image,&exc); if (!images || (exc.severity != UndefinedException)) { MagickError(exc.severity,exc.reason,exc.description); exit(1); } } else images = image; image_to_list(list,image,dest); DestroyExceptionInfo(&exc); DestroyImageInfo(image_info); if (image != images) DestroyImages(image); DestroyImages(images); } void gen_clipart(const psiconv_config config,psiconv_list list, const psiconv_clipart_f f, const char *dest) { int i; psiconv_list sections; psiconv_clipart_section section; if (!(sections = psiconv_list_new(sizeof(*section->picture)))) { fprintf(stderr,"Out of memory error\n"); exit(1); } for (i = 0; i < psiconv_list_length(f->sections); i ++) { if (!(section = psiconv_list_get(f->sections,i))) { fprintf(stderr,"Internal data structures corrupted\n"); exit(1); } if ((psiconv_list_add(sections,section->picture))) { fprintf(stderr,"Out of memory error\n"); exit(1); } } gen_image_list(config,list,sections,dest); psiconv_list_free(sections); } void gen_mbm(const psiconv_config config,psiconv_list list, const psiconv_mbm_f f, const char *dest) { gen_image_list(config,list,f->sections,dest); } void gen_sketch(const psiconv_config config,psiconv_list list, const psiconv_sketch_f f, const char *dest) { Image *image; image = get_paint_data_section(f->sketch_sec->picture); image_to_list(list,image,dest); DestroyImage(image); } int gen_image(psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding encoding_type) { if (file->type == psiconv_mbm_file) gen_mbm(config,list,(psiconv_mbm_f) file->file,dest); else if (file->type == psiconv_clipart_file) gen_clipart(config,list, (psiconv_clipart_f) file->file,dest); else if (file->type == psiconv_sketch_file) { gen_sketch(config, list,(psiconv_sketch_f) file->file,dest); } else return -1; return 0; } #endif void init_image(void) { struct fileformat_s ff; #if IMAGEMAGICK const MagickInfo *mi; ff.output = gen_image; for (mi = GetMagickFileList(); mi ; mi = mi->next) { if (mi->encoder) { ff.name = strdup(mi->name); ff.description = strdup(mi->description); ff.supported_format = FORMAT_CLIPART_SINGLE | FORMAT_MBM_SINGLE | FORMAT_SKETCH; if (mi->adjoin) ff.supported_format |= FORMAT_MBM_MULTIPLE | FORMAT_CLIPART_MULTIPLE; psiconv_list_add(fileformat_list,&ff); } } #endif } psiconv-0.9.8/program/psiconv/gen_xhtml.c0000644000175000017500000006645310336374753015444 00000000000000/* gen_html.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include #include #include "general.h" #include "gen.h" #include #include #include #ifdef DMALLOC #include "dmalloc.h" #endif #define TEMPSTR_LEN 100 static void text(const psiconv_config config,psiconv_list list, psiconv_string_t data,const encoding enc); static void color(const psiconv_config config, psiconv_list list, psiconv_color color,int may_be_transparant, const encoding enc); static void border(const psiconv_config config, psiconv_list list, psiconv_border_kind_t border,const encoding enc); static void style_name(const psiconv_config config, psiconv_list list, const psiconv_string_t name,const encoding enc); static int character_layout_equal(const psiconv_character_layout l1, const psiconv_character_layout l2); static void character_layout_diffs(const psiconv_config config, psiconv_list list, const psiconv_character_layout new, const psiconv_character_layout base, const encoding enc); static void paragraph_layout_diffs(const psiconv_config config, psiconv_list list, const psiconv_paragraph_layout new, const psiconv_paragraph_layout base, const encoding enc); static void style(const psiconv_config config, psiconv_list list, const psiconv_word_style style, const psiconv_paragraph_layout base_para, const psiconv_character_layout base_char, const encoding enc); static void styles(const psiconv_config config, psiconv_list list, const psiconv_word_styles_section styles_sec,const encoding enc); static void header(const psiconv_config config, psiconv_list list, const psiconv_word_styles_section styles_sec,const encoding enc); static void footer(const psiconv_config config, psiconv_list list, const encoding enc); static void characters(const psiconv_config config, psiconv_list list, const psiconv_string_t textstr, const psiconv_character_layout layout, const psiconv_character_layout base, const encoding enc); static void paragraphs(const psiconv_config config, psiconv_list list, psiconv_text_and_layout paragraphs, const psiconv_word_styles_section styles, const encoding enc); static void paragraph(const psiconv_config config, psiconv_list list, const psiconv_paragraph para, const psiconv_word_styles_section styles_sec, const encoding enc); static void gen_word(const psiconv_config config, psiconv_list list, const psiconv_word_f file, const encoding enc); static void gen_texted(const psiconv_config config, psiconv_list list, const psiconv_texted_f file, const encoding enc); static int gen_xhtml(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding enc); void text(const psiconv_config config,psiconv_list list, psiconv_string_t data,const encoding enc) { int i; for (i = 0; i < psiconv_unicode_strlen(data); i++) { if ((data[i] == 0x06) || (data[i] == 0x07) || (data[i] == 0x08)) output_simple_chars(config,list,"
",enc); else if ((data[i] == 0x0b) || (data[i] == 0x0c)) output_simple_chars(config,list,"-",enc); else if ((data[i] == 0x0f) || (data[i] == 0x09) || (data[i] == 0x0a)) output_simple_chars(config,list," ",enc); else if (data[i] >= 0x20) output_char(config,list,data[i],enc); } } void color(const psiconv_config config, psiconv_list list, psiconv_color color,int may_be_transparant, const encoding enc) { char tempstr[TEMPSTR_LEN]; if (may_be_transparant && (color->red == 0xff) && (color->blue == 0xff) && (color->green == 0xff)) output_simple_chars(config,list,"transparant",enc); else { snprintf(tempstr,TEMPSTR_LEN,"rgb(%d,%d,%d)", color->red, color->green, color->blue); output_simple_chars(config,list,tempstr,enc); } } void border(const psiconv_config config, psiconv_list list, psiconv_border_kind_t border,const encoding enc) { output_simple_chars(config,list, border == psiconv_border_none?"none": border == psiconv_border_solid?"solid": border == psiconv_border_double?"double": border == psiconv_border_dotted?"dotted": border == psiconv_border_dashed?"dashed": border == psiconv_border_dotdashed?"dashed": border == psiconv_border_dotdotdashed?"dashed":"",enc); } void style_name(const psiconv_config config, psiconv_list list, const psiconv_string_t name,const encoding enc) { psiconv_string_t name_copy; int i; if (!name) return; if (!(name_copy = psiconv_unicode_strdup(name))) { fputs("Out of memory error\n",stderr); exit(1); } for (i = 0; i < psiconv_unicode_strlen(name_copy); i++) { if ((name_copy[i] < 0x21) || ((name_copy[i] >= 0x7f) && name_copy[i] <= 0xa0)) name_copy[i] = '_'; } output_string(config,list,name_copy,enc); free(name_copy); } /* Check whether the same layout information would be generated */ int character_layout_equal(const psiconv_character_layout l1, const psiconv_character_layout l2) { return (l1 && l2 && (l1->color->red == l2->color->red) && (l1->color->green == l2->color->green) && (l1->color->blue == l2->color->blue) && (l1->back_color->red == l2->back_color->red) && (l1->back_color->green == l2->back_color->green) && (l1->back_color->blue == l2->back_color->blue) && (l1->font_size == l2->font_size) && (l1->italic == l2->italic) && (l1->bold == l2->bold) && (l1->super_sub == l2->super_sub) && (l1->underline == l2->underline) && (l1->strikethrough == l2->strikethrough) && (l1->font->screenfont == l2->font->screenfont)); } void character_layout_diffs(const psiconv_config config, psiconv_list list, const psiconv_character_layout new, const psiconv_character_layout base, const encoding enc) { char tempstr[TEMPSTR_LEN]; if (!base || (new->color->red != base->color->red) || (new->color->green != base->color->green) || (new->color->blue != base->color->blue)) { output_simple_chars(config,list,"color:",enc); color(config,list,new->color,0,enc); output_simple_chars(config,list,";",enc); } if (!base || (new->back_color->red != base->back_color->red) || (new->back_color->green != base->back_color->green) || (new->back_color->blue != base->back_color->blue)) { output_simple_chars(config,list,"background-color:",enc); color(config,list,new->back_color,1,enc); output_simple_chars(config,list,";",enc); } if (!base || (new->font_size != base->font_size)) { output_simple_chars(config,list,"font-size:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->font_size); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || (new->italic != base->italic)) { output_simple_chars(config,list,"font-style:",enc); output_simple_chars(config,list,new->italic?"italic":"normal",enc); output_simple_chars(config,list,";",enc); } if (!base || (new->bold != base->bold)) { output_simple_chars(config,list,"font-weight:",enc); output_simple_chars(config,list,new->bold?"bold":"normal",enc); output_simple_chars(config,list,";",enc); } if (!base || (new->super_sub != base->super_sub)) { output_simple_chars(config,list,"font-style:",enc); output_simple_chars(config,list, new->super_sub==psiconv_superscript?"super": new->super_sub==psiconv_subscript?"sub": "normal",enc); output_simple_chars(config,list,";",enc); } if (!base || (new->underline != base->underline) || (new->strikethrough != base->strikethrough)) { output_simple_chars(config,list,"text-decoration:",enc); output_simple_chars(config,list,new->underline?"underline": new->strikethrough?"line-through": "none",enc); output_simple_chars(config,list,";",enc); } if (!base || (new->font->screenfont != base->font->screenfont)) { output_simple_chars(config,list,"font-family:",enc); output_simple_chars(config,list, new->font->screenfont == psiconv_font_serif?"serif": new->font->screenfont == psiconv_font_sansserif?"sans-serif": new->font->screenfont == psiconv_font_nonprop?"monospace": new->font->screenfont == psiconv_font_misc?"fantasy":"", enc); } } void paragraph_layout_diffs(const psiconv_config config, psiconv_list list, const psiconv_paragraph_layout new, const psiconv_paragraph_layout base, const encoding enc) { char tempstr[TEMPSTR_LEN]; float pad_left_base=0.0,pad_left_new,text_indent_base=0.0,text_indent_new; if (new->bullet->on) { pad_left_new = new->indent_left < new->indent_first? new->indent_left:new->indent_first; text_indent_new = 0.0; } else { pad_left_new = new->indent_left; text_indent_new = new->indent_first; } if (base) { if (base->bullet->on) { pad_left_base = base->indent_left < base->indent_first? base->indent_left:base->indent_first; text_indent_base = 0.0; } else { pad_left_base = base->indent_left; text_indent_base = base->indent_first; } } if (!base || (new->back_color->red != base->back_color->red) || (new->back_color->green != base->back_color->green) || (new->back_color->blue != base->back_color->blue)) { output_simple_chars(config,list,"background-color:",enc); color(config,list,new->back_color,1,enc); output_simple_chars(config,list,";",enc); } if (!base || (pad_left_new != pad_left_base)) { output_simple_chars(config,list,"padding-left:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",pad_left_new); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"cm;",enc); } if (!base || (new->indent_right != base->indent_right)) { output_simple_chars(config,list,"padding-right:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->indent_right); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"cm;",enc); } if (!base || (text_indent_new != text_indent_base)) { output_simple_chars(config,list,"text-indent:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",text_indent_new); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"cm;",enc); } if (!base || (new->justify_hor != base ->justify_hor)) { output_simple_chars(config,list,"font-style:",enc); output_simple_chars(config,list, new->justify_hor==psiconv_justify_left?"left": new->justify_hor==psiconv_justify_centre?"center": new->justify_hor==psiconv_justify_right?"right": new->justify_hor==psiconv_justify_full?"justify": "",enc); output_simple_chars(config,list,";",enc); } #if 0 /* This gave bad output... */ if (!base || (new->linespacing != base->linespacing)) { output_simple_chars(config,list,"line-height:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->linespacing); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } #endif if (!base || (new->space_above != base->space_above)) { output_simple_chars(config,list,"padding-top:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->space_above); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || (new->space_below != base->space_below)) { output_simple_chars(config,list,"padding-bottom:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->space_below); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || (new->right_border->kind != base->right_border->kind)) { output_simple_chars(config,list,"border-right-style:",enc); border(config,list,new->right_border->kind,enc); output_simple_chars(config,list,";",enc); } if (!base || (new->bottom_border->kind != base->bottom_border->kind)) { output_simple_chars(config,list,"border-bottom-style:",enc); border(config,list,new->bottom_border->kind,enc); output_simple_chars(config,list,";",enc); } if (!base || (new->top_border->kind != base->top_border->kind)) { output_simple_chars(config,list,"border-top-style:",enc); border(config,list,new->top_border->kind,enc); output_simple_chars(config,list,";",enc); } if (!base || (new->left_border->kind != base->left_border->kind)) { output_simple_chars(config,list,"border-left-style:",enc); border(config,list,new->left_border->kind,enc); output_simple_chars(config,list,";",enc); } if (!base || ((new->right_border->kind != psiconv_border_none) && (new->right_border->thickness != base->right_border->thickness))) { output_simple_chars(config,list,"border-right-width:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->right_border->thickness); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || ((new->bottom_border->kind != psiconv_border_none) && (new->bottom_border->thickness != base->bottom_border->thickness))) { output_simple_chars(config,list,"border-bottom-width:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->bottom_border->thickness); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || ((new->top_border->kind != psiconv_border_none) && ( new->top_border->thickness != base->top_border->thickness))) { output_simple_chars(config,list,"border-top-width:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->top_border->thickness); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || ((new->left_border->kind != psiconv_border_none) && (new->left_border->thickness != base->left_border->thickness))) { output_simple_chars(config,list,"border-left-width:",enc); snprintf(tempstr,TEMPSTR_LEN,"%f",new->left_border->thickness); output_simple_chars(config,list,tempstr,enc); output_simple_chars(config,list,"pt;",enc); } if (!base || ((new->right_border->kind != psiconv_border_none) && ((new->right_border->color->red != base->right_border->color->red) || (new->right_border->color->green != base->right_border->color->green)|| (new->right_border->color->blue != base->right_border->color->blue)))) { output_simple_chars(config,list,"border-right-color:",enc); color(config,list,new->right_border->color,0,enc); output_simple_chars(config,list,";",enc); } if (!base || ((new->top_border->kind != psiconv_border_none) && ((new->top_border->color->red != base->top_border->color->red) || (new->top_border->color->green != base->top_border->color->green) || (new->top_border->color->blue != base->top_border->color->blue)))) { output_simple_chars(config,list,"border-top-color:",enc); color(config,list,new->top_border->color,0,enc); output_simple_chars(config,list,";",enc); } if (!base || ((new->bottom_border->kind != psiconv_border_none) && ((new->bottom_border->color->red != base->bottom_border->color->red) || (new->bottom_border->color->green !=base->bottom_border->color->green)|| (new->bottom_border->color->blue != base->bottom_border->color->blue)))){ output_simple_chars(config,list,"border-bottom-color:",enc); color(config,list,new->bottom_border->color,0,enc); output_simple_chars(config,list,";",enc); } if (!base || ((new->left_border->kind != psiconv_border_none) && ((new->left_border->color->red != base->left_border->color->red) || (new->left_border->color->green != base->left_border->color->green) || (new->left_border->color->blue != base->left_border->color->blue)))) { output_simple_chars(config,list,"border-left-color:",enc); color(config,list,new->left_border->color,0,enc); output_simple_chars(config,list,";",enc); } } void style(const psiconv_config config, psiconv_list list, const psiconv_word_style style, const psiconv_paragraph_layout base_para, const psiconv_character_layout base_char, const encoding enc) { output_simple_chars(config,list,"*.style_",enc); style_name(config,list,style->name,enc); output_simple_chars(config,list," {",enc); paragraph_layout_diffs(config,list,style->paragraph,base_para,enc); character_layout_diffs(config,list,style->character,base_char,enc); output_simple_chars(config,list,"}\n",enc); } void styles(const psiconv_config config, psiconv_list list, const psiconv_word_styles_section styles_sec,const encoding enc) { int i; psiconv_word_style styl; psiconv_character_layout base_char; psiconv_paragraph_layout base_para; if (!(base_char = psiconv_basic_character_layout())) { fputs("Out of memory error\n",stderr); exit(1); } if (!(base_para = psiconv_basic_paragraph_layout())) { fputs("Out of memory error\n",stderr); exit(1); } output_simple_chars(config,list,"\n",enc); } void header(const psiconv_config config, psiconv_list list, const psiconv_word_styles_section styles_sec,const encoding enc) { output_simple_chars(config,list, "\n",enc); output_simple_chars(config,list,"", enc); output_simple_chars(config,list,"\n\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"EPOC32 file " "converted by psiconv\n",enc); styles(config,list,styles_sec,enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); } void footer(const psiconv_config config, psiconv_list list, const encoding enc) { output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); } void characters(const psiconv_config config, psiconv_list list, const psiconv_string_t textstr, const psiconv_character_layout layout, const psiconv_character_layout base, const encoding enc) { psiconv_list templist; if (!(templist = psiconv_list_new(sizeof(psiconv_u8)))) { fputs("Out of memory error\n",stderr); exit(1); } character_layout_diffs(config,templist,layout,base,enc); if (psiconv_list_length(templist)) { output_simple_chars(config,list,"",enc); } text(config,list,textstr,enc); if (psiconv_list_length(templist)) { output_simple_chars(config,list,"",enc); } psiconv_list_free(templist); } void paragraph(const psiconv_config config, psiconv_list list, const psiconv_paragraph para, const psiconv_word_styles_section styles_sec, const encoding enc) { int i,charnr,start,len; psiconv_string_t text; psiconv_in_line_layout layout,next_layout; psiconv_word_style style = NULL; psiconv_paragraph_layout base_para; psiconv_character_layout base_char; psiconv_list templist; if (!(templist = psiconv_list_new(sizeof(psiconv_u8)))) { fputs("Out of memory error\n",stderr); exit(1); } if (styles_sec) { if (!(style = psiconv_get_style(styles_sec,para->base_style))) { fputs("Unknown style found; data corrupt\n",stderr); exit(1); } base_para = style->paragraph; base_char = style->character; } else { base_para = psiconv_basic_paragraph_layout(); base_char = psiconv_basic_character_layout(); if (!base_para || !base_char) { fputs("Out of memory error\n",stderr); exit(1); } } output_simple_chars(config, list,para->base_paragraph->bullet->on?"
  • name,enc); output_simple_chars(config,list,"\" ",enc); } paragraph_layout_diffs(config,templist,para->base_paragraph,base_para,enc); character_layout_diffs(config,templist,para->base_character,base_char,enc); if (psiconv_list_length(templist)) { output_simple_chars(config,list,"style=\"",enc); if (psiconv_list_concat(list,templist)) { fputs("Out of memory error\n",stderr); exit(1); } output_simple_chars(config,list,"\"",enc); } output_simple_chars(config,list,">",enc); if (psiconv_list_length(para->in_lines) == 0) { if (psiconv_unicode_strlen(para->text)) characters(config,list,para->text,para->base_character, para->base_character,enc); } else { charnr = 0; start = -1; for (i = 0; i < psiconv_list_length(para->in_lines); i++) { if (start < 0) start = charnr; if (!(layout = psiconv_list_get(para->in_lines,i))) { fputs("Internal data structures corruption\n",stderr); exit(1); } if (i+1 < psiconv_list_length(para->in_lines)) { if (!(next_layout = psiconv_list_get(para->in_lines,i+1))) { fputs("Internal data structures corruption\n",stderr); exit(1); } } else { next_layout = NULL; } if (next_layout && character_layout_equal(layout->layout,next_layout->layout)) { charnr += layout->length; continue; } len = charnr - start + layout->length; if (len) { if (!(text = malloc(sizeof (*text) * (len + 1)))) { fputs("Out of memory error\n",stderr); exit(1); } memcpy(text,para->text+start,len * sizeof(*text)); text[len] = 0; characters(config,list,text,layout->layout,para->base_character,enc); free(text); } charnr += layout->length; start = -1; } } output_simple_chars(config, list, para->base_paragraph->bullet->on?"
\n":"

\n", enc); if (!styles_sec) { psiconv_free_paragraph_layout(base_para); psiconv_free_character_layout(base_char); } psiconv_list_free(templist); } void paragraphs(const psiconv_config config, psiconv_list list, psiconv_text_and_layout paragraphs, const psiconv_word_styles_section styles, const encoding enc) { int i; psiconv_paragraph para; for (i = 0; i < psiconv_list_length(paragraphs); i++) { if (!(para = psiconv_list_get(paragraphs,i))) { fputs("Internal datastructure corruption\n",stderr); exit(1); } paragraph(config,list,para,styles,enc); } } void gen_word(const psiconv_config config, psiconv_list list, const psiconv_word_f file, const encoding enc) { if (!file) return; header(config,list,file->styles_sec,enc); paragraphs(config,list,file->paragraphs,file->styles_sec,enc); footer(config,list,enc); } void gen_texted(const psiconv_config config, psiconv_list list, const psiconv_texted_f file, const encoding enc) { header(config,list,NULL,enc); paragraphs(config,list,file->texted_sec->paragraphs,NULL,enc); footer(config,list,enc); } int gen_xhtml(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding enc) { encoding enc1 = enc; if (enc == ENCODING_PSION) { fputs("Unsupported encoding\n",stderr); return -1; } else if (enc == ENCODING_ASCII) enc1 = ENCODING_ASCII_HTML; if (file->type == psiconv_word_file) { gen_word(config,list,(psiconv_word_f) file->file,enc1); return 0; } else if (file->type == psiconv_texted_file) { gen_texted(config,list,(psiconv_texted_f) file->file,enc1); return 0; } else return -1; } static struct fileformat_s fileformats[] = { { "XHTML", "XHTML 1.0 Strict, using CSS for formatting", FORMAT_WORD | FORMAT_TEXTED, gen_xhtml }, { NULL, NULL, 0, NULL } }; void init_xhtml(void) { int i; for (i = 0; fileformats[i].name; i++) psiconv_list_add(fileformat_list,fileformats+i); } psiconv-0.9.8/program/psiconv/gen_html4.c0000644000175000017500000002775410336374742015337 00000000000000/* gen_html.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include #include #include "general.h" #include #include #ifdef DMALLOC #include "dmalloc.h" #endif #define TEMPSTR_LEN 100 static void text(const psiconv_config config,psiconv_list list, psiconv_string_t data,const encoding enc); static void header(const psiconv_config config, psiconv_list list, const encoding enc); static void footer(const psiconv_config config, psiconv_list list, const encoding enc); static void characters(const psiconv_config config, psiconv_list list, const psiconv_string_t textstr, const psiconv_character_layout layout,const encoding enc); static void paragraph(const psiconv_config config, psiconv_list list, psiconv_paragraph para, const encoding enc); static void paragraphs(const psiconv_config config, psiconv_list list, psiconv_text_and_layout paragraphs, const encoding enc); static void gen_word(const psiconv_config config, psiconv_list list, const psiconv_word_f file, const encoding enc); static void gen_texted(const psiconv_config config, psiconv_list list, const psiconv_texted_f file, const encoding enc); static int gen_html4(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding enc); void text(const psiconv_config config,psiconv_list list, psiconv_string_t data,const encoding enc) { int i; for (i = 0; i < psiconv_unicode_strlen(data); i++) { if ((data[i] == 0x06) || (data[i] == 0x07) || (data[i] == 0x08)) output_simple_chars(config,list,"
",enc); else if ((data[i] == 0x0b) || (data[i] == 0x0c)) output_simple_chars(config,list,"-",enc); else if ((data[i] == 0x0f) || (data[i] == 0x09) || (data[i] == 0x0a)) output_simple_chars(config,list," ",enc); else if (data[i] >= 0x20) output_char(config,list,data[i],enc); } } void header(const psiconv_config config, psiconv_list list, const encoding enc) { output_simple_chars(config,list,"\n", enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"EPOC32 file " "converted by psiconv\n",enc); output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); } void footer(const psiconv_config config, psiconv_list list, const encoding enc) { output_simple_chars(config,list,"\n",enc); output_simple_chars(config,list,"\n",enc); } int character_layout_equal(const psiconv_character_layout l1, const psiconv_character_layout l2) { int font_size1,font_size2; font_size1 = l1->font_size < 8 ?1: l1->font_size < 10 ?2: l1->font_size < 13 ?3: l1->font_size < 17 ?4: l1->font_size < 24 ?5: l1->font_size < 36 ?6:7; font_size2 = l2->font_size < 8 ?1: l2->font_size < 10 ?2: l2->font_size < 13 ?3: l2->font_size < 17 ?4: l2->font_size < 24 ?5: l2->font_size < 36 ?6:7; return (l1 && l2 && (l1->color->red == l2->color->red) && (l1->color->green == l2->color->green) && (l1->color->blue == l2->color->blue) && (font_size1 == font_size2) && (l1->italic == l2->italic) && (l1->bold == l2->bold) && (l1->super_sub == l2->super_sub) && (l1->underline == l2->underline) && (l1->strikethrough == l2->strikethrough) && (l1->font->screenfont == l2->font->screenfont)); } void characters(const psiconv_config config, psiconv_list list, const psiconv_string_t textstr, const psiconv_character_layout layout,const encoding enc) { char tempstr[TEMPSTR_LEN]; output_simple_chars(config,list,"font->screenfont == psiconv_font_serif?"serif": layout->font->screenfont == psiconv_font_sansserif?"sans-serif": layout->font->screenfont == psiconv_font_nonprop?"monospace": layout->font->screenfont == psiconv_font_misc?"fantasy":"", enc); output_simple_chars(config,list,"\"",enc); if ((layout->font_size < 10) || (layout->font_size >= 13)) { output_simple_chars(config,list," size=",enc); output_simple_chars(config,list, layout->font_size < 8 ?"1": layout->font_size < 10 ?"2": layout->font_size < 13 ?"3": layout->font_size < 17 ?"4": layout->font_size < 24 ?"5": layout->font_size < 36 ?"6":"7",enc); } if ((layout->color->red != 0) || (layout->color->green != 0) || (layout->color->blue != 0)) { snprintf(tempstr,TEMPSTR_LEN,"%02x%02x%02x", layout->color->red,layout->color->green,layout->color->blue); output_simple_chars(config,list," color=#",enc); output_simple_chars(config,list,tempstr,enc); } output_simple_chars(config,list,">",enc); if (layout->italic) output_simple_chars(config,list,"",enc); if (layout->bold) output_simple_chars(config,list,"",enc); if (layout->super_sub != psiconv_normalscript) output_simple_chars(config,list, layout->super_sub == psiconv_superscript?"": layout->super_sub == psiconv_subscript?"": "",enc); if (layout->strikethrough) output_simple_chars(config,list,"",enc); if (layout->underline) output_simple_chars(config,list,"",enc); text(config,list,textstr,enc); if (layout->underline) output_simple_chars(config,list,"",enc); if (layout->strikethrough) output_simple_chars(config,list,"",enc); if (layout->super_sub != psiconv_normalscript) output_simple_chars(config,list, layout->super_sub == psiconv_superscript?"": layout->super_sub == psiconv_subscript?"": "",enc); if (layout->bold) output_simple_chars(config,list,"",enc); if (layout->italic) output_simple_chars(config,list,"",enc); output_simple_chars(config,list,"",enc); } void paragraph(const psiconv_config config, psiconv_list list, psiconv_paragraph para, const encoding enc) { int i,charnr,start,len; psiconv_string_t text; psiconv_in_line_layout layout,next_layout; output_simple_chars(config,list, para->base_paragraph->bullet->on?"
    base_paragraph->justify_hor == psiconv_justify_centre) output_simple_chars(config,list," align=center",enc); else if (para->base_paragraph->justify_hor == psiconv_justify_right) output_simple_chars(config,list," align=right",enc); else if (para->base_paragraph->justify_hor == psiconv_justify_full) output_simple_chars(config,list," align=justify",enc); output_simple_chars(config,list,">",enc); if (psiconv_list_length(para->in_lines) == 0) { if (psiconv_unicode_strlen(para->text)) characters(config,list,para->text,para->base_character,enc); } else { charnr = 0; start = -1; for (i = 0; i < psiconv_list_length(para->in_lines); i++) { if (start < 0) start = charnr; if (!(layout = psiconv_list_get(para->in_lines,i))) { fputs("Internal data structures corruption\n",stderr); exit(1); } if (i+1 < psiconv_list_length(para->in_lines)) { if (!(next_layout = psiconv_list_get(para->in_lines,i+1))) { fputs("Internal data structures corruption\n",stderr); exit(1); } } else { next_layout = NULL; } if (next_layout && character_layout_equal(layout->layout,next_layout->layout)) { charnr += layout->length; continue; } len = charnr - start + layout->length; if (len) { if (!(text = malloc(sizeof (*text) * (len + 1)))) { fputs("Out of memory error\n",stderr); exit(1); } memcpy(text,para->text+charnr,len * sizeof(*text)); text[len] = 0; characters(config,list,text,layout->layout,enc); free(text); } charnr += layout->length; start = -1; } } output_simple_chars(config, list, para->base_paragraph->bullet->on?"
\n":"\n",enc); } void paragraphs(const psiconv_config config, psiconv_list list, psiconv_text_and_layout paragraphs, const encoding enc) { int i; psiconv_paragraph para; for (i = 0; i < psiconv_list_length(paragraphs); i++) { if (!(para = psiconv_list_get(paragraphs,i))) { fputs("Internal datastructure corruption\n",stderr); exit(1); } paragraph(config,list,para,enc); } } void gen_word(const psiconv_config config, psiconv_list list, const psiconv_word_f file, const encoding enc) { if (!file) return; header(config,list,enc); paragraphs(config,list,file->paragraphs,enc); footer(config,list,enc); } void gen_texted(const psiconv_config config, psiconv_list list, const psiconv_texted_f file, const encoding enc) { header(config,list,enc); paragraphs(config,list,file->texted_sec->paragraphs,enc); footer(config,list,enc); } int gen_html4(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *dest, const encoding enc) { encoding enc1 = enc; if (enc == ENCODING_PSION) { fputs("Unsupported encoding\n",stderr); return -1; } else if (enc == ENCODING_ASCII) enc1 = ENCODING_ASCII_HTML; if (file->type == psiconv_word_file) { gen_word(config,list,(psiconv_word_f) file->file,enc1); return 0; } else if (file->type == psiconv_texted_file) { gen_texted(config,list,(psiconv_texted_f) file->file,enc1); return 0; } else return -1; } static struct fileformat_s fileformats[] = { { "HTML4", "HTML 4.01 Transitional, without CSS", FORMAT_WORD | FORMAT_TEXTED, gen_html4 }, { NULL, NULL, 0, NULL } }; void init_html4(void) { int i; for (i = 0; fileformats[i].name; i++) psiconv_list_add(fileformat_list,fileformats+i); } psiconv-0.9.8/program/psiconv/gen.h0000644000175000017500000000212410336374741014213 00000000000000/* gen.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1990-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_GEN_H #define PSICONV_GEN_H #include "psiconv/data.h" #include "psiconv.h" void init_xhtml(void); void init_html4(void); void init_txt(void); void init_rtf(void); void init_image(void); void init_latex(void); #endif /* PSICONV_GEN_H */ psiconv-0.9.8/program/psiconv/psiconv.h0000644000175000017500000000336410336374752015134 00000000000000/* psiconv.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_H #define PSICONV_H #include #include #define FORMAT_WORD 0x01 #define FORMAT_TEXTED 0x02 #define FORMAT_CLIPART_SINGLE 0x04 #define FORMAT_CLIPART_MULTIPLE 0x08 #define FORMAT_MBM_SINGLE 0x10 #define FORMAT_MBM_MULTIPLE 0x20 #define FORMAT_SKETCH 0x40 typedef enum { ENCODING_UTF8, ENCODING_UCS2, ENCODING_PSION, ENCODING_ASCII, ENCODING_ASCII_HTML } encoding; typedef int output_function(const psiconv_config config, psiconv_list list, const psiconv_file file, const char *type, const encoding encoding_type); typedef struct fileformat_s { const char *name; const char *description; int supported_format; output_function *output; } *fileformat; psiconv_list fileformat_list; /* of struct psiconv_fileformat */ #endif /* PSICONV_H */ psiconv-0.9.8/program/psiconv/magick-aux.h0000644000175000017500000000216710336374756015505 00000000000000/* magick-aux.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2000-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #if IMAGEMAGICK #if IMAGEMAGICK_API == 1 #include #else #include #include #include #include #endif /* IMAGEMAGICK_OLD */ extern const MagickInfo * GetMagickFileList(void); #endif /* IMAGEMAGICK */ psiconv-0.9.8/program/psiconv/general.h0000644000175000017500000000343210336374757015071 00000000000000/* general.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef GENERAL_H #define GENERAL_H #include #include #include #include "psiconv.h" /* Several routines to output text. The text is appended to a psiconv_list of bytes (u8), in the specified encoding. A single character may add several bytes to the list, in some encodings. */ /* Output a single UCS2 character */ extern void output_char(psiconv_config config, psiconv_list list, psiconv_ucs2 character, encoding enc); /* Output a string of UCS2 characters */ extern void output_string(psiconv_config config, psiconv_list list, psiconv_ucs2 *string, encoding enc); /* Output a string of ASCII chars to the list. Only characters between 0x20 and 0x7e (inclusive) may be used. */ extern void output_simple_chars(psiconv_config config, psiconv_list list, char *string, encoding enc); #endif /* GENERAL_H */ psiconv-0.9.8/program/psiconv/psiconv.man0000644000175000017500000000265310336374763015462 00000000000000.\"Created with GNOME Manpages Editor .\"http://gmanedit.sourceforge.net .\"Sergio Rua .\" .TH PSICONV 1 "11 November 2003" .SH NAME psiconv \- Translate Psion 5 and other EPOC device files. .SH SYNOPSIS .B psiconv .RI [ \-d | \-\-debug ] .RI [ \-h | \-\-help ] .RI [ \-o | \-\-outputfile ] .RI [ \-s | \-\-silent ] .RI [ \-T | \-\-type=FILETYPE ] .RI [ \-V | \-\-version ] .RI [ \-v | \-\-verbose ] .RI [ \-u | \-\-UTF8 ] .RI [ FILE .IR ... ] .br .SH DESCRIPTION This manual page explains the .B psiconv program. .B Psiconv translates Psion 5 and other EPOC device files to more commonly used formats. .br Psiconv works like a filter: output is sent to .B stdout without the .I -o option, and input is read from .B stdin if no files are given. .SH OPTIONS .TP .IR \-d | \-\-debug Show debug information on stderr .TP .IR \-h | \-\-help Display this help and exit .TP .IR \-o | \-\-outputfile Output to file instead of stdout .TP .IR \-s | \-\-silent Do not even show warnings on stderr .TP .IR \-T | \-\-type=FILETYPE Output type .TP .IR \-V | \-\-version Display the program version and exit .TP .IR \-v | \-\-verbose Show progress indicators on stderr .TP .IR \-u | \-\-UTF8 Input file is encoded in UTF8 .SH LICENCE Psiconv is released under the Gnu General Public License, version 2 or higher. .SH BUGS Many more formats should be supported. .SH AUTHOR Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include unsigned long uid1[32] = { /* bit 0 */ 0x000045A0, /* bit 1 */ 0x00008B40, /* bit 2 */ 0x000006A1, /* bit 3 */ 0x00000D42, /* bit 4 */ 0x00001A84, /* bit 5 */ 0x00003508, /* bit 6 */ 0x00006A10, /* bit 7 */ 0x0000D420, /* bit 8 */ 0x45A00000, /* bit 9 */ 0x8B400000, /* bit 10 */ 0x06A10000, /* bit 11 */ 0x0D420000, /* bit 12 */ 0x1A840000, /* bit 13 */ 0x35080000, /* bit 14 */ 0x6A100000, /* bit 15 */ 0xD4200000, /* bit 16 */ 0x0000AA51, /* bit 17 */ 0x00004483, /* bit 18 */ 0x00008906, /* bit 19 */ 0x0000022D, /* bit 20 */ 0x0000045A, /* bit 21 */ 0x000008B4, /* bit 22 */ 0x00001168, /* bit 23 */ 0x000022D0, /* bit 24 */ 0xAA510000, /* bit 25 */ 0x44830000, /* bit 26 */ 0x89060000, /* bit 27 */ 0x022D0000, /* bit 28 */ 0x045A0000, /* bit 29 */ 0x08B40000, /* bit 30 */ 0x11680000, /* bit 31 */ 0x22D00000}; unsigned long uid2[32] = { /* bit 0 */ 0x000076B4, /* bit 1 */ 0x0000ED68, /* bit 2 */ 0x0000CAF1, /* bit 3 */ 0x000085C3, /* bit 4 */ 0x000018A7, /* bit 5 */ 0x0000374E, /* bit 6 */ 0x00006E9C, /* bit 7 */ 0x0000DD38, /* bit 8 */ 0x76B40000, /* bit 9 */ 0xED680000, /* bit 10 */ 0xCAF10000, /* bit 11 */ 0x85C30000, /* bit 12 */ 0x18A70000, /* bit 13 */ 0x374E0000, /* bit 14 */ 0x6E9C0000, /* bit 15 */ 0xDD380000, /* bit 16 */ 0x00003730, /* bit 17 */ 0x00006E60, /* bit 18 */ 0x0000DCC0, /* bit 19 */ 0x0000A9A1, /* bit 20 */ 0x00004363, /* bit 21 */ 0x000086C6, /* bit 22 */ 0x00001DAD, /* bit 23 */ 0x00003B5A, /* bit 24 */ 0x37300000, /* bit 25 */ 0x6E600000, /* bit 26 */ 0xDCC00000, /* bit 27 */ 0xA9A10000, /* bit 28 */ 0x43630000, /* bit 29 */ 0x86C60000, /* bit 30 */ 0x1DAD0000, /* bit 31 */ 0x3B5A0000 }; unsigned long uid3[32] = { /* bit 0 */ 0x00003331, /* bit 1 */ 0x00006662, /* bit 2 */ 0x0000CCC4, /* bit 3 */ 0x000089A9, /* bit 4 */ 0x00000373, /* bit 5 */ 0x000006E6, /* bit 6 */ 0x00000DCC, /* bit 7 */ 0x00001B98, /* bit 8 */ 0x33310000, /* bit 9 */ 0x66620000, /* bit 10 */ 0xCCC40000, /* bit 11 */ 0x89A90000, /* bit 12 */ 0x03730000, /* bit 13 */ 0x06E60000, /* bit 14 */ 0x0DCC0000, /* bit 15 */ 0x1B980000, /* bit 16 */ 0x00001021, /* bit 17 */ 0x00002042, /* bit 18 */ 0x00004084, /* bit 19 */ 0x00008108, /* bit 20 */ 0x00001231, /* bit 21 */ 0x00002462, /* bit 22 */ 0x000048C4, /* bit 23 */ 0x00009188, /* bit 24 */ 0x10210000, /* bit 25 */ 0x20420000, /* bit 26 */ 0x40840000, /* bit 27 */ 0x81080000, /* bit 28 */ 0x12310000, /* bit 29 */ 0x24620000, /* bit 30 */ 0x48C40000, /* bit 31 */ 0x91880000 }; unsigned long checkuid(unsigned long id1,unsigned long id2, unsigned long id3) { int i; unsigned long res = 0; for (i = 0; i < 32; i++) { if (id1 & (1 << i)) res = res ^ uid1[i]; if (id2 & (1 << i)) res = res ^ uid2[i]; if (id3 & (1 << i)) res = res ^ uid3[i]; } return res; } void printhexdigit(char digit) { if (digit < 10) putchar(digit + '0'); else putchar(digit + 'A' - 10); } void printhex(unsigned long id) { int i; for (i = 0; i < 8; i ++) { printhexdigit((id & 0xf0000000) >> 28); id = id << 4; } } int main(int argc, char *argv[]) { unsigned long res; res = checkuid(0x10000037,0x1000006D,0x1000007F); printhex(res); putchar('\n'); exit(0); } psiconv-0.9.8/program/extra/empty.c0000644000175000017500000000353110336374765014246 00000000000000/* empty.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include void help(void) { fprintf(stderr,"Syntax: empty TYPE FILENAME\n" " TYPE may be Word or TextEd; only the first character is checked\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; psiconv_buffer buf; psiconv_file psionfile; psiconv_file_type_t type=0; psiconv_config config; if (argc < 3) help(); if ((argv[1][0] == 't') || (argv[1][0] == 'T')) type = psiconv_texted_file; else if ((argv[1][0] == 'w') || (argv[1][0] == 'W')) type = psiconv_word_file; else { help(); } config = psiconv_config_default(); psiconv_config_read(NULL,&config); psionfile = psiconv_empty_file(type); if (psiconv_write(config,&buf,psionfile)) { fprintf(stderr,"Generate error\n"); exit(1); } if (!(fp = fopen(argv[2],"w"))) { perror("Can't open file"); exit(1); } if ((psiconv_buffer_fwrite_all(buf,fp))) { perror("Can't fwrite file"); exit(1); } exit(0); } psiconv-0.9.8/program/extra/rewrite.c0000644000175000017500000000421510336374766014572 00000000000000/* rewrite.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include int main(int argc, char *argv[]) { FILE *fp; psiconv_buffer buf; psiconv_file psionfile; psiconv_config config; /* psiconv_verbosity = PSICONV_VERB_DEBUG; */ if (argc < 3) { fprintf(stderr,"Not enough arguments\n"); fprintf(stderr,"Syntax: INFILE OUTFILE\n"); exit(1); } config = psiconv_config_default(); psiconv_config_read(NULL,&config); if (!(fp = fopen(argv[1],"r"))) { perror("Can't open file"); exit(1); } if (!(buf=psiconv_buffer_new())) { perror("Can't allocate buf"); exit(1); } if ((psiconv_buffer_fread_all(buf,fp))) { perror("Can't fread file"); exit(1); } fclose(fp); if ((psiconv_parse(config,buf,&psionfile))) { fprintf(stderr,"Parse error\n"); exit(1); } psiconv_buffer_free(buf); buf = NULL; if (psiconv_write(config,&buf,psionfile)) { fprintf(stderr,"Generate error\n"); exit(1); } psiconv_free_file(psionfile); if (!(fp = fopen(argv[2],"w"))) { perror("Can't open file"); exit(1); } if ((psiconv_buffer_fwrite_all(buf,fp))) { perror("Can't fwrite file"); exit(1); } fclose(fp); psiconv_buffer_free(buf); psiconv_config_free(config); exit(0); } psiconv-0.9.8/README0000644000175000017500000001133010010205272010775 00000000000000INTRODUCTION ============ This package is meant to make the Psion 5 series of PDAs, as well as other small computers running EPOC 32, more usable to non-Windows users. But even they may profit from the data I collected. The package consists of several parts: * Documentation about Psion 5 data formats; * A library which can be linked against application that have to read and write Psion 5 files; * An example command-line program which reads Psion files and writes more commonly used formats. DATA FORMATS ============ As far as I know, and have gathered from the newsgroups, Psion does not want or is not able to release the data formats of the saved files of their internal applications. I am trying to reverse engineer these data formats and to document them for general use. At this moment, I understand their Word, Sheet, TextEd, Sketch, MBM, Clipart and Record files, as well as a few other less important formats. I want this information to be available to everyone, in order to write better file conversion utilities for popular (non-)Windows programs. All documentation is written in Psion 5 Word. Fortunately, the utilities in this package can translate it to HTML and other formats. Unlike all other files in this package, the *.psi files in the directory formats/psion are completely public domain. I ask anybody who reproduces them, or uses their information in other programs, kindly to attribute them to me. The documentation files are not installed on a `make install'; you can find them in the subdirectories of the formats directory. THE LIBRARY =========== libpsiconv is a library of routines that you can link against your own application. It allows you to read and write Psion 5 files. Note that it comes under the GNU General Public License; that means that you can only link it to programs which are also covered by that license. You can contact me if you need other license terms. The following formats are supported at this moment: Word (R+W) Word processor files TextEd (R+W) OPL editor files Sketch (R+W) Picture files MBM (R+W) Alternate picture format; can contain several pictures ClipArt (R+W) Internal picture format; can contain several pictures Sheet (R) Spreadsheet files Documentation is scarce; please examine the source code or the example psiconv program. Some things may also be found in the doc subdirectory. THE PROGRAM =========== Psiconv is a command-line converter that reads Psiconv files and outputs more commonly used formats. It is linked against libpsiconv, and can handle anything that it can. Please enter `psiconv --help' if you want to know about its syntax. The current HTML4 target is not very ideal. HTML is just not made to represent detailed layout considerations: it is a document description language. Still, the output is quite readable already. Of course, headers and footers are not displayed, because there is no notion of pages in HTML. Tabs are also difficult; they are not supported yet. This can be solved using tables, but it is quite hard to do it correctly. Some other things are just approximated too. The XHTML target uses cascading style sheets (CSS). You need a not-too-old browser for this to display correctly. Generally, the output of this generator is of higher quality than the normal HTML generator's. A plain TEXT target just grabs all text, without any futher conversions. All ImageMagick graphic output formats are supported; depending on how you compiled ImageMagick, this is betwee 20 and 50 different formats. Your favorite one should be somewhere in there... In the past, my focus was on extending the number of output targets for this program; at the moment, I belief more in import/export filters for office applications like AbiWord, Gnumeric and the Gimp. Psiconv is licensed under the GPL. Please read the included file COPYING for exact licensing information. Please contact me if you need some other licensing terms. NEWS AND FUTURE DEVELOPMENTS ============================ Starting with version 0.2, psiconv should keep all namespaces unpoluted. Starting with version 0.4, the conversion routines are linked into a (static or shared) library. Version 0.5 has autoconf and libtool support, and should run on many more platforms. Version 0.6 has support for graphics. Version 0.8 can generate files and add Sheet support. Version 0.9 uses Unicode inside, add the psiconv.conf file and has many more enhancements. High on the TODO list are input routines for Record files. Sheet files will be next. I am running into some trouble understanding Data and Agenda files, but with a little luck, I'll figure it out after all. This is more long-term though. INSTALLATION ============ Please read the file INSTALL for installation instructions. psiconv-0.9.8/configure.in0000644000175000017500000002144210336401027012442 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([lib/psiconv]) AM_INIT_AUTOMAKE(psiconv,0.9.8) AM_CONFIG_HEADER(config.h) dnl Checks for programs. AM_PROG_LIBTOOL dnl This is stolen from gnome-libs-1.0.14 AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.], ,enable_compile_warnings=minimum) AC_MSG_CHECKING(what warning flags to pass to the C compiler) warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi if test "x$enable_compile_warnings" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) warnCFLAGS="-Wall -Wunused" ;; esac ## -W is not all that useful. And it cannot be controlled ## with individual -Wno-xxx flags, unlike -Wall if test "x$enable_compile_warnings" = "xyes"; then warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" fi fi fi AC_MSG_RESULT($warnCFLAGS) AC_ARG_ENABLE(iso-c, [ --enable-iso-c Try to warn if code is not ISO C ],, enable_iso_c=no) AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCFLAGS) if test "x$cflags_set" != "xyes"; then CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" cflags_set=yes AC_SUBST(cflags_set) fi dnl Checks for libraries. AC_ARG_WITH(imagemagick, [ --with-imagemagick enable ImageMagick (default = yes)], [IMAGEMAGICK=$withval], [IMAGEMAGICK='yes']) if test x"$IMAGEMAGICK" != xno ; then AC_CHECK_PROG(IMAGEMAGICK,Magick-config,yes,no) if test x"$IMAGEMAGICK" != xno ; then CFLAGS_OLD="$CFLAGS" CPPFLAGS_OLD="$CPPFLAGS" LDFLAGS_OLD="$LDFLAGS" LIBS_OLD="$LIBS" CFLAGS="$CFLAGS `Magick-config --cflags`" CPPFLAGS="$CPPFLAGS `Magick-config --cppflags`" LDFLAGS="$LDFLAGS `Magick-config --ldflags`" LIBS="$LIBS `Magick-config --libs`" AC_MSG_CHECKING(whether GetMagickInfo works and which API to use) AC_TRY_RUN([ #include #include #include #include int main(void) { unsigned long number_formats; ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); GetMagickInfoList("*",&number_formats,&exception); return number_formats == 0; }], IMAGEMAGICK=4,IMAGEMAGICK=no,IMAGEMAGICK=no) if test x"$IMAGEMAGICK" = xno ; then AC_TRY_RUN([ #include #include #include #include int main(void) { unsigned long number_formats; ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); GetMagickInfoList("*",&number_formats); return number_formats == 0; }], IMAGEMAGICK=3,IMAGEMAGICK=no,IMAGEMAGICK=no) fi if test x"$IMAGEMAGICK" = xno ; then AC_TRY_RUN([ #include #include #include #include int main(void) { ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); return (NULL == GetMagickInfo(NULL,&exception)); }], IMAGEMAGICK=2,IMAGEMAGICK=no,IMAGEMAGICK=no) fi if test x"$IMAGEMAGICK" = xno ; then AC_TRY_RUN([ #include int main(void) { ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); return (NULL == GetMagickInfo(NULL,&exception)); }], IMAGEMAGICK=1,IMAGEMAGICK=no,IMAGEMAGICK=no) fi AC_MSG_RESULT("Version $IMAGEMAGICK") LDFLAGS="$LDFLAGS_OLD" LIBS="$LIBS_OLD" dnl Note: CFLAGS can't be set for single directories, so we propagate them if test x"$IMAGEMAGICK" = xno ; then CFLAGS="$CFLAGS_OLD" CPPFLAGS="$CPPFLAGS_OLD" fi fi fi if test x"$IMAGEMAGICK" != xno ; then LIB_MAGICK="`Magick-config --libs` `Magick-config --ldflags`" AC_DEFINE(IMAGEMAGICK, 1 ,[ImageMagick availability]) AC_DEFINE_UNQUOTED(IMAGEMAGICK_API, $IMAGEMAGICK, [ImageMagick API version]) else LIB_MAGICK= fi AC_SUBST(LIB_MAGICK) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T dnl Here we check for large enough integer types. This is not quite dnl good enough, but it should work almost always. AC_CHECK_SIZEOF(char,1) AC_CHECK_SIZEOF(short,1) AC_CHECK_SIZEOF(int,2) AC_CHECK_SIZEOF(long,4) AC_MSG_CHECKING(for an 8 bit integer type) if test $ac_cv_sizeof_char -ge 1 ; then INT_8_BIT=char AC_MSG_RESULT(char) elif test $ac_cv_sizeof_short -ge 1 ; then INT_8_BIT=short AC_MSG_RESULT(short) elif test $ac_cv_sizeof_int -ge 1 ; then AC_MSG_RESULT(int) elif test $ac_cv_sizeof_long -ge 1 ; then INT_8_BIT=long AC_MSG_RESULT(long) else AC_MSG_ERROR(No integer type of at least 8 bits found) fi AC_MSG_CHECKING(for a 16 bit integer type) if test $ac_cv_sizeof_char -ge 2 ; then INT_16_BIT=char AC_MSG_RESULT(char) elif test $ac_cv_sizeof_short -ge 2 ; then INT_16_BIT=short AC_MSG_RESULT(short) elif test $ac_cv_sizeof_int -ge 2 ; then INT_16_BIT=int AC_MSG_RESULT(int) elif test $ac_cv_sizeof_long -ge 2 ; then INT_16_BIT=long AC_MSG_RESULT(long) else AC_MSG_ERROR(No integer type of at least 16 bits found) fi AC_MSG_CHECKING(for a 32 bit integer type) if test $ac_cv_sizeof_char -ge 4 ; then INT_32_BIT=char AC_MSG_RESULT(char) elif test $ac_cv_sizeof_short -ge 4 ; then INT_32_BIT=short AC_MSG_RESULT(short) elif test $ac_cv_sizeof_int -ge 4 ; then INT_32_BIT=int AC_MSG_RESULT(int) elif test $ac_cv_sizeof_long -ge 4 ; then INT_32_BIT=long AC_MSG_RESULT(long) else AC_MSG_ERROR(No integer type of at least 32 bits found) fi AC_SUBST(INT_8_BIT) AC_SUBST(INT_16_BIT) AC_SUBST(INT_32_BIT) dnl Checks for library functions. AC_FUNC_VPRINTF AC_REPLACE_FUNCS(strdup) AC_CHECK_FUNC(getopt_long,getopt=yes,getopt=no) if test $getopt = no; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) fi AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable dmalloc for developers (default:off)], [case "${enableval}" in yes) dmalloc=yes ;; no) dmalloc=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-dmalloc) ;; esac],[dmalloc=false]) if test x"$dmalloc" = xyes; then AC_CHECK_LIB(dmalloc,malloc,dmalloc=yes,dmalloc=no) fi if test x"$dmalloc" = xyes; then AC_CHECK_HEADER(dmalloc.h,dmalloc=yes,dmalloc=no) fi if test x"$dmalloc" = xyes ; then LIB_DMALLOC=-ldmalloc AC_DEFINE(DMALLOC,1,[DMalloc availability]) else LIB_DMALLOC= fi AC_SUBST(LIB_DMALLOC) dnl With and without functions AC_ARG_ENABLE(xhtml-docs, [ --disable-xhtml-docs Disable generation of XHTML docs (default: on)], [case "${enableval}" in yes) xhtmldocs=true ;; no) xhtmldocs=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-xhtml-docs) ;; esac],[xhtmldocs=true]) AM_CONDITIONAL(XHTMLDOCS,test x$xhtmldocs = xtrue) AC_ARG_ENABLE(html4-docs, [ --enable-html4-docs Enable generation of HTML 4 docs (default: off)], [case "${enableval}" in yes) html4docs=true ;; no) html4docs=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-html4-docs) ;; esac],[html4docs=false]) AM_CONDITIONAL(HTML4DOCS,test x$html4docs = xtrue) AC_ARG_ENABLE(ascii-docs, [ --enable-ascii-docs Enable generation of ASCII docs (default: off)], [case "${enableval}" in yes) asciidocs=true ;; no) asciidocs=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-ascii-docs) ;; esac],[asciidocs=false]) AM_CONDITIONAL(ASCIIDOCS,test x$asciidocs = xtrue) AC_ARG_WITH(etcdir, [ --with-etcdir=DIR Set configfile dir (default: SYSCONFDIR/psiconv)], [PSICONVETCDIR=${withval}], [PSICONVETCDIR=${sysconfdir}/psiconv]) AC_SUBST(PSICONVETCDIR) AC_ARG_WITH(imagemagick, [ --with-imagemagick enable ImageMagick (default = yes)], [IMAGEMAGICK=$withval], [IMAGEMAGICK='yes']) AC_CONFIG_FILES([Makefile compat/Makefile lib/Makefile lib/psiconv/Makefile program/Makefile program/psiconv/Makefile program/psiconv-config/Makefile program/psiconv-config/psiconv-config program/psiconv-config/psiconv-config.man lib/psiconv/general.h formats/Makefile docs/Makefile program/extra/Makefile etc/Makefile examples/Makefile]) AC_OUTPUT psiconv-0.9.8/aclocal.m40000644000175000017500000073357310336401071012007 00000000000000# generated automatically by aclocal 1.8.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # Debian $Rev: 214 $ # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided and an installed libltdl is not found, it is # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $CC in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; linux*) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi4*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED ]) AC_MSG_RESULT([$SED]) ]) # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.8.5])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) psiconv-0.9.8/Makefile.am0000644000175000017500000000011610336375247012176 00000000000000SUBDIRS = compat lib program formats docs etc examples EXTRA_DIST=autogen.sh psiconv-0.9.8/Makefile.in0000664000175000017500000004524510336413005012206 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO compile config.guess config.sub depcomp install-sh \ ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = compat lib program formats docs etc examples EXTRA_DIST = autogen.sh all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/lib/psiconv $(distdir)/program/psiconv-config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/config.h.in0000644000175000017500000000433310336401224012153 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* DMalloc availability */ #undef DMALLOC /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* ImageMagick availability */ #undef IMAGEMAGICK /* ImageMagick API version */ #undef IMAGEMAGICK_API /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of a `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of a `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned' if does not define. */ #undef size_t psiconv-0.9.8/configure0000775000175000017500000270242510336413011012047 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="lib/psiconv" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL cflags_set IMAGEMAGICK LIB_MAGICK INT_8_BIT INT_16_BIT INT_32_BIT LIBOBJS LIB_DMALLOC XHTMLDOCS_TRUE XHTMLDOCS_FALSE HTML4DOCS_TRUE HTML4DOCS_FALSE ASCIIDOCS_TRUE ASCIIDOCS_FALSE PSICONVETCDIR LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-compile-warnings=no/minimum/yes Turn on compiler warnings. --enable-iso-c Try to warn if code is not ISO C --enable-dmalloc Enable dmalloc for developers (default:off) --disable-xhtml-docs Disable generation of XHTML docs (default: on) --enable-html4-docs Enable generation of HTML 4 docs (default: off) --enable-ascii-docs Enable generation of ASCII docs (default: off) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-imagemagick enable ImageMagick (default = yes) --with-etcdir=DIR Set configfile dir (default: SYSCONFDIR/psiconv) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.8" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=psiconv VERSION=0.9.8 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. ac_config_headers="$ac_config_headers config.h" # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED fi echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3632 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5196:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6228: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6232: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6461: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6465: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6521: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:6525: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds="$tmp_archive_cmds" fi link_all_deplibs=no else ld_shlibs=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var " || \ test "X$hardcode_automatic"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then archive_cmds_need_lc_CXX=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_CXX='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='-all_load $convenience' link_all_deplibs_CXX=yes else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd12*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes archive_cmds_need_lc_CXX=no archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.0-5 | solaris2.0-5.*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10984: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:10988: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11044: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11048: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; linux*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var CXX" || \ test "X$hardcode_automatic_CXX"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13338: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13342: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13398: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13402: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_F77="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_F77="$tmp_archive_cmds" fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi4*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_F77=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_F77='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='-all_load $convenience' link_all_deplibs_F77=yes else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var F77" || \ test "X$hardcode_automatic_F77"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15443: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15447: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15676: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15680: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15736: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15740: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_GCJ="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_GCJ="$tmp_archive_cmds" fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi4*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_GCJ=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_GCJ='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='-all_load $convenience' link_all_deplibs_GCJ=yes else ld_shlibs_GCJ=no fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var GCJ" || \ test "X$hardcode_automatic_GCJ"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Check whether --enable-compile-warnings or --disable-compile-warnings was given. if test "${enable_compile_warnings+set}" = set; then enableval="$enable_compile_warnings" else enable_compile_warnings=minimum fi; echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6 warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi if test "x$enable_compile_warnings" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ \ -Wall\ \ *) ;; *) warnCFLAGS="-Wall -Wunused" ;; esac ## -W is not all that useful. And it cannot be controlled ## with individual -Wno-xxx flags, unlike -Wall if test "x$enable_compile_warnings" = "xyes"; then warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" fi fi fi echo "$as_me:$LINENO: result: $warnCFLAGS" >&5 echo "${ECHO_T}$warnCFLAGS" >&6 # Check whether --enable-iso-c or --disable-iso-c was given. if test "${enable_iso_c+set}" = set; then enableval="$enable_iso_c" else enable_iso_c=no fi; echo "$as_me:$LINENO: checking what language compliance flags to pass to the C compiler" >&5 echo $ECHO_N "checking what language compliance flags to pass to the C compiler... $ECHO_C" >&6 complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ \ -ansi\ \ *) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *\ \ -pedantic\ \ *) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi echo "$as_me:$LINENO: result: $complCFLAGS" >&5 echo "${ECHO_T}$complCFLAGS" >&6 if test "x$cflags_set" != "xyes"; then CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" cflags_set=yes fi # Check whether --with-imagemagick or --without-imagemagick was given. if test "${with_imagemagick+set}" = set; then withval="$with_imagemagick" IMAGEMAGICK=$withval else IMAGEMAGICK='yes' fi; if test x"$IMAGEMAGICK" != xno ; then # Extract the first word of "Magick-config", so it can be a program name with args. set dummy Magick-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_IMAGEMAGICK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$IMAGEMAGICK"; then ac_cv_prog_IMAGEMAGICK="$IMAGEMAGICK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_IMAGEMAGICK="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_IMAGEMAGICK" && ac_cv_prog_IMAGEMAGICK="no" fi fi IMAGEMAGICK=$ac_cv_prog_IMAGEMAGICK if test -n "$IMAGEMAGICK"; then echo "$as_me:$LINENO: result: $IMAGEMAGICK" >&5 echo "${ECHO_T}$IMAGEMAGICK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x"$IMAGEMAGICK" != xno ; then CFLAGS_OLD="$CFLAGS" CPPFLAGS_OLD="$CPPFLAGS" LDFLAGS_OLD="$LDFLAGS" LIBS_OLD="$LIBS" CFLAGS="$CFLAGS `Magick-config --cflags`" CPPFLAGS="$CPPFLAGS `Magick-config --cppflags`" LDFLAGS="$LDFLAGS `Magick-config --ldflags`" LIBS="$LIBS `Magick-config --libs`" echo "$as_me:$LINENO: checking whether GetMagickInfo works and which API to use" >&5 echo $ECHO_N "checking whether GetMagickInfo works and which API to use... $ECHO_C" >&6 if test "$cross_compiling" = yes; then IMAGEMAGICK=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main(void) { unsigned long number_formats; ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); GetMagickInfoList("*",&number_formats,&exception); return number_formats == 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then IMAGEMAGICK=4 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) IMAGEMAGICK=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test x"$IMAGEMAGICK" = xno ; then if test "$cross_compiling" = yes; then IMAGEMAGICK=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main(void) { unsigned long number_formats; ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); GetMagickInfoList("*",&number_formats); return number_formats == 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then IMAGEMAGICK=3 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) IMAGEMAGICK=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi if test x"$IMAGEMAGICK" = xno ; then if test "$cross_compiling" = yes; then IMAGEMAGICK=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main(void) { ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); return (NULL == GetMagickInfo(NULL,&exception)); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then IMAGEMAGICK=2 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) IMAGEMAGICK=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi if test x"$IMAGEMAGICK" = xno ; then if test "$cross_compiling" = yes; then IMAGEMAGICK=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main(void) { ExceptionInfo exception; GetExceptionInfo(&exception); OpenModules(&exception); return (NULL == GetMagickInfo(NULL,&exception)); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then IMAGEMAGICK=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) IMAGEMAGICK=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: \"Version $IMAGEMAGICK\"" >&5 echo "${ECHO_T}\"Version $IMAGEMAGICK\"" >&6 LDFLAGS="$LDFLAGS_OLD" LIBS="$LIBS_OLD" if test x"$IMAGEMAGICK" = xno ; then CFLAGS="$CFLAGS_OLD" CPPFLAGS="$CPPFLAGS_OLD" fi fi fi if test x"$IMAGEMAGICK" != xno ; then LIB_MAGICK="`Magick-config --libs` `Magick-config --ldflags`" cat >>confdefs.h <<\_ACEOF #define IMAGEMAGICK 1 _ACEOF cat >>confdefs.h <<_ACEOF #define IMAGEMAGICK_API $IMAGEMAGICK _ACEOF else LIB_MAGICK= fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for char" >&5 echo $ECHO_N "checking for char... $ECHO_C" >&6 if test "${ac_cv_type_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((char *) 0) return 0; if (sizeof (char)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_char=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 echo "${ECHO_T}$ac_cv_type_char" >&6 echo "$as_me:$LINENO: checking size of char" >&5 echo $ECHO_N "checking size of char... $ECHO_C" >&6 if test "${ac_cv_sizeof_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_char" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_char=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (char)); } unsigned long ulongval () { return (long) (sizeof (char)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (char))) < 0) { long i = longval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_char=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_char" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((short *) 0) return 0; if (sizeof (short)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_short=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short)); } unsigned long ulongval () { return (long) (sizeof (short)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (short))) < 0) { long i = longval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_short=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking for an 8 bit integer type" >&5 echo $ECHO_N "checking for an 8 bit integer type... $ECHO_C" >&6 if test $ac_cv_sizeof_char -ge 1 ; then INT_8_BIT=char echo "$as_me:$LINENO: result: char" >&5 echo "${ECHO_T}char" >&6 elif test $ac_cv_sizeof_short -ge 1 ; then INT_8_BIT=short echo "$as_me:$LINENO: result: short" >&5 echo "${ECHO_T}short" >&6 elif test $ac_cv_sizeof_int -ge 1 ; then echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6 elif test $ac_cv_sizeof_long -ge 1 ; then INT_8_BIT=long echo "$as_me:$LINENO: result: long" >&5 echo "${ECHO_T}long" >&6 else { { echo "$as_me:$LINENO: error: No integer type of at least 8 bits found" >&5 echo "$as_me: error: No integer type of at least 8 bits found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for a 16 bit integer type" >&5 echo $ECHO_N "checking for a 16 bit integer type... $ECHO_C" >&6 if test $ac_cv_sizeof_char -ge 2 ; then INT_16_BIT=char echo "$as_me:$LINENO: result: char" >&5 echo "${ECHO_T}char" >&6 elif test $ac_cv_sizeof_short -ge 2 ; then INT_16_BIT=short echo "$as_me:$LINENO: result: short" >&5 echo "${ECHO_T}short" >&6 elif test $ac_cv_sizeof_int -ge 2 ; then INT_16_BIT=int echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6 elif test $ac_cv_sizeof_long -ge 2 ; then INT_16_BIT=long echo "$as_me:$LINENO: result: long" >&5 echo "${ECHO_T}long" >&6 else { { echo "$as_me:$LINENO: error: No integer type of at least 16 bits found" >&5 echo "$as_me: error: No integer type of at least 16 bits found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for a 32 bit integer type" >&5 echo $ECHO_N "checking for a 32 bit integer type... $ECHO_C" >&6 if test $ac_cv_sizeof_char -ge 4 ; then INT_32_BIT=char echo "$as_me:$LINENO: result: char" >&5 echo "${ECHO_T}char" >&6 elif test $ac_cv_sizeof_short -ge 4 ; then INT_32_BIT=short echo "$as_me:$LINENO: result: short" >&5 echo "${ECHO_T}short" >&6 elif test $ac_cv_sizeof_int -ge 4 ; then INT_32_BIT=int echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6 elif test $ac_cv_sizeof_long -ge 4 ; then INT_32_BIT=long echo "$as_me:$LINENO: result: long" >&5 echo "${ECHO_T}long" >&6 else { { echo "$as_me:$LINENO: error: No integer type of at least 32 bits found" >&5 echo "$as_me: error: No integer type of at least 32 bits found" >&2;} { (exit 1); exit 1; }; } fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case $LIBOBJS in "$ac_func.$ac_objext" | \ *" $ac_func.$ac_objext" | \ "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done echo "$as_me:$LINENO: checking for getopt_long" >&5 echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6 if test "${ac_cv_func_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getopt_long to an innocuous variant, in case declares getopt_long. For example, HP-UX 11i declares gettimeofday. */ #define getopt_long innocuous_getopt_long /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getopt_long (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getopt_long /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt_long) || defined (__stub___getopt_long) choke me #else char (*f) () = getopt_long; #endif #ifdef __cplusplus } #endif int main () { return f != getopt_long; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getopt_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getopt_long=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 echo "${ECHO_T}$ac_cv_func_getopt_long" >&6 if test $ac_cv_func_getopt_long = yes; then getopt=yes else getopt=no fi if test $getopt = no; then case $LIBOBJS in "getopt.$ac_objext" | \ *" getopt.$ac_objext" | \ "getopt.$ac_objext "* | \ *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; esac case $LIBOBJS in "getopt1.$ac_objext" | \ *" getopt1.$ac_objext" | \ "getopt1.$ac_objext "* | \ *" getopt1.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;; esac fi # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then enableval="$enable_dmalloc" case "${enableval}" in yes) dmalloc=yes ;; no) dmalloc=no ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-dmalloc" >&5 echo "$as_me: error: bad value ${enableval} for --enable-dmalloc" >&2;} { (exit 1); exit 1; }; } ;; esac else dmalloc=false fi; if test x"$dmalloc" = xyes; then echo "$as_me:$LINENO: checking for malloc in -ldmalloc" >&5 echo $ECHO_N "checking for malloc in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char malloc (); int main () { malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_malloc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dmalloc_malloc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dmalloc_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_malloc" >&6 if test $ac_cv_lib_dmalloc_malloc = yes; then dmalloc=yes else dmalloc=no fi fi if test x"$dmalloc" = xyes; then if test "${ac_cv_header_dmalloc_h+set}" = set; then echo "$as_me:$LINENO: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking dmalloc.h usability" >&5 echo $ECHO_N "checking dmalloc.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking dmalloc.h presence" >&5 echo $ECHO_N "checking dmalloc.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: dmalloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: dmalloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: dmalloc.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: dmalloc.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: dmalloc.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: dmalloc.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: dmalloc.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: dmalloc.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: dmalloc.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dmalloc.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dmalloc.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dmalloc_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 fi if test $ac_cv_header_dmalloc_h = yes; then dmalloc=yes else dmalloc=no fi fi if test x"$dmalloc" = xyes ; then LIB_DMALLOC=-ldmalloc cat >>confdefs.h <<\_ACEOF #define DMALLOC 1 _ACEOF else LIB_DMALLOC= fi # Check whether --enable-xhtml-docs or --disable-xhtml-docs was given. if test "${enable_xhtml_docs+set}" = set; then enableval="$enable_xhtml_docs" case "${enableval}" in yes) xhtmldocs=true ;; no) xhtmldocs=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-xhtml-docs" >&5 echo "$as_me: error: bad value ${enableval} for --enable-xhtml-docs" >&2;} { (exit 1); exit 1; }; } ;; esac else xhtmldocs=true fi; if test x$xhtmldocs = xtrue; then XHTMLDOCS_TRUE= XHTMLDOCS_FALSE='#' else XHTMLDOCS_TRUE='#' XHTMLDOCS_FALSE= fi # Check whether --enable-html4-docs or --disable-html4-docs was given. if test "${enable_html4_docs+set}" = set; then enableval="$enable_html4_docs" case "${enableval}" in yes) html4docs=true ;; no) html4docs=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-html4-docs" >&5 echo "$as_me: error: bad value ${enableval} for --enable-html4-docs" >&2;} { (exit 1); exit 1; }; } ;; esac else html4docs=false fi; if test x$html4docs = xtrue; then HTML4DOCS_TRUE= HTML4DOCS_FALSE='#' else HTML4DOCS_TRUE='#' HTML4DOCS_FALSE= fi # Check whether --enable-ascii-docs or --disable-ascii-docs was given. if test "${enable_ascii_docs+set}" = set; then enableval="$enable_ascii_docs" case "${enableval}" in yes) asciidocs=true ;; no) asciidocs=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-ascii-docs" >&5 echo "$as_me: error: bad value ${enableval} for --enable-ascii-docs" >&2;} { (exit 1); exit 1; }; } ;; esac else asciidocs=false fi; if test x$asciidocs = xtrue; then ASCIIDOCS_TRUE= ASCIIDOCS_FALSE='#' else ASCIIDOCS_TRUE='#' ASCIIDOCS_FALSE= fi # Check whether --with-etcdir or --without-etcdir was given. if test "${with_etcdir+set}" = set; then withval="$with_etcdir" PSICONVETCDIR=${withval} else PSICONVETCDIR=${sysconfdir}/psiconv fi; # Check whether --with-imagemagick or --without-imagemagick was given. if test "${with_imagemagick+set}" = set; then withval="$with_imagemagick" IMAGEMAGICK=$withval else IMAGEMAGICK='yes' fi; ac_config_files="$ac_config_files Makefile compat/Makefile lib/Makefile lib/psiconv/Makefile program/Makefile program/psiconv/Makefile program/psiconv-config/Makefile program/psiconv-config/psiconv-config program/psiconv-config/psiconv-config.man lib/psiconv/general.h formats/Makefile docs/Makefile program/extra/Makefile etc/Makefile examples/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XHTMLDOCS_TRUE}" && test -z "${XHTMLDOCS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"XHTMLDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"XHTMLDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HTML4DOCS_TRUE}" && test -z "${HTML4DOCS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HTML4DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HTML4DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ASCIIDOCS_TRUE}" && test -z "${ASCIIDOCS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ASCIIDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ASCIIDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES compat/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/psiconv/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/psiconv/Makefile" ;; "program/Makefile" ) CONFIG_FILES="$CONFIG_FILES program/Makefile" ;; "program/psiconv/Makefile" ) CONFIG_FILES="$CONFIG_FILES program/psiconv/Makefile" ;; "program/psiconv-config/Makefile" ) CONFIG_FILES="$CONFIG_FILES program/psiconv-config/Makefile" ;; "program/psiconv-config/psiconv-config" ) CONFIG_FILES="$CONFIG_FILES program/psiconv-config/psiconv-config" ;; "program/psiconv-config/psiconv-config.man" ) CONFIG_FILES="$CONFIG_FILES program/psiconv-config/psiconv-config.man" ;; "lib/psiconv/general.h" ) CONFIG_FILES="$CONFIG_FILES lib/psiconv/general.h" ;; "formats/Makefile" ) CONFIG_FILES="$CONFIG_FILES formats/Makefile" ;; "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "program/extra/Makefile" ) CONFIG_FILES="$CONFIG_FILES program/extra/Makefile" ;; "etc/Makefile" ) CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@cflags_set@,$cflags_set,;t t s,@IMAGEMAGICK@,$IMAGEMAGICK,;t t s,@LIB_MAGICK@,$LIB_MAGICK,;t t s,@INT_8_BIT@,$INT_8_BIT,;t t s,@INT_16_BIT@,$INT_16_BIT,;t t s,@INT_32_BIT@,$INT_32_BIT,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LIB_DMALLOC@,$LIB_DMALLOC,;t t s,@XHTMLDOCS_TRUE@,$XHTMLDOCS_TRUE,;t t s,@XHTMLDOCS_FALSE@,$XHTMLDOCS_FALSE,;t t s,@HTML4DOCS_TRUE@,$HTML4DOCS_TRUE,;t t s,@HTML4DOCS_FALSE@,$HTML4DOCS_FALSE,;t t s,@ASCIIDOCS_TRUE@,$ASCIIDOCS_TRUE,;t t s,@ASCIIDOCS_FALSE@,$ASCIIDOCS_FALSE,;t t s,@PSICONVETCDIR@,$PSICONVETCDIR,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi psiconv-0.9.8/AUTHORS0000644000175000017500000000215110336374632011210 00000000000000This package could not have been created without the help of many, many people. The most notable contributors are listed below. You are probably best of to mail if you have questions, suggestions or problems. * Frodo Looijaard Started this project; has done anything not attributed to anyone else. * Andrew Johnson He wrote the plain text and HTML-4 targets for psiconv. * James He helped to puzzle out several obscure parts of Word files * Jwan-Luc Damnet Like James, he helped with some Word file things. * Wolfgang Szoecs His MBM reader helped me figure out how those graphic files are exactly structured. * Kevin Wheatley 5MX patches, and perhaps dynamically loadable converters in the future! * Tamas Decsi He contributed much Sheet work, both in helping figuring out the file format and in writing the parsing code. * Keitha Kawabe Unicode support, compilation on non-Linux platforms psiconv-0.9.8/COPYING0000644000175000017500000004311007777625554011214 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. psiconv-0.9.8/ChangeLog0000664000175000017500000017643410336373701011730 000000000000002005-11-15 Frodo Looijaard * lib/psiconv/parse_common.c, lib/psiconv/unicode.c: (Frodo) Resolved a few spurious warnings * program/psiconv/gen_html4.c, program/psiconv/gen_xhtml.c: (Frodo) Fixed compilation problem on newer systems: ffs was an already used symbol. 2005-02-25 Frodo Looijaard * ChangeLog, NEWS, configure.in, debian/changelog, program/psiconv-config/psiconv-config: (Frodo) Update for 0.9.7 * configure.in, program/psiconv/magick-aux.c, program/psiconv/magick-aux.h: (Frodo) Support ImageMagick 6 * INSTALL, NEWS, debian/changelog: (Frodo) Pending changes 2005-02-25 21:36 frodo * configure.in, program/psiconv/magick-aux.c, program/psiconv/magick-aux.h: (Frodo) Support ImageMagick 6 2005-02-25 19:34 frodo * INSTALL, NEWS, debian/changelog: (Frodo) Pending changes 2004-04-30 00:14 frodo * ChangeLog, configure.in, lib/psiconv/Makefile.am, program/psiconv-config/psiconv-config: (Frodo) Bump up the libary version and program version 2004-04-30 00:05 frodo * configure.in, program/psiconv/gen_image.c, program/psiconv/magick-aux.h: (Frodo) Keep ImageMagick happy on Solaris It needs a #include . 2004-04-29 23:57 frodo * formats/html4_links.sh: (Frodo) And after the Solaris changes, it now works again on Linux Don't you love shell scripting? 2004-04-29 23:43 frodo * formats/: generate_html4.sh, html4_links.sh, index_html.sh: (Frodo) Solaris /bin/sh compatibility updates /bin/sh on Solaris is just braindead, if you are used to bash (or even Sun's ksh) 2004-04-29 21:40 frodo * compat/Makefile.am, program/psiconv/gen_image.c: (Frodo) Solaris build fixes * gen_image fixes (didn't I do these before?!?) * Building shared libs 2004-04-28 23:28 frodo * compat/Makefile.am: (Frodo) Fixed compat directory LIBOBJS handling Mandated by newer autoconf/automake/libtool versions. 2004-04-06 16:38 frodo * ChangeLog, NEWS, debian/changelog: (Frodo) Final 0.9.5 commit 2004-04-06 16:27 frodo * ChangeLog, program/psiconv/psiconv.c: (Frodo) Fixed bug that made compiling with gcc 2.95.x impossible 2004-03-22 21:08 frodo * ChangeLog, configure.in, lib/psiconv/Makefile.am, lib/psiconv/generate_image.c, lib/psiconv/parse_common.c, program/psiconv-config/psiconv-config: (Frodo) Fix in color generation algorithm * Update version to 0.9.5 * Update patch level of library * For greyscale pictures, white was translated as black. Not good. 2004-03-17 18:31 frodo * ChangeLog, NEWS, debian/changelog, lib/psiconv/Makefile.am: (Frodo) Final 0.9.4 commit 2004-03-16 14:47 frodo * ChangeLog, lib/psiconv/data.c, lib/psiconv/data.h: (Frodo) Sync 2004-03-09 00:20 frodo * lib/psiconv/: data.c, data.h: (Frodo) Added forgotten function free_word_style_list 2004-03-04 22:55 frodo * examples/Word, lib/psiconv/data.h, lib/psiconv/image.c, lib/psiconv/parse_image.c, program/psiconv-config/psiconv-config: (Frodo) Bug fixes * Image colors correction (scale 0.0 to 1.0, instead of 0.0 to less-than 1.0) * Bullet and indentation docs update * Update version number 2004-02-28 18:09 frodo * lib/psiconv/parse_common.c: (Frodo) Simplify routine a bit by using the new psiconv_unicode_from_list 2004-02-26 22:33 frodo * configure.in, lib/psiconv/Makefile.am, lib/psiconv/parse_driver.c: (Frodo) Version nrs, case-insensitive applid * Bump library patch level up by one * Update version number to 0.9.4 * Make applid comparison case-insensitive 2004-02-26 18:12 frodo * ChangeLog, NEWS, debian/changelog: (Frodo) Final 0.9.3 checkin 2004-02-26 18:08 frodo * lib/psiconv/generate_common.c: (Frodo) Stupid typo-mistake 2004-02-26 17:27 frodo * lib/psiconv/: generate_common.c, generate_driver.c, generate_image.c, generate_layout.c, generate_page.c, generate_texted.c, generate_word.c, parse_common.c, parse_driver.c, parse_simple.c, parse_word.c: (Frodo) And even more error work. 2004-02-26 16:58 frodo * NEWS, lib/psiconv/generate_common.c, lib/psiconv/generate_simple.c: (Frodo) Even better errors and progress/debug info 2004-02-25 21:57 frodo * lib/psiconv/: generate_common.c, generate_driver.c, generate_image.c, generate_layout.c, generate_page.c, generate_simple.c, generate_texted.c, generate_word.c, unicode.c, unicode.h: (Frodo) Progress information while generating update Much better progress information now, and better error reporting. 2004-02-25 21:56 frodo * lib/psiconv/parse_image.c: (Frodo) Modify debugging level The noise from parsing pictures was ridiculous. Now you have to edit the C code and #define LOUD to have it shout at you like that. 2004-02-25 17:12 frodo * lib/psiconv/unicode.h: (Frodo) Fix on previous commit 2004-02-25 17:11 frodo * NEWS, configure.in, debian/changelog, lib/psiconv/Makefile.am, lib/psiconv/unicode.c, lib/psiconv/unicode.h, program/psiconv-config/psiconv-config: (Frodo) AbiWord work * Update version to 0.9.3 * Update library version * New functions psiconv_unicode_from_list and psiconv_unicode_strstr 2004-02-23 18:57 frodo * ChangeLog, NEWS, TODO, debian/changelog, docs/configuration: (Frodo) Final update for release 0.9.2 2004-02-23 18:36 frodo * formats/generate_ascii.sh: (Frodo) Ouch. Forgot to add the -c arg to psiconv at the right place 2004-02-23 18:23 frodo * TODO, lib/psiconv/generate_word.c: (Frodo) Solve a few small buglets 2004-02-23 18:23 frodo * Makefile.am: (Frodo) Remove Debian from make dist 2004-02-23 18:01 frodo * lib/psiconv/: Makefile.am, misc.c, parse_layout.c: (Frodo) Buglets 2004-02-23 14:34 frodo * formats/: Makefile.am, generate_ascii.sh, generate_html4.sh, generate_xhtml.sh, psiconv.conf: (Frodo) Added configuration file for formats Alls formats docs are now generated with a sane configfile. 2004-02-23 14:33 frodo * lib/psiconv/configuration.c: (Frodo) Buglet in configfile parsing solved * Typo: eovar instead of eoval in one check 2004-02-23 14:08 frodo * TODO, program/psiconv/psiconv.c: (Frodo) Psiconv program work * Added -c option 2004-02-22 23:32 frodo * lib/psiconv/configuration.c: (Frodo) Default configuration bug fixed * Now properly initialize default_configuration 2004-02-22 23:24 frodo * etc/psiconv.conf.eg, lib/psiconv/configuration.c, lib/psiconv/error.c, lib/psiconv/generate_common.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_simple.c, lib/psiconv/generate_word.c, lib/psiconv/misc.c, lib/psiconv/parse_common.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_simple.c, lib/psiconv/parse_word.c, lib/psiconv/unicode.c, lib/psiconv/unicode.h, program/psiconv/general.c: (Frodo) UTF8 work (it should now actually work!) * Replaced psiconv_unicode_from_char with psiconv_unicode_read_char and removed psiconv_unicode_from_chars * Replaced psiconv_unicode_to_char with psiconv_unicode_write_char and removed psiconv_unicode_to_chars * Rewrote psiconv_parse_text_section to be more sane, easier to read and to work with the above updates * Updated all places where the psiconv_unicode_from/to_char calls were used * Updated psiconv.conf.eg to reflect the correct character set numbers * Fixed a buglet that made it impossible to set verbosity to 5 in config * Removed strange code in make_printable * Rewrote the ENCODING_PSION option in the psiconv program to work with the new definitions. 2004-02-21 14:24 frodo * formats/: generate_html4.sh, generate_xhtml.sh: (Frodo) Work around CDPATH bash bugs, as reported by Reuben Thomas 2004-02-21 14:11 frodo * Makefile.am, debian/changelog, debian/control, debian/copyright, debian/libpsiconv6.copyright, debian/psiconv-doc.copyright, debian/psiconv-doc.dirs, debian/psiconv-doc.install, debian/rules: (Frodo) Debian stuff * psiconv-doc is now independent of other packages 2004-02-21 13:10 frodo * Makefile.am, debian/changelog, debian/control, debian/rules, program/psiconv-config/psiconv-config: (Frodo) Debian stuff * Changed psiconv-dev to libpsiconv-dev * Bumped up the version number 2004-02-21 12:48 frodo * program/psiconv-config/Makefile.am: (Frodo) Forgotten file 2004-02-20 22:52 frodo * configure.in, lib/psiconv/configuration.h: (Frodo) * Bumped version numer to 0.9.2 * Fixed error handler bug (returned void * instead of void) 2004-02-10 18:24 frodo * ChangeLog, configure.in, debian/control, debian/psiconv-doc.dirs, debian/psiconv-doc.install, debian/psiconv.manpages, debian/rules, program/psiconv-config/psiconv-config.man.in: (Frodo) Final 0.9.1 commit * Added psiconv-config manpage * Updated Debian build 2004-02-10 00:33 frodo * ChangeLog, NEWS, debian/changelog, debian/control, debian/libpsiconv6.dirs, debian/libpsiconv6.install, debian/psiconv-dev.dirs, debian/psiconv-dev.install: (Frodo) A few last-minute deb changes 2004-02-10 00:12 frodo * lib/psiconv/configuration.c, lib/psiconv/configuration.h, lib/psiconv/data.c, lib/psiconv/generate_common.c, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, program/extra/rewrite.c: (Frodo) Several (smallish) memory leaks resolved 2004-02-09 23:09 frodo * Makefile.am, configure.in: (Frodo) Last fixes for the extra directory move 2004-02-09 23:03 frodo * program/: Makefile.am, extra/Makefile.am: (Frodo) Move extra dir under programs 2004-02-09 22:51 frodo * debian/: libpsiconv6.dirs, libpsiconv6.install: (Frodo) Add support in debian stuff for the new psiconv-config program 2004-02-08 23:44 frodo * NEWS, configure.in, lib/psiconv/Makefile.am, lib/psiconv/configuration.c, lib/psiconv/configuration.h, program/psiconv-config/psiconv-config, program/psiconv-config/psiconv-config.in: (Frodo) psiconv-config program plus bugfixes * Bumped up the version number to 0.9.1 * Bumped up the library version to 0.6.1 * Added the psiconv-config program (for autoconf use by third parties) * Added the psiconv_config_free function * Fixed the installation ($includedir/include/general.h) 2004-02-04 18:37 frodo * ChangeLog, Makefile.am, TODO, debian/changelog, debian/libpsiconv6.dirs, debian/libpsiconv6.install, debian/rules, docs/Makefile.am, formats/Makefile.am: (Frodo) Last commit for 0.9.0. * Correct `make dist' * Correct Debian stuff 2004-02-04 18:10 frodo * etc/: Makefile.am, psiconv.conf.eg: (Frodo) Update example psiconv.conf to correctly document latest settings 2004-02-04 16:28 frodo * README, TODO, docs/ascii, docs/configuration, docs/html, docs/html4, docs/unicode, docs/xhtml, lib/psiconv/configuration.c: (Frodo) Documentation updates. Removed fatals. 2004-02-04 15:37 frodo * ChangeLog: (Frodo) Nice Changelog 2004-02-04 15:36 frodo * ChangeLog, etc/Makefile.am: (Frodo) Added Makefile.am 2004-02-04 15:32 frodo * Makefile.am, configure.in, etc/psiconv.conf, etc/psiconv.conf.eg, lib/psiconv/Makefile.am, lib/psiconv/configuration.c: (Frodo) Configuration file installation and location * Add the --with-etcdir configuration option * Install psiconv.conf.eg and (if not yet present) psiconv.conf 2004-02-04 13:19 frodo * NEWS, TODO, compat/compat.h, compat/dummy.c, formats/psion/Introduction.psi, lib/psiconv/buffer.c, lib/psiconv/buffer.h, lib/psiconv/checkuid.c, lib/psiconv/common.h, lib/psiconv/configuration.c, lib/psiconv/configuration.h, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/error.c, lib/psiconv/error.h, lib/psiconv/generate.h, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/image.c, lib/psiconv/image.h, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/misc.c, lib/psiconv/parse.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, program/extra/checkuid.c, program/extra/empty.c, program/extra/rewrite.c, lib/psiconv/parse_formula.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, lib/psiconv/unicode.c, lib/psiconv/unicode.h, program/psiconv/gen.h, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/general.c, program/psiconv/magick-aux.c, program/psiconv/magick-aux.h, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) Copyright dates update 2004-02-04 12:35 frodo * formats/generate_html4.sh, formats/generate_xhtml.sh, formats/html4_links.sh, formats/html_links.sh, formats/xhtml_links.sh, formats/psion/ASCII_Codes.psi, formats/psion/Application_ID_Section.psi, formats/psion/Basic_Elements.psi, formats/psion/Basic_Structures.psi, formats/psion/Clip_Art_File.psi, formats/psion/Embedded_Object_Section.psi, formats/psion/File_Structure.psi, formats/psion/Header_Section.psi, formats/psion/Identifiers.psi, formats/psion/Index.psi, formats/psion/Introduction.psi, formats/psion/Layout_Codes.psi, formats/psion/MBM_File.psi, formats/psion/Page_Layout_Section.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Password_Section.psi, formats/psion/Record_Section.psi, formats/psion/Sheet_Basic_Structures.psi, formats/psion/Sheet_Cell_List.psi, formats/psion/Sheet_File.psi, formats/psion/Sheet_Formula_List.psi, formats/psion/Sheet_Graph_Section.psi, formats/psion/Sheet_Info_Section.psi, formats/psion/Sheet_Variable_List.psi, formats/psion/Sheet_Workbook_Section.psi, formats/psion/Sheet_Worksheet.psi, formats/psion/Sheet_Worksheet_List.psi, formats/psion/Sketch_Section.psi, formats/psion/Text_Layout_Section.psi, formats/psion/Text_Section.psi, formats/psion/Userdic_File.psi, formats/psion/Word_Status_Section.psi, formats/psion/Word_Styles_Section.psi, formats/psion/World_Data_File.psi, program/psiconv/gen_html4.c, program/psiconv/gen_xhtml.c: (Frodo) Format documentation work * Uploaded newest Format documentation * Split generate_html.sh into xhtml and html4 specific versions * Changed gen_xhtml and gen_html4 to combine spans that have the same layout codes * Changed gen_xhtml and gen_html4 not to emit empty spans 2004-02-02 22:57 frodo * debian/: libpsiconv6.dirs, libpsiconv6.docs, libpsiconv6.install: (Frodo) Oops, forgot to add these files 2004-02-02 22:56 frodo * NEWS, configure.in, formats/Makefile.am, formats/generate_html.sh, formats/generate_html4.sh, formats/generate_rtf.sh, formats/generate_xhtml.sh, formats/html_links.sh, lib/psiconv/configuration.c, lib/psiconv/error.c, lib/psiconv/generate_layout.c, lib/psiconv/parse_common.c, lib/psiconv/unicode.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_xhtml.c, program/psiconv/psiconv.c: (Frodo) Make the formats stuff work again * Amend the configure.in to select the right targets * Remove RTF support (it never worked anyway) * Update the links creation scripts And in the psiconv program and library: * Some fixes to reduce compiler warnings * Emit tabs as spaces in the HTML4/XHTML generators 2004-02-02 21:43 frodo * NEWS, TODO, debian/libpsiconv5.dirs, debian/libpsiconv5.docs, debian/libpsiconv5.install, lib/psiconv/data.h, lib/psiconv/unicode.c, program/psiconv/Makefile.am, program/psiconv/gen.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_txt.c, program/psiconv/gen_xhtml.c, program/psiconv/general.c, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) Psiconv program update * Created html4 target * Update of xhtml target (print entities if ASCII, and others) * Made everything static that should not be exported * Renamed stuff to xhtml were appropriate * The fileformat data does now contain the supported Psion files to convert * This is also printed in the help text * ENCODING_ASCII_HTML introduced (only used internally) * Replaced debug, silent, verbose options with noise option * Default targets are XHTML and TIFF 2004-01-28 21:18 frodo * program/psiconv/gen_xhtml.c: (Frodo) XHTML output complete 2004-01-26 22:56 frodo * program/psiconv/: Makefile.am, gen_html.c, gen_xhtml.c, psiconv.c: (Frodo) XHTML work 2004-01-26 15:00 frodo * program/psiconv/: general.h, general.c: (Frodo) Update 2004-01-26 13:59 frodo * lib/psiconv/: data.h, generate_word.c, image.c, parse_routines.h, parse_simple.c, parse_word.c: (Frodo) Oops, forgot about image.c 2004-01-18 20:58 frodo * program/psiconv/: Makefile.am, gen_image.c, psiconv.c: (Frodo) Image generation active again in psiconv program 2004-01-09 23:31 frodo * configure.in: (Frodo) Fixed autoconf problem with newer versions 2004-01-09 23:20 frodo * NEWS, TODO, etc/psiconv.conf, lib/psiconv/configuration.c, program/psiconv/Makefile.am, program/psiconv/encoding.h, program/psiconv/gen.h, program/psiconv/gen_txt.c, program/psiconv/general.c, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) Psiconv program rewrite start * Add support for different encodings * Restructure some things * Only ASCII support at the moment 2004-01-06 21:15 frodo * NEWS, TODO, etc/psiconv.conf, lib/psiconv/common.h, lib/psiconv/configuration.c, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/error.c, lib/psiconv/error.h, lib/psiconv/general.h, lib/psiconv/general.h.in, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/misc.c, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_formula.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, lib/psiconv/unicode.c, lib/psiconv/unicode.h: (Frodo) Unicode transition Note: this commit breaks psiconv. The programs in the extra directory should work properly. * Change all datastructures to use unicode for character encodings * Added psiconv_error function * Called psiconv_error at places where a warning was stupid * Added psiconv_progress in all generate functions * Added lev parameter to all generate functions * Removed general.h from CVS (we have general.h.in, after all) * Probably other stuff I forgot 2004-01-04 23:20 frodo * lib/psiconv/: data.h, parse_formula.c, parse_sheet.c: (Frodo) More preparations for the Unicode change. Use psiconv_string everywhere possible (no more char * stuff) 2004-01-04 23:07 frodo * lib/psiconv/: configuration.c, configuration.h, data.h, generate_layout.c, generate_routines.h, generate_simple.c, parse_layout.c, parse_simple.c, unicode.c: (Frodo) Move fontnames to psiconv_string type 2004-01-04 16:47 frodo * TODO, docs/unicode, etc/psiconv.conf, lib/psiconv/Makefile.am, lib/psiconv/configuration.c, lib/psiconv/configuration.h, lib/psiconv/general.h, lib/psiconv/unicode.c, lib/psiconv/unicode.h: (Frodo) Preparation for the conversion to Unicode. 2003-12-14 00:26 frodo * NEWS, lib/psiconv/configuration.c, lib/psiconv/configuration.h, program/extra/empty.c, program/extra/rewrite.c, program/psiconv/psiconv.c: (Frodo) Add configuration file parsing support To do: install config file on installation of psiconv, also in Debian install 2003-12-13 19:23 frodo * NEWS, TODO, lib/psiconv/parse_image.c: (Frodo) Revamped and expanded image (paint data section) parsing Color images are now supported Colordepths besides 2 bit are now supported RLE12,16 and 24 are now supported All of the above are experimental Parsing of images takes some more memory, but the code structure is much simpler. 2003-12-03 16:16 frodo * lib/psiconv/: Makefile.am, generate_image.c, image.h, parse_image.c: (Frodo) Enhancing image parsing * Preparations in parse_image to do a pass-based decoding with support for all image formats * Moved some stuff to image.h/image.c that is used both for the generation and parsing of images * image.h is not installed 2003-12-02 20:48 frodo * TODO, etc/psiconv.conf: (Frodo) Configuration file template. Not installed yet, not parsed yet. 2003-12-02 20:47 frodo * lib/psiconv/: configuration.c, configuration.h, generate_image.c: (Frodo) Picture generation now supports all RLE's and many more config items. Mostly untested, though. 2003-11-27 21:55 frodo * lib/psiconv/: generate_image.c, parse_image.c: (Frodo) RLE16/24 support, but not yet used 2003-11-27 13:08 frodo * NEWS, examples/Clipart, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_routines.h: (Frodo) Clipart generation 2003-11-27 12:43 frodo * NEWS, lib/psiconv/common.h, lib/psiconv/configuration.c, lib/psiconv/configuration.h, lib/psiconv/error.c, lib/psiconv/error.h, lib/psiconv/generate.h, lib/psiconv/generate_routines.h, lib/psiconv/list.h, lib/psiconv/parse.h, lib/psiconv/parse_routines.h: (Frodo) Move error_function to the config struct 2003-11-26 21:56 frodo * NEWS: (Frodo) NEWS update 2003-11-26 21:56 frodo * NEWS, TODO, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_routines.h, lib/psiconv/misc.c, lib/psiconv/parse_simple.c: (Frodo) Support MBM output format 2003-11-25 23:08 frodo * lib/psiconv/: configuration.c, configuration.h, generate_common.c, generate_driver.c, generate_image.c, generate_routines.h, parse_driver.c: (Frodo) Generating of Sketch files, both stand-alone and as objects, works! No RLE encoding yet, we have to test higher colordepths. 2003-11-25 18:59 frodo * NEWS: (Frodo) NEWS update 2003-11-25 18:57 frodo * TODO, lib/psiconv/Makefile.am, lib/psiconv/configuration.c, lib/psiconv/configuration.h, lib/psiconv/error.c, lib/psiconv/error.h, lib/psiconv/generate.h, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/list.c, lib/psiconv/parse.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_formula.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, program/extra/empty.c, program/extra/rewrite.c, program/psiconv/psiconv.c: (Frodo) config stuff and image generation stuff * All parse and generate functions have a new config parameter * New files configuration.[ch] in the psiconv lib * Some image generation stuff (not ready, but won't do any harm) 2003-11-23 22:47 frodo * NEWS, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/generate_common.c, lib/psiconv/generate_routines.h, lib/psiconv/parse_common.c, lib/psiconv/parse_routines.h: (Frodo) Embedded object generation works! Not too useful though, we also need sketch or sheet generation; the only thing actually working at the moment is embedding word docs within word docs. Oh well. It's a good start. 2003-11-23 19:53 frodo * NEWS, lib/psiconv/generate_driver.c: (Frodo) Generation change: psiconv_write_*_file no longer generates the header section This is now done in psiconv_write. This will help us create objects. 2003-11-23 19:48 frodo * program/extra/rewrite.c: (Frodo) Explain rewrite syntax 2003-11-22 23:24 frodo * debian/: control, rules: (Frodo) Updated Debian to new major lib number 2003-11-22 23:17 frodo * NEWS, configure.in, lib/psiconv/Makefile.am, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_driver.c, lib/psiconv/parse_image.c, lib/psiconv/parse_routines.h: (Frodo) Some more work on objects: * Bumped up major library version * Corrected parsing of sketch_section, changed struct * parse_sketch_section does not have the is_object flag anymore 2003-11-21 16:39 frodo * NEWS, lib/psiconv/buffer.c, lib/psiconv/parse_common.c: (Frodo) Parsing of embedded objects in Word complete 2003-11-21 00:45 frodo * lib/psiconv/: parse_common.c, parse_routines.h: (Frodo) More embedded object work. Everytihng except the object data itself is now safely parsed. 2003-11-20 23:14 frodo * lib/psiconv/: data.h, parse_common.c, parse_driver.c, parse_routines.h: (Frodo) More work for embedded objects (not finished yet) 2003-11-19 22:04 frodo * lib/psiconv/: data.c, data.h, parse_common.c: (Frodo) Data structures for (Word) objects created. 2003-11-18 12:25 frodo * lib/psiconv/: buffer.c, buffer.h: (Frodo) Add function psiconv_buffer_subbuffer 2003-11-12 15:36 frodo * debian/rules: (Frodo) Better shared libs deps in debian build 2003-11-12 13:29 frodo * Makefile.am: (Frodo) 'make dist' includes Debian files too now 2003-11-12 00:14 frodo * debian/: files, libpsiconv5.docs, psiconv.manpages, rules: (Frodo) Debian update 2003-11-11 23:49 frodo * COPYING, INSTALL, debian/changelog, debian/compat, debian/control, debian/copyright, debian/files, debian/libpsiconv5.dirs, debian/libpsiconv5.docs, debian/libpsiconv5.install, debian/psiconv-dev.dirs, debian/psiconv-dev.install, debian/psiconv-doc.dirs, debian/psiconv-doc.install, debian/psiconv.dirs, debian/psiconv.install, debian/psiconv.manpages, debian/rules, program/psiconv/Makefile.am, program/psiconv/psiconv.man: (Frodo) New manpage and Debian support 2003-11-11 21:41 frodo * NEWS, autogen.sh: (Frodo) Correction autogen.sh 2003-11-11 19:58 frodo * COPYING, ChangeLog, INSTALL, NEWS, README, autogen.sh, configure.in, formats/Makefile.am, lib/psiconv/Makefile.am, program/extra/Makefile.am, program/psiconv/magick-aux.c, program/psiconv/magick-aux.h, program/psiconv/psiconv.c: (Frodo) Many build updates: * Automake 1.6 and 1.7 support * Autoconf 2.5x support * ImageMagick 5.4.x and 5.5.x support * Format documentation will now be installed 2003-06-16 19:48 frodo * lib/psiconv/parse_word.c: (Frodo) Buglet fixed in style section parsing, when number of hotkeys is not equal to the number of styles. 2003-05-04 22:08 frodo * INSTALL, formats/psion/ASCII_Codes.psi, formats/psion/Introduction.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Password_Section.psi: (Frodo) Update 2002-05-10 18:15 frodo * AUTHORS, NEWS, formats/generate_ascii.sh, formats/generate_html.sh, formats/generate_html4.sh, formats/generate_rtf.sh, formats/html_links.sh, formats/index_html.sh: (Frodo) Compile on non-Linux platforms: Keitha Kawabe 2002-05-10 18:02 frodo * configure.in: (Frodo) Update to version 0.8.4 2002-05-10 17:55 frodo * AUTHORS, COPYING, INSTALL, NEWS, configure.in, program/psiconv/encoding.h, program/psiconv/gen.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_latex.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) UTF-8 support (Keita Kawabe, keite.kawabe@mpq.mpg.de) 2002-01-29 21:15 frodo * lib/psiconv/Makefile.am: (Frodo) Fixed lib version 2002-01-29 21:08 frodo * NEWS: (Frodo) Update 2002-01-29 19:49 frodo * NEWS, program/extra/rewrite.c: (Frodo) Another smallish memory leak 2002-01-29 19:47 frodo * lib/psiconv/: data.c, parse_layout.c: (Frodo) Two memory-leaks fixed 2002-01-29 19:38 frodo * configure.in, lib/psiconv/buffer.c, lib/psiconv/checkuid.c, lib/psiconv/data.c, lib/psiconv/error.c, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_image.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/list.c, lib/psiconv/misc.c, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_formula.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_sheet.c, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, program/extra/Makefile.am, program/extra/rewrite.c, program/psiconv/Makefile.am, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_latex.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/magick-aux.c: (Frodo) DMALLOC support 2002-01-28 22:04 frodo * NEWS, lib/psiconv/list.c: (Frodo) Fix memory leak 2002-01-22 22:45 frodo * NEWS, lib/psiconv/parse_page.c, program/psiconv/gen_html4.c, program/psiconv/gen_txt.c: (Frodo) Fixed possible dangling pointers when no header/footer text was present, and added test to see whether any is present. 2002-01-22 22:24 frodo * NEWS: (Frodo) Update 2002-01-22 22:22 frodo * program/psiconv/: gen_image.c, magick-aux.c, magick-aux.h: (Frodo) Update for newest ImageMagick 2002-01-22 22:16 frodo * COPYING, INSTALL, autogen.sh: (Frodo) Synchronisation. 2001-08-04 19:28 frodo * NEWS, lib/psiconv/Makefile.am: (Frodo) Update libversion 2001-07-28 15:13 frodo * formats/: Makefile.am, psion/Basic_Elements.psi, psion/Index.psi, psion/Introduction.psi, psion/Sheet_Basic_Structures.psi, psion/Sheet_Cell_List.psi, psion/Sheet_Formula_List.psi, psion/Sheet_Graph_Description.psi, psion/Sheet_Graph_Region.psi, psion/Sheet_Graph_Section.psi, psion/Sheet_Grid_Section.psi, psion/Sheet_Line_Section.psi, psion/Sheet_Variable_List.psi, psion/Sheet_Worksheet.psi: (Frodo) Update for version 2.8 of Psion_Files 2001-07-25 13:49 frodo * NEWS, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c: (Frodo) Sheet grid section support 2001-07-25 00:50 frodo * lib/psiconv/parse_sheet.c: (Frodo) Added unknown section 2001-07-25 00:44 frodo * lib/psiconv/parse_simple.c: (Frodo) Long strings now parsed correctly 2001-07-25 00:31 frodo * lib/psiconv/parse_sheet.c: (Frodo) Fixed info section parse 2001-07-24 22:36 frodo * lib/psiconv/parse_sheet.c: (Frodo) Whitespace cleanup 2001-07-24 22:32 frodo * lib/psiconv/: data.c, data.h, parse_formula.c, parse_routines.h, parse_sheet.c, parse_simple.c: (Frodo) Many new sheet things * Variable section and formula variable parsing * Info section * Name section * Better parsing of vararg functions 2001-07-18 14:24 frodo * lib/psiconv/: data.c, data.h, parse_routines.h, parse_sheet.c: (Frodo) Sheet line defaults added 2001-07-16 19:51 frodo * NEWS, configure.in: (Frodo) Preparation for release 0.8.2 2001-07-11 00:38 frodo * lib/psiconv/: data.c, data.h: (Frodo) New function psiconv_get_function 2001-07-02 21:00 frodo * formats/psion/Sheet_Basic_Structures.psi: (Frodo) Forgot one file to add? 2001-07-02 20:55 frodo * acconfig.h: (Frodo) Not needed anymore 2001-07-01 22:40 frodo * examples/Sheet, lib/psiconv/data.h, lib/psiconv/parse_sheet.c: (Frodo) New example sheet 2001-07-01 15:14 frodo * lib/psiconv/: data.c, parse_routines.h, parse_sheet.c: (Frodo) Default cell layout will now be used 2001-07-01 14:01 frodo * lib/psiconv/parse_sheet.c: (Frodo) Fixed segfault 2001-06-30 22:36 frodo * examples/: MBM, Sketch: (Frodo) Example graphic files 2001-06-30 15:36 frodo * Makefile.am, NEWS, autogen.sh, configure.in, lib/psiconv/parse_simple.c, program/psiconv/gen_image.c, program/psiconv/magick-aux.c: (Frodo) Now compiles again with newest ImageMagick. 2001-06-17 20:47 frodo * Makefile.in, aclocal.m4, config.guess, config.h.in, config.sub, configure, install-sh, ltconfig, ltmain.sh, missing, mkinstalldirs, stamp-h.in, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/Makefile.in, program/extra/Makefile.in, lib/psiconv/Makefile.in, program/Makefile.in, program/psiconv/Makefile.in: (Frodo) Make us depend fully on autogen.sh 2001-06-17 20:44 frodo * Makefile.in, aclocal.m4, autogen.sh, config.guess, config.h.in, config.sub, configure, configure.in, ltconfig, ltmain.sh, compat/Makefile.in, docs/Makefile.in, program/extra/Makefile.in, formats/Makefile.in, lib/Makefile.in, lib/psiconv/Makefile.in, program/Makefile.in, program/psiconv/Makefile.in: (Frodo) Update to libtool-1.4, autoconf-2.50 2001-03-11 21:06 frodo * AUTHORS, formats/Makefile.am, formats/Makefile.in: (Frodo) Sync 2001-03-11 20:58 frodo * formats/psion/: Sheet_Cell_List.psi, Sheet_Formula_List.psi, Sheet_Info_Section.psi, World_Data_File.psi: (Frodo) Last updates for 2.7 2001-03-11 20:39 frodo * formats/psion/: Basic_Structures.psi, Header_Section.psi, Index.psi, Introduction.psi, Layout_Codes.psi, Page_Layout_Section.psi, Sheet_Cell_List.psi, Sheet_File.psi, Sheet_Formula_List.psi, Sheet_Graph_Description.psi, Sheet_Grid_Section.psi, Sheet_Info_Section.psi, Sheet_Name_Section.psi, Sheet_Status_Section.psi, Sheet_Variable_List.psi, Sheet_Workbook_Section.psi, Sheet_Worksheet.psi, Sheet_Worksheet_List.psi, Text_Layout_Section.psi, Word_Status_Section.psi, World_Data_File.psi: (Frodo) Update to version 2.7 of datafiles 2001-03-11 17:23 frodo * lib/psiconv/checkuid.c: (Frodo) Gert-Jan de Vos' patch for checkuid 2001-03-07 00:59 frodo * lib/psiconv/: data.c, data.h, parse_page.c, parse_routines.h, parse_sheet.c: (Frodo) Many changes to sheets 2001-03-04 23:10 frodo * lib/psiconv/: data.c, data.h, parse_formula.c, parse_layout.c, parse_routines.h, parse_sheet.c, parse_simple.c: (Frodo) Thomas Decsi's major sheet patch 2001-02-16 19:49 frodo * examples/TextEd, examples/Word, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen.h, program/psiconv/gen_latex.c, program/psiconv/psiconv.c: (Frodo) Jim Ottaway's gen_latex module, and two example files 2001-02-15 22:54 frodo * lib/psiconv/parse_formula.c: (Frodo) Fixed formula numbers 2001-02-08 21:03 frodo * lib/psiconv/: data.h, parse_formula.c: (Frodo) Latest formula additions of Decsi 2001-02-03 16:11 frodo * lib/psiconv/parse_formula.c: (Frodo) Vararg arguments now work. Formulas are complete (except for name references)! 2001-02-02 22:07 frodo * lib/psiconv/parse_formula.c: (Frodo) Preparations for vararg functions 2001-01-31 01:57 frodo * lib/psiconv/: data.c, data.h, generate_layout.c, parse_formula.c, parse_layout.c: (Frodo) Applied Decsi's patch for wraps 2001-01-31 01:41 frodo * lib/psiconv/parse_formula.c: (Frodo) Added strings to formulas 2001-01-31 01:35 frodo * lib/psiconv/: data.h, parse_formula.c: (Frodo) Added cell references and cell blocks 2001-01-31 00:57 frodo * lib/psiconv/: data.h, parse_formula.c, parse_routines.h, parse_simple.c: (Frodo) Added floats 2001-01-31 00:15 frodo * lib/psiconv/parse_formula.c: (Frodo) Forgot to add parse_formula.c in the previous patch 2001-01-30 22:37 frodo * lib/psiconv/: data.c, data.h: (Frodo) Most formula work is completed 2001-01-29 22:57 frodo * lib/psiconv/: Makefile.am, Makefile.in, data.c, data.h, list.c, list.h, parse_routines.h, parse_sheet.c: (Frodo) Base formula work 2001-01-22 21:36 frodo * configure, configure.in, compat/Makefile.am, compat/Makefile.in, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_image.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c: (Frodo) Another small Sheet improvement: sheet formula list 2001-01-21 01:06 frodo * config.guess, config.sub, ltconfig, ltmain.sh: (Frodo) Update to libtool 1.4 2001-01-17 13:04 frodo * NEWS, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_driver.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c: (Frodo) A little more sheet work. Added a Sheet Workbook section, though nothing is really put into it yet. 2001-01-17 01:05 frodo * NEWS, configure, configure.in, docs/Makefile.am, docs/Makefile.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_sheet.c: (Frodo) Start of Sheet support: base types defined, page and status section parsed, supporting definitions in data.c 2001-01-10 18:19 frodo * formats/psion/Introduction.psi: (Frodo) Corrected Decsi's name. 2001-01-10 17:56 frodo * formats/psion/: Introduction.psi, Layout_Codes.psi: (Frodo) Make sure the Psion docs are up-to-date 2001-01-10 17:39 frodo * lib/psiconv/data.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_rtf.c: (Frodo) Abstracted screenfont into enum 2001-01-07 21:30 frodo * lib/psiconv/generate_common.c: (Frodo) Sanitaized the input for layout section generation; it should now work more often. 2000-12-31 02:36 frodo * program/extra/Makefile.am, program/extra/Makefile.in, program/extra/empty.c, lib/psiconv/data.c, lib/psiconv/generate_common.c: (Frodo) Empty Word and TextEd documents work! 2000-12-30 23:17 frodo * AUTHORS, NEWS, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.c, lib/psiconv/data.h: (Frodo) Added psiconv_empty_* routines 2000-12-28 16:49 frodo * formats/Makefile.am, formats/Makefile.in, formats/psion/Embedded_Object_Section.psi, formats/psion/Fonts.psi, formats/psion/Identifiers.psi, formats/psion/Index.psi, formats/psion/Introduction.psi, formats/psion/Layout_Codes.psi, formats/psion/Page_Layout_Section.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Password_Section.psi, formats/psion/Section_Table_Section.psi, formats/psion/Sheet_File.psi, formats/psion/Sheet_Graph_Description.psi, formats/psion/Sheet_Graph_List_Section.psi, formats/psion/Sheet_Graph_Region.psi, formats/psion/Sheet_Graph_Section.psi, formats/psion/Sheet_Status_Section.psi, formats/psion/Sketch_Section.psi, formats/psion/Text_Layout_Section.psi, formats/psion/Userdic_File.psi, formats/psion/Word_Styles_Section.psi, formats/psion/World_Data_File.psi, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/generate_image.c, lib/psiconv/parse_layout.c: (Frodo) Update of format description. Added some obscure layout codes. 2000-12-28 01:29 frodo * TODO, lib/psiconv/generate_word.c: (Frodo) Life is beautiful: Word documents now seem to be generated flawlessly! 2000-12-28 01:24 frodo * TODO, lib/psiconv/generate_layout.c, lib/psiconv/parse_layout.c: (Frodo) Fixed super/subscript generation, fixed border warnings in parsing 2000-12-28 00:56 frodo * lib/psiconv/: generate_layout.c, generate_word.c, parse_word.c: (Frodo) Fixed a couple of bugs with bullets and styles - even in the parser 2000-12-28 00:20 frodo * lib/psiconv/: generate_driver.c, generate_routines.h, generate_word.c, parse_word.c: (Frodo) Not yet perfect; but we actually rewrote a Psion Word file! 2000-12-27 03:13 frodo * lib/Makefile.in, lib/psiconv/generate.h, program/Makefile.in: (Frodo) Some forgotten files 2000-12-27 03:12 frodo * program/extra/rewrite.c, lib/psiconv/buffer.c, lib/psiconv/buffer.h, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/list.c, lib/psiconv/list.h, program/psiconv/psiconv.c: (Frodo) Many changes. Layout sections now work! * Added list_empty, list_replace * Added relocation to buffers, removed base address * Added buffer_resolve, buffer_add_reference, buffer_add_target, psiconv_unique_id functions * Modifified other buffer functions to work with references * Added comments to buffer.h * Added write_offset function * Added reference support in functions where needed * Corrected extra/rewrite error message * Corrected numerous bugs to make layouts work. 2000-12-25 23:25 frodo * configure, configure.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/buffer.c, lib/psiconv/buffer.h, lib/psiconv/common.h, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/parse.h, lib/psiconv/parse_common.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_simple.c, program/extra/rewrite.c, program/psiconv/psiconv.c: (Frodo) Added a complete buffer abstraction 2000-12-25 15:34 frodo * lib/psiconv/: data.c, data.h, generate_layout.c: (Frodo) Added compare functions for layout elements 2000-12-25 01:29 frodo * lib/psiconv/generate_routines.h: (Frodo) Completed generate_routines.h 2000-12-25 01:26 frodo * lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.h, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_layout.c, lib/psiconv/generate_page.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_texted.c, lib/psiconv/generate_word.c, lib/psiconv/list.c, lib/psiconv/parse_page.c, program/extra/rewrite.c: (Frodo) Added word-specific generation routines 2000-12-24 18:26 frodo * Makefile.am, Makefile.in, configure, configure.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/generate_common.c, lib/psiconv/generate_driver.c, lib/psiconv/generate_routines.h, program/extra/Makefile.am, program/extra/Makefile.in, program/extra/README, program/extra/checkuid.c, program/extra/rewrite.c: (Frodo) Several things: * Added the extra directory to the build process, added a README. * Made checkuid compile cleanly * Added rewrite utility 2000-12-24 17:34 frodo * lib/psiconv/list.c, lib/psiconv/list.h, program/psiconv/psiconv.c: (Frodo) New list functions fread_all and fwrite_all 2000-12-24 17:03 frodo * lib/psiconv/: Makefile.am, Makefile.in, generate_common.c, generate_driver.c, generate_page.c, generate_routines.h, generate_texted.c: (Frodo) We should now have enough to generate TextEd sections! 2000-12-23 21:21 frodo * TODO, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/common.h, lib/psiconv/generate_layout.c, lib/psiconv/generate_routines.h, lib/psiconv/generate_simple.c, lib/psiconv/list.c, lib/psiconv/list.h: (Frodo) New generation routines in generate_layout 2000-12-22 23:31 frodo * lib/psiconv/: Makefile.am, Makefile.in, checkuid.c, common.h, error.c, error.h, general.h, generate_routines.h, generate_simple.c, list.c, misc.c, parse.h, parse_common.c, parse_driver.c, parse_image.c, parse_layout.c, parse_page.c, parse_routines.h, parse_simple.c, parse_texted.c, parse_word.c: (Frodo) First generate routines! Reshuffled a few things to make it all work out 2000-12-20 23:07 frodo * NEWS, configure, configure.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_word.c: (Frodo) Fixed style inheritance from Normal 2000-12-16 17:27 frodo * lib/psiconv/data.c: (Frodo) Fixed error in not setting default linespacing 2000-12-15 19:52 frodo * NEWS, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_layout.c, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_rtf.c: (Frodo) 0-7-0 release 2000-12-15 18:17 frodo * NEWS, TODO, configure, configure.in, lib/psiconv/parse_driver.c, program/psiconv/gen_image.c, program/psiconv/psiconv.c: (Frodo) All formats tested, with a little luck most problems are now caught 2000-12-15 02:16 frodo * lib/psiconv/error.c, lib/psiconv/list.c, lib/psiconv/parse_common.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, program/psiconv/psiconv.c: (Frodo) First typos eliminated. Word files seem to work now. Need to test other types. 2000-12-15 01:21 frodo * TODO, docs/parsing, lib/psiconv/parse.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c: (Frodo) Massive update: theoretically, all return codes are now checked. Untested - may have many typos. 2000-12-13 17:30 frodo * NEWS, TODO, compat/compat.h, compat/dummy.c, lib/psiconv/checkuid.c, lib/psiconv/data.c, program/extra/checkuid, lib/psiconv/data.h, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/misc.c, lib/psiconv/parse.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_image.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c: (Frodo) Updated all copyright notices 2000-12-13 17:17 frodo * lib/psiconv/: Makefile.am, Makefile.in, data.c, data.h, error.c, error.h, list.c, list.h, misc.c, parse.h, parse_aux.c, parse_routines.h: (Frodo) Several important changes: * Created new misc.c, error.c and error.h files * Split parse_aux.c among them * Made list.c, data.c, error.c, checkuid.c and misc.c failsafe. 2000-12-13 01:42 frodo * NEWS, lib/psiconv/parse.h, lib/psiconv/parse_aux.c, lib/psiconv/parse_driver.c, program/psiconv/psiconv.c: (Frodo) Error printing can now be captured by another program 2000-12-10 21:27 frodo * lib/psiconv/parse_driver.c: (Frodo) psiconv_verbosity was undefined! 2000-12-10 17:53 frodo * formats/: generate_ascii.sh, generate_html.sh, generate_html4.sh, generate_rtf.sh: (Frodo) Now formats generation works too in the new structure 2000-12-10 17:49 frodo * Makefile.am, Makefile.in, NEWS, configure, configure.in, formats/psion/Clip_Art_File.psi, formats/psion/File_Structure.psi, formats/psion/Section_Table_Offset_Section.psi, formats/psion/Sheet_File.psi, lib/Makefile.am, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.h, lib/psiconv/parse.h, lib/psiconv/parse_routines.h, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/magick-aux.c, program/psiconv/magick-aux.h, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) Revamped directory structure, rescues a few files from CVS limbo 2000-12-10 17:13 frodo * configure, configure.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in: (Frodo) general.h is now installed 2000-12-10 16:44 frodo * lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/parse_common.c, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) Changed all struct definition to make them C++ compatible 2000-12-10 03:17 frodo * lib/psiconv/: data.h, list.h, parse.h, parse_routines.h: (Frodo) Added C++ extern statements 2000-11-30 21:09 frodo * NEWS, configure, configure.in, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/parse_simple.c, program/psiconv/Makefile.am, program/psiconv/Makefile.in: (Frodo) Important X-encoding-related bug that made psiconv fail on large documents 2000-10-21 02:49 frodo * Makefile.in, configure, configure.in, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/psiconv/Makefile.in, program/psiconv/Makefile.in, program/psiconv/gen.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_image.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c, program/psiconv/psiconv.c, program/psiconv/psiconv.h: (Frodo) YES! Fixed everything - ImageMagick should now finally work! 2000-10-04 21:02 frodo * configure, configure.in, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen_image.c: (Frodo) Now finally ImageMagick 5 works correctly. 2000-09-11 16:02 frodo * lib/psiconv/parse_common.c: (Frodo) Styles bug fixed 2000-07-17 23:12 frodo * configure, configure.in: (Frodo) ImageMagick support should work now; at least, we have now a GetMagickInfo check. Now we wait for the new ImageMagick release. 2000-07-14 22:44 frodo * INSTALL, Makefile.in, NEWS, TODO, aclocal.m4, configure, configure.in, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/psiconv/Makefile.in, program/psiconv/Makefile.in, program/psiconv/gen_image.c: (Frodo) First stab at ImageMagick 5 support. Still problems with listing all filetypes, though. 2000-02-04 21:33 frodo * program/psiconv/gen_image.c: (Frodo) Patched compile-without-Imagemagick bug 1999-12-04 22:46 frodo * NEWS, README, configure, configure.in, formats/Makefile.am, formats/Makefile.in, formats/psion/Basic_Structures.psi, formats/psion/Embedded_Object_Section.psi, formats/psion/Header_Section.psi, formats/psion/Identifiers.psi, formats/psion/Index.psi, formats/psion/Introduction.psi, formats/psion/Layout_Codes.psi, formats/psion/MBM_File.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Record_File.psi, formats/psion/Record_Section.psi, formats/psion/Sketch_File.psi, formats/psion/Sketch_Section.psi, formats/psion/TextEd_File.psi, formats/psion/Word_File.psi, formats/psion/Word_Styles_Section.psi, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, program/psiconv/psiconv.c: (Frodo) Final commit for 0.6.1 New formats files 1999-12-04 21:53 frodo * lib/psiconv/: parse_driver.c, parse_image.c, parse_routines.h: (Frodo) Clip Art files now working correctly. 1999-12-04 01:48 frodo * program/psiconv/gen_image.c: (Frodo) Clipart generation done. Pictures are still offset a bit. To fix... 1999-12-04 01:40 frodo * lib/psiconv/: data.h, parse_common.c, parse_driver.c, parse_image.c, parse_routines.h: (Frodo) Clipart file parsing completed 1999-12-04 00:13 frodo * lib/psiconv/: data.c, data.h, parse_driver.c, parse_image.c, parse_routines.h: (Frodo) Renamed jumptable_mbm_section to jumptable_section Typecast buglet removed from data.c 1999-12-03 01:59 frodo * TODO, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_routines.h: (Frodo) Some base work for ClipArt files 1999-12-03 01:15 frodo * program/psiconv/gen_image.c: (Frodo) Multiple images in a file are now supported. 1999-12-03 00:36 frodo * program/psiconv/gen_image.c: (Frodo) Multiple pictures conversion should be in. But no test-MBMs yet :-( 1999-12-02 21:09 frodo * program/psiconv/gen_image.c: (Frodo) Preparations for multiple images output 1999-12-02 19:05 frodo * NEWS, README, TODO, config.h.in, configure, configure.in, formats/generate_html.sh, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen_rtf.c: (Frodo) Release 0.6.0. Several minor things found when compiling. 1999-12-02 18:19 frodo * program/psiconv/psiconv.h: (Frodo) New file forgotten in last commit 1999-12-02 18:18 frodo * program/psiconv/: Makefile.am, Makefile.in, gen.h, gen_html.c, gen_html4.c, gen_image.c, gen_rtf.c, gen_txt.c, psiconv.c: (Frodo) Full ImageLib support! To do: * More than one picture in a file * Special features like clipping 1999-11-30 01:26 frodo * Makefile.in, configure, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/psiconv/Makefile.in, program/psiconv/Makefile.in: (Frodo) Force commit to update timestamps of autoconf/automake generated files 1999-11-30 01:24 frodo * program/psiconv/gen_image.c: (Frodo) Yet another forgotten file. This is getting boring... 1999-11-30 01:22 frodo * compat/compat.h: (Frodo) And yet another file... 1999-11-30 01:20 frodo * compat/: dummy.c, getopt.c, getopt.h, getopt1.c: (Frodo) Added several files that were forgotten in the compat section... 1999-11-30 01:14 frodo * acconfig.h: (Frodo) Added acconfig.h file; I had forgotten about it :-( 1999-11-30 01:12 frodo * AUTHORS, TODO, lib/psiconv/data.h: (Frodo) Corrected outline level definition 1999-11-01 13:35 frodo * lib/psiconv/: data.h, parse_layout.c, parse_word.c: (Kevin Wheatley) 5MX patches, mostly outline stuff 1999-10-31 00:36 frodo * AUTHORS, TODO: (Frodo) Changed TODO and AUTHORS to include latest work and mention Wolfgang Szoecs 1999-10-31 00:28 frodo * lib/psiconv/: data.h, parse_common.c, parse_image.c: (Frodo) Parsing of both MBM and Sketch files finished and correct! To do: * Need to ask ImageMagick what output formats are available; * Need to display those formats in --help, and understand them on the command-line; * Need to generate the correct type of file; * Need to take a look at some special Sketch options (size, cuts, etc) * Sometimes, the file seems to be negative. Probably an ImageMagick problem. * Need to handle several images in one file elegantly 1999-10-29 23:14 frodo * lib/psiconv/: checkuid.c, data.c, data.h, parse_common.c, parse_driver.c, parse_image.c, parse_routines.h: (Frodo) Sketch files are now supported. That is, they are parsed, and generated, but generating still needs a lot of work. Untested. 1999-10-28 23:23 frodo * compat/: Makefile.am, Makefile.in: (Frodo) Fix for SUNs: libcompat.a is now always created. 1999-10-27 17:33 frodo * compat/: Makefile.am, Makefile.in: (Frodo) Fixed `make dist' to include latest additions in compat/ 1999-10-27 17:30 frodo * configure, configure.in, compat/Makefile.in, lib/psiconv/data.c: (Frodo) Added getopt_long support for systems without it, as well as a minor typo. 1999-10-27 17:04 frodo * lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/data.c, lib/psiconv/parse_common.c, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen_html.c, program/psiconv/gen_rtf.c, program/psiconv/psiconv.c: (Frodo) Some IRIX compatibility issues fixed, as well as some compiler warnings 1999-10-27 16:28 frodo * Makefile.in, configure, configure.in, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/psiconv/Makefile.in, program/psiconv/Makefile.in: (Frodo) Added configuration options for more warnings 1999-10-27 15:09 frodo * lib/psiconv/: data.h, parse.h, parse_common.c, parse_driver.c: (Frodo) Several changes in header parsing The definition of header section is changed to exclude the long with the offset of the Section Table Section. This allows easier integration of Data-like file formats. psiconv_parse_{texted,word,mbm}_file now do not parse the header section. This will allow easier integration for objects-within-objects. They start at the long with the offset of the Section Table Section. psiconv_file_type now returns the read header section, and its length. 1999-10-13 21:15 frodo * program/psiconv/: Makefile.am, Makefile.in, gen.h, psiconv.c: (Frodo) Crude ImageMagick output Invoke with -T IMAGE. No selection of image types yet. 1999-10-13 18:08 frodo * Makefile.in, config.h.in, configure, configure.in, compat/Makefile.in, docs/Makefile.in, formats/Makefile.in, lib/psiconv/Makefile.in, program/psiconv/Makefile.am, program/psiconv/Makefile.in: (Frodo) Added ImageMagick detection and configuration. No code to use it yet. 1999-10-13 17:02 frodo * configure, configure.in, lib/psiconv/parse_image.c: (Frodo) Latest parse_paint_section changes It still is not perfect, but it is certainly coming along 1999-10-11 21:17 frodo * lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/gen.h, lib/psiconv/gen_html.c, lib/psiconv/gen_html4.c, lib/psiconv/gen_rtf.c, lib/psiconv/gen_txt.c, program/psiconv/Makefile.am, program/psiconv/Makefile.in, program/psiconv/gen.h, program/psiconv/gen_html.c, program/psiconv/gen_html4.c, program/psiconv/gen_rtf.c, program/psiconv/gen_txt.c: (Frodo) Moved generation stuff out of the library into psiconv 1999-10-11 20:19 frodo * lib/psiconv/: data.c, parse_driver.c, parse_image.c: (Frodo) Current status images: Parsing kind of works, but the number of pixels does not match. What am I doing wrong? 1999-10-11 18:15 frodo * lib/psiconv/: data.c, data.h, parse_common.c, parse_driver.c, parse_image.c, parse_routines.h: (Frodo) Full MBM support - untested 1999-10-11 17:17 frodo * lib/psiconv/: data.h, gen_html.c, parse_image.c, parse_routines.h: (Frodo) Now image stuff compiles. Only psiconv_parse_paint_data_section is defined at this moment, it is not yet called. 1999-10-11 17:06 frodo * lib/psiconv/: Makefile.am, Makefile.in, parse_image.c: (Frodo) First stap at image parsing. Won't compile yet - too bad 1999-10-05 17:33 frodo * lib/psiconv/gen_rtf.c: (Frodo) Perhaps even slightly functional RTF generator Most stubs are in, and it should even do something. The generated code is not validated yet, so it will probably not work. Still many things to do. 1999-10-05 17:32 frodo * lib/psiconv/gen_html.c: (Frodo) Small bug fix Instead of the contents of `font', the font pointers were compared; so they were often inequal, leading to too many font emitions. 1999-10-04 20:19 frodo * configure, configure.in, formats/Makefile.am, formats/Makefile.in, formats/generate_rtf.sh: (Frodo) Added --enable-rtf-docs flag in configure, and scripts needed to generate RTF docs No substitution of links is done yet. 1999-10-04 20:13 frodo * lib/psiconv/gen_rtf.c: (Frodo) Start of RTF generator Font tables and color tables are generated. 1999-10-04 18:38 frodo * lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/gen.h, lib/psiconv/gen_rtf.c, program/psiconv/psiconv.c: (Frodo) Stubs for RTF output 1999-10-03 23:10 frodo * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, config.guess, configure, configure.in, install-sh, missing, mkinstalldirs, COPYING, INSTALL, README, TODO, aclocal.m4, config.h.in, config.sub, ltconfig, ltmain.sh, stamp-h.in, formats/Makefile.am, formats/generate_html4.sh, formats/html_links.sh, formats/index_html.sh, formats/Makefile.in, formats/generate_ascii.sh, formats/generate_html.sh, formats/psion/ASCII_Codes.psi, formats/psion/Application_ID_Section.psi, formats/psion/Basic_Elements.psi, formats/psion/Basic_Structures.psi, formats/psion/Embedded_Object_Section.psi, formats/psion/Fonts.psi, formats/psion/Header_Section.psi, formats/psion/Identifiers.psi, formats/psion/Index.psi, formats/psion/Introduction.psi, formats/psion/Layout_Codes.psi, formats/psion/MBM_File.psi, formats/psion/Page_Layout_Section.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Password_Section.psi, formats/psion/Record_File.psi, formats/psion/Record_Section.psi, formats/psion/Section_Table_Section.psi, formats/psion/Sketch_File.psi, formats/psion/Sketch_Section.psi, formats/psion/Substitutions.psi, formats/psion/TextEd_File.psi, formats/psion/TextEd_Section.psi, formats/psion/Text_Layout_Section.psi, formats/psion/Text_Section.psi, formats/psion/Word_File.psi, formats/psion/Word_Status_Section.psi, formats/psion/Word_Styles_Section.psi, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/checkuid.c, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/gen.h, lib/psiconv/gen_html.c, lib/psiconv/gen_html4.c, lib/psiconv/gen_txt.c, lib/psiconv/general.h.in, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/parse.h, lib/psiconv/parse_aux.c, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, program/psiconv/Makefile.in, compat/Makefile.am, compat/Makefile.in, compat/strdup.c, docs/Makefile.am, docs/Makefile.in, docs/ascii, docs/html, docs/html4, program/extra/checkuid, program/extra/checkuid.c, program/psiconv/Makefile.am, program/psiconv/psiconv.c: Imported sources 1999-10-03 23:10 frodo * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, config.guess, configure, configure.in, install-sh, missing, mkinstalldirs, COPYING, INSTALL, README, TODO, aclocal.m4, config.h.in, config.sub, ltconfig, ltmain.sh, stamp-h.in, formats/Makefile.am, formats/generate_html4.sh, formats/html_links.sh, formats/index_html.sh, formats/Makefile.in, formats/generate_ascii.sh, formats/generate_html.sh, formats/psion/ASCII_Codes.psi, formats/psion/Application_ID_Section.psi, formats/psion/Basic_Elements.psi, formats/psion/Basic_Structures.psi, formats/psion/Embedded_Object_Section.psi, formats/psion/Fonts.psi, formats/psion/Header_Section.psi, formats/psion/Identifiers.psi, formats/psion/Index.psi, formats/psion/Introduction.psi, formats/psion/Layout_Codes.psi, formats/psion/MBM_File.psi, formats/psion/Page_Layout_Section.psi, formats/psion/Paint_Data_Section.psi, formats/psion/Password_Section.psi, formats/psion/Record_File.psi, formats/psion/Record_Section.psi, formats/psion/Section_Table_Section.psi, formats/psion/Sketch_File.psi, formats/psion/Sketch_Section.psi, formats/psion/Substitutions.psi, formats/psion/TextEd_File.psi, formats/psion/TextEd_Section.psi, formats/psion/Text_Layout_Section.psi, formats/psion/Text_Section.psi, formats/psion/Word_File.psi, formats/psion/Word_Status_Section.psi, formats/psion/Word_Styles_Section.psi, lib/psiconv/Makefile.am, lib/psiconv/Makefile.in, lib/psiconv/checkuid.c, lib/psiconv/data.c, lib/psiconv/data.h, lib/psiconv/gen.h, lib/psiconv/gen_html.c, lib/psiconv/gen_html4.c, lib/psiconv/gen_txt.c, lib/psiconv/general.h.in, lib/psiconv/list.c, lib/psiconv/list.h, lib/psiconv/parse.h, lib/psiconv/parse_aux.c, lib/psiconv/parse_common.c, lib/psiconv/parse_driver.c, lib/psiconv/parse_layout.c, lib/psiconv/parse_page.c, lib/psiconv/parse_routines.h, lib/psiconv/parse_simple.c, lib/psiconv/parse_texted.c, lib/psiconv/parse_word.c, program/psiconv/Makefile.in, compat/Makefile.am, compat/Makefile.in, compat/strdup.c, docs/Makefile.am, docs/Makefile.in, docs/ascii, docs/html, docs/html4, program/extra/checkuid, program/extra/checkuid.c, program/psiconv/Makefile.am, program/psiconv/psiconv.c: Initial revision psiconv-0.9.8/INSTALL0000644000175000017500000002203010336413004011152 00000000000000Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. psiconv-0.9.8/NEWS0000644000175000017500000001421410336373364010643 000000000000000.9.8 20051115 Small bug fixes 0.9.7 20050225 Support ImageMagick 6 0.9.6 20040430 Compilation fixes for Solaris Compilation fixes for ImageMagick unavailability 0.9.5 20040406 Bug fixes Compilation with gcc 2.95.x should work again 0.9.4 20040316 Mostly bug fixes Minimum version required for AbiWord 2.1.1 and later 0.9.3 20040226 Minimum version required for new AbiWord 2.1 plugin Fixed a few minor bugs Added psiconv_unicode_from_list and psiconv_unicode_strstr Much better error and progress reporting in generators 0.9.2.1 20040223 Quick fix for the library number mistake in 0.9.2 0.9.2 20040223 Many bugfixes, among them some critical ones: * Package now builds without psiconv.conf files installed UTF8 Psion support might now actually work -c argument introduced for psiconv program 0.9.1 20040209 Added the psiconv-config program. Fixed the installation of @includedir@/psiconv/general.h Added the forgotted psiconv_config_free function. Removed some small memory leaks. 0.9.0 20040204 New major library version number breaks source compatibility: * All strings and characters are now stored in UCS-2 * New config structure. - Call psiconv_config_default and psiconv_config_read at the start of your program - Almost all functions have a new psiconv_config parameter - All former global variables are now in this structure * Several minor changes in the functions defined in parse_routines.h and generate_routines.h * All generate_* routines have now a lev parameter except generate_file. * psiconv_sketch_section data representation changes * New verbosity level PSICONV_VERB_ERROR Use config files /etc/psiconv.conf and ~/.psiconv.conf Support automake 1.6, 1.7 and 1.8 Support autoconf-2.50 and up Support ImageMagick 5.4.x and 5.5.x (API changed once again...) Support Unicode output in psiconv program (Keita Kawabe) Don't use features not present in plain sh (Keita Kawabe) Clean up some automake-related stuff. Format documentation is now installed too. Debian build support Embedded objects in Word are now properly parsed and generated Sketch file generation is added (stand-alone and as object) MBM and Clipart file generation is added Image files other than 2-bits greyscale are parsed and generated (experimental) Errors and warnings sanitized Rewrite of the psiconv program: * Outputs in UTF8, UCS2, ASCII or Psion encodings * XHTML target generates strict XHTML using CSS * HTML4 target generates traditional HTML without CSS * IMAGE target remains the same * LATEX and RTF targets are not supported anymore 0.8.3 20020129 Extended sheet parsing support in library: all non-graph parts are now parsed. Support autoconf-2.52, libtool-1.4.2 (needs patch!), automake-1.5 Support ImageMagick-5.4.2-2 (older may not work) Fix header/footer potential segfault Fix large list-related memory leak and several smaller ones. 0.8.2 20010717 Some sheet parsing support in library, for from complete, but good enough for basic Gnumeric support Added autogen.sh autoconf-2.50, automake-1.4-p4 0.8.1 20010110 New enum screenfont_t New program rewrite in extra Added psiconv_empty_* functions Fixed a few minor generation bugs 0.8.0 20001228 Fixed style inheritance from Normal Fixed warnings in layouts Added generation routines to libpsiconv Upgraded documentation to version 2.6 Fixed several minor parse-related issues 0.7.1 20001218 Maintenance release to be used with Abiword. Set proper interline defaults. 0.7.0 20001215 Made libpsiconv C++ compatible. general.h is now installed properly (oops...) Revamped package directory structure and files. Include files contain now the correct paths. Fixed a nasty typo; larger files should now work. It seems psiconv_verbosity was never defined. Added message printing hook for applications to capture. All result codes are now tested, library is much more robust. Some internal data fields have been renamed. 0.6.2 20001021 ImageMagick 5 now works. I hope. 0.6.1 19991204 Added Clipart files. Several pictures in one file are now handled correctly. 0.6.0 19991202 Renamed HTML to HTML3. Images can be handled through the ImageMagick library. Moved the generation routines out of libpsiconv. 0.5.0 19990930 Automake, autoconf and libtool support. No functional changes. One small bug squashed in the parser. 0.4.0 19990812 First release of libpsiconv. It now supports Word and TextEd files. Many internal things have changed, including the names of many functions. Renamed TEXT format to ASCII, and the -t option to -T. Psiconv is now linked against libpsiconv 0.3.0 19990711 New target formats HTML4 and TEXT 0.2.3 19990618 Nothing really. 0.2.2 19990618 Small bugfixes. Word Status Section now completely read. 0.2.1 19990614 Bug fix: No layout section needed in header/footer 0.2.0 19990614 Much better progress and debug reports Page section now parsed (no HTML output for it though) Some small bugs removed 0.1.0 19990610 Initial release psiconv-0.9.8/TODO0000644000175000017500000000217210016436747010634 00000000000000Data formats: * Understand the password section * Understand and document 10000050 file types (Agenda, Data, etc) Parser: * Incorporate the replacement section. Stubs are already in place. * Check image parsing works for other things than 2-bits greyscale. * Complete Sheet * Add more file formats Generator: * Add audio file support. * Check image file generation works for other things than 2 bits greyscale * Add Sheet * Add more file formats Psiconv program: * HTML: Verify generated code, to see whether it is HTML-4.01 compatible * XHTML: Verify generated code, to see whether it is XHTML compatible * HTML,XHTML: Add support for images * RTF: Make it usable. Not nearly finished at the moment. Dead project. * LATEX: re-enable or delete. Dead project. * IMAGE: support for special things like clipping is still lacking at the generator side. Config files: * Add hex parsing General: * Many common values are returned as int. Perhaps change this to long, for better behaviour on very large files on some architectures? * Use libaudiofile for audio conversions? * Look at portability (headers) * Add more comments in data.h psiconv-0.9.8/compile0000755000175000017500000000707210336413007011513 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2003-11-09.00 # Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit 0 ;; -v | --v*) echo "compile $scriptversion" exit 0 ;; esac prog=$1 shift ofile= cfile= args= while test $# -gt 0; do case "$1" in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we do something ugly here. ofile=$2 shift case "$ofile" in *.o | *.obj) ;; *) args="$args -o $ofile" ofile= ;; esac ;; *.c) cfile=$1 args="$args $1" ;; *) args="$args $1" ;; esac shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$prog" $args fi # Name of file we expect compiler to create. cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir $lockdir > /dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir $lockdir; exit 1" 1 2 15 # Run the compile. "$prog" $args status=$? if test -f "$cofile"; then mv "$cofile" "$ofile" fi rmdir $lockdir exit $status # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: psiconv-0.9.8/config.guess0000755000175000017500000012546610336413005012463 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. 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 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; 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 ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # 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 ;; 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 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *: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:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *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. 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? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe 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;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; 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* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*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 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $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 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 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:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $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:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${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 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; 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 i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) 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 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-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 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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 ;; 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 exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; 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 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # 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 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; 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[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 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *: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 ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: psiconv-0.9.8/config.sub0000755000175000017500000007547010336413005012125 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # 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* | 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/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -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 | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | 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 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | 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] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | 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-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | 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]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) 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 ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) 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 ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; 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-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; 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 ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -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* | -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* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: psiconv-0.9.8/depcomp0000755000175000017500000003541010336413010011501 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-04-25.13 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 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: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: 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', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # Dependencies are output in .lo.d with libtool 1.4. # They are output in .o.d with libtool 1.5. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: psiconv-0.9.8/install-sh0000755000175000017500000002244110336413004012133 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-04-01.17 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 -d DIRECTORIES... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. test -n "$dir_arg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" || lasterr=$? # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those 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" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # 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 test -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 $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: psiconv-0.9.8/ltmain.sh0000644000175000017500000054737210336412775012004 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.6 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $" # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: psiconv-0.9.8/missing0000755000175000017500000002466610336413004011541 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: psiconv-0.9.8/mkinstalldirs0000755000175000017500000000653510336413010012740 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2004-02-15.20 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit 0 ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: psiconv-0.9.8/autogen.sh0000755000175000017500000000241707754244601012150 00000000000000#!/bin/sh # # Run this before configure # # This file blatantly ripped off from subversion and Abiword # To run this file, you need: # automake >= 1.6 (tested with 1.6.3, 1.7.8; older will probably not work) # libtool >= 1.5 (tested with 1.5; older will probably not work) # autoconf >= 2.50 (tested with 2.50, 2.57; older will not work) # Set this to a specific version if you want to use a non-standard automake #AUTOMAKE_VERSION=-1.6 # Set this to a specific version if you want to use a non-standard autoconf #AUTOCONF_VERSION=2.50 set -e echo "Libtool..." libtoolize --copy --force # Produce aclocal.m4, so autoconf gets the automake macros it needs echo "Creating aclocal.m4..." aclocal$AUTOMAKE_VERSION autoheader$AUTOCONF_VERSION # Produce all the `Makefile.in's, verbosely, and create neat missing things # like `libtool', `install-sh', etc. automake$AUTOMAKE_VERSION --add-missing --verbose --gnu --copy --force-missing # If there's a config.cache file, we may need to delete it. # If we have an existing configure script, save a copy for comparison. if [ -f config.cache ] && [ -f configure ]; then cp configure configure.$$.tmp fi # Produce ./configure echo "Creating configure..." autoconf$AUTOCONF_VERSION echo "" echo "You can run ./configure now." echo "" psiconv-0.9.8/compat/0000777000175000017500000000000010336611556011507 500000000000000psiconv-0.9.8/compat/Makefile.am0000644000175000017500000000025610044273416013455 00000000000000noinst_LTLIBRARIES = libcompat.la libcompat_la_LIBADD = @LTLIBOBJS@ libcompat_la_SOURCES = dummy.c libcompat_la_LDFLAGS = EXTRA_DIST=getopt.h compat.h getopt.c getopt1.c psiconv-0.9.8/compat/Makefile.in0000664000175000017500000003327210336413005013466 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libcompat_la_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = compat DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in getopt.c \ getopt1.c strdup.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcompat_la_DEPENDENCIES = @LTLIBOBJS@ am_libcompat_la_OBJECTS = dummy.lo libcompat_la_OBJECTS = $(am_libcompat_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/getopt.Plo $(DEPDIR)/getopt1.Plo \ @AMDEP_TRUE@ $(DEPDIR)/strdup.Plo ./$(DEPDIR)/dummy.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libcompat_la_SOURCES) DIST_SOURCES = $(libcompat_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libcompat.la libcompat_la_LIBADD = @LTLIBOBJS@ libcompat_la_SOURCES = dummy.c libcompat_la_LDFLAGS = EXTRA_DIST = getopt.h compat.h getopt.c getopt1.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu compat/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu compat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcompat.la: $(libcompat_la_OBJECTS) $(libcompat_la_DEPENDENCIES) $(LINK) $(libcompat_la_LDFLAGS) $(libcompat_la_OBJECTS) $(libcompat_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/compat/getopt.c0000644000175000017500000007255707655260324013114 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ psiconv-0.9.8/compat/getopt1.c0000644000175000017500000001070607655260324013161 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ psiconv-0.9.8/compat/strdup.c0000644000175000017500000000224507655260324013116 00000000000000/* strdup.c -- return a newly allocated copy of a string Copyright (C) 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef STDC_HEADERS #include #include #else char *malloc (); char *strcpy (); #endif /* Return a newly allocated copy of STR, or 0 if out of memory. */ char * strdup (str) const char *str; { char *newstr; newstr = (char *) malloc (strlen (str) + 1); if (newstr) strcpy (newstr, str); return newstr; } psiconv-0.9.8/compat/dummy.c0000444000175000017500000000166310336374645012733 00000000000000/* dummy.c - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Dummy object, to make sure libcompat will be created. */ static void psiconv_dummy (void) {;} psiconv-0.9.8/compat/getopt.h0000644000175000017500000001334507655260324013107 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ psiconv-0.9.8/compat/compat.h0000644000175000017500000000177710336374636013100 00000000000000/* compat.h - Part of psiconv, a PSION 5 file formats converter Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PSICONV_COMPAT_H #define PSICONV_COMPAT_H #include "config.h" #ifndef HAVE_STRDUP extern char *strdup(const char *str); #endif #endif /* def PSICONV_COMPAT_H */ psiconv-0.9.8/formats/0000777000175000017500000000000010336611562011674 500000000000000psiconv-0.9.8/formats/psion/0000777000175000017500000000000010336611561013023 500000000000000psiconv-0.9.8/formats/psion/Application_ID_Section.psi0000644000175000017500000000414710010143274017753 000000000000007m■ЯU6  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aб[Application ID Section]Application ID SectionApplication ID sections define objects. Usually, a file has a main Application ID Section, and all inserted objects have one too. This section may actually describe what application should be launched to access the file.An Application ID section is structured like this: Size Description лID╗ Identifier лString╗ Appication name At this time, there seems to be a one-on-one relation between identifiers and application names. But for all I know the identifier might not describe the application, but the file; in that case, there might be more than one identifier associated with an application (though each identifier should still be associated with one single application).These identifiers are also used for UID3 in the лHeader Section╗.Identifier Name7D 00 00 10 Paint.app7E 00 00 10 RECORD.APP7F 00 00 10 Word.app84 00 00 10 Agenda.app85 00 00 10 TextEd.app86 00 00 10 Data.app87 00 00 10 Comms.app88 00 00 10 Sheet.app а" Courier NewЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman▌3[B@"ArialЁ"Times New Roman а" Courier New а" Courier NewA Ё"Times New Roman а" Courier New а" Courier New а" Courier New"Word.app C"yCъЙ)psiconv-0.9.8/formats/psion/ASCII_Codes.psi0000644000175000017500000000570110010143274015412 000000000000007m■ЯUР mш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AЭ [ASCII Codes][ASCII Code][ASCII]ASCII CodesAll text is encoded in ASCII, using the translation below (IBM code page 1252). Some codes below 20 have special uses; they are listed here too, but may not be used in all cases.There are Psion's which use different code pages, for cyrillic characters for example. Codes Use 06 New Paragraph 07 New Line 08 Hard Page 09 Tab 0A Unbreakable tab 0B Hard hyphen 0C Potential hyphen 0D Unknown (found in one text section). Not displayed 0E Object Placeholder 0F Visible space 10 Hard space 20 Space 21-2F !"#$%&'()*+,-./ 30-39 0-9 3A-40 :;<=>?@ 41-5A A-Z 5B-60 [\]^_` 61-7A a-z 7B-7E {|}~ 80 А 82-8C ВГДЕЖЗИЙКЛМ 8E О 91-9C СТУФХЦЧШЩЪЫЬ 9E-9F ЮЯ A1-AF бвгдежзийклмноп B0-BF ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐ C0-CF └┴┬├─┼╞╟╚╔╩╦╠═╬╧ D0-DF ╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ E0-EF рстуфхцчшщъыьэюя F0-FF ЁёЄєЇїЎў°∙·√№¤■  Ё"Times New Roman а" Courier New&! │W  8      $  @"Arial Ё"Times New Roman  а" Courier New Ё"Times New Roman а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New а" Courier New"Word.app C"yCiЙГ psiconv-0.9.8/formats/psion/Basic_Elements.psi0000644000175000017500000001035210010143274016320 000000000000007m■ЯU╣эФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A$[Basic Elements][Basic Storage Elements]Basic ElementsBasic Storage ElementsAll other elements can be descibed in terms of these three basic storage elements:Abbr. Full Desciption B Byte 1 byte long (8 bits) W Word 2 bytes long L Long 4 bytes longAll numbers are written in hexcode. So 48 equals 72 decimal. A sequence of bytes is written like 4E 00 00 10. As the Psion uses little endian, this corresponds to the number 1000004E. Negative numbers are expressed using two's complement notation: F7 corresponds to -9.Sometimes, we need to talk about individual bits. A byte has 8 bits; bit 0 is the LSB (value: 1), bit 7 the MSB (value: 80).[Lists]ListsOften lists are used. A list consists of an indication of its length, followed by length elements. A BListB uses a byte as length indicator and its length is counted in bytes. A LListB uses a long to encode the length, counted in bytes, etc. So the first letter tells how the length indicator is encoded: in a byte (B), word (W), long (L), special (S) or extra (X). The last letter tells what unit the length count is in: bytes (B), words (W), Longs (L) or elements as described (E).We can make the following matrix: Element SizeIndicator B W L E B BlistB [BListB] BListW [BListW] BListL [BListL] BlistE [BListE] W WlistB [WListB] WListW [WListW] WListL [WListL] WlistE [WListE] L LlistB [LListB] LListW [LListW] LListL [LListL] LlistE [LListE] S SlistB [SListB] SListW [SListW] SListL [SListL] SlistE [SListE] X XlistB [XListB] XListW [XListW] XListL [XListL] XlistE [XListE]The special and extra encodings need some more explanation.They are both used in cases where it is unclear how big a number needs to be represented. Both use an expandable scheme to encode numbers.Special encoding:Length described Length of indicator Value of indicator How to recognize00000000 - 0000003F B 4 * length + 2 First byte & 03 == 0200000080 - 00001FFF W 8 * length + 5 First byte & 07 == 05Extra encoding:Length described Length of indicator Value of indicator How to recognize00000000 - 0000007F B 2 * length First byte & 01 == 0000000080 - 00003FFF W 4 * length + 1 First byte & 03 == 0100004000 - 1FFFFFFF L 8 * length + 3 First byte & 07 == 03 Ё"Times New Roman а" Courier New Ё"Times New Roman а" Courier New а" Courier New$)S}ф"#GGGGG╞LCCL@CC @"Arial Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New а" Courier New Ё"Times New Roman" а" Courier New а" Courier New а" Courier NewC а" Courier New а" Courier NewC а" Courier New а" Courier NewC а" Courier New а" Courier NewB а" Courier New Ё"Times New Roman а" Courier NewB а" Courier New Ё"Times New RomanK а" Courier New а" Courier NewK а" Courier New а" Courier New"Word.app C"yC Ймpsiconv-0.9.8/formats/psion/Basic_Structures.psi0000644000175000017500000001016610010143274016732 000000000000007m■ЯUE─Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AС%[Basic Structures]Basic Structures[Strings] [String]StringsA string is encoded as a лSListB╗.. Strings use лASCII Codes╗..[Offsets] [Offset]OffsetsAt many places, other locations in the file are referenced. These locations are given as Offsets: the number of bytes from the start of the file. Offsets are always encoded in Longs.[Lengths] [Length]LengthsLengths are encoded within longs. The unit is a twip, or 1/5A0 inch (1/1440 decimal). This means 237 (567 decimal) units correspond to 1 cm.[Sizes][Size]SizesFont sizes are expressed within longs. The unit is a 1/14 point (1/20 decimal). As a point equals 1/48 twip (1/72 decimal), this is actually the same unit as used for лLengths╗.[Colors][Color]ColorsColors are encoded within three bytes. Each byte ranges from 00 (black) to FF (white). This is clearly intended to be a RGB encoding, but the Psion 5 only has a greytone display. All three bytes should be equal to express a greytone, and in practice, only values 00 00 00, 55 55 55, AA AA AA and FF FF FF are seen.Signed Integers[SInt][SInts][Signed Integer][Signed Integers]Signed integers are encoded in longs. The most significant bit is used as sign (0 for positive, 1 for negative). So +1 is encoded as 01 00 00 00, and -1 as 01 00 00 80.Floating Point Numbers[Float][Floats][Floating Point Numbers]Floating point numbers are encoded in 8 bytes. The most significant bit is used as sign (0 for positive, 1 for negative). The next B (11 decimal) bits are used as a two-complement exponent, and the remaining 34 (52 decimal) bits are used as the mantissa.The complete number can be found through this C formula (>> means shift right, ** means to the power of, Float is the 8 byte unsigned integer representation): (Float & 0x8000000000000000 ? -1 : 1) * (1 + (Float & 0x000FFFFFFFFFFFFF) / 0x0010000000000000) * (2 ** (((Float & 0x7FF0000000000000) >> 52) - 0x3FF)Some example representations:Number (decimal) Sign bit Exponent Mantissa Complete 1.0 0 3FF 0000000000000 00 00 00 00 00 00 F0 3F 2.0 0 400 0000000000000 00 00 00 00 00 00 00 40 3.0 0 400 8000000000000 00 00 00 00 00 00 08 40 3.5 0 400 C000000000000 00 00 00 00 00 00 0C 40-3.5 1 400 C000000000000 00 00 00 00 00 00 0C C0 0.5 0 3FE 0000000000000 00 00 00 00 00 00 E0 3F 0.0 0 000 0000000000000 00 00 00 00 00 00 00 00  Ё"Times New Roman ЁЁ"Times New Roman Ёа" Courier New Ё"Times New RomanЁ а" Courier New  Ё"Times New Roman -@╖Н▓;/й( Я);67:::::::   @"Arial Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman Ё Ё Ё Ё Ё"Times New RomanЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman ЁЁ ЁЁBЁ Ё Ё ЁЁЁ0ЁЁ6 а" Courier New а" Courier New"Word.app C"yCf Й8psiconv-0.9.8/formats/psion/Clip_Art_File.psi0000644000175000017500000000305310010143274016077 000000000000007m■ЯU·├Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AI [Clip Art File]Clip Art FileThis file type is used by Sketch for its internal Clip Art collection, but also to hold pictures used by an application. It contains several pictures.The лClip Art File╗ starts as below:0000 лID╗ Always 41 00 00 100004 LListL List of offsets of each лClip Art Item╗[Clip Art Item]Clip Art ItemEach item is laid out as follows:0000 лID╗ Always 40 00 00 100004 L Always 02 00 00 00 ?0008 L Always 00 00 00 00 ?000C L Always 00 00 00 00 ?0010 L Unknown. 0C 00 00 00 for Sketch Clip Art, 08 00 00 00 at other places.0014 лPaint Data Section╗ЁЁ"Times New Romanа" Courier NewЧ%5"P @"ArialЁ"Times New Roman  Ё"Times New RomanЁ"Times New Romanа" Courier NewЁ"Times New Roman"Word.app C"yCTЙэpsiconv-0.9.8/formats/psion/Embedded_Object_Section.psi0000644000175000017500000000735410010143274020116 000000000000007m■ЯU╗\Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AQ[Embedded Object Section]Embedded Object SectionIt is possible to embed files within other files. In this way, you can for example embed a picture within a text document.These objects are structured exactly like normal documents. Their data is embedded in the file of the master file. But offsets within their data are relative to the start of the object in the file, not to the start of the whole file! So if an object's data start at offset 00005432 of the master file, an offset of 00004321 within the object data corresponds to offset 00009753 in the master file.This section consists of one лBListL╗ of pairs of longs: the first long is an лID╗ containing the section identifier, the second is the лOffset╗ within the file. It is likely that all three sections below need to be present in the shown order.Identifier Description46 01 00 10 Offset of the лObject Display Section╗2A 01 00 10 Offset of the лObject Icon Section╗44 01 00 10 Offset of the лSection Table Offset Section╗The лSection Table Offset Section╗ is also the start of the embedded object; offsets within it are relative to its location.[Object Display Section]Object Display Section Data Description B Display as icon (00) or full (01) лLength╗ Object displayed horizontal size лLength╗ Object displayed vertical size L Unknown; alsways 00 00 00 00 ?The sizes are the size the object will be displayed with. If the object is displayed as an icon, for example, the size of the icon is put here; if it is cropped and/or scaled, the resulting size is found.If this is embedded in a лText Layout Inline List╗, the sizes found here are the same as those in the inline list.[Object Icon Section]Object Icon Section Data Description лString╗ Application name лLength╗ Icon horizontal size лLength╗ Icon vertical sizeIf the object is displayed iconified, the sizes in the лObject Display Section╗ and the лText Layout Inline List╗ (if the object is embedded in it) are the same as found here.$$SketchЇЇl h╙4(єI@└I@єI@шш}&Paint.app}Й^F╓ *у DЄ Ё а" Courier NewЁ"Times New Roman а" Courier New Ё"Times New Roman Ё"Times New Roman ╚"Times New Roman${ОЇ41;}'+)$═s░ @"ArialЁ"Times New Roman а" Courier New а" Courier New а" Courier New а" Courier NewQo $$" а" Courier New Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier Newп Ё"Times New Roman"Word.app C"yCИ Йоpsiconv-0.9.8/formats/psion/File_Structure.psi0000644000175000017500000000607310010143274016407 000000000000007m■ЯU fш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aile Structure]File StructureAll Psion files start with a block of 4 longs: the лHeader Section╗. The first three describe what kind of file this is, the last is a checksum.The exact structure of the remaining file depends on what kind of file this is. But some general things can be said.[ID 10000037 Files][ID 10000037 File]ID 10000037 filesExamples of these files are the лWord File╗ and лSheet File╗.Address Size Description0000 L UID1: 100000370004 L UID20008 L UID3000C L UID4: Checksum of UID1, UID2 and UID30010 лOffset╗ Offset of лSection Table Section╗At offset 0010, usually a long is found with the address of the лSection Table Section╗. The лSection Table Section╗ contains a list of section identifiers and their addresses.[ID 10000050 Files][ID 10000050 File]ID 10000050 filesNOTE: BELOW DATA IS INCOMPETE AND PARTIALLY INCORRECT! SORRY...Examples of these files are the Data File and Agenda File.Address Size Description0000 L UID1: 100000500004 L UID20008 L UID3000C L UID4: Checksum of UID1, UID2 and UID30010 L Unknown0014 L Unknown: always 00 00 00 00 ?0018 лLListB╗ The file data лLListE╗ Section start tableThere are two ways in which you can see this structure. On the one hand, it contains, starting on address 0018, a sequence of a лLListB╗, a word and a лLListE╗. The лLListB╗ contains the bulk data, the лLListE╗ contains 5 byte elements with offsets, relative to address 001E, in each last long where all sections start.On the other hand, at address 001E a list of sections start. Each section starts with a word encoding the length of the section. Seen in this way, the Section Start Table is part of just another of these sections.ЁЁ"Times New Roman а" Courier New а" Courier New Ё"Times New Roman Ё"Times New Roman#Сu&>01▒&@;0( @╓ @"ArialЁ"Times New Roman Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New╒Ё"Times New Roman"Word.app C"yC╚Й¤ psiconv-0.9.8/formats/psion/Fonts.psi0000644000175000017500000000337710010143274014545 000000000000007m■ЯU╬Э  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A╜ [Fonts][Font]FontsFonts are encoded by their full name (using лASCII Codes╗), followed by a byte with the screen font number. Before the name, a byte encodes the length of the name plus one (a complete font is a лBListB╗). So an theoretical font called New displayed with screen font code 80 would be encoded as 04 4E 65 57 80.Fonts are specific to your printer choice. But printer fonts can't be displayed directly on your screen. Instead, each printer font is mapped to a screen font. These are numbered as follows:. Code Usual name Comments 00 Swiss Only found in bullet desciptions? May be the same as 02. 01 Arial Proportional sans serif font 02 Courier New Non-proportional font 03 Times New Roman Proportional serifed fontа" Courier New Ё"Times New RomanЁ"Times New Roman 6└F*(/ @"Arial Ё"Times New RomanыЁ"Times New RomanЁ"Times New RomanHЁ"Times New Roman а" Courier Newа" Courier New"Word.app C"yCёЙ┴psiconv-0.9.8/formats/psion/Header_Section.psi0000644000175000017500000001174010010143274016321 000000000000007m■ЯUпФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AU3[Header Section]Header Section10 bytes header data. This section is guaranteed to be found at the very start of the file. It is the only section that starts at an unchanging offset.The first long determines the layout of this section. The following values are found:Value ID 1 Description37 00 00 10 лID 10000037 File╗, with a лSection Table Section╗41 00 00 10 лClip Art File╗50 00 00 10 лID 10000050 File╗, structured as a list of sections.Files starting with ID 37 00 00 10 have a лSection Table Offset Section╗ with the offset of the лSection Table Section╗ directly after the лHeader Section╗. This is better described in the лFile Structure╗ chapter.Offset Data Description0000 лID╗ UID1: 37 00 00 10: Header Section layout0004 лID╗ UID2: File kind0008 лID╗ UID3: Application ID000C L UID4: Checksum of UID1, UID2 and UID3 0010UID2 tells what kind of file is found. The values below are known: UID2 UID1 Desciption 6D 00 00 10 37 00 00 10 Data file UID3 is the Application ID. It is the same as used in the лApplication ID Section╗.UID4 is a checksum of UID1 to UID3. It is computed by taking the exclusive-or (xor) of the values found it the tables below. Each value is only used when the corresponding bit is set to one.UID4 can also be computed by using OPL function CheckUID$.UID1 bit Valuebit 0 0x000045A0bit 1 0x00008B40bit 2 0x000006A1bit 3 0x00000D42bit 4 0x00001A84bit 5 0x00003508bit 6 0x00006A10bit 7 0x0000D420bit 8 0x45A00000bit 9 0x8B400000bit 10 0x06A10000bit 11 0x0D420000bit 12 0x1A840000bit 13 0x35080000bit 14 0x6A100000bit 15 0xD4200000bit 16 0x0000AA51bit 17 0x00004483bit 18 0x00008906bit 19 0x0000022Dbit 20 0x0000045Abit 21 0x000008B4bit 22 0x00001168bit 23 0x000022D0bit 24 0xAA510000bit 25 0x44830000bit 26 0x89060000bit 27 0x022D0000bit 28 0x045A0000bit 29 0x08B40000bit 30 0x11680000bit 31 0x22D00000UID2 bit Valuebit 0 0x000076B4bit 1 0x0000ED68bit 2 0x0000CAF1bit 3 0x000085C3bit 4 0x00001BA7bit 5 0x0000374Ebit 6 0x00006E9Cbit 7 0x0000DD38bit 8 0x76B40000bit 9 0xED680000bit 10 0xCAF10000bit 11 0x85C30000bit 12 0x1BA70000bit 13 0x374E0000bit 14 0x6E9C0000bit 15 0xDD380000bit 16 0x00003730bit 17 0x00006E60bit 18 0x0000DCC0bit 19 0x0000A9A1bit 20 0x00004363bit 21 0x000086C6bit 22 0x00001DADbit 23 0x00003B5Abit 24 0x37300000bit 25 0x6E600000bit 26 0xDCC00000bit 27 0xA9A10000bit 28 0x43630000bit 29 0x86C60000bit 30 0x1DAD0000bit 31 0x3B5A0000UID3 bit Valuebit 0 0x00003331bit 1 0x00006662bit 2 0x0000CCC4bit 3 0x000089A9bit 4 0x00000373bit 5 0x000006E6bit 6 0x00000DCCbit 7 0x00001B98bit 8 0x33310000bit 9 0x66620000bit 10 0xCCC40000bit 11 0x89A90000bit 12 0x03730000bit 13 0x06E60000bit 14 0x0DCC0000bit 15 0x1B980000bit 16 0x00001021bit 17 0x00002042bit 18 0x00004084bit 19 0x00008108bit 20 0x00001231bit 21 0x00002462bit 22 0x000048C4bit 23 0x00009188bit 24 0x10210000bit 25 0x20420000bit 26 0x40840000bit 27 0x81080000bit 28 0x12310000bit 29 0x24620000bit 30 0x48C40000bit 31 0x91880000Ё"Times New Romanа" Courier New а" Courier New а" Courier NewБШV@C╫3/C&T┐; @"ArialЁ"Times New Roman а" Courier NewЁ"Times New Roman а" Courier Newа" Courier New а" Courier Newа" Courier New%а" Courier NewЁ"Times New Roman а" Courier New а" Courier New"Word.app C"yC╫Йвpsiconv-0.9.8/formats/psion/Identifiers.psi0000644000175000017500000001324110010143274015710 000000000000007m■ЯUp╜ Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aэ6[Identifiers][IDs][ID]IdentifiersAt many places. identifiers are used. They are encoded in a long, of which the last byte usually equals 10. Identifiers are assigned by Psion for all kinds of tasks; the central registration of them ensures none are used double.Below is a list of all identifiers I have found.Identifier Location Description37 00 00 10 лHeader Section╗ UID1: лID 10000037 File╗40 00 00 10 лHeader Section╗ UID1: лClip Art File╗41 00 00 10 лClip Art Item╗ лClip Art Item╗ marker42 00 00 10 лHeader Section╗ UID2: лMBM File╗46 00 00 10 лHeader Section╗ UID1: лWorld Data File╗4C 00 00 10 лWord Other Styles╗ Non-removable style4F 00 00 10 лWord Other Styles╗ Removable style50 00 00 10 лHeader Section╗ UID1: лID 10000050 File╗51 00 00 10 лText Layout Section╗ Embedded Object marker52 00 00 10 лSection Table Section╗ лRecord Section╗ offset marker5C 00 00 10 лTextEd Section╗ TextEd Section marker5F 00 00 10 лText Replacement Section╗ Substitution kind: Time or date60 00 00 10 лText Replacement Section╗ Substitution kind: Page nr.61 00 00 10 лText Replacement Section╗ Substitution kind: Nr. of pages62 00 00 10 лText Replacement Section╗ Substitution kind: Filename63 00 00 10 лTextEd Jumptable╗ лText Replacement Section╗ offset marker64 00 00 10 лTextEd Section╗ лText Section╗ marker65 00 00 10 лTextEd Jumptable╗ Unknown offset marker66 00 00 10 лTextEd Section╗ лText Layout Section╗ offset marker6D 00 00 10 лHeader Section╗ UID2: Data file7D 00 00 10 лApplication ID Section╗ Paint.app identifier лSection Table Section╗ лSketch Section╗ offset marker7E 00 00 10 лApplication ID Section╗ RECORD.APP identifier7F 00 00 10 лApplication ID Section╗ Word.app identifier84 00 00 10 лApplication ID Section╗ Agenda.app identifier85 00 00 10 лApplication ID Section╗ TextEd.app identifier лSection Table Section╗ лTextEd Section╗ offset marker86 00 00 10 лApplication ID Section╗ Data.app identifier87 00 00 10 лApplication ID Section╗ Comms.app identifier лSection Table Section╗ Comms Section offset marker88 00 00 10 лApplication ID Section╗ Sheet.app identifier89 00 00 10 лSection Table Section╗ лApplication ID Section╗ offset markerCD 00 00 10 лSection Table Section╗ лPassword Section╗ offset markerFD 00 00 10 лPage Layout Section╗ Page dimensions marker03 01 00 10 лPassword Section╗ Password block marker04 01 00 10 лSection Table Section╗ лWord Styles Section╗ offset marker05 01 00 10 лSection Table Section╗ лText Layout Section╗ offset marker06 01 00 10 лSection Table Section╗ лText Section╗ offset marker0E 01 00 00 лPage Layout Section╗ Page dimension marker1D 01 00 10 лSection Table Section╗ ??? offset marker1F 01 00 10 лSection Table Section╗ лSheet Status Section╗ offset marker21 01 00 10 лSection Table Section╗ лSheet Graph List Section╗ offset marker2A 01 00 00 лEmbedded Object Section╗ лObject Icon Section╗ offset marker42 01 00 10 лSection Table Section╗ лText Layout Section╗ offset marker44 01 00 00 лEmbedded Object Section╗ лSection Table Offset Section╗ offset marker46 01 00 00 лEmbedded Object Section╗ лObject Display Section╗ offset markerA1 01 00 10 лRecord Section╗ ADPCM compression selector43 02 00 10 лSection Table Section╗ лWord Status Section╗ offset markerEA oC 00 10 лApplication ID Section╗ Jotter.app identifier лHeader Section╗ UID3: Jotter filesBE 0E 00 10 лHeader Section╗ UID2: Contacts store fileЁ"Times New Romanа" Courier New а" Courier New а" Courier New а" Courier New а" Courier New; х1%96618629:D6GCGCJ67D0:<;9;;<9:9:LF:7IIB97JNJISM;I;+:! @"ArialЁ"Times New Roman$ а" Courier New а" Courier New8а" Courier New а" Courier New  а" Courier Newа" Courier New а" Courier New!а" Courier New а" Courier New  а" Courier Newа" Courier New а" Courier New  а" Courier Newа" Courier New а" Courier New  а" Courier Newа" Courier New' а" Courier New а" Courier New/а" Courier New а" Courier NewE а" Courier Newа" Courier New а" Courier New/ а" Courier New а" Courier New&а" Courier New а" Courier New  а" Courier Newа" Courier New а" Courier New"Word.app C"yC╜Йcpsiconv-0.9.8/formats/psion/Index.psi0000644000175000017500000000760010010143274014514 000000000000007m■ЯUO# Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AС$[Index]IndexAbout this document лIntroduction╗ лIndex╗ лSubstitutions╗: Creating the HTML linksThe structure of Psion files лFile Structure╗ The лID 10000037 File╗ The лID 10000050 File╗ лEncrypted Sections╗ лEncryption Method╗Data files лClip Art File╗ лMBM File╗ лRecord File╗ лSheet File╗ лSketch File╗ лTextEd File╗ лUserdic File╗ лWord File╗ лWorld Data File╗Main Sections лApplication ID Section╗ лHeader Section╗ лPage Layout Section╗ лPaint Data Section╗ лPassword Section╗ лRecord Section╗ лSection Table Offset Section╗ лSection Table Section╗ лSheet Graph List Section╗ лSheet Status Section╗ лSheet Workbook Section╗ лSketch Section╗ лText Section╗ лTextEd Section╗ лText Layout Section╗ лWord Status Section╗ лWord Styles Section╗Primitive structures лASCII Codes╗ лColors╗ лBasic Elements╗: Byte, Word and Long лFonts╗ лIDs╗: Identifiers лFloats╗: Floating point umbers лLists╗: BListB and other ?List? structures лLengths╗ лOffsets╗ лSheet Cell Block╗ лSheet Cell Layout╗  лSheet Cell Offset╗ лSheet Cell Reference╗ лSheet Date╗ лSheet Number Format╗ лSheet Variable Reference╗ лSInts╗: Signed integers лSizes╗ лStrings╗Intermediate Structures лBorders╗ лBullets╗ лCharacter Layout Codes╗ лCharacter Layout List╗ лClip Art Item╗ лEmbedded Object Section╗ лMBM Jumptable╗ лObject Display Section╗ лObject Icon Section╗ лPage Header╗ лPage Layout Section╗ лParagraph Layout Codes╗ лParagraph Layout List╗ лSheet Cell╗ лSheet Cell List╗ лSheet Formula╗ лSheet Formula Elements╗ лSheet Formula List╗ лSheet Formula Varargs╗ лSheet Graph Axis╗ лSheet Graph Description╗ лSheet Graph Region╗ лSheet Graph Section╗ лSheet Grid Section╗ лSheet Info Section╗ лSheet Line╗ лSheet Line Section╗ лSheet Name Section╗ лSheet Variable╗ лSheet Variable List╗ лSheet Worksheet╗ лSheet Worksheet List╗ лSheet Worksheet List Element╗ лTabs╗ лText Layout Inline List╗ лText Layout Paragraph Types╗ лText Layout Paragraph Type List╗ лText Layout Paragraph Elements╗ лText Layout Paragraph Element List╗ лText Replacement Section╗ лText Substitution Pattern╗ лTextEd Jumptable╗ лWord Normal Style╗ лWord Style Hotkeys╗ лWord Other Styles╗ лWord Style ID╗ лWord Style Trailer╗ лWorld Data City Section╗ лWorld Data Country Section╗Ё Ё Ёt *     ' !-       #"& @"ArialЁ ЁЁ Ё Ё  ЁЁ  Ё Ё Ё Ё Ё Ё  Ё Ё Ё Ё Ё"Word.app C"yC& ЙBpsiconv-0.9.8/formats/psion/Introduction.psi0000644000175000017500000001067710010160376016140 000000000000007m■ЯUОьФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A╒/[Introduction]IntroductionThis is version 2.9 of the Psion 5 data file documentation, dated 20040204.This collection of text files (released both as Psion Word files and as HTML) documents file formats as used by built-in Psion 5 applications. Psion has never released the formats of their saved files, so I had to reverse-engineer them.For those concerned with legalities: I never disassembled or otherwise inspected one single ROM-based Psion application, nor did I use the Psion SDK (Software Development Kit). Instead, I created documents, examined their contents through a hex-editor, modified them, examined them again, etc. until I understood how they were structured and what their contents meant.Because of the way this information is collected, there may be errors in the descriptions. Sometimes I had to make educated guesses or extrapolate about details. Everything was initially figured out with and checked against my own Psion 5, a series 5 R1 with dutch ROM 1.01(145). You can find the version of your own ROM in the System/Information/About Series 5 screen. I have recently upgraded to a series 5MX with UK ROM 1.05(255). Some things may still be called a little differently on an actual UK or US Psion that in this guide, but the this has gotten a lot better compared to previous versions of this documentation.You can send any errors, omissions, translation probems, or comments to frodol@dds.nl. The latest version of this document can always be found through my homepage: http://huizen.dds.nl/Шfrodol/You may use the information in this document in any way you want, as far as permitted by Psion, but I would appreciate an acknowledgement if you do.I would like to thank the following people for their help or input: Andrew Johnson  James  Jwan-Luc Damnet  Daniel Smith (MBM stuff)and especially: Tamas Decsi Version historyVersion Release date Changes2.9 20040204 Minor corrections2.8 20010728 More Sheet documentation2.7 20010311 Sheet documentation almost completed2.6 20001228 Userdic and World Data files documented. Some data on Sheet files (unfinished). Quite a few corrections all-over.2.5 19991204 Clipart files documented. Corrections and fixes.2.4 19990812 Sketch, MFM and Record files documented.2.3 19990724 Objects in word files documented. TextEd files documented.2.2 19990711 Some unknown things filled in, all minor2.1 19990618 Small fixes to make automatic HTML links generation easier2.0 19990618 Completely restructured. This is now a collection of small files. Almost all sections were rewritten.1.3 19990615 Some typo's removed. Start section renamed into status section. Status section much better documented. Some special characters added.1.2 19990614 Added header/footer replacement section1.1 19990613 Some small bugs resolved. Added identifier section.1.0 19990612 New: Page section. All parts of the Word file are now accounted for!0.1 19990610 First release @"Arial Ё"Times New Roman Ё"Times New Roman а" Courier NewЁ"Times New Roman" Lэqq├ХD"'5# '3А?7I7ItФ6BSH Ё"Times New Roman! Ё"Times New Roman Ё"Times New RomanH Ё"Times New Roman  Ё"Times New RomanO Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New а" Courier New"Word.app C"yCў ЙБpsiconv-0.9.8/formats/psion/Layout_Codes.psi0000644000175000017500000002121410010143274016034 000000000000007m■ЯU["йФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Ae_[Layout Codes]Layout CodesThere are two kinds of layout codes: those which always modify a whole pragraph, and those which modify one or more characters. They are always kept strictly separate. A layout code consists of a type byte, followed by one or more modifier bytes. All rcognized codes are listed below.[Paragraph Layout List]Paragraph Layout ListA Paragraph Layout List is a лLListB╗ of лParagraph Layout Codes╗. Paragraph Layout Codes are almost always found in this form.[Paragraph Layout Codes][Paragraph Layout Code]Paragraph Layout CodesAs explained above, a Paragraph Layout Code consists of a type byte, telling what kind of layout code this is, followed by a type-dependent amount of data.Type Size Data Description01 3B лColor╗ Background color02 L , лLength╗ Indent left03 L лLength╗ Indent right04 L лLength╗ (Un)indent first line (length relative to indent left setting)05 B Hor. justify left (00), centre (01), right (02) or full (03)06 B Vert. justify top (00) centre (01) or bottom (02) 07 L лSize╗ Interline distance08 B Interline distance is minimum (00) or exact (01)09 L лSize╗ Line distance before paragraph start0A L лSize╗ Line distance after paragraph end0B B Line distance options: Keep on one page on (01) or off (00)0C B Line distance options: Keep together with on (01) or off (00)0D B Line distance options: On next page on (01) or off (00)0E B Protection vs. single lines on pages disable (01) or enable (00)0F B Wrap data to fill sheet cell limits on (01) or off (00)10 L лLength╗ Distance of borders from text11 9B лBorder╗ Top border12 9B лBorder╗ Bottom border13 9B лBorder╗ Left border14 9B лBorder╗ Right border15 * лBullet╗ Bullets16 L лLength╗ Set standard (left) tabs interval17 5B лTab╗ Set extra tabSome comments. The first line of a paragraph can have a different indentation than the other lines. This indentation length is always relative to the normal indentation, and can be positive (more to the right) or negative (more to the left). Combined with bulltes, things are slightly different (see there).Borders can be made to be drawn beyond the standard margins, by specifying the amount of space between them and the text. This is always a positive value.There always standard tab positions; they are placed at regular interfals as specified. These are always left tabs. Additional tabs can also be specified, but these are always in addition to the standard tab positions.[Borders][Border]BordersThe four possible borders are specified separately, through initial type bytes 11 to 14. The border structure is shown below. Offset Data Description 0000 B Type (see below) 0001 L Thickness (always 01 for types 02 to 06) 0005 лColor╗ Color of border 0008 B Unknown (always 00 or 01 ?) 0009The border type can have the following values: Border Type Description 00 None 01 Solid single line 02 Solid double line 03 Dotted line 04 Dashed line 05 Dotsdashed line 06 Dotdotdashed lineThe thickness can only be defined for solid lines. It is expressed in units of 1/14 point (1/20 decimal), just like лSizes╗ and лLengths╗. The three Unknown bytes may be another color code, or something completely different. The function of the final byte is also unclear.[Bullets][Bullet]BulletsA Bullet description is a лBListB╗. The complete structure is given below, including the initial length byte excluding the initial type byte 15. Offset Data Description 0000 B Size of the remainder of this section in bytes 0001 лSize╗ Font size of bullet in points 0005 B Character used for bullet in лASCII╗ 0006 B Indent after bullet on (01) or off (00) 0007 лColor╗ Color of bullet 0008 лFont╗ Font from which the bullet is taken (always Swiss?)The combination of indents and bullets is somewhat involved. If Indent After Bullet is off, everything works as expected: the bullet is located at the first line indent, and the text starts right after it. If it is on, the bullet is located at the minmum of first line indent and left indent; the text (including the first line) is located at the maximum of first line indent and left indent.[Tabs][Tab]TabsIn addition to the default left tabs, which are found at regular intervals, more tabs can be defined. Each additional tab is specified in its own structure. Below this structure is shown, excluding the initial type byte 17. Offset Data Description 0000 лLength╗ Location of the tab, relative to the left margin 0004 B Tab type (see below) 0005There are three kinds of tabs. They specify the anchoring of the text just after the tab: either the first character, the centre character or the last character. Tab type Kind 1 Left 2 Centre 3 Right[Character Layout List]Character Layout ListA Character Layout List is a лLListB╗ of лCharacter Layout Codes╗. Character Layout Codes are almost always found in this form.[Character Layout Codes][Character Layout Code]Character Layout CodesAs explained above, a Character Layout Code consists of a type byte, telling what kind of layout code this is, followed by a type-dependent amount of data.Type Size Data Description18 B Set ??? on (01) or off (00)19 3B лColor╗ Set text color1A 3B лColor╗ Set ??? color (background?)1B B Set ??? on (01) or off (00). Displayed with black background.1C L лSize╗ Change character point size1D B Italic on (01) or off (00)1E B Bold on (01) or off (001F B Superscript (01) or subscipt (02) or off (00)20 B Underline on (01) or off (00)21 B Strikethrough on (01) or off (00)22 * лFont╗ Change character font23 B Unknown24 B Unknown (5MX only): always 00 ?Some remarks: several of the above codes are sometimes found in Word documents (especially after a clipboard copy from another program), but seem te be ignored by Word. This is more or less true for codes 18, 1A, 1B, 23 and 24. None of them can be generated directly by a Word user.  @"Arial а" Courier NewЁ"Times New Roman а" Courier New Ё"Times New Romanа" Courier NewЁЁ"Times New Roman z А0Ь!OG=";41FHBKB/24Ы█~3&/ С9,/2CЙ р@в   А0Ь&,H+%"8(,%*  Ё"Times New RomanЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman а" Courier New а" Courier New а" Courier NewЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman а" Courier New а" Courier New а" Courier New а" Courier NewO Ё"Times New Roman┴Ё"Times New Roman Ё"Times New Roman Ё"Times New RomanЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman а" Courier New а" Courier New  а" Courier New Ё"Times New Roman  Ё"Times New Roman  Ё"Times New RomanЁ"Times New Roman Ё"Times New RomanЁ"Times New Roman а" Courier New а" Courier New"Word.app C"yC█ЙN"psiconv-0.9.8/formats/psion/MBM_File.psi0000644000175000017500000000312010010143275015011 000000000000007m■ЯU   d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aa [MBM File]MBM FileMBM files are basically (collections of) Sketch files with a few things stripped.MBM files start with a лHeader Section╗ which starts with the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 42 00 00 10 UID2: File kind0008 лID╗ 00 00 00 00 UID3: Application ID000C L 39 64 39 47 UID4: Checksum of UID1, UID2 and UID30010 лOffset╗ лMBM Jumptable╗Note that there is no лSection Table Section╗; a лMBM Jumptable╗ is found instead.[MBM Jumptable]MBM JumptableThis is a лLListL╗ of лOffsets╗ , each to a лPaint Data Section╗. So there is one лOffset╗ for each picture.Ё"Times New Romanа" Courier NewЁ @"ArialЁ  RO3',;!Sm а" Courier Newа" Courier New  ЁЁlЁ"Word.app C"yCЪЙpsiconv-0.9.8/formats/psion/Page_Layout_Section.psi0000644000175000017500000000517510010143275017350 000000000000007m■ЯUL hФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Ay[Page Layout Section]Page Layout SectionThis section describes the general page layout, its headers and its footers.Below the structure of this section is shown. Size Data Description L Page number of first page L лLength╗ Distance of header from the top of the page L лLength╗ Distance of footer from the bottom of the page L лLength╗ Left margin width L лLength╗ Right margin width L лLength╗ Distance of first line from the top of the page L лLength╗ Distance of last line from the bottom of the page лPage Header╗ Header лPage Header╗ Footer L лID╗ Always FD 00 00 10 or 0E 01 00 10 ? L лLength╗ Page width L лLength╗ Page heightMost items are self-explanatory. Of course,the header and footer must fit within the top and bottom margins.[Page Header]Page HeaderBoth header and footer data are as follows. Note that, due to the use of a lot of identifiers, it might be permitted to order the elements slightly different. As it is not clear what kinds of reshufflings are right, I have choosen to just present them in the order found. Size Data Description B Empty section (00) or with content (01) B Header/footer displayed on first page (00) or surpressed (01) 3B Unknown: always 00 00 00 ?(*) лParagraph Layout List╗ Base style definition(*) лCharacter Layout List╗ Base style definition ?(*) лTextEd Section╗If the first byte equals 00, the (*)-marked parts are not present.The base style definition probably defines a sort of Normal style for all text and layout in this section.Ё"Times New Romanа" Courier New а" Courier Newа" Courier NewЁ"Times New RomanЁ#M.!9< =?0m 2H&35Ck @"ArialЁ"Times New Roman  Ё"Times New Roman Ё"Times New Roman"Word.app C"yC Й? psiconv-0.9.8/formats/psion/Paint_Data_Section.psi0000644000175000017500000002363410010143275017143 000000000000007m■ЯUk'з  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A)n[Paint Data Section]Paint Data SectionThis section contains all the data of a picture.NB: the data on colour pictures and non-8 bit RLE encoding is still somewhat fuzzy. Size Description L Size of лPaint Data Section╗ (including this long) L Offset within лPaint Data Section╗ of pixel data. Always 28 00 00 00 ? L X Size of picture in dots L Y Size of picture in dots лLength╗ X Size of the picture in twips. 00 00 00 00 means unspecified. лLength╗ Y Size of the picture in twips. 00 00 00 00 means unspecified. L Number of bits in a dot. Usually 02 00 00 00 L 00 00 00 00 for greyscale pictures, 01 00 00 00 for colour (?) L Always 00 00 00 00 ? L Encoding (see table below) L (CA) Always FF FF FF FF ? L (CA) Always 44 00 00 00 ? Pixel dataThe two longs marked (CA) are only found in a лClip Art File╗. Their use is unknown. They are not included in the size of the section (first long) and the offset of the pixel data (second long): you should add 8 to both of them.There are several ways an image may be encoded: Vlaue Description 00 00 00 00 Plain data 01 00 00 00 8-bit RLE encoding 02 00 00 00 12-bit RLE encoding 03 00 00 00 16-bit RLE encoding 04 00 00 00 24-bit RLE encodingThough all lines have the same length, this length can be a little larger than the picture X size. The remaining padding should be discarded. The length of a line is always a whole number of longs (after RLE decoding).8-bit RLE encoding consists of sequences of marker bytes with data bytes. A marker byte of 00 to 7F means that the next byte should be repeated that many times and once more. A marker byte of 80 to FF means that (100-marker) bytes of data follow.12-bit RLE encoding consists of words. The 4 most significant bits hold the number of repetitions minus 1 of the 12 least significant bits.16-bit RLE and 24-bit RLE are similar to 8-bit RLE. A marker byte of 00 to 7F means that the next pixel (2 resp. 3 bytes) should be repeated that many times and once more. A marker byte of 80 to FF means that (100-marker) pixels (2 resp. 3 bytes each) of data follow.After RLE decoding (or right at the start if this was plain data), you are left with a series of bytes. Depending on the number of bits per pixel, you can get any number of colours. Least significant bits are leftmost pixels, and for colour pictures, blue is usually least significant, green is in the middle, and red is most significant.If the number of bits per pixel equals 2, each byte encodes four pixels. A pixel is two bits wide, and can range from black to invisible: Value Color 0 Black 1 Dark grey 2 Light grey 3 InvisibleIf the number of bits per pixel equals 4, a palette is used for colour images as follows: Value RGB Color 0 00 00 00 Black 1 55 55 55 Dark grey 2 80 00 00 Dark red 3 80 80 00 Dark yellow 4 00 80 00 Dark green 5 FF 00 00 Red 6 00 FF 00 Green 7 FF FF 00 Yellow 8 FF 00 FF Magenta 9 00 FF 00 Blue A 00 FF FF Cyan B 80 00 80 Dark magenta C 00 00 80 Dark blue D 00 80 80 Dark magenta E AA AA AA Light grey F FF FF FF WhitewA 8-bit colour palette as below has been found: Value RGB  00 00 00 00 01 33 00 00 02 66 00 00 03 99 00 00 04 CC 00 00 05 FF 00 00 06 00 33 00 07 33 33 00 08 66 33 00 09 99 33 00 0A CC 33 00 0B FF 33 00 0C 00 66 00 0D 33 66 00 0E 66 66 00 0F 99 66 00 10 CC 66 00 11 FF 66 00 12 00 99 00 13 33 99 00 14 66 99 00 15 99 99 00 16 CC 99 00 17 FF 99 00 18 00 CC 00 19 33 CC 00 1A 66 CC 00 1B 99 CC 00 1C CC CC 00 1D FF CC 00 1E 00 FF 00 1F 33 FF 00 20 66 FF 00 21 99 FF 00 22 CC FF 00 23 FF FF 00 24 00 00 33 25 33 00 33 26 66 00 33 27 99 00 33 28 CC 00 33 29 FF 00 33 2A 00 33 33 2B 33 33 33 2C 66 33 33 2D 99 33 33 2E CC 33 33 2F FF 33 33 30 00 66 33 31 33 66 33 32 66 66 33 33 99 66 33 34 CC 66 33 35 FF 66 33 36 00 99 33 37 33 99 33 38 66 99 33 39 99 99 33 3A CC 99 33 3B FF 99 33 3C 00 CC 33 3D 33 CC 33 3E 66 CC 33 3F 99 CC 33 40 CC CC 33 41 FF CC 33 42 00 FF 33 43 33 FF 33 44 66 FF 33 45 99 FF 33 46 CC FF 33 47 FF FF 33 48 00 00 66 49 33 00 66 4A 66 00 66 4B 99 00 66 4C CC 00 66 4D FF 00 66 4E 00 33 66 4F 33 33 66 50 66 33 66 51 99 33 66 52 CC 33 66 53 FF 33 66 54 00 66 66 55 33 66 66 56 66 66 66 57 99 66 66 58 CC 66 66 59 FF 66 66 5A 00 99 66 5B 33 99 66 5C 66 99 66 5D 99 99 66 5E CC 99 66 5F FF 99 66 60 00 CC 66 61 33 CC 66 62 66 CC 66 63 99 CC 66 64 CC CC 66 65 FF CC 66 66 00 FF 66 67 33 FF 66 68 66 FF 66 69 99 FF 66 6A CC FF 66 6B FF FF 66 6C 11 11 11 6D 22 22 22 6E 44 44 44 6F 55 55 55 70 77 77 77 71 11 00 00 72 22 00 00 73 44 00 00 74 55 00 00 75 77 00 00 76 00 11 00 77 00 22 00 78 00 44 00 79 00 55 00 7A 00 77 00 7B 00 00 11 7C 00 00 22 7D 00 00 44 7E 00 00 55 7F 00 00 77 80 00 00 88 81 00 00 AA 82 00 00 BB 83 00 00 DD 84 00 00 EE 85 00 88 00 86 00 AA 00 87 00 BB 00 88 00 DD 00 89 00 EE 00 8A 88 00 00 8B AA 00 00 8C BB 00 00 8D DD 00 00 8E EE 00 00 8F 88 88 88 90 AA AA AA 91 BB BB BB 92 DD DD DD 93 EE EE EE 94 00 00 99 95 33 00 99 96 66 00 99 97 99 00 99 98 CC 00 99 99 FF 00 99 9A 00 33 99 9B 33 33 99 9C 66 33 99 9D 99 33 99 9E CC 33 99 9F FF 33 99 A0 00 66 99 A1 33 66 99 A2 66 66 99 A3 99 66 99 A4 CC 66 99 A5 FF 66 99 A6 00 99 99 A7 33 99 99 A8 66 99 99 A9 99 99 99 AA CC 99 99 AB FF 99 99 AC 00 CC 99 AD 33 CC 99 AE 66 CC 99 AF 99 CC 99 B0 CC CC 99 B1 FF CC 99 B2 00 FF 99 B3 33 FF 99 B4 66 FF 99 B5 99 FF 99 B6 CC FF 99 B7 FF FF 99 B8 00 00 CC B9 33 00 CC BA 66 00 CC BB 99 00 CC BC CC 00 CC BD FF 00 CC BE 00 33 CC BF 33 33 CC C0 66 33 CC C1 99 33 CC C2 CC 33 CC C3 FF 33 CC C4 00 66 CC C5 33 66 CC C6 66 66 CC C7 99 66 CC C8 CC 66 CC C9 FF 66 CC CA 00 99 CC CB 33 99 CC CC 66 99 CC CD 99 99 CC CE CC 99 CC CF FF 99 CC D0 00 CC CC D1 33 CC CC D2 66 CC CC D3 99 CC CC D4 CC CC CC D5 FF CC CC D6 00 FF CC D7 33 FF CC D8 66 FF CC D9 99 FF CC DA CC FF CC DB FF FF CC DC 00 00 FF DD 33 00 FF DE 66 00 FF DF 99 00 FF E0 CC 00 FF E1 FF 00 FF E2 00 33 FF E3 33 33 FF E4 66 33 FF E5 99 33 FF E6 CC 33 FF E7 FF 33 FF E8 00 66 FF E9 33 66 FF EA 66 66 FF EB 99 66 FF EC CC 66 FF ED FF 66 FF EE 00 99 FF EF 33 99 FF F0 66 99 FF F1 99 99 FF F2 CC 99 FF F3 FF 99 FF F4 00 CC FF F5 33 CC FF F6 66 CC FF F7 99 CC FF F8 CC CC FF F9 FF CC FF FA 00 FF FF FB 33 FF FF FC 66 FF FF FD 99 FF FF FE CC FF FF FF FF FF FFЁа" Courier New Ё"Times New Roman а" Courier NewЁ"Times New Roman;1T8LII2D  ц0!"""█ўМ SК Z0  @"Arialа" Courier NewSЁ"Times New Romanа" Courier Newа" Courier New а" Courier Newа" Courier New/Ёа" Courier Newа" Courier New а" Courier New а" Courier Newа" Courier New!а" Courier NewЁ  а" Courier New а" Courier New а" Courier NewЁ а" Courier New а" Courier New  а" Courier Newа" Courier New"Word.app C"yCМЙ^'psiconv-0.9.8/formats/psion/Password_Section.psi0000644000175000017500000000561110010143275016734 000000000000007m■ЯUX Ы  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A=[Password Section]Password SectionThis sextion is found in documents that have been encrypted with a password. Its contents is not yet fully decoded. It is 29 bytes long. Size Data Description B Always A2 ? W Always 01 00 ? W Checksum ? L лID╗ Always 03 01 00 10 ? 20B Encrypted passwordPresumably, the plaintext password is put through a (one-way?) hash function and the result is put in this section.[Encrypted Sections]Encrypted SectionsIf a file is encrypted by a password, only a few sections will actually be encrypted: Filetype Section ID Section Name лWord File╗ 10000106 лText Section╗ лSheet File╗ 1000011D  10000121 лSheet Graph List Section╗[Encryption Method]Encryption MethodThe plaintext is separated into blocks of 20 bytes. The last block is padded with bytes containing 30. Each block is encypted by adding a 20 byte long key. This key is somehow based on the plaintext password (probably through a similar, though different, hash function as that which is used to encrypt the password), and it is the same for each block. The resulting encryption seems to be fairly weak. For a word file, for example, you can gather a lot of information from the other (unencrypted) sections; for a longer text, this is probably enough to break the encryption key, without ever needing the plaintext password! This could even be automated somewhat: if there is a Paragraph Element List, you know the length of each paragraph; you also know that (almost) all paragraphs end with a 06 byte.Ё " Courier New Ё"Times New Roman а" Courier NewЙ tV$'*a├Ё @"ArialЁ"Times New Roman " Courier New " Courier New Ё"Times New Roman Ё"Times New Roman а" Courier New" а" Courier New а" Courier New а" Courier New а" Courier New ╚" Courier New Ё"Times New Roman Ё"Times New Roman┬Ё"Word.app C"yCЙK psiconv-0.9.8/formats/psion/Record_File.psi0000644000175000017500000000342510010143275015624 000000000000007m■ЯUф║  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aй [Record File]Record FileBoth alarm sounds and normal record files use the same file format.Record files start with a лHeader Section╗ which starts with the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 6D 00 00 10 UID2: File kind0008 лID╗ 7E 00 00 10 UID3: Application ID000C L CF AC 08 55 UID4: Checksum of UID1, UID2 and UID30010 лSection Table Offset Section╗0014The лSection Table Section╗ may contain the following sections, usual in the given order.Identifier Section Always found52 00 00 10 Offset of the лRecord Section╗ Yes89 00 00 10 Offset of the лApplication ID Section╗ YesЁ"Times New Romanа" Courier New а" Courier New а" Courier New DR3',;$Z)28  @"Arial @"ArialЁ"Times New Roman а" Courier Newа" Courier NewYЁ а" Courier New( а" Courier New а" Courier New"Word.app C"yCмЙ╫psiconv-0.9.8/formats/psion/Record_Section.psi0000644000175000017500000000320210010143275016342 000000000000007m■ЯUQrФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AI [Record Section]Record SectionOffset Size Description0000 L Uncompressed data length0004 лID╗ A1 01 00 10 for ADPCM compression, 00 00 00 00 for standard compression0008 W Number of times the sound will be repeated minus 1 (ie 03 for 4 times)000A B Volume setting: from 01 (minimum) to 05 (maximum)000B B Always 00?000C L Time between repeats in millionths of a second (000F4240 for one second)0010 лLListB╗ Sound dataStandard compression uses (about) 8.3 kHz 8 bits sampling. So each byte records a volume.ADPCM compression is a standard that can be looked up elsewhere (OK, this is a cop-out; I will document it at some later time). а" Courier NewЁ Ё"Times New Roman "SP;RZА @"ArialЁ"Times New Roman а" Courier New а" Courier New а" Courier New Ё"Times New Roman Ё"Times New Roman"Word.app C"yCФЙDpsiconv-0.9.8/formats/psion/Section_Table_Offset_Section.psi0000644000175000017500000000223610010143275021153 000000000000007m■ЯUmш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aн[Section Table Offset Section]Section Table Offset SectionThis is a very simple section, found directly after the лHeader Section╗ in an лID 10000037 File╗. It just contains the offset of the лSection Table Section╗.Offset Size Description0000 лOffset╗ Offset of the лSection Table Section╗ЁЁ"Times New RomanЯ5@"Arial@"Arial а" Courier New а" Courier New а" Courier Newа" Courier New"Word.app C"yC-Й`psiconv-0.9.8/formats/psion/Section_Table_Section.psi0000644000175000017500000000436010010143275017645 000000000000007m■ЯU┐Иш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A [Section Table Section]Section Table SectionExcept for the лHeader Section╗, no section starts at a predetermined offset. Instead, this section contains a table with the offsets of all other major sections. What sections are mentioned here depends on the kind of file.This sections consists of one лBListL╗ of pairs of longs: the first long is an лID╗ containing the section identifier, the second is the лOffset╗ within the file.In some cases, a simplified form of this section is found, with just one long in the лBListB╗. This is the offset of the only section in the file, and is not marked by a identifier.Identifier Section52 00 00 10 Offset of the лRecord Section╗7D 00 00 10 Offset of the лSketch Section╗85 00 00 10 Offset of the лTextEd Section╗87 00 00 10 Offset of the Comms Section89 00 00 10 Offset of the лApplication ID Section╗CD 00 00 10 Offset of the лPassword Section╗04 01 00 10 Offset of the лWord Styles Section╗05 01 00 10 Offset of the лPage Layout Section╗06 01 00 10 Offset of the лText Section╗1D 01 00 10 Offset of ??? (Sheet)1F 01 00 10 Offset of the лSheet Status Section╗21 01 00 10 Offset of the лSheet Graph List Section╗43 01 00 10 Offset of the лText Layout Section╗43 02 00 10 Offset of лWord Status Section╗ а" Courier New Ё"Times New RomanЁ"Times New Romanа" Courier Newсг╢,,,)4.11*#261-@"ArialЁ"Times New Roman а" Courier New а" Courier New"Word.app C"yCЙ▓psiconv-0.9.8/formats/psion/Sheet_Basic_Structures.psi0000644000175000017500000001405510010143275020064 000000000000007m■ЯU№шФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A2[Sheet Basic Structures]Sheet Basic StructuresSeveral structures seem specific for the Sheet program.[Sheet Date][Sheet Dates]Sheet DatesA date is encoded as either a лSInt╗ or a лFloat╗. Its integer value is the number of days elapsed since December 31,1899 (day 0), its fractional part encodes the time as fraction of (decimal) 24 hours. So January 1, 1900 midnight would be encoded as 1, while January 1, noon would be encoded as (decimal) 1.5.Internally, sheet dates are treated exactly like numbers, and all numeric operations may be applied to them.[Sheet Cell Offset]Sheet Cell OffsetCell offsets can either be absolute (relative to cell A1) or relative (relative to the current cell). Start End Description 0000 bit 0 0003 bit 5 Offset (number of cells) 0003 bit 6 Relative (0) or absolute (1) offset 0003 bit 7 Positive (0, right/down) or negitive (1, up/left) offset[Sheet Cell Reference]Sheet Cell ReferenceReference a single cell. Data Description лSheet Cell Offset╗ Vertical offset лSheet Cell Offset╗ Horizontal offset B Unknown: (always 00?) (Worksheet number?)[Sheet Cell Block]Sheet Cell BlockReference a block of cells. Data Description лSheet Cell Offset╗ Vertical offset first cell лSheet Cell Offset╗ Horizontal offset first cell B Unknown (always 00?) (Worksheet number?) лSheet Cell Offset╗ Vertical offset last cell лSheet Cell Offset╗ Horizontal offset last cell B Unknown (always 00?) (Worksheet number?)[Sheet Number Format]Sheet Number FormatDetermines how a number is displayed. The number of decimals is not relevant for all formats. Data Description B Always 02? лSheet Number Format Code╗ Number format B Decimals (bit 1 to 7)[Sheet Number Format Code]Sheet Number Format Code code display as 00 general 02 fixed decimal 04 scientific 06 currency 08 percent 0A triads (every 3 digits separated) 0C boolean (true/false) 0E text 10 "d/mm" (eg. 1.3 for March 1) 12 "mm/d" (eg. 3.1 for March 1) 14 "dd/mm/yy" (eg. 01.03.2000) 16 "mm/dd/yy" 18 "yy/mm/dd" 1A "d mmm" (eg. 1 Mar) 1C "d mmm yy" 1E "dd mmm yyyy" 20 "mmm" 22 "monthname" (eg. March) 24 "mmm yy" 26 "monthname yy" 28 "monthname dd, yyyy" 2A "dd.mm.yyyy hh:ii ampm" 2C "dd.mm.yyyy HH:ii" 2E "mm.dd.yyyy hh:ii ampm" 30 "mm.dd.yyyy HH:ii" 32 "yyyy.mm.dd hh:ii ampm" 34 "yyyy.mm.dd HH:ii" 36 "hh:ii ampm" (eg. 1:25pm) 38 "hh:ii:ss ampm" 3A "HH:ii" (eg. 13:25) 3C "HH:ii:ss"[Sheet Cell Layout]Sheet Cell Layout Data Description B Always 02 ? B bit 0: default paragraph layout present (01) or not (00) bit 1: default character layout present (1) or not (00) bit 2: default number format present (1) or not (00)(*) лParagraph Layout List╗ Default paragraph layout(*) лCharacter Layout List╗ Default character layout(*) лSheet Number Format╗ Default number format[Sheet Variable Reference]Sheet Variable ReferenceSheet variables are referenced by number. Each variable in the лSheet Variable List╗ has its own number encoded in it.  Data Description L Variable reference number  Ё"Times New RomanЁ а" Courier Newа" Courier New Ё Ё а" Courier New Ё"Times New Roman Ёa8 7m f04I&(3132022^ -#  ' ""! B@=550 x#5 @"Arial Ё"Times New Roman  Ё"Times New Roman Ё"Times New Roman[ Ё"Times New Roman▄Ё"Times New Roman Ё ЁeЁ а" Courier New а" Courier New а" Courier New а" Courier NewHа" Courier New а" Courier New а" Courier New а" Courier New а" Courier New$ а" Courier New Ё а" Courier New' а" Courier New2 а" Courier NewЁ а" Courier New а" Courier New а" Courier New а" Courier New/ а" Courier New Ё а" Courier New2 а" Courier New а" Courier New. а" Courier New Ё а" Courier New1 а" Courier New Ё а" Courier Newа" Courier New а" Courier Newа" Courier New а" Courier New а" Courier New а" Courier New а" Courier New Ё Ё а" Courier New а" Courier New а" Courier New"Word.app C"yCЙЙяpsiconv-0.9.8/formats/psion/Sheet_Cell_List.psi0000644000175000017500000000652210010143275016452 000000000000007m■ЯU! 5Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AЙ[Sheet Cell List]Sheet Cell ListThis contains a description of all cells in a worksheet. Data Description B unknown, always 02 ? B unknown, always 00 ? XListE List of лSheet Cells╗[Sheet Cell][Sheet Cells]Sheet CellNote that a calculated cell (through a formula) still has its resulting value here. Data Description 3B cell position (see below) B cell flags (see below) ?B cell value (see below)(*) ?B лSheet Cell Layout╗(**) XInt formula reference numberThe cell position is encoded as follows: Begin End Description 0000 bit 0 0000 bit 1 Unknown (always 0 ?) 0000 bit 2 0001 bit 2 Column number (column A = 00) 0001 bit 3 0002 bit 7 Row number (row 1 = 00)The cell flags contains the information below: Begin End Description 0000 bit 0 0000 bit 1 Unknown (always 0 ?) 0000 bit 2 Cell is locked (0) or not (1) when sheet protected 0000 bit 3 Cell is calculated (1) or uncalculated (0) 0000 bit 4 Cell layout is default (0) or specified (1) 0000 bit 5 0000 bit 7 Cell content type (see below)The following lists the content types, with the values corresponding to them. code type value description 0 blank - a blank cell 1 integer лSInt╗ integer value 2 boolean B TRUE (1) / FALSE (0) 3 error W error, see error codes below 4 real лFloat╗ IEEE double precision float 5 string лSListB╗ simple text The following errors are used: code displayed description 0 no error 1 #NULL! ? 2 #DIV/0! division by zero 3 #VALUE! illegal value 4 #REF! ? 5 #NAME! ? 6 #NUM! ? 7 #N/A! not applicable  Ё"Times New Roman @"Arial а" Courier New а" Courier NewЁ"Times New RomanЁ Ё"Times New Romanа" Courier New 79 T!$)-60/-D<=6N"%,.!    8Ё @"ArialS Ё"Times New Roman а" Courier New а" Courier New а" Courier New  а" Courier New а" Courier NewЁ а" Courier New а" Courier NewЁ а" Courier New а" Courier NewMЁ"Times New Roman  а" Courier New а" Courier New а" Courier New а" Courier New"Word.app C"yCdЙ psiconv-0.9.8/formats/psion/Sheet_File.psi0000644000175000017500000000435610010143275015462 000000000000007m■ЯU╜V  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aq[Sheet File]Sheet FileSheet files start with a лHeader Section╗ which starts with the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 6D 00 00 10 UID2: File kind0008 лID╗ 88 00 00 10 UID3: Application ID000C L A8 15 08 55 UID4: Checksum of UID1,2 and 30010The лSection Table Section╗ may contain the following sections, usual in the given order:Identifier Section Always foundCD 00 00 10 Offset of the лPassword Section╗ No1F 01 00 10 Offset of the лSheet Status Section╗ Yes05 01 00 10 Offset of the лPage Layout Section╗ Yes1D 01 00 10 Offset of лSheet Workbook Section╗ Yes21 01 00 10 Offset of the лSheet Graph List Section╗ Yes89 00 00 10 Offset of the лApplication ID Section╗ YesThe лPassword Section╗ is only found in encrypted documents. At least the лSheet Graph List Section╗ is encrypted if it is found.а" Courier New а" Courier New Ё"Times New Romanа" Courier New а" Courier NewЁ  Q3',4Z*3777:9В  @"Arial Ё"Times New Roman  Ё"Times New RomanDЁ"Times New Roman Ё"Times New Roman а" Courier Newа" Courier NewYЁ а" Courier New) а" Courier New а" Courier New8 а" Courier New"Word.app C"yCЮЙ░psiconv-0.9.8/formats/psion/Sheet_Formula_List.psi0000644000175000017500000002023110010143275017171 000000000000007m■ЯUh nФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AEX[Sheet Formula List]Sheet Formula ListAll used formulas are put into this section, and referenced when used. Data Description B Always 02 ? лXListE╗ List of лSheet Formulas╗When referenced, the formula number is counted from the tail of the list: the last entry is referenced as 00, the butlast as 02 etc. (X-numbered?).[Sheet Formula][Sheet Formulas]Sheet FormulaA formula is encoded as an SListB. The formula itself is layed out in memory in Reverse Polish Notation (RPN), and consists of лSheet Formula Elements╗. Formula Lay-out 1-5 1 5 - 1+2╫3 1 2 3 ╫ + sin(10╫3)-4 10 3 ╫ sin 4 - sum(1,2,3) sum 1 2 3 sum[Sheet Formula Element][Sheet Formula Elements]Sheet Formula ElementsEach formula element is identified by a marker, which is optionally followed by more data (for example, an integer is layed out as the marker 20 followed by the four bytes of a лSInt╗).There are a few special markers. Each formula ends with marker 15. Markers 2A and 2B are used to separate the arguments of the var-arg operators (see below).Marker Data following Args Description 01 2 operator < (less than)02 2 operator <= (less than or equals)03 2 operator > (greater than)04 2 operator >= (greater than or equals)05 2 operator <> (not equals)06 2 operator = (equals)07 2 operator + (addition)08 2 operator - (subtraction)09 2 operator * (multiplication)0A 2 operator / (division)0B 2 operator ^ (power)0C 1 operator + (positive prefix)0D 1 operator - (negative prefix)0E 1 operator NOT0F 2 operator AND10 2 operator OR11 2 operator & (string concatenate)12 1 brackets () 131415 0 end-of-formula161718191A1B1C1D1E1F лFloat╗ 0 double precision floating point number (8 bytes)20 лSInt╗ 0 signed integer number (4 bytes)2122232425 Sheet Variable Reference 0 named variable26 BListB 0 text string27 лSheet Cell Reference╗ 0 single cell reference28 лSheet Cell Block╗ 0 cell block reference29 лSheet Cell Block╗ 0 same as 28, but appears within vararg functions2A 0 operand separator within vararg functions2B 0 vararg operand end marker2C 2D2E2F30313233 0 FALSE34 3 IF35 0 TRUE36 2 CELL37 1 ERROR.TYPE38 1 ISBLANK39 1 ISERR3A 1 ISERROR3B 1 ISLOGICAL3C 1 ISNA3D 1 ISNONTEXT3E 1 ISNUMBER3F 1 ISTEXT40 1 N41 1 TYPE42 2 ADDRESS43 1 COLUMN44 1 COLUMNS45 3 HLOOKUP46 3 INDEX47 1 INDIRECT48 3 LOOKUP49 3 OFFSET4A 1 ROW4B 1 ROWS4C 3 VLOOKUP4D 1 CHAR4E 1 CODE4F 2 EXACT50 3 FIND51 2 LEFT52 1 LEN53 1 LOWER54 3 MID55 1 PROPER56 4 REPLACE57 2 REPT58 2 RIGHT59 2 STRING5A 1 T5B 1 TRIM5C 1 UPPER5D 1 VALUE5E 3 DATE5F 1 DATEVALUE60 1 DAY61 1 HOUR62 1 MINUTE63 1 MONTH64 0 NOW65 1 SECOND66 0 TODAY67 3 TIME68 1 TIMEVALUE69 1 YEAR6A 1 ABS6B 1 ACOS6C 1 ASIN6D 1 ATAN6E 2 ATAN26F 1 COS70 1 DEGREES71 1 EXP72 1 FACT73 1 INT74 1 LN75 1 LOG1076 2 MOD77 0 PI78 1 RADIANS79 0 RAND7A 2 ROUND7B 1 SIGN7C 1 SIN7D 1 SQRT7E 2 SUMPRODUCT7F 1 TAN80 1 TRUNC81 3 CTERM82 4 DDB83 3 FV84 2 IRR85 2 NPV86 3 PMT87 3 PV88 3 RATE89 3 SLN8A 4 SYD8B 3 TERM8C 2 COMBIN8D 2 PERMUT8E лSheet Formula Varargs╗ 0 AVERAGE8F лSheet Formula Varargs╗ 0 CHOOSE90 лSheet Formula Varargs╗ 0 COUNT91 лSheet Formula Varargs╗ 0 COUNTA92 лSheet Formula Varargs╗ 0 COUNTBLANK93 лSheet Formula Varargs╗ 0 MAX94 лSheet Formula Varargs╗ 0 MIN95 лSheet Formula Varargs╗ 0 PRODUCT96 лSheet Formula Varargs╗ 0 STDEVP97 лSheet Formula Varargs╗ 0 STDEV98 лSheet Formula Varargs╗ 0 SUM99 лSheet Formula Varargs╗ 0 SUMSQ9A лSheet Formula Varargs╗ 0 VARP9B лSheet Formula Varargs╗ 0 VARIn the above table, args is the number of elements 'popped' from the stack before the result is 'pushed'. As you can see, funtions with a variable number of arguments are handled specially, and never pop previous values.[Sheet Formula Varargs]Sheet Formula VarargsSome operators have a variable number of operands. Each operand in its turn consists of лSheet Formula Elements╗ . The encoding is quite different from that used for normal operators. After the operator marker, the operands follow as formulas (without the initial length encoding and without the final 15 marker), separated by the 2A marker. The last operand is followed by the 2B marker, and after this the operator marker is repeated, followed by a word with the number of parameters. Schematically: Size Description B Operator marker Operand 1 (лSheet Formula Elements╗) B 2A marker Operand 2 (лSheet Formula Elements╗) .... B 2A marker B 2B marker B Operator marker W Number of operands  Ё"Times New Roman а" Courier Newа" Courier NewЁ"Times New RomanЁ Ё а" Courier New  Ё┬G#Ф Щ0║Ю*%0(3'"$'*$!++.D3.50K8('&%&*##'&%#%$#▌° )) ! @"Arial Ё"Times New RomanFЁ"Times New Romanа" Courier New а" Courier New а" Courier NewЁ Ё"Times New Roman Ё"Times New RomanШЁ а" Courier New а" Courier New а" Courier New" Courier NewЁЭЁ а" Courier New а" Courier Newа" Courier New а" Courier New Ё Ё а" Courier New а" Courier New а" Courier New"Word.app C"yCЙ[ psiconv-0.9.8/formats/psion/Sheet_Graph_Description.psi0000644000175000017500000000735610010143275020212 000000000000007m■ЯU╜ Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A1#[Sheet Graph Description]Sheet Graph DescriptionThis section contains additional data about a graph. Data Description B Unknown, always 02 ? B Graph is 2d (00) or 3d (01) L Unknown, always 46 00 00 00 ? L Unknown, always B1 00 00 00 ? L Unknown, always 46 00 00 00 ? L Unknown, always 25 00 00 00 ? L Unknown, always 24 02 00 00 ? L Unknown, always B1 00 00 00 ? L Unknown, always 00 00 00 00 ? L Unknown, always 00 00 00 00 ? L Unknown, always 3A 02 00 00 ? L Unknown, always D7 00 00 00 ? лString╗ Graph label лSheet Graph Axis╗ X axis setting лSheet Graph Axis╗ Y axis setting лColor╗ Text color лColor╗ Axis color лColor╗ Background color B Graph title: font characteristics (see below) 3B 00 00 00Some of the graph title font characteristics are placed in this section; other characteristics are found in the лSheet Graph Section╗. The following characteristics are found here: Bit Meaning 0 Underline 1 Strikeout 2-3 Always 1 ? 4-7 Always 0 ? Sheet Graph Axis[Sheet Graph Axis] Data Description B Visibility flags (see below) 3B Always 00 00 00 ? B Major tick marks: none (03), outside (02), inside (01), both (00) B Minor tick marks: none (03), outside (02), inside (01), both (00) B Unknown (found 00, 01 and 02) B A лSheet Number Format Code╗ shifted right one bit B Number of decimals displayed лString╗ X-Axis label 5B Unknown, always 00 00 00 00 00 ? W Unknown, related to scaling? B Unknown, always 40 ? 5B Unknown, always 00 00 00 00 00 ? W Unknown, lower scale limit? B Unknown, always 40 ? 5B Unknown, always 00 00 00 00 00 ? W Unknown, upper scale limit? B Unknown, always 40 ? 2L Unknown, always 00000000 00000000 ? B Unknown, sub scale step? B Unknown, always 01 ? B Unknown, always 00 ? L X-axis labels start row (row 1 = 00) L X-axis labels start column (column A = 00) L X-axis labels end row (row 1 = 00) L X-axis labels end column (column A = 00)Visibility flags: Bit Meaning 0-1 Always 0 ? 2 Major grid lines on (1) or off (0) 3 Minor grid lines on (1) or off (0) 4 Labels shown (1) or off (0) 5 Always 1 ? 6-7 Always 0 ? @"ArialЁа" Courier NewЁ"Times New Roman а" Courier Newа" Courier New Ё"Times New RomanG5"$$$$$$$$$$##4╡#HH$9#(#("("++1)/''  Ё"Times New Roman @"Arial а" Courier New а" Courier Newа" Courier NewЁ"Times New Roman а" Courier NewЁ"Times New Roman а" Courier New"а" Courier Newа" Courier New"Word.app C"yC╬ Й░psiconv-0.9.8/formats/psion/Sheet_Graph_List_Section.psi0000644000175000017500000000230210010143275020310 000000000000007m■ЯUСщФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A [Sheet Graph List Section]Sheet Graph List SectionThis section contains a list of references to all graphs. Data Description B Always 02 X Total number of graphs X Number of currently displayed graph List of лOffsets╗ for each лSheet Graph Section╗The list is in fact an лXListL╗, except that there is an extra Extra-encoded number added after the length indicator.Ё @"ArialЁ"Times New Roman ╚" Courier New ╚" Courier New :)5vuЁ"Word.app C"yCЕЙДpsiconv-0.9.8/formats/psion/Sheet_Graph_Region.psi0000644000175000017500000000612010010143275017136 000000000000007m■ЯU  Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aэ[Sheet Graph Region]Sheet Graph RegionThis section contains the full description of one graph region. Data Description B Always 02 B Region visible (01) or not (00) L Topmost values row (row 1 = 0) L Leftmost values column (column A = 0) L Bottommost values row (row 1 = 0) L Rightmost values column (column A = 0) L Topmost labels row (row 1 = 0) L Leftmost labels column (column A = 0) L Bottommost labels row (row 1 = 0) L Rightmost labels column (column A = 0) B Label alignment (see below) B Labels: data values (00), defined range (01), none (02) лColor╗ Marking symbol color B Marking symbol type лColor╗ Borderline color B Thickness of connecting line B Connecting line on (01) or off (00) лColor╗ Fill color B Fill pattern (see below) лString╗ Region name The following fill patterns are defined: Value Description 00 solid 01 horizontal lines 02 vertical lines 03 cross lines 04 left diagonal lines 05 right diagonal lines 06 cross diagonal linesLabel alignment can have the following values Value Alignment (relative to marking) 00 above 01 center 02 right 03 below 04 leftMarking symbol type can have the following values Value Alignment (relative to marking) 00 none 01 diagonal cross 02 square 03 diamond 04 cross 05 circleЁ @"Arial а" Courier New Ё"Times New Roman4@&%,(-%,(-">#*) .)    2)   а" Courier New а" Courier New( Ё"Times New Roman а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New - Ё"Times New Roman а" Courier New а" Courier New& а" Courier New а" Courier New а" Courier New 1 Ё"Times New Roman а" Courier New а" Courier New& а" Courier New а" Courier New а" Courier New "Word.app C"yC}Й psiconv-0.9.8/formats/psion/Sheet_Graph_Section.psi0000644000175000017500000000716110010143275017325 000000000000007m■ЯU@&Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aэ [Sheet Graph Section]Sheet Graph SectionThis section contains the full description of one graph. Data Description B Always 02 лOffset╗ Offset of the лSheet Graph Description╗ L Number of regions used (length of list below) L Graph type (see below) List List of лOffsets╗ to each лSheet Graph Region╗ W Always 00/01 00 ? лFont╗ Axis: Font (default: Arial) лSize╗ Axis: Font size B Axis: Font characteristics (see below) 3B Always 00 00 00 (axis colour?) лFont╗ Title: Font (default: Arial) лSize╗ Title: Font size B Title: Font characteristics (see below) 3B Always 00 00 00 (title colour?) B Position of legend (see below) B Always 02 ? L Always 00 00 00 00 ? L Always 00 00 00 00 ? L Always 83 1A 00 00 ? L Always 00 0A 00 00 ? лString╗ Graph titleRegions can be seen as independent graphs that are displayed over each other or are otherwise combined.The following graph types are used: Number Name Region handling 0 line graph (separate line for each region) 1 column graph (separate column for each region) 2 multi-column graph (one column for all regions) 3 bar graph (separate bar for each region) 4 multi-bar graph (one bar for all regions) 5: scatter chart (x-y pairs) 6 pie chart (shows first region only)The list of лOffsets╗ to each лSheet Graph Region╗ is in fact an лLListL╗, except that another long (containing the Graph Type) is between the list length and the list itself.The font characteristics are encoded as below. Note that some of the characteristics are instead found in the лSheet Graph Description╗! Bit Meaning 0 Italics 1 Bold 2 Superscript 3 SubscriptThe three bytes after the font characteristics axis and title byte may well contain the text color for each of them; there seems to be a bug in Sheet which makes it ignore changes to them.The legend position is encoded as follows: Number Location 00 off 01 north-west 02 north 03 north-east 04 east 05 south-east 06 south 07 south-west 08 west 09 centerЁ @"Arial Ё"Times New Roman а" Courier Newа" Courier New а" Courier New99347&-&'.'%h$"36510",░Й  ╜+      Ё"Times New Roman @"Arial а" Courier New а" Courier New а" Courier New ╚" Courier New а" Courier New  а" Courier New а" Courier New+а" Courier New а" Courier NewЁ а" Courier Newа" Courier New а" Courier New"Word.app C"yC= Й3psiconv-0.9.8/formats/psion/Sheet_Grid_Section.psi0000644000175000017500000000546110010143275017152 000000000000007m■ЯU ╪Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AБ[Sheet Grid Section]Sheet Grid Section Data Description B bit 0: show column titles (1) or hide them (0) bit 1: show row titles (1) or hide them (0) bit 2: show vertical grid lines (1) or hide them (0) bit 3: show horizontal grid lines (1) or hide them (0) bit 4,5: unknown (always 1?) bit 6: unknown (always 0?) bit 7: Freeze panes row off (0) or on (1) B bit 0: Freeze panes column off (0) or on (1) other bits: Unknown (found 80 and C0) B unknown (found 90) B bit 2: page break on (0) or off (1) L First (visible) row L first (visible) column L last (visible) row L last (visible) column лLength╗ default row height лXListE╗ list of non-default row height elements (see below) лLength╗ default column width лXListE╗ list of non-default column width elements (see below) W unknown, always 00 00 ? лXListL╗ list of row numbers of rows with page break лXListL╗ list of column numbers of columns with page break 16B 16 unknown bytes (00)(*) L Freeze panes: number of frozen row(*) L Freeze panes: number of frozen column(*) L Freeze panes: first non-frozen row on current display(*) L Freeze panes: first non-frozen column on current display 3B unknown, always FF FF FF ?Items marked with (*) are only present of one of the two freeze pane bits are set.The elements of the XListE of non-default row and column heights are each 2 longs long: Data Description L row or column number лLength╗ row or column height Ё"Times New Roman @"Arial а" Courier Newа" Courier NewЁ Ё"Times New Roman'409;!.2*)>@6<+.>A!SY  а" Courier New а" Courier New= а" Courier New  а" Courier NewX Ё"Times New Roman а" Courier New а" Courier New а" Courier New а" Courier New"Word.app C"yCтЙє psiconv-0.9.8/formats/psion/Sheet_Info_Section.psi0000644000175000017500000000215710010143275017157 000000000000007m■ЯU> Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aс[Sheet Info Section]Sheet Info SectionThis is a very short but relatively badly understood section Data Description B Always 02 ? X Unknown (document version number?) B bit 0: auto recalculation on (1) or off (0), bit 1: always 1 ?  Ё"Times New RomanЁ а" Courier New =(D @"Arial Ё"Times New Roman а" Courier New а" Courier New"Word.app C"yC·Й1psiconv-0.9.8/formats/psion/Sheet_Line_Section.psi0000644000175000017500000000321010010143275017142 000000000000007m■ЯUWи  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A▒[Sheet Line Section]Sheet Line SectionThis section contains all default settings for rows or columns. Cell layouts are based on these defaults, and new cells get these layout defaults. Data Description B Always 02 ? лXListE╗ List of лSheet Lines╗[Sheet Line][Sheet Lines]Sheet LineA cell line is encoded as follows: Size Description X Row or column number лSheet Cell Layout╗ Layout of the cell lineа" Courier New Ё"Times New Romanа" Courier New а" Courier New Ё"Times New Roman У  #/ @"Arial Ё"Times New RomanТЁ"Times New Romanа" Courier New а" Courier New а" Courier NewЁ"Ё а" Courier New а" Courier New. а" Courier New"Word.app C"yCоЙJpsiconv-0.9.8/formats/psion/Sheet_Name_Section.psi0000644000175000017500000000212210010143275017134 000000000000007m■ЯU!РФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AM[Sheet Name Section]Sheet Name SectionThis section contains the name of the Sheet (?) Data Description B Always 02 ? лString╗ Sheet name  Ё"Times New RomanЁ а" Courier New0 @"Arial Ё"Times New Roman а" Courier New а" Courier New а" Courier New Ё Ё"Word.app C"yCХЙpsiconv-0.9.8/formats/psion/Sheet_Status_Section.psi0000644000175000017500000000401010010143275017535 000000000000007m■ЯU╫ДФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aa[Sheet Status Section]Sheet Status SectionThis section, 15 bytes long, contains most Sheet editor settings.0000 B Always 02 ?0001 L Y position cursor0005 L X position cursor0009 B Show sheet (00) or graph (01)000A B Toolbar status bit 0: side sheet toolbar on (1) or off (0) bit 1: top sheet toolbar on (1) or off (0) bit 2: side graph toolbar on (1) or off (0) bit 3: top graph toolbar on (1) or off (0)000B B Scrollbar status bit 0,1: horizontal scrollbar on (0), off (1), auto (2) bit 2,3: vertical scrollbar on (0), off (1), auto (2)000C B Unknown. Always 00?000D L Sheet display size0011 L Graph display size0015The cursor position is counted relative from the upper left cell (which is at location (0,0)).The sheet display size is the size of the characters on the screen, in percents times A (10 decimal) .Lower values mean smaller characters.The graph display size is the size of the graph (mostly its labels) on the screen. "ArialЁ"Times New Romanа" Courier NewЁB&0/0/<:_МS Ё "Arialа" Courier Newаа" Courier Newаа" Courier NewаRЁ"Times New Roman"Word.app C"yC┌Й╩psiconv-0.9.8/formats/psion/Sheet_Variable_List.psi0000644000175000017500000000562510010143275017323 000000000000007m■ЯUd Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aї[Sheet Variable List]Sheet Variable ListAll used variables (names) are put into this section, and referenced when used. Data Description B Always 02 ? лXListE╗ List of лSheet Variables╗[Sheet Variable][Sheet Variables]Sheet VariableA sheet variable is constructed as follows: Size Description лString╗ Variable name B Variable type marker Variable data L Variable reference numberUsed markers and the data after them: Marker Data Description 00 лSInt╗ Integer variable 01 лFloat╗ Floating point variable 02 лString╗ Text variable 03 Reference Cell reference 04 Block Cell blockCell references are always absolute (relative to cell A1).Reference; Data Description B Unknown (always 00?) (Worksheet number?) L Row number (row 1 = 0) L Column number (column A = 0)Block: Data Description B Unknown (always 00?) (Worksheet number?) L Row number first cell (row 1 = 0) L Column number first cell (column A = 0) L Row number last cell (row 1 = 0) L Column number last cell (column A = 0) Ё"Times New Roman а" Courier Newа" Courier NewЁ Ё"Times New Roman(P$", & ' ; /#/(.'- @"Arial Ё"Times New RomanOЁ"Times New Romanа" Courier New а" Courier New а" Courier New!Ё+Ё а" Courier New а" Courier New а" Courier NewЁ а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New Ё"Times New Roman а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New а" Courier New"Word.app C"yC?ЙW psiconv-0.9.8/formats/psion/Sheet_Workbook_Section.psi0000644000175000017500000000271710010143275020063 000000000000007m■ЯUЮГ  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Ae[Sheet Workbook Section]Sheet Workbook SectionOffset Size Description0000 B 02 (no Sheet name offset) or 04 (with Sheet Name offset)0000 лOffset╗ Offset of the лSheet Info Section╗0004 лOffset╗ Offset of the лSheet Formula List╗0008 лOffset╗ Offset of the лSheet Worksheet List╗000C лOffset╗ Offset of the лSheet Variable List╗0010 * лOffset╗ Offset of the лSheet Name Section╗0014The offset to the Sheet Name Section is only present if the first byte is 04. Perhaps this is only used if there are no graphs defined?а" Courier New Ё"Times New Romanа" Courier New C22433И @"Arial Ё"Times New Roman а" Courier Newа" Courier NewЗЁ"Times New Roman"Word.app C"yCЙСpsiconv-0.9.8/formats/psion/Sheet_Worksheet.psi0000644000175000017500000000323510010143275016551 000000000000007m■ЯUl>Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A¤[Sheet Worksheet]Sheet Worksheet Data Description B Always 04 ? B Show zero values (1) or hide them (0) лSheet Cell Layout╗ Default layout лOffset╗ Offset to лSheet Line Section╗ for rows лOffset╗ Offset to лSheet Line Section╗ for columns лOffset╗ Offset to лSheet Cell List╗ лOffset╗ Offset to лSheet Grid Section╗ лOffset╗ Offset to unknown section (see below)There is one section referenced here whose contents seems always to be the same. Its use is unknown.Unknown section: Data Description L Always 00 00 00 00 ? Ё"Times New Roman @"Arial а" Courier Newа" Courier NewЁ/%69*-4e а" Courier New а" Courier New  а" Courier New&а" Courier New3а" Courier New а" Courier New а" Courier New"Word.app C"yCAЙ_psiconv-0.9.8/formats/psion/Sheet_Worksheet_List.psi0000644000175000017500000000373110010143275017545 000000000000007m■ЯUиЮФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aэ [Sheet Worksheet List]Sheet Worksheet ListIt seems likely there can be more than one worksheet in the file format, though there is always only one found (so we have 02 followed by a single лSheet Worksheet List Element╗ instead of a лXListE╗ in actual documents). All cell references at other places always have an unknown byte containing 00 associated with them: this is probably meant to specify the worksheet number. Data Description B Always 02? лXListE╗ A list of лSheet Worksheet List Elements╗[Sheet Worksheet List Element][Sheet Worksheet List Elements]Sheet Worksheet List ElementsAs there is only found one worksheet in this list, the first byte is always 00 in real documents; how it is actually used is just a guess. Data Description B Worksheet number? лOffset╗ Offset of the лSheet Worksheet╗ Ё"Times New Roman а" Courier New @"ArialЁ Ё Ёz4>М* Ф Ё"Times New Romanх Ё Ё"Times New Roman а" Courier New а" Courier NewЁ< ЁЁ а" Courier New а" Courier New) а" Courier New"Word.app C"yC=ЙЫpsiconv-0.9.8/formats/psion/Sketch_File.psi0000644000175000017500000000334010010143275015623 000000000000007m■ЯUп  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞AХ [Sketch File]Sketch FileSketch files start with a лHeader Section╗ which starts with the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 6D 00 00 10 UID2: File kind0008 лID╗ 7D 00 00 10 UID3: Application ID000C L 9C F9 08 55 UID4: Checksum of UID1, UID2 and UID30010 лSection Table Offset Section╗0014The лSection Table Section╗ may contain the following sections, usual in the given order.Identifier Section Always found7D 00 00 10 Offset of the лSketch Section╗ Yes89 00 00 10 Offset of the лApplication ID Section╗ YesЁ"Times New Romanа" Courier New а" Courier NewЁ а" Courier New R3',;$Z)28  @"Arial @"Arial а" Courier Newа" Courier NewYЁ а" Courier New( а" Courier New а" Courier New7 а" Courier New"Word.app C"yCgЙвpsiconv-0.9.8/formats/psion/Sketch_Section.psi0000644000175000017500000000624410010143275016356 000000000000007m■ЯUs НФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A"[Sketch Section]Sketch SectionThis section contains the description of a picture. Its actual data is found in the embedded лPaint Data Section╗.Offset Size Normal Object0000 W X size as displayed0002 W Y size as displayed0004 W X offset of picture within displayed area0006 W Y offset of picture within displayed area0008 W X offset within form (0000 for non-objects)000A W Y offset within form (oo00 for non-objects)000C W X size of form (0000 for non-objects)000E W Y size of form (0000 for non-objects)0010 W Always 00 00?лPaint Data Section╗ W X magnification W Y magnification L Left cut L Right cut L Top cut L Bottom cutA picture is a rectangle which should be displayed. The proper picture is within this rectangle, surrounded by empty space. To keep down the file size, we put a (smaller) rectangle around the picture, and only encode the pixel data within this smaller rectangle. The (larger) rectangle is in its turn put on a (rectangular) form. So we have three rectangles within each other, from large to small: the form, the picture as displayed, and the pixel data.The first eight words encode the locations and sizes of these rectangles in pixel units. The last four words may all be set to zero, to indicate no form rectangle is used. All sizes are given without taking any magnification and cropping into account.The magnification factors determine whether the picture should be compressed or expanded. 03E8 (1000 decimal) is normal size; lower numbers compress, higher numbers expand. So 01F4 would mean halfsize. They just tell how the picture should be displayed, and changing the magnification factor will not change any of the other values. Note that the Sketch program does not read these values; they are only used for sketch objects.The cuts determine whether a portion of the picture should be hidden, on one of its four sides. Cuts are in fractions of C*Size. So 0000 means do no cut, and 0600 would hide half of a picture 0100 dots large. The displayed size (offset 0 and 2) is taken as a basis for this. Note that the Sketch program does not read these values; they are only used for sketch objects.ЁЁ"Times New Romanа" Courier News2254.. ╞№нs @"Arial @"ArialЁ"Times New Roman а" Courier NewЁ"Times New Romanа" Courier NewЁ"Times New Roman"Word.app C"yCЙ Йf psiconv-0.9.8/formats/psion/Substitutions.psi0000644000175000017500000000204210010143275016340 000000000000007m■ЯUёш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A¤[Substitutions]SubstitutionsWhen this Psion Word document is translated to HTML, a special script scans it after the normal translation step, to create HTML code with cross references.Targets are between square brackets and are not displayed.References are between double sharp brackets and are displayed as links.The title of the page is set from the first target name found.Э;I? @"Arial"Word.app C"yCБЙфpsiconv-0.9.8/formats/psion/TextEd_File.psi0000644000175000017500000000353710010143275015607 000000000000007m■ЯU.▒  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aa [TextEd File]TextEd FileThese files are for example used by the internal OPL editor.TextEd files start with a лHeader Section╗ which starts wih the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 6D 00 00 10 UID2: File kind0008 лID╗ 85 00 00 10 UID3: Application ID000C L F4 63 08 55 UID4: Checksum of UID1, UID2 and UID30010 лSection Table Offset Section╗0014The лSection Table Section╗ may contain the following sections, usual in the given order.Identifier Section Always found85 00 00 10 Offset of the лTextEd Section╗ Yes05 01 00 10 Offset of the лPage Layout Section╗ Yes89 00 00 10 Offset of the лApplication ID Section╗ YesЁ"Times New Romanа" Courier New а" Courier NewЁ а" Courier New =Q3',;$Z)268  @"Arial @"ArialЁ"Times New Roman а" Courier Newа" Courier NewYЁ а" Courier New( а" Courier New а" Courier New"Word.app C"yC┌Й!psiconv-0.9.8/formats/psion/TextEd_Section.psi0000644000175000017500000000733510010143275016334 000000000000007m■ЯUмФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞Aq[TextEd Section]TextEd SectionThis section describes a text, with layout codes and other things. It is laid out as a jumptable to auxiliary sections followed by the text itself. L лID╗ Identifier 5C 00 00 10 лTextEd Jumptable╗  L лID╗ Identifier 64 00 00 10 лText Section╗ Text of the header/footerNote that there is a real лText Section╗ at the end, not just an offset to it![TextEd Jumptable]TextEd JumptableThis contains combinations of IDs and offsets of sections. All entries are optional.Identifier Section63 00 00 10 лText Replacement Section╗65 00 00 10 Unknown; always found with offset 00 00 00 00?66 00 00 10 лText Layout Section╗If no лText Layout Section╗ is needed, its лOffset╗ may equal 00 00 00 00, or it may simply be omitted. It is possible this is true for other sections as well.[Text Replacement Section]Text Replacement SectionThis section describes how dynamic elements like the current date and the page number should be substituted.These elements are written fully in the лText Section╗, with their latest expansions. This section determines how they should be updated.This section is a лLListE╗ of the elements below. Note that the last element only consists of the first Long. Size Data Description L Offset of replacement text, counted from the end of the last L Length of the text as appearing in the text section L лID╗ Identifier for kind of substitution L лOffset╗ Offset of the лText Substitution Pattern╗ Identifier Data Notes 5F 00 00 10 Time or date Uses true substitution patterns 60 00 00 10 Page nr. Substitution pattern of length 0 61 00 00 10 Nr. of pages Substitution pattern of length 0 62 00 00 10 Filename No subsitution pattern; offset 0[Text Substitution Pattern]Text Substitution PatternThe substitution patterns are BlistBs. Their encoding is unclear; %*J%:1%T%B is found for times, %D%M%J%/0%1%/1%2%/2%3%/3 for dates.а" Courier NewЁ а" Courier NewЁ"Times New Roman-Ф##,OU(<#аЎnD;.7;9<9ЕЁ"Times New Romanа" Courier New @"ArialЁ"Times New RomanУЁ"Times New Romanа" Courier New+а" Courier NewЁ"Times New RomanЁ"Times New Roman @"Arial Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New Ё ЁЁ а" Courier Newа" Courier New Ё"Times New RomanЁ"Times New RomanBЁ"Times New Roman Ё"Times New RomanЁ"Times New RomanЁ"Times New Roman Ё"Times New Roman"Word.app C"yCЮ ЙЯpsiconv-0.9.8/formats/psion/Text_Layout_Section.psi0000644000175000017500000001413310010143275017412 000000000000007m■ЯU*{  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A9B[Text Layout Section]Text Layout SectionThis section descibes how the text of a лText Section╗ is formatted.There are a couple of levels on which the layout can be expressed. Most global are the styles. If available, they are described in the лWord Styles Section╗, and referenced here. But not each Text Layout Section uses styles.One down is the лText Layout Paragraph Type List╗; it contains a sort of unnamed styles. They are generated automatically.Each paragraph is mentioned in the лText Layout Paragraph Element List╗. It either contains a reference to a лText Layout Paragraph Type╗ or it contains the лParagraph Layout Codes╗ and the number of лCharacter Layout Codes╗ for this paragraph.The whole list of лCharacter Layout Codes╗ is found at the end in the лText Layout Inline List╗. These are the only way in which in-paragraph layouts can be expressed. Data Description W Section with (01 00) or without (00 00) style indicators лText Layout Paragraph Type List╗ лText Layout Paragraph Element List╗ лText Layout Inline List╗If the first word indicates that this is style-less section, the лText Layout Paragraph Type List╗ and the лText Layout Paragraph Element List╗ contain no style references.[Text Layout Paragraph Type List][Text Layout Paragraph Type][Text Layout Paragraph Types]Paragraph Type ListThese are a sort of unnamed styles. They are referenced in the лText Layout Paragraph Element List╗. They are only used for paragraphs whose characters all have the same layout.This is a лBListE╗ of the following Paragraph Type elements: Data Description L Type number лParagraph Layout List╗ Layout codes(*) лWord Style ID╗ Style indicator лCharacter Layout List╗ Layout codesAll Paragraph Type elements have a unique number, as expressed in the Type number. Normally, they are simply numbered from 01 00 00 00 upwards.The Style indicator is only present if this list is part of a лText Layout Section╗ with styles. If so, it expresses a style on which this Paragraph Type is based. Anything not overruled here is taken from that style.[Text Layout Paragraph Element List][Text Layout Paragraph Element][Text Layout Paragraph Elements]Paragraph Element ListThis is a LListE. Each paragraph has an entry here. Data Description L Number of text characters in paragraph B Paragraph type, as in the лText Layout Paragraph Type List╗ (**) лParagraph Layout List╗(*) (**) лWord Style ID╗ Style indicator (**) L Number of лText Layout Inline List╗ elements for this paragraphEach paragraph of the лText Section╗ is mentioned here in order.The number of text characters for a paragraph should concur with the number of characters as found in the лText Section╗The entries marked (**) are only present if the paragraph type is set to 00, meaning it is not based on a лText Layout Paragraph Type╗.The Style indicator is only present if this list is part of a лText Layout Section╗ with styles. If so, it expresses a style on which this Paragraph Element is based. Anything not overruled here is taken from that style.It is forbidden for a paragraph to have exactly one inline element.[Text Layout Inline List]Inline ListThis is a лLListE╗ of the following elements: Data Description B Type: 01 for objects, 00 for normal layout L Number of characters this layout element applies to лCharacter Layout List╗(*) лID╗ Always 51 00 00 10 ?(*) лOffset╗ Offset of лEmbedded Object Section╗(*) лLength╗ Object size horizontal(*) лLength╗ Object size vertical(*) Only for type 01 (objects)For each paragraph that has inline elements at all, it should have enough elements that each character in the paragraph belongs to exactly one element.For the layout list, not specified means back to the default for this paragraph, for italic, bold, super/subscript, strike-out and underline (and probably all other layouts too).The sizes are the size the object will be displayed with. If the object is displayed as an icon, for example, the size of the icon is put here; if it is cropped and/or scaled, the resulting size is found.The sizes found here are the same as those in the лObject Display Section╗. а" Courier New Ё"Times New Roman а" Courier NewЁ"Times New Roman Ё"Times New Roman Ё"Times New Roman?Eс{їиB#&о[▓='''Р┌d4.C*KAyИ▌D .4=#5(&Ш│═L @"ArialЁ"Times New Roman Ё"Times New Roman Ё"Times New Roman▒ Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier Newc Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier NewJ а" Courier New Ё"Times New Roman  Ё"Times New Roman Ё"Times New Roman а" Courier New а" Courier New а" Courier NewK Ё"Times New Roman"Word.app C"yCРЙpsiconv-0.9.8/formats/psion/Text_Section.psi0000644000175000017500000000152710010143275016060 000000000000007m■ЯU&ш d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A╥[Text Section]Text SectionA text setion simply contains plain text. It is a лXListB╗ of лASCII Codes╗.Ё"Times New Roman M @"ArialЁ"Times New RomanLЁ"Times New Roman"Word.app C"yCjЙpsiconv-0.9.8/formats/psion/Userdic_File.psi0000644000175000017500000000307610010143275016006 000000000000007m■ЯU Ьш d╚"Times New RomanN123&Heading 1L"Times New Roman Ё < &Heading 2LЁ"Times New Roman Ё < &Heading 3L    h3r h3r ╨╨аа\c√efd\c0ef8d¤В.╞Aх [Userdic File]Userdic FileThe userdic file contains the words a user has added to his personal spelling dictionary. It is used by the Spell program. This file is always located in System/Data and called User.dic.The userdic file is a simple ASCII file. As each Psion ASCII files, it consists of a sequence of lines; each line is terminated by the carriage return linefeed (0D 0A).The first line of the file contains a special header; after this, each word is on a single line.The header is reproduced below; as far as known, it is always exactly the same. The first line contains 24 (36 decimal) characters, followed by the carriage return linefeed pair.#HEADERSTART#1#16#0#0#=#HEADEREND#Ё @"Arial ╗йa│% ЪЁ"Times New Roman Ё"Times New Roman Ё"Times New RomanЁ"Times New RomanЁ"Times New Roman▓Ё$ а" Courier New"Word.app C"eьCзЙpsiconv-0.9.8/formats/psion/Word_File.psi0000644000175000017500000000445410010143275015324 000000000000007m■ЯU√p  d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A[Word File]Word FileWord files start with a лHeader Section╗ which starts with the following codes:Offset Size Data Description0000 лID╗ 37 00 00 10 UID1: Header Section layout0004 лID╗ 6D 00 00 10 UID2: File kind0008 лID╗ 7F 00 00 10 UID3: Application ID000C L FE 9F 08 55 UID4: Checksum of UID1, UID2 and UID 30010 лSection Table Offset Section╗0014The лSection Table Section╗ may contain the following sections, usual in the given order.Identifier Section Always foundCD 00 00 10 Offset of the лPassword Section╗ No43 02 00 10 Offset of лWord Status Section╗ Yes04 01 00 10 Offset of the лWord Styles Section╗ Yes05 01 00 10 Offset of the лPage Layout Section╗ Yes06 01 00 10 Offset of the лText Section╗ Yes43 01 00 10 Offset of the лText Layout Section╗ No89 00 00 10 Offset of the лApplication ID Section╗ YesThe лPassword Section╗ is only found in encrypted documents. Only the лText Section╗ is actually encrypted if it is found.If a лText Layout Section╗ is not present, all text defaults to style Normal with no futher layout.Ё"Times New Romanа" Courier New а" Courier NewЁ а" Courier New Ё"Times New Roman  P3',<$Z)2366058{d @"ArialЁ"Times New Roman а" Courier Newа" Courier NewYЁ а" Courier New( а" Courier New а" Courier New`Ё"Times New RomanЁ"Word.app C"yCFЙюpsiconv-0.9.8/formats/psion/Word_Status_Section.psi0000644000175000017500000000371310010143275017411 000000000000007m■ЯUЪpФ d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A┘[Word Status Section]Word Status SectionThis section contains most Word editor settings. Offset Data Description0000 B Unknown: Always 02 ?0001 B Display flags bit 0: Show tabs (1=on, 0=off) bit 1: Show spaces (1=on, 0=off) bit 2: Show paragraph ends (1=on, 0=off) bit 3: Show line breaks (1=on, 0=off) bit 5: Show hard minus (1=on, 0=off) bit 6: Show hard spaces (1=on, 0=off)0002 B Display flags bit 0: Show full picture objects (1) or iconify them (0) bit 1: Show full graph objects (1) or iconify them (0)0003 B Show top toolbar (01) or hide it (00)0004 B Show side toolbar (01) or hide it (00)0005 B Operational flags: bit 3: move words to fit on screen (1) or to correspond to page settings (0)0006 L Offset of cursor000A L Display size000EThe offset of the cursor is counted from the start of the лText Section╗.The display size is the size of the characters on the screen, in percents times A (10 decimal) .Lower values mean smaller characters.а" Courier NewЁ"Times New RomanЁ"Times New Roman2#%-*)*=;./QJЖ @"ArialЁ"Times New Roman а" Courier Newа" Courier New"Word.app C"yC°ЙНpsiconv-0.9.8/formats/psion/Word_Styles_Section.psi0000644000175000017500000001130710010143275017407 000000000000007m■ЯUЦ· Ф d╚"Times New RomanN123O*Koptekst 1L Ё < *Koptekst 2LЁ Ё < *Koptekst 3L *OpsomtekenO│ХSwiss    h3r h3r ╨╨аа\cefd\cDefLd¤В.╞A )[Word Styles Section]Word Styles SectionThis section contains data about the styles used, both internal default styles and user-defined ones. It consists of the following parts: лWord Normal Style╗ лWord Style Hotkeys╗ лWord Other Styles╗ лWord Style Trailer╗[Word Normal Style]Normal StyleThe normal style definition is special. All other styles are based upon it (though there seem to be hooks to allow other base styles). It is structered as follows: Data Description лParagraph Layout List╗ Style layout: paragraph codes part лCharacter Layout List╗ Style layout: character codes part L HotkeyThe hotkey contains an лASCII╗ character encoded in a long. That means that all but the first byte of the long always equal 00.[Word Style Hotkeys]HotkeysNow follow all the hotkeys used to call up the styles quickly. This is a лBListL╗ of hotkeys. Each hotkey is an лASCII╗ character encoded in a long. That means that all but the first byte of the long always equal 00.The hotkeys are given in the same order as the styles in the лWord Other Styles╗ section. The amount of hotkeys given here and the amount of styles are always equal.If no hotkey is defined for a style, a value of 00 00 00 00 is used instead.[Word Other Styles]Other StylesThis section contains the definitions of all styles, excluding the Normal style, which is defined in the лWord Normal Style╗ section.The hotkeys are given in the same order as the hotkeys in the лWord Style Hotkeys╗ section. The amount of styles given here and the amount of hotkeys are always equal.This is a лBListE╗ of the following elements: Data Description лString╗ Style name лID╗ Style kind ID  L Outline level (5MX only; 00 00 00 00 for others) лCharacter Layout List╗ Style layout: character codes part лParagraph Layout List╗ Style layout: paragraph codes partTwo kind of IDs are found: 4C 00 00 10 for default styles that can not be removed, and 4F 00 00 10 for other, removable styles.[Word Style ID]Style IDsStyles are numbered from FF down, in the order they are defined in the лWord Other Styles╗ section. The normal style, as defined in thee лWord Normal Style╗ section, always has number 00.The Word Style ID is a Byte containing this number.If you use the default Word template file, you will have the non-removable styles below:  Style ID Style Name 00 Normal FF Header 1 FE Header 2 FD Header 3[Word Style Trailer]Style TrailerFor each defined style,excluding the normal style, a FF byte appears at the end of the styles section. Their meaning is unknown.Ё"Times New Roman Ё"Times New Romanа" Courier New а" Courier NewЁ"Times New Roman а" Courier New:К д==А┌зM Зи.;==А ╝4Y Б @"ArialЁ"Times New Romanа" Courier NewЁ"Times New Roman  Ё"Times New RomanЁ"Times New Romanа" Courier New а" Courier New а" Courier Newа" Courier New Ё"Times New RomanЁ"Times New RomanLЁ"Times New Romanа" Courier New  Ё"Times New RomanЁ"Times New Romanа" Courier New а" Courier New а" Courier Newа" Courier New  Ё"Times New Roman Ё"Times New Roman╗ Ё"Times New RomanЁ"Times New Roman а" Courier New а" Courier New  Ё"Times New Roman Ё"Times New RomanАЁ"Word.app C"yCE ЙЙpsiconv-0.9.8/formats/psion/World_Data_File.psi0000644000175000017500000001021510010143275016421 000000000000007m■ЯU\S  d╚"Times New RomanN123&Heading 1L"Times New Roman Ё < &Heading 2LЁ"Times New Roman Ё < &Heading 3L    h3r h3r ╨╨аа\c√efd\c0ef8d¤В.╞AБ#[World Data File]World Data FileThis file is used by the Time program to save data about new or modified countries and cities. It is usually located in C:\System\Data and called WLD_DATA.DBW.Note that simply changing this file does not change the data within the Time program; a soft reset should do the trick, though.The World Data File starts with a лHeader Section╗ which contains:Offset Size Data Description0000 лID╗ 46 00 00 10 UID1: World Data File0004 лID╗ 00 00 00 00 UID2: Unused0008 лID╗ 00 00 00 00 UID3: Unused000C L F1 E7 5A 04 UID4: Checksum of UID1, UID2 and UID30010The remaining file is structured as follows:Size Data DescriptionL 01 00 00 00 Marker to start the city sectionLListE лWorld Data City Section╗L 00 00 00 00 Marker to start the country sectionLListE лWorld Data Country Section╗[World Data City Section]World Data City SectionThis is an LListE.City section elements are structured as follows:Size DescriptionлString╗ New city nameлString╗ New country nameлString╗ Original city name (empty string if this is a new city)лString╗ Original country name (empty string if this is a new city)8B City dataлString╗ Area codeThe city data is very compact, probably to save space:Start End Description0000 bit 0 0001 bit 0 Horizontal map position (left=000, right=17b)0001 bit 1 0001 bit 2 Unused?0001 bit 3 0002 bit 7 Latitude in minutes (South is negative)0003 bit 0 0003 bit 7 Vertical map position (top=00, bottom=cf)0004 bit 0 0005 bit 6 Longitude in minutes (East is negative)0005 bit 7 0007 bit 1 GMT offset in minutes0007 bit 2 0007 bit 3 Summertime zone (0=none,1=europe, 2=northern, 3=southern)0007 bit 4 0007 bit 7 Unused?Longitude, Latitude and GMT offsets are encoded as лSigned Integers╗,[World Data Country Section]World Data Country SectionThis is an LListE.Note that if you change the name of a country, all its cities are also put into the лWorld Data City Section╗.Country section elements are structured as follows:Size DescriptionлString╗ New capital city nameлString╗ New country nameлString╗ Original country name (empty string if this is a new country)лString╗ National codeлString╗ National prefixлString╗ International prefixЁЁ"Times New Romanа" Courier New а" Courier New а" Courier New-   ! а" Courier New$#8аАC-$$;-1%4(1BE7D>@>,PGo4 H @"ArialЁ"Times New Roman а" Courier Newа" Courier New а" Courier Newа" Courier New Ё"Times New RomanЁ"Times New Roman а" Courier Newа" Courier New-   ! а" Courier New$#-   ! а" Courier New$#-   ! а" Courier New$#E1   ! Ё"Times New Roman$#а" Courier New Ё"Times New RomanЁ"Times New Roman  а" Courier Newа" Courier New  а" Courier Newа" Courier New  а" Courier Newа" Courier New"Word.app C"eьC╬ ЙOpsiconv-0.9.8/formats/Makefile.am0000644000175000017500000000603510016376451013650 00000000000000GENERATE = psion/Application_ID_Section.psi \ psion/ASCII_Codes.psi \ psion/Basic_Elements.psi \ psion/Basic_Structures.psi \ psion/Clip_Art_File.psi \ psion/Embedded_Object_Section.psi \ psion/File_Structure.psi \ psion/Fonts.psi \ psion/Header_Section.psi \ psion/Identifiers.psi \ psion/Index.psi \ psion/Introduction.psi \ psion/Layout_Codes.psi \ psion/MBM_File.psi \ psion/Page_Layout_Section.psi \ psion/Paint_Data_Section.psi \ psion/Password_Section.psi \ psion/Record_File.psi \ psion/Record_Section.psi \ psion/Section_Table_Offset_Section.psi \ psion/Section_Table_Section.psi \ psion/Sheet_Basic_Structures.psi \ psion/Sheet_Cell_List.psi \ psion/Sheet_File.psi \ psion/Sheet_Formula_List.psi \ psion/Sheet_Graph_Description.psi \ psion/Sheet_Graph_List_Section.psi \ psion/Sheet_Graph_Region.psi \ psion/Sheet_Graph_Section.psi \ psion/Sheet_Grid_Section.psi \ psion/Sheet_Info_Section.psi \ psion/Sheet_Line_Section.psi \ psion/Sheet_Name_Section.psi \ psion/Sheet_Status_Section.psi \ psion/Sheet_Variable_List.psi \ psion/Sheet_Workbook_Section.psi \ psion/Sheet_Worksheet.psi \ psion/Sheet_Worksheet_List.psi \ psion/Sketch_File.psi \ psion/Sketch_Section.psi \ psion/Substitutions.psi \ psion/TextEd_File.psi \ psion/TextEd_Section.psi \ psion/Text_Layout_Section.psi \ psion/Text_Section.psi \ psion/Userdic_File.psi \ psion/Word_File.psi \ psion/Word_Status_Section.psi \ psion/Word_Styles_Section.psi \ psion/World_Data_File.psi EXTRA_DIST=$(GENERATE) generate_ascii.sh generate_xhtml.sh generate_html4.sh \ html4_links.sh xhtml_links.sh index_html.sh psiconv.conf nobase_pkgdata_DATA=$(XHTMLDOCFILES) $(HTML4DOCFILES) $(ASCIIDOCFILES) \ $(PSIONFILES) all-local: .touch-xhtml .touch-html4 .touch-ascii PSIONFILES=$(GENERATE) .touch-xhtml: $(GENERATE) if XHTMLDOCS rm -rf xhtml mkdir xhtml ./generate_xhtml.sh .. xhtml $(GENERATE) touch .touch-xhtml XHTMLDOCFILES=$(patsubst %.psi,%.html,$(patsubst psion/%,xhtml/%,$(GENERATE))) $(XHTMLDOCFILES): .touch-xhtml endif .touch-html4: $(GENERATE) if HTML4DOCS rm -rf html4 mkdir html4 ./generate_html4.sh .. html4 $(GENERATE) touch .touch-html4 HTML4DOCFILES=$(patsubst %.psi,%.html,$(patsubst psion/%,html4/%,$(GENERATE))) $(HTML4DOCFILES): .touch-html4 endif .touch-ascii: $(GENERATE) if ASCIIDOCS rm -rf ascii mkdir ascii ./generate_ascii.sh .. ascii $(GENERATE) touch .touch-ascii ASCIIDOCFILES=$(patsubst %.psi,%.ascii,$(patsubst psion/%,ascii/%,$(GENERATE))) $(ASCIIDOCFILES): .touch-ascii endif clean-local: rm -rf xhtml html4 ascii .touch-* psiconv-0.9.8/formats/Makefile.in0000664000175000017500000003213210336413006013651 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = formats DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(pkgdatadir)" nobase_pkgdataDATA_INSTALL = $(install_sh_DATA) DATA = $(nobase_pkgdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ GENERATE = psion/Application_ID_Section.psi \ psion/ASCII_Codes.psi \ psion/Basic_Elements.psi \ psion/Basic_Structures.psi \ psion/Clip_Art_File.psi \ psion/Embedded_Object_Section.psi \ psion/File_Structure.psi \ psion/Fonts.psi \ psion/Header_Section.psi \ psion/Identifiers.psi \ psion/Index.psi \ psion/Introduction.psi \ psion/Layout_Codes.psi \ psion/MBM_File.psi \ psion/Page_Layout_Section.psi \ psion/Paint_Data_Section.psi \ psion/Password_Section.psi \ psion/Record_File.psi \ psion/Record_Section.psi \ psion/Section_Table_Offset_Section.psi \ psion/Section_Table_Section.psi \ psion/Sheet_Basic_Structures.psi \ psion/Sheet_Cell_List.psi \ psion/Sheet_File.psi \ psion/Sheet_Formula_List.psi \ psion/Sheet_Graph_Description.psi \ psion/Sheet_Graph_List_Section.psi \ psion/Sheet_Graph_Region.psi \ psion/Sheet_Graph_Section.psi \ psion/Sheet_Grid_Section.psi \ psion/Sheet_Info_Section.psi \ psion/Sheet_Line_Section.psi \ psion/Sheet_Name_Section.psi \ psion/Sheet_Status_Section.psi \ psion/Sheet_Variable_List.psi \ psion/Sheet_Workbook_Section.psi \ psion/Sheet_Worksheet.psi \ psion/Sheet_Worksheet_List.psi \ psion/Sketch_File.psi \ psion/Sketch_Section.psi \ psion/Substitutions.psi \ psion/TextEd_File.psi \ psion/TextEd_Section.psi \ psion/Text_Layout_Section.psi \ psion/Text_Section.psi \ psion/Userdic_File.psi \ psion/Word_File.psi \ psion/Word_Status_Section.psi \ psion/Word_Styles_Section.psi \ psion/World_Data_File.psi EXTRA_DIST = $(GENERATE) generate_ascii.sh generate_xhtml.sh generate_html4.sh \ html4_links.sh xhtml_links.sh index_html.sh psiconv.conf nobase_pkgdata_DATA = $(XHTMLDOCFILES) $(HTML4DOCFILES) $(ASCIIDOCFILES) \ $(PSIONFILES) PSIONFILES = $(GENERATE) @XHTMLDOCS_TRUE@XHTMLDOCFILES = $(patsubst %.psi,%.html,$(patsubst psion/%,xhtml/%,$(GENERATE))) @HTML4DOCS_TRUE@HTML4DOCFILES = $(patsubst %.psi,%.html,$(patsubst psion/%,html4/%,$(GENERATE))) @ASCIIDOCS_TRUE@ASCIIDOCFILES = $(patsubst %.psi,%.ascii,$(patsubst psion/%,ascii/%,$(GENERATE))) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu formats/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu formats/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-nobase_pkgdataDATA: $(nobase_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(nobase_pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; \ echo " $(nobase_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(nobase_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-nobase_pkgdataDATA: @$(NORMAL_UNINSTALL) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(nobase_pkgdata_DATA)'; for p in $$list; do \ case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/psion @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nobase_pkgdataDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-nobase_pkgdataDATA .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-nobase_pkgdataDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am uninstall-nobase_pkgdataDATA all-local: .touch-xhtml .touch-html4 .touch-ascii .touch-xhtml: $(GENERATE) @XHTMLDOCS_TRUE@ rm -rf xhtml @XHTMLDOCS_TRUE@ mkdir xhtml @XHTMLDOCS_TRUE@ ./generate_xhtml.sh .. xhtml $(GENERATE) @XHTMLDOCS_TRUE@ touch .touch-xhtml @XHTMLDOCS_TRUE@$(XHTMLDOCFILES): .touch-xhtml .touch-html4: $(GENERATE) @HTML4DOCS_TRUE@ rm -rf html4 @HTML4DOCS_TRUE@ mkdir html4 @HTML4DOCS_TRUE@ ./generate_html4.sh .. html4 $(GENERATE) @HTML4DOCS_TRUE@ touch .touch-html4 @HTML4DOCS_TRUE@$(HTML4DOCFILES): .touch-html4 .touch-ascii: $(GENERATE) @ASCIIDOCS_TRUE@ rm -rf ascii @ASCIIDOCS_TRUE@ mkdir ascii @ASCIIDOCS_TRUE@ ./generate_ascii.sh .. ascii $(GENERATE) @ASCIIDOCS_TRUE@ touch .touch-ascii @ASCIIDOCS_TRUE@$(ASCIIDOCFILES): .touch-ascii clean-local: rm -rf xhtml html4 ascii .touch-* # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/formats/generate_ascii.sh0000755000175000017500000000073610016435001015102 00000000000000#! /bin/sh echo "Generating ascii docs..." basedir="$1" outputdir="$2" shift shift libtool="$basedir/libtool" psiconv="$basedir/program/psiconv/psiconv" config="$basedir/formats/psiconv.conf" for file in "$@"; do echo "Going to process $file..." outputfile=$outputdir/`basename $file|sed s,'.psi$','.ascii',` echo $libtool --mode=execute $psiconv -c $config -o $outputfile -Tascii $file $libtool --mode=execute $psiconv -c $config -o $outputfile -Tascii $file done psiconv-0.9.8/formats/generate_xhtml.sh0000755000175000017500000000313410016376701015154 00000000000000#! /bin/sh # Work around a BASH bug (prints a directory even in a non-interactive shell) unset CDPATH if test "$#" -lt 3 ; then echo "Syntax: $0 psiconv_dir output_dir files..." exit 1 fi if ! test -d "$1"/program/psiconv ; then echo "First parameter should be base psiconv directory!" exit 1 fi basedir=`cd $1; pwd` if ! test -d "$2" ; then echo "Output directory does not exist!" exit 1 fi outputdir=`cd $2; pwd` shift shift echo "Generating xhtml docs..." libtool=$basedir/libtool psiconv=$basedir/program/psiconv/psiconv indexfile=$outputdir/index tempdir=$outputdir/.temp mkindex=$basedir/formats/index_html.sh index=$tempdir/index mkdef=$basedir/formats/xhtml_links.sh config="$basedir/formats/psiconv.conf" echo "Going to create the intermediate files..." rm -rf $tempdir mkdir $tempdir for file in "$@"; do echo "Going to process $file..." outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` echo $libtool --mode=execute $psiconv -c $config -o $outputfile -Txhtml -eASCII $file $libtool --mode=execute $psiconv -c $config -o $outputfile -Txhtml -eASCII $file done echo "Going to produce the index..." ( cd $tempdir files= for file in "$@"; do files="$files `basename $file|sed s,'.psi$','.html',`" done $mkindex $index $files ) echo "Going to produce the final files..." for file in "$@"; do echo "Going to process $file..." inputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` outputfile=$outputdir/`basename $file|sed s,'.psi$','.html,'` rm -f $outputfile echo $mkdef $index $inputfile \> $outputfile $mkdef $index $inputfile > $outputfile done psiconv-0.9.8/formats/generate_html4.sh0000754000175000017500000000313410044273416015047 00000000000000#! /bin/sh # Work around a BASH bug (prints a directory even in a non-interactive shell) unset CDPATH if test "$#" -lt 3 ; then echo "Syntax: $0 psiconv_dir output_dir files..." exit 1 fi if test ! -d "$1"/program/psiconv ; then echo "First parameter should be base psiconv directory!" exit 1 fi basedir=`cd $1; pwd` if test ! -d "$2" ; then echo "Output directory does not exist!" exit 1 fi outputdir=`cd $2; pwd` shift shift echo "Generating html4 docs..." libtool=$basedir/libtool psiconv=$basedir/program/psiconv/psiconv indexfile=$outputdir/index tempdir=$outputdir/.temp mkindex=$basedir/formats/index_html.sh index=$tempdir/index mkdef=$basedir/formats/html4_links.sh config="$basedir/formats/psiconv.conf" echo "Going to create the intermediate files..." rm -rf $tempdir mkdir $tempdir for file in "$@"; do echo "Going to process $file..." outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` echo $libtool --mode=execute $psiconv -c $config -o $outputfile -Thtml4 -eASCII $file $libtool --mode=execute $psiconv -c $config -o $outputfile -Thtml4 -eASCII $file done echo "Going to produce the index..." ( cd $tempdir files= for file in "$@"; do files="$files `basename $file|sed s,'.psi$','.html',`" done $mkindex $index $files ) echo "Going to produce the final files..." for file in "$@"; do echo "Going to process $file..." inputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` outputfile=$outputdir/`basename $file|sed s,'.psi$','.html,'` rm -f $outputfile echo $mkdef $index $inputfile \> $outputfile $mkdef $index $inputfile > $outputfile done psiconv-0.9.8/formats/html4_links.sh0000755000175000017500000000142510044274620014375 00000000000000#! /bin/sh compute_command_line() { index_file="$1" printf "sed " while read file lineno name; do printf "%s %s " -e \''s,\['"$name"'\],,g'\' printf "%s %s " -e \''s,«'"$name"'»,'"$name"',g'\' done < "$index_file" } generate_links() { command=`compute_command_line "$1"` #echo $command eval "$command" } generate_headers() { index_file_generate_headers="$1" this_file_generate_headers=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'` name_generate_headers=`grep "^$this_file_generate_headers" "$index_file_generate_headers" | head -1 | sed s,'^[^ ]* [^ ]* ,,'` sed -e 's,.*,'"$name_generate_headers"',' } cat "$2" | generate_links "$1" | generate_headers "$1" "$2" psiconv-0.9.8/formats/xhtml_links.sh0000755000175000017500000000145010010152637014473 00000000000000#! /bin/sh generate_links() { #local index_file name file lineno index_file="$1" command='sed ' { while read file lineno name; do command="$command -e "\''s,\['"$name"'\],,g'\' command="$command -e "\''s,«'"$name"'»,'"$name"',g'\' done } < "$index_file" eval "$command" } generate_headers() { # local index_file name this_file index_file_generate_headers="$1" this_file_generate_headers=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'` name_generate_headers=`grep "^$this_file_generate_headers" "$index_file_generate_headers" | head -1 | sed s,'^[^ ]* [^ ]* ,,'` sed -e 's,.*,'"$name_generate_headers"',' } cat "$2" | generate_links "$1" | generate_headers "$1" "$2" psiconv-0.9.8/formats/index_html.sh0000754000175000017500000000175610044273417014311 00000000000000#! /bin/sh make_targets_file() { # local file line line_nr error targets_file files targets_file="$1" shift files="$@" printf "" > "$targets_file" for file in $files; do ( line_nr=1 while read line; do error=0 while [ $error -eq 0 ] && echo $line | grep '\[' >/dev/null ; do if echo $line | grep '\[.*\]' >/dev/null; then printf "%s %s " "$file" "$line_nr" >> "$targets_file" echo $line | sed -e 's,^[^\[]*\[,,' -e 's,\].*$,,' \ >> "$targets_file" else echo "In \`$file\' line $line_nr: target brackets inbalance" >&2 error=1 fi line=`echo $line | sed -e 's,^[^]]*\],,'` done if [ $error -eq 0 ] && echo $line | grep '\]' >/dev/null ; then echo "In \`$file\' line $line_nr: target brackets inbalance" >&2 error=1 fi line_nr=`echo "$line_nr + 1" | bc` done ) < $file done } make_targets_file "$@" psiconv-0.9.8/formats/psiconv.conf0000644000175000017500000000044310016400477014135 00000000000000# This is the configuration file for libpsiconv for the data formats docs # All settings correspond to my Psion 5 MX, which was used to write them. Verbosity=3 Color = 0 ColorDepth = 2 #RedBits = 0 #GreenBits = 0 #BlueBits = 0 CharacterSet = 1 UnknownUnicodeChar = 63 UnknownEPOCChar = 63 psiconv-0.9.8/docs/0000777000175000017500000000000010336611562011151 500000000000000psiconv-0.9.8/docs/Makefile.am0000644000175000017500000000007310010210254013077 00000000000000EXTRA_DIST=ascii html4 xhtml parsing configuration unicode psiconv-0.9.8/docs/Makefile.in0000664000175000017500000002106610336413005013131 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = ascii html4 xhtml parsing configuration unicode all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/docs/ascii0000644000175000017500000000026310010205202012054 00000000000000This psiconv generator just grabs all text from a document. No ASCII layout tricks are used: you will get all text, without any layout considerations (other than paragraph ends). psiconv-0.9.8/docs/html40000644000175000017500000000103210010205742012020 00000000000000This README provides information about the psiconv HTML4 output generator. Output files generated using the options -T HTML use only HTML 4.01 to format their text. This has some drawbacks, as several layout options are not available in plain HTML. The good news is that almost any browser should accept the generated HTML and render the page in an acceptable way. Note that tabs, headers and footers are not rendered at all. Especially the omission of tabs can cause ugly layouts. Unfortunately, there is not a real solution for this. psiconv-0.9.8/docs/xhtml0000644000175000017500000000047010010205411012122 00000000000000This is the basic psiconv generator. It generates XHTML; all layout is done using CSS. You need a newish browser to handle that correctly. Note that tabs, headers and footers are not rendered at all. Especially the omission of tabs can cause ugly layouts. Unfortunately, there is not a real solution for this. psiconv-0.9.8/docs/parsing0000644000175000017500000000350107655260327012463 00000000000000Major parsing routines are built according to this template: int psiconv_parse_TYPE (const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_TYPE *result) { int res = 0; int len = 0; int leng; psiconv_progress(lev+1,off,"Going to parse TYPE"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; /* Example of calling some other parse function */ if ((res = psiconv_parse_TYPE2(buf,lev+2,off+len,&leng, &(*result)->FIELD2))) goto ERROR2; psiconv_debug(lev+2,off+len,"Some helpful message"); len += leng; /* Example of reading some bytes directly */ (*result)->FIELD1 = psiconv_read_u8(buf,lev+2,off+len,&res); if (!res) goto ERROR3; psiconv_debug(lev+2,off+len,"Some helpful message"); len ++; psiconv_debug(lev+2,off+len,"Some helpful message"); if (length) *length = len; psiconv_progress(lev+1,off+len-1,"End of TYPE (total length: %08x)", len); return 0; ERROR3: free ((*result)->FIELD2) ERROR2: free (*result); ERROR1: psiconv_warn(lev+1,off,"Reading of TYPE failed"); if (length) *length = 0; if (!res) return -PSICONV_E_NOMEM; else return res; } If something unexpected happens half-way, but you can recover from it (for example, an unexpected value in some well-defined field), call psiconv_warn, but do not return with an error. The rule is that if the result code of a procedure is not 0, you may assume that things are hopeless, that nothing was allocated, and that every field contains nonsense. psiconv-0.9.8/docs/configuration0000644000175000017500000000166410016437422013662 00000000000000Starting with version 0.9.0, all applications linked against libpsiconv (including the psiconv program in this package) will try to read a configuration file psiconv.conf. It is sought for in PSICONVETCDIR (--with-etcdir option in configure, defaults to PREFIX/etc) and in the homedirectory of the current user. Programs can add other location to this path. If more than one configuration file is found, they are all read in order (first the one in PSICONVETCDIR, then the one in ~, finally any additional locations added by the program), and settings in later files overrule settings in earlier files. In PSICONVETCDIR an example configuration file psiconv.conf.eg is always installed. Older versions are overwritten. If no psiconv.conf file is present, a copy one will be created from the psiconv.conf.eg file. Be careful if you use DESTDIR to install at a temporary place, because it will not find the psiconv.conf file and install a new one. psiconv-0.9.8/docs/unicode0000644000175000017500000000077010010205775012434 00000000000000Starting with psiconv 0.9.0, all strings are internally represented using Unicode, with the UCS2 encoding. This encodes every Unicode codepoint with a 16-bit unsigned integer. The codepoints 0x06 to 0x0f are treated specially. They are not translated, and keep their Psion-specific meanings: 0x06: New paragraph 0x07: New line 0x08: Hard page 0x09: Tab 0x0a: Unbreakable tab 0x0b: Unbreakable hyphen 0x0c: Potential hyphen 0x0d: Unknown 0x0e: Object placeholder 0x0f: Visible space psiconv-0.9.8/etc/0000777000175000017500000000000010336611562010774 500000000000000psiconv-0.9.8/etc/Makefile.am0000644000175000017500000000050510010212037012723 00000000000000INCLUDES=-I../.. -I../../lib -I../../compat psiconvetcdir = @PSICONVETCDIR@ psiconvetc_DATA = psiconv.conf.eg EXTRA_DIST=psiconv.conf.eg install-data-hook: if ! test -f $(DESTDIR)$(psiconvetcdir)/psiconv.conf; then \ cp $(DESTDIR)$(psiconvetcdir)/psiconv.conf.eg \ $(DESTDIR)$(psiconvetcdir)/psiconv.conf; \ fi psiconv-0.9.8/etc/Makefile.in0000664000175000017500000002355510336413006012762 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = etc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(psiconvetcdir)" psiconvetcDATA_INSTALL = $(INSTALL_DATA) DATA = $(psiconvetc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I../.. -I../../lib -I../../compat psiconvetcdir = @PSICONVETCDIR@ psiconvetc_DATA = psiconv.conf.eg EXTRA_DIST = psiconv.conf.eg all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-psiconvetcDATA: $(psiconvetc_DATA) @$(NORMAL_INSTALL) test -z "$(psiconvetcdir)" || $(mkdir_p) "$(DESTDIR)$(psiconvetcdir)" @list='$(psiconvetc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(psiconvetcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(psiconvetcdir)/$$f'"; \ $(psiconvetcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(psiconvetcdir)/$$f"; \ done uninstall-psiconvetcDATA: @$(NORMAL_UNINSTALL) @list='$(psiconvetc_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(psiconvetcdir)/$$f'"; \ rm -f "$(DESTDIR)$(psiconvetcdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(psiconvetcdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-psiconvetcDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-psiconvetcDATA .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man \ install-psiconvetcDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am uninstall-psiconvetcDATA install-data-hook: if ! test -f $(DESTDIR)$(psiconvetcdir)/psiconv.conf; then \ cp $(DESTDIR)$(psiconvetcdir)/psiconv.conf.eg \ $(DESTDIR)$(psiconvetcdir)/psiconv.conf; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/etc/psiconv.conf.eg0000644000175000017500000000674310016160065013634 00000000000000# This is the configuration file for libpsiconv. # By default, the library looks for /etc/psiconv/psiconv.conf and # ~/.psiconv.conf, but programs may add more entries to this searchpath. # Settings in later files overrule settings in earlier files (so everything # in .psiconv.conf is more important than /etc/psiconv/psiconv.conf). # All lines with only whitespace are ignored. # Comment lines start with a hash (#) and are ignored. # Comments are not allowed after statements. # Statements are of the form: # VAR=VALUE # There may be whitespace around the = token. # Variable names are case-insensitive. ########################## # ALL SETTINGS EXPLAINED # ########################## #################### # General settings # #################### # The verbosity of the libary # This determines how much output the library generates, especially when it # is parsing Psion files. # There are four levels of verbosity; higher numbers generate more output: # 1: Only display fatal errors # 2: Display errors # 3: Display warnings # 4: Display progress information # 5: Display debug information # Programs can use their own error/information reporting routines; by default, # everything is logged to stderr. #Verbosity = 3 #################### # Display settings # #################### # Display settings are used when generating image files. # Set Color to zero when you have a greyscale display, to one if you # have a color display #Color = 0 # The number of bits used to encode colors. #ColorDepth = 2 # If you have a color display, colors may be encoded either as RGB colors # or as entries in a palet. In the first case, set here the number of bits # used to encode red, green and blue. Make sure the sum of these bit numbers # equals the ColorDepth set above. To use one of the default palets, # set all three to zero. # If you have a greyscale display, these settings are ignored. #RedBits = 0 #GreenBits = 0 #BlueBits = 0 ############################ # Character table settings # ############################ # Settings to determine the used character set # The character set used in EPOC files (individual characters can be # changed below) # 0: Unicode (Eastern Psions) # 1: IBM Codepage 1252 (Western Europe Psions) # If you have another characterset, please let me know, and I will add it here. #CharacterSet = 0 # if the character set specified above does not completely match, you can # change individual characters here. The number in the variable name is the # number of the EPOC format character; the number in the value is the # corresponding Unicode codepoint. #Char130 = 33304 # The unknown character placeholder (EPOC format) # When translating from Unicode back to EPOC format, the Unicode character # may not be presentable. This is the Psion codepage character number to # use in this case. The default below is a question mark. # Allowed values: 0 to 255 #UnknownEPOCChar = 63 # The unknown character placeholder (Unicode format) # When translating from EPOC format to Unicode, the EPOC character # may not be known. This is the Unicode character number to # use in this case. The default below is a question mark. # Allowed values: 0 to 65535 #UnknownUnicodeChar = 63 #################################### # DEFAULTS FOR THE PSION 5 AND 5MX # #################################### Color = 0 ColorDepth = 2 #RedBits = 0 #GreenBits = 0 #BlueBits = 0 CharacterSet = 1 UnknownUnicodeChar = 63 UnknownEPOCChar = 63 ########################### # ADD YOUR SETTINGS BELOW # ########################### psiconv-0.9.8/examples/0000777000175000017500000000000010336611562012037 500000000000000psiconv-0.9.8/examples/Makefile.am0000644000175000017500000000006010336401734014001 00000000000000EXTRA_DIST=Clipart MBM Sheet Sketch TextEd Word psiconv-0.9.8/examples/Makefile.in0000664000175000017500000002106710336413006014021 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ASCIIDOCS_FALSE = @ASCIIDOCS_FALSE@ ASCIIDOCS_TRUE = @ASCIIDOCS_TRUE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HTML4DOCS_FALSE = @HTML4DOCS_FALSE@ HTML4DOCS_TRUE = @HTML4DOCS_TRUE@ IMAGEMAGICK = @IMAGEMAGICK@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT_16_BIT = @INT_16_BIT@ INT_32_BIT = @INT_32_BIT@ INT_8_BIT = @INT_8_BIT@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_DMALLOC = @LIB_DMALLOC@ LIB_MAGICK = @LIB_MAGICK@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PSICONVETCDIR = @PSICONVETCDIR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XHTMLDOCS_FALSE = @XHTMLDOCS_FALSE@ XHTMLDOCS_TRUE = @XHTMLDOCS_TRUE@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ cflags_set = @cflags_set@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = Clipart MBM Sheet Sketch TextEd Word all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: psiconv-0.9.8/examples/Clipart0000444000175000017500000013306007761363433013306 00000000000000AH(м0┤8 ╝ @─H╠P╘L╨!T$╪&\)р+d.▄0`3ф5h8ь:p=Ї?xB№DАGJИL OРQTШVYа[$^и`,c░e4h╕jн<№ UU╛@н╠є UU╛╒п╠є  QU╛T┐к╠№  GU■T¤к*╧№  U■Pїлк└├Wї}T№╒пк Ёё╦WїQъ┐кё №ф/UuGик \ё?ЁУ*U]и*ЁW¤@┴GUMu └_Uй@UM╒┴UЇ║б|╒W5UUU╨к║ё _╒TUUн║б╩ UUдл║б*  U¤@о║бъ  WUек■б.T  UEzюёюB¤   U5щ║с.╘    _╒дс B¤     WУыс.╘      _╤■B¤      M║/╘        5¤B¤        ╫$╘         _C¤          ╒                                          @ h(00    D    ?№          ГЄ         и╩         ак╩        кU*        аZU)       ?кVБж№      и·й№      OйеЯкЄ      П▒¤еЄ      ?╡VU╩      ?╞кЇQ╚       ╘■f╚       S∙G!       SS∙W!       cLщк№      OMхгк№      Пq%ккЄ      ПuбккЄ      5ЖккV╩     _5Цкк╩     U╒кжВ     U╒X*Ек     WUSа*l№    _UcїпPi№    _UM▒Oе║ё    UН╡СкВё    U5╒л ╒╞     U5╞·Tк╞     W╒Tй      W╒п·T     _USэйk№    _Uc№ркj№    UMї√клё     UНё┐zеї     U5╒√Fн╞     W5╞яХп┼     W╒T┐∙n┴     _╒  №     US¤■┴      Uc№№       UMї┴ї       UН\ї       W5└U        W╒_ї        _UU         U¤         ╒      @ h(00    D      ?Ё          └         №?Ё       №  ├      Ё        └    ?№   ?└      Ё         ?Ё  №      ё  Ё      D№  ▄     ?№  |     CDD№  °¤   Ш   ьў  ?`fD   ╕▀  ГЩЩ┴   ь~ dfC─   ╕√=РЩЁ?└   ьюCff┬  є   ╕╗УЩ №  ┼   ьюafЁ  W┌   ╕╗Щ  ┼i   ьюdї Ч╞)   ╕╗ШЁ╨_й╩>   ью$┐rек·   ╕╗п╥кк_)   ь.&п╩к·е*   ╕;пJы_к*   ь.f╝Jек*   ╕;Щ╝JЧкк*   ь.f╝Jлкм*   ╕ЛЩ╝Jл╩й*   ьNf╝JлЬм*   ╕ЛЩ╝Jл╔й*   ьNf╝JлЬм*   ╕ЛЩ╝Jл╔й*   ьb&╝JлЬк*   ╕У┐Jл╔к%   ьb&┐╥лЪZ$   ╕Уп╥лк %   ьb&иЇлкZ/   ╕Шё лк·   ь$ ? лкj┴   ╕Ё ? лк№   ь№ ?■лj┴    ░№  °л№    #   уk┴        №        ?└      @ h(00    D  c          ╘k┴     ├   x WЁ    Ё  ?ї¤o  _5№  ?ъўЯ№ ї   OїЯ№  ¤B   O┌Ё  ·^¤  SЦA   кV¤  Ф)   iU¤  T└   UU¤ ?╙|─·┐p№?Ё╧?№   TU?   ? Ё  ?\ї╧    XAUє    #№├№    П 0     ??╠      └є      #└╧№      ПЁ3       ?Ё╠        <є        #╠№        П3         ?┴          Hё          Tє          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№          ╙№         ?Ф├         ГХ?№       lХ■       Ё[U· Ё     ? PЕ╚  @ h(/0    D  @ *°/├№    Фек┐■┐ы№    Фек┐■┐ы№    Фек┐■┐ы№    Фек┐■┐ы№    Фек┐■┐ы№    дкккккк¤    ·    л╛¤    @Ї├№    Ї├№    PAЇ├№    AЇ├№    QPQЇ├№    @PЇ├№    #@AЇ├№    #¤0     #@@¤0     #¤0     #¤0     #¤0     #¤0     #¤Ё     #¤╠     #@=╠     #=╠     #@@?╠     #@?╠     #D?╠     #A?╠     #@?╠     ПD?╠     ПPD?╠     П┴є     ПQ╨є     П╨є     П╨є     П@P╨є     ПPD╨є     ПT╨є     ПD╤є     ?╨╧№     ?@UЇ├№     ?Ї├№     ?@Ї├№     ?DЇ├№     ?PЇ├№     ?Ї├№     DT¤   @ h(/0    D     ?°?°        ?° °         ° °         °?■        ?°■        ?°■         °?■        ?■?■        ■П         ■Г         ?■Г         ?■П         ■П         ■у        ¤5■р       ▌w=■р       w▌■у      QB       Oї ?■3      O ▌=■8      Oї  >8      O▀▄ >8      O╒M?■8      ╧swП 8      ?DTБ5╞      ?EА╬      ?SuЕ╬      ?]З╬      ?SMБ╬      ?╒БН═      ?SUЕБ═      ?UПБ═      ?SuБЕ═        TБЗё       LUЗeё        Tacє        U``є        T``є        Uaсє        TaYє       LUрXє       

╠      ПА?є      ПАє      ?рє№       иx         к▀Ё         P          O           Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          Oє          O           P         V■Ё       ?░Х■№      Wе■ └     ?ЁYе· №    ПPU!Є  @ h(/0    D                                                                                            ├           └           ─      └ ?─     а╧ ?┼?   ш╧└?kё╧   а·─ZЁ└├   Га└№є   П>Ё * Ё   ■Ё_№?┐№   ?■└WЁ╩?№┬  ?А■┴  № № Гк ╧┴? ?шпЁ?и  ├ё?+░ ┐┬ ╝UЁлD ┬П╬V№└├пj@¤╦гCА■+Ё┐кё╦уи· № к╨╦ ·0 К┬ л╦(░■№ В ╗V╦·м №┐бє ыV@╦╛ш?Ё┐р3 яZa╦>· №┐ш яZE┴>■Ёп°└;я[ё:■╧└ · яjЄ(■ ,■└яnЁ ■  ■3 яj°■  Ў пz·/Ъ■ ў  ┐{·/TъЯV╘  пZ·пPекU╨  ъ_■лBUUUP кVU■п PU@кVUuБ■кккJUUUUа·ккккк @к■┐ккккккк ак  ыккккккккъ        ккк·                                     @ h(00    D       ?T¤         @uё        U╟    ?P╫    └wWu5tЁ№  ▀¤|Cє  P9_5ЁЁ┴╧ _└ ▌▄└├p7 ?=їЁ ▄}▄?№?t    №├ Cё╘■ ▀u?╨▌ ╧qU  єў? = єW√u}╫CЁ P─UщЁ ў?┼ sD_5  ¤@E┴■╧WХ?U╝·;}UCUUU┼лъ;q№TUUP▒къ;G▄@ @мккы─╒PUUU┴лккяU UUUмкъ п?PЁлк  ┐s@5№  пЁ ┐NU├лкк:ик   ╬╝кккГ╛ккЁ :Ё А є║пкЄ √пак*№├ ║кЁ л ·кк┬╕я є  ╧ы╛к╩@PЁ   ык┬(№_№  Oр╛/╠а0№   @┴кк┬№  гЁЁ╨№  Г └Ё W┴№  ик є╨<Ё  CPЁ  ├  №_є╨(  CЁр WБ   № г?и0  CPа>4  +№_к┬ UА  пакП*К   кккккккВ   ┐кк·Kак*М    ┐ъ  @Б       лЁи         Аъ        пкк·@ h(00    D                  S№                    ?          ?╞          ?╞ Ё     ─     ?·АъпиkЁ   ├┐° к*√k╩   є  ял╩ к №  №╩ кк╩┐кЕ┬  мВ пкт╗к ?╛т┐кктлк№?оркккЄккU№?п╕ккк▓ккjZёП+╝ккк▓кк*иё╧+.икк▓кк`X┬є .Вкк╕к aР╔│Кп(а8Phв┼єКлиUб8ZUhЙьКлвVш╕hкЙ╝Кл╩кш╕мКкЙ╕Кк*,ъ╕▓акF╕Еккъ╕кк&мЙккк·╕ккк&мЙикк║°лк*Е%мВаок║°лк Й%ив·║╛°лкЙивXр√л°п*Кибhм■╕┐BКибhU░RЖ╞ибиUUUUёRЕF╞ибвVUUUбPЕб┼иЖвVUUUUбб┼гЖКZUUUUUиa┼SЖКkUUUUUhXїc*пUUUUкXёO%*╛UUUUjXЄПк°VUUUБЪU№?ишкjfжи  Фи┬лкк к%┼  Ги*  квкIЁ  ?икиj     гккЦвккЄ    ПjViвjUЄ    ?ШйVеZХ№     SеХ и       ? Ё   @ \(0/    DUE TAEA0E└ЁTL<A└CLA0??P└PAPU№ C 1@№PP1Ё@ U@ 0@Ё<@ёc№├ └     ? P<№?┴      ? ?┼    WU№C¤┼   ?Tё PT   ├ UQ└  ° └ ╧┐яfР>№ и?   ╗;д№ и╩ Ё CЁ_№ и╩■SФJU№ и▓ мV@йJU№ и▓/) ┐?шOU№ (и;О·  ёOU№ H┘NОк■WёKU№ аГОккU▒U№ иRТПкjUХ?U№ иR╝ТккU┼?U№ и№УкjU┼?U№ иВ№УккU┼?U№ ик№УкjU┼?U№ ик№УккU┼?U№ ик°УкjU┼?U№ икдУккU┼/U№ икRТкjU┼U№ ГкЄСккUЕE  ?итПкjUEM┴   ГТОккUёK№   ?PЙкjU▒     SЕккUa┼     ЕкjUQ       ккU╤        аjUЁ        к          `┴          №     @ \(0/    D     ?№          ╧ё          ╧ё          ╧ё          є┼          є┼          є┼          №          №          №         ? U№        ? U№        ? U№        ╧ Uё    №  ╧ Uё  ?у  ╧ Uё  └╦П └ є U┼  Є?ї?Ёє U┼№_№ T ° UЁ   Sї √ Uї _┼  OU я U¤ Uё  ?Uї┐ U _U№  ?UU ■╒ UU№   TUї√ї_U    SUUя¤UU┼    OUUхZUUё    ?Uх¤[U№     Ф _ї       є W╒ ╧      є UU ╧      є UU ╧      №UU¤?      №_UUї?      №WT╒?     ? W┼S╒ №    ? UёOU №    U№?U¤Ё    ╧_  Tїє    ╧_┴  Cїє    єW№  ?╒╧    є    T╧    s┼    S═    |Ё    =    ,      8    ╚      #   ?Є      П№  ?№      ?№ @ h(00    D                                                   №         Pёє         TЁ╧?      ?╧╧├№     ?)╧╧№oЁ     ?*╧ ╗ё     ?к╠╞ о╟     ?ьМ┬?└      °Мё       №CёЁ       №O№№     ЁO     ?Ай╩3└ P   ПЩ/T┼   S■ ? ╛Ы┴  ?ф√№ №яюЁ  П∙> ?D└ №  OВ?√OPё  У╬■Sк№╔  c╧╛фJUёя  ФБаюиR ╔┐г№ Ш)e;∙╘ ╛Уё TА.ї /╗ ╞ Ф`AI>  ьY╚ ED╤O  ┐░ EDЇN  ■aСi№S`¤У S°EСj№Oх╗#№S№Сj№O  D▒+XРjё?∙■D▒║Kб*hЄ хy╝лJбFСЄ X▄х*ииJбё c╕-ХJбкjШё ПT.ЩI▒║жЪeё ?dUиВЪ`VЄ  ШжTжЦEY№  VYдае&ЕХ№  УeEUБZ`%   /UEUХUU╔    ФQ`YVUUЄ     ТVUVUк№     иZUк       ак             @ h(00    D     └                   ?T№№        ?№є└      ┼єєЁ      O╩є3 №     П╩є┴ n№     П*│ё┐ыё     ;гЁЁ     ?>c№├ └     ? P<№?┴     ? ? ?┼     ?№├ ┼      є Ё?T┴     Uё     └ ╧┐яfЁ    ?   ╗;№    ╧ Ё №    ╧■Sаё    │ ╘к Пё    │/┘ob№;╞   ?и;■ Сёя─   ╧┘Nў┐aЖя   аГ}ЯЙ╔оC    s╥¤fI{?¤  ?st UI%ь№  ?3▌ UIy╪dё  ╧C╒UR┘╤T┴  ╧[ї_URх╞T  єU∙URХАЁ DU¤_ХTХ{@╦?W■[ХTU▐P┼├@W WХTUET┼|Э [ХTхNUё\Aё VХT5TEUёTF VPUqU№ce|UT U№SUЩ UPс╫? Ovcfъ~┼ O╒?YUUХо▀є ?¤¤гE└TU║>Ё  Ї ?ЇPХъ└  S  UU╒= ╚  ї_U╒ё└П╬  P U№  ?Ё   U└       м№└                  @ h(00    D              №           Cё    ?¤    Ї|№    №   ╨   ?Ї  ?╧  Ї╠╧є   O=└є Ї    ╒№C├╧є    є@=ЁЁ┼      <0 ╧_A      3╟╧<       C|P№      ?√?Д╤№      ├╟C╛├      ╝ ├Ыъ>     ?√лjию√№    O╝┐*ш ┐є    У№√лю┐■╧    г№√  № ╧    д№ √>Є ?    Ф№ O┼     h№г№П╩ #   ?eЄcЄO г№  ?ЦёгёO У№  ?fЄTЄПeЁа№  ?jкёOVЩ№  ?ЦVeёOeХЦ№  ?ЪЩZёSVZЩ№  ?TYUЄSХUU№  ?aХeёdUeU№   UUTVe    АdХYUVU    HUUYUU    CEUTUUE┴    EUUTU┴    TAQUDЁ    ?QUQE№    ?QE№   U@QPTU¤ ╒ DQЁ W¤╫  @T  ╫¤ WU@U╒ ¤ _UUUUї ╘  WUUUU╒  C╒  UU¤  W┴?@Uї    _U№ ?PUUUU№    Ё   @ h(00    D         ╧       Ё  ╠       №╧╠№      DЁ╧м№      Ё╧╩Ё      DЁгмЄ     №Г23     D№у>     №,#є    ??ркє    ПV └Иє    упU№ ╗╚    ° oё М╚    8№┐ё 1А┬    №7╝ёё └    |ї┐ёЁЁ    № ё№№    ;?oё_№     ?ё└[№      ╧╞ ё      ░кE      ?■nРк╟     П ┐Wжъ┼     ╧ √як║┴     у   я■┴     ° ?¤■z1     ь ¤ <     ° _ я^<    ?■    ▀№   ?√   ┐k№   ?■   √л№   ?√ O  ╟╗№   ?п C ■┼~№   ?ю ╫ яєк№   ?√■ я ┐z№   ?ю   юю^№    ь    ╛.     ╕ ?╜юя/     ь√¤як     г╛_ ╛я┼     П  ╗лk╤     П· ╛ыgR¤    ?кллyZT╒    Wаъ║nUU    UEw▐ЩQUU    _РiTU╒     UPUU¤     UUUU╒   @ h(00    D     ?           <╧          ├Ё          O№          3є          =▀          №         ?3ў         ╦¤╬         ├°pЁ        ? /        ^╨         ╧├╖№        3,·       ?└ї ╧       ╦Tн        ├я√s        ┬?╘є      ┐ЁCm┼,      ?└Фь       T=    CхNъ■єУ>    ЩO╣ єO*     @2й√№?╔  └  ?<Ф■№ Ё  Ё ? Ую№ є   < O:  є OV└?)  3P ?ХU┼ └  CU─  TE% ╧ P┴  C1UРUЁ  EUUUUU╔ё  OTUEYQE№  Q┼d1ULU№  ?DUEUQY   ?UVUeU    DTUeUeE─    СХUUUё    CDUUХUD№    UUV№     DTVUE      └              @ h(00    D                                                                                                                                                                          №      │ккккЄ      ,6╩     ?╦ ?6 (№    ╧Є ?6 ГЄ    │№ ?6 ?     ,  ?6  аЁ  ?╦  ?6  П Ё ╧6Аъ │кккк╢кккк·№│кккк╢ГккккЄ│кккк╢кккккЄ│кккк╢ккккк╩єкккк╢кккк ╧как╢кка*WЕк╢к*WЕOк╢кJUё?ёTuUAё№ ?ё@ё   ?┼   O┼    T┼   ?U┼    Ё    Ё                                                                                                                                                  @ h(00    D                                                                                                                                                                 └       ?акк*      ФХeЁ    ?№     ╧    ╬╧cЁ   є    єПУ┼  ?|╒  ┐°╧R└  Пкj■ ? К╔  Аj╒/√е ?кк*Ы.пCZ Акккк╦и─?кккккжкVA┼ПккккjкZ┼гкккк&иZЁиккjВj@@№єгккжиfUL№шbкihVUe№АЩ№ЩЩU Tь>TU SUЩPPQU└ UХeA№?Ё ODTUQ    ?0№      Ё      ├  Ё         ?№                                                                                                                @ h(00    D                                                                                                                                                                                 └         Ё╟       №є┐ё      ?Ёєєk№      ├ №     ╧° л┐Ё    tё ц_└    ?¤Єпї@    O┐тj}P    ╙┐аj╘ў№   ├пX╟ї▀№   ╙Ре┌├¤є   ╧е■┌є@¤4є   Ё╩ё@¤4є   П@╠r┼@Mє   Г╠@╧№  ?ш░к@ў╙№  П ░кF4U  ╧ЄUP|MU  аUЁS╒  ЗHUU0T¤  ╞бHUU╒   ЄёUЁUї   А∙Ї3  U    А~qєЁ       А>|є        Ає╧№        ╟╙╘        4U¤       |MU        ?ЁSї         T          U╒          _¤       @ h(00    D                                                                    №         ?P         @■oЁ       ∙        ф   ┐№    ?Р■   л№    @■   ┐к№   ∙    лк№  ф    ┐кк№  O■    лкк№ 0P╒   ┐ккк№ЪU   лккк№гкъPї пкккк№Укк╒ ккккк№|ккъTнкккк*№ьйккSнккккB мпк*Lнккк* м к┬GнкккBA№м п╝FнкккTPєм √мFнкк Pєм +лFнккPРєм +лFнк ╘└№м ╩лFнкPA╘╘г ╩кFн TфTUГ ╩кNнPAU0U╒<№╩кC TU¤°┬╩·PPUPU╒ ф/р┐UUU¤ S■  PPU╒   х┐PPUU¤  дР*TU╒   TJE@UU¤   C% ─,TU╒    Х┴XUU¤    WPсTU╒     _E9UU¤     ╨ ЁЁ ·@¤Tї ┴_=Ф╒Pё  №SA=U№   ш T=и╒    ╒CV SAE┼   ?╘T¤ш?Ё    А■SїPV    _=h¤OїT№   SAQї а     ╪O╒Y¤     АЎ?PSё     @ h(00    D                                                       Ї          ░Є         ┐ё         ╧┐ї         ўп¤         №+№        ? [         ▀ J         П ╩         є┐╥  ?Ё     °пЄ  ╧Ў    ? пї  є╞    ╧√лЁ  ь╓    У л¤ ?■╓    у j№ ╧ ┌    №┐Z¤ │┐╞ №?Ї?          є╘         ╧└╙4M╙4M╙Їа?є ├0 ├0 ├░С>а        j1┼@к■√   ┐кfЁёTек╩  пaY  PЦ√ пR    EA╝ ┐╞        є ┐        П■ j        ?я [№       № п¤       П▓ пё       П √┐╞       ь ┌         є          └ k№        (■п¤        аьпЎ        Ё┐Ў         Пл╩         ?к╩          Ё                                      @ h(00    D                     д         ?Р╗         Cъ√        Ї╛я       ?╨╗√√       @┐я┐п      ¤  ┐к      ╨   к     ?¤  л*T     O  ┐к@     Ї л№     °┬ *T└┐     и>┐J к    ?ъ■е№пк    ?к Ы─┐к     ?║ *╤ккЄ    Пъ┐╩|к*м    Пъ┐oк╩k    П·п2kк░Z    П·п─j*пV    П·п╠j┬кU    П■+▒j╝jU    ■+▒JлZU    П№*│rкVU    ПЄJм|кUї    ў ╩ ojU    ╙л╨ЁЫZ¤    Sпъ┐Ъ╓@    O╜ъпЪ>P    ?їылZTU   їP л>Tї   OE¤ыU    ?а╒?@Uї   ╒CYY@@U   ?╘Se(Pї    А■O╒ВZU   _=dї?TTЇ   SAM╒ А■    ш?Ueї     Г╓ TPO┼     U ·?Ё     ¤T¤Р╒        S5       ¤ш └       їCV         ╘T№        Г■         @ h(00    D                                                                   ?└         @uЁ       щяъ      фюю╗Z№     Р·╛ кё    ╜я√о T┼   Їю■╛кP┴╧  ?╨я√ял<╦  C   п*TЁ/╩ ?Ї  ┐к@ *┌ O   к №л╩Ў ╙  п*P└┐к░Ў ¤ к@ к п╓?╛Ё┐ Ёп*Ё ─?к╧пR└┐к┬пP┼П║й л*|─Пъ &ёпк┴TA─Пю┐J╝к*AQ├г·п2Як┬ФQ╙г·п─Ык|Cй╘Pєг■л╠Ъ*╫Фj╘└╘г■+▒Ъ╩=йj╘Tг■+│ЪЄ=к*0UUг JмТrПк*U╒З Jм\|Як*UU¤#┐╩м▄▀зкBU╒ г╝+▀▀з*TU¤ ╜В2├▀ўйBU╒  Ї*4№ўў*TU¤  ╘л·╒ў╜BU╒   Sпz@wTU¤   O¤:╫@U╒    ?╘?5 TU¤    P?5AU╒     E5UU¤      LU╒       WU@U¤       UU╒         WU¤                                                       @ h(00    D лккккккк■лЄ лкккккк л╛Є лккккк к■лЄ лкккъ к л╛Є лккъ┐к к■лЄ лк·┐ъ к л╛Є л·пъ┐к к■лЄ лп·┐ъ к л╛Є л·пъ┐к к■лЄ лп·┐ъ к л╛Є л·пъ┐к к■лЄ лп·┐ъ к лкЄ л·пъ┐к кккЄ лп·┐ъ ккккЄ л·пъ┐кккккЄ лп·┐ккккккЄ л·пкккккккЄ лпккккккккЄ лккккккк*кЄ лккккккк┬лЄ лкккккUкЄлЄ лккккVUкЄлЄ лкккZUPкЁ Є лккjUS   Є лккZ№S╩ Є лккZ№Sъ ЧЄ л*кZ _SкёлЄ л┬лZ\_SкЄлЄ лЄлZ\_Sк·йЄ лЄлZ\CSкZк╥ лЁ Z@Sкк*P    Z\SккU ╦ Z\_Sк Tї ы ЧZ\_ п@╒  лёлZ\ ╫U¤  лЄлZ  _¤╫   л·йZ№ї_    лZкЄ ╫ї    лкк┬_¤╒¤   лккї_ ╒   №лккїW ї  ёлк*╘¤W   ╟лк№╒_¤╫  л TP ї_¤  и@UЁWї    U¤ A¤╫     Wї  ╟_¤     _   ї     @ h(00    D  └        № ?└      ?№_Uї?№     ╧екZ¤C     єЯкккЎO     №зккк┌?¤    №лкккъ?¤    №пккк·?ё    є┐ккк■Oё    ├ пк· ¤  №   ?Ї  ї O№ ?@И   O ?W@╒LЩ∙ №?мWUU╒LUЪf Ї мокz5;■л"└ гокz5є├ ┐к* │║кz52№ UЁ╧ъкz5├  PU└ ?ыкz═   ¤0плzН UUї╫ └оzWUUUUUїЁ;UUїWU W|%_U№    №WU*        №Як*   ?№   №Як*        №Як"    ?№  №Як*        №Як*├    ?  №Я**        №Як*¤├      №Як*╫       №Як"¤├     №Як* ╫      №Як* ¤├    №Я**  W     №Як*  ї├   №Як*   W    №Як"    ї├  №Як*    _  №ЯЦ*     U  №Я*    WU  №ЯРJUUUUUU  №ЯРRUUUUUU  ёЯTUUUUUU  Я@UUUUUUU  ЬTUUUUUUU  UUUUUUUU@ h(00    D Ё         к      №  аккЁ   и  <ик   ?ак*└ №Гк  Аккк №№?( ккк*p№№ Cиккк@w№№╙<аккк ww№№?¤ккк*pw № Sккк@w7Ё № ккww╒  №Аек t7└  <кzккpw@uЁ <иккwщяъ |Гккtфюю╗Z№|7иwР·╛ кё(№ U№П─#A!ГB№ U№П№#A иT№ U№П!Eб ї№ U№П╠"DE P № U№П°#EEї № U№П▄!DET¤ Ё U№П╠!E┼   ┼ U№П№ D№   №U№П*┼    _ёU№Па*№     ┼┴Пк@¤     PМ T¤     UUАPї        ╒      @ h(00    Dкккккк     ккккккP№   ккккк ЁЁ   кккк*P┴└├   ккккBЁ   ккк*T└└<№  ккк@Ё?ЁЁ  кк UЁ└№└├  ккPЁ?Ё  кUЁ└№└<№ кRЁ?Ё?ЁЁ кRЁ└№└№└є кЁ?Ё?Ё№ к╥└№└№└  к╥?Ё?ЁЁ  к╥№└№└   к╥?Ё?Ё├   к╥ └№└№   к╥ ?ЁП№   к╥ №└P№   к╥ ?Ёж    к╥ └`i№   к╥ █?ЪЦ№ ■ к╥┐¤АейАў кТ█ +hj* ┐─ к╥ї ZЦЦ╞╝4 к╥ пеiйё№│Ї№к╥ jZZZЄ№№№к╝Цжж&─  ?¤к╥`iii╔№ C к╥УЪЪЪЄ╘ к╥геЁ VUё к╥SjЁ√ ЄЄЄ к╥г ▐■№Є■Є к╥г╔ ТўєЄ Є к╥S╩ ТЇєЄ ╛ к╥г╞ │Їє>р¤к╥г№ №Ї├ .¤к╥SJЁ ¤№┐'ёкгЄP? ┐$═к2 №[U┼? ┐4╧к№├ ╦╦╦? ┐Ї╧    ╦╦╦ Ё №єЄ   ╦╦╦ ├ ?№№   ╦√╦ /     ╦ ╦ ///     ╦ √ /я/     √   / / @ h(00    D                                          №          П№         └а┬        ?(j*Ё       ?гVе╚       ?гT╩       ?М╩    ?Ё  0лаЁ    ?Є  ╠л Є   Г  ??лаЄ   аий└├¤к╬?Ё МZХ"№ўгъ?<Є МRU( ▀л■Г  0( л¤аий└├мВ┬ Wл╒МZХ"3п*╚UлUМRU(ємВ╩UUлU0(є#иJUUлU┴мВ┬sМк5UUлU1п*╚3          ╝·№         ╝ъє         ╝к╧       ╝к>      № ┐к·№    №  ┐къє   ?Ё ккккк╧   ╧ кккккк>   єпкккккк·№  №кккккккъє ?┐кккккккк╧ ╧пкккккккк ╧лкккккккк┼ єлкккккккjё єккккккккZ№ №кккккккк  ╝кккккккк┼  ╝кккjUекjё ?пкккVUХкZ№ ?пкккUФк  ?пккj Фк┼  ?пккZё Фjё  ╧лккZ№ ФZ№  ╧лккV№ Ф   ╧лкк  Ф┼   ╧лкк  Tё   ╧лкк  T№   ╧лкк      ╧лкк  ─    ╧лкк  Ё    ╧лкк  №    ╧лкк       ╧лкк       ╧лкк       ╧лкк       ╧лкк       ╧лкк       ╧WUU       ╧UUU              @ h(00    D   ?        ?└        └ ккZ└      лккк№    єпккккjё    №кккккк┼   ?пкккккк   ?пкккккк   ╧лккккккZ№  ╧лккккккZ№  єкккккккjё  єккк·кккjё  єккк╓лккjё  ╝кккUпккк┼  ╝ккjE╜ккк┼  ╝ккZ1╜ккк┼  ╝ккZ№╝ккк┼  ╝ккZ№╝ккк┼  ╝ккZ№╝ккк┼  ╝кZU№╝ккк┼  ╝к╝ккк╝кZ№ ┐кккї ╧╝кjСкккккккё╝ккEйкккккZ№╝ккеккккк ╝ккZФккккк┼ ╝ккZPккккjё ╝ккZLйкккZ№ ╝ккZ<еккк  ╝ккZ№Фккк┼  ╝ккZ№Sккjё  ╝ккZ№OйкZ№  ╝ккZ№?ек   ╝ккZ№ Фк┼   ╝ккZ№ Sjё   ╝ккZ№ OY№   ╝ккZ№ ?    ╝ккZ№  ─    ╝ккZ№  є    ╝ккZ№       ╝ккZ№       ╝ккZ№       ╝ккZ№       ╝ккZ№       ╝ккZ№       |UUU№       \UUU№       №       @ h(00    D                                                    №          ?є          ╧╧          є:          ╝ъ№        ?пкє        ╧лк╬        єкк:        ╝ккъ№      ?пкккє      ╧лккк╬      єкккк:      ╝ккккъ№     │кккккє     ╧ккккк╬     ?лкккк:      мккккъ№  ?  │кккккє    ╧ккккк╬  3  ?лкккк:     мккккъ№?   │кккккє╧   ╧ккккк╬є   ?лкккк:╝    мккккъп    │кккккк    ╧кккккк    ?лккккк     мккккк     │ккккк     ╧ккккк     ?лкккк      мкккк      │кккк      ╧кккк      ?лккк      ?лккк      ╧лккк      єкккк      ╝кккк     ?пкккк     ╧UUUUU     sUUUUU     @ h(00    D                           C>       ?P:=№      O¤Рj∙Ё      CъГjъ├     PкПкк?     ├Укккк·№    уУккккъЁ    аФккъє   ?(еаT>и№   )╘е·а╨Ё  OI ейъг╘├  ObJйОйка  CPJйкКкАГ>№ ФjккО*и?·№?<дкккОкк:ш№·икакГкК·и№O иVъУкBъа№OБкЦ>°ФкPъг№бке·3е*к#№?дкйкCй к ?T*икOкJйк3№ PлкОкZкъє№ ЁпкОккккр№ ┐ЪкАкК*╘є глЪjQ?к еє ФкZjФ·а·SщЁ Фкj)дъгкSъ№ PкккжкПкУъ№ CйВкккОъг*№ Рккккка   ?АBйкккки┬  ?ФJеК к Ё   P ФВА    C PUиъ╧    ?А*TUаъЁ     SкTХ№     C%Tе<Ё      Tе№         Tе№         Tе№         TХЁ        ?TХЄ        ?UU╩        UU╔        OUU)        OUU%    @ h(00    D                           №          П№          г№          г№          аЁ         ?иЄ         к╩        ?ак         кк*Ё       ГКкъє       А┬кк├       ?░к╛       ╛т░>№      Г.Ё№     ?и 0е0Ё     └@1й╧       Tй       ├ФBй>№      ?иZК·Ё      лТКъ├      ╧├В к      3─> >      P  8     ? еLА0№      пкккккк·  кккккккккккккккккUUккккккъккZеккккк║кк  Рккккк║ккё  Oкккккокj№ккйккккокпккZдккккокпккZдкккклк╞лккZСкккклк╞лккjСкккклк╞лккjСккк■лк╞лккjСкъ┐■лк╞лккjСкъ┐ккк╞лккjСкъкккк╞лккjСкъкккк╞лккZСкъккккпккZдк║кккк*пккVик║ккккj№кjйк║кккккёUUEккокккккUUРккокккккZйкклккккккUUккккккккккккккккк  пкккккк·  ╝кккккк>UUёккккккOUU  ╟кккккк╙    ╟║ккккк╙    ╟ълкккк╙    ╟к■кккк╙    ╟кк лкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟кккккк╙  @ h(00    D                                                                                                            UUUUUUUUUUUU            кккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккк·п·п·п·п·п·п·п·п·п·п·п·пкккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккккк            UUUUUUUUUUUU                                                                                                            @ h(00    D  ╟кккккк╙    ╟кккккк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟ккккккSUU  ╟ккълкк  ╟ккълкк     ╟ккълккккк  ╟ккълккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккълккккк  ╟ккълккккк  ╟ккълккккк  ╟ккълккккк  ╟ккккккккк  ╟кккккк┐ъ┐  ╟кккккк┐ъ┐  ╟кккккклкк  ╟ккълкклкк  ╟ккълкклкк  ╟ккълкклкк  ╟ккълкклкк  ╟кккккклкк  ╟кккккклкк  ╟кккккклкк  ╟кккккклкк  ╟ккълкклкк  ╟ккълккккк  ╟ккълкк     ╟ккълкк  ╟ккккккSUU  ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟кккккк╙    ╟кккккк╙  @ h(00    D  ╟кккккк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙  UU┼ккълккSUU└ккълкк   ккъ  ┐   ккккккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъкккккккккккъккккккккк■л■кккккк┐ъ┐■л■кккккк┐ъ┐ккккккккклккккккккккклккккккккккклккккккккккклккккккккккклккккккккккклккккккккккклккккккккккклккккккккккклккккккккккклкккккккккккккк   ■  лкк   └ккълккUU┼ккълккSUU  ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟кккккк╙  @ h(00    D  ╟ккълкк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟кккккк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккълкк╙    ╟ккккккSUU  ╟кккккк  ╟кккккк     ╟ккккккккк  ╟ккълккккк  ╟ккълккккк  ╟ккълккккк  ╟ккълккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккълккккк  ╟ккълккккк  ╟ккъ┐ъ┐ъ┐ъ  ╟ккъ┐ъ┐ъ┐ъ  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟ккккккккк  ╟             WUUUUUUUUU                                                                                                            psiconv-0.9.8/examples/MBM0000644000175000017500000001231607655260345012325 000000000000007B9d9G╞▓(ь             h ¤?№ ∙?№  ?Ёєt ¤?№ ∙?№  ЁЁt ¤?№ ∙?№   Ёt э?№ 0Ё  00№№0t э?№№└?№0№Ё0t э?№<Ё└<Ё└?<Ё└ Ёt э?№ ЁЁ ЁЁ?<№├ Ёt э?№ ЁЁЁЁ?<└ Ёt э?№ ЁЁ  Ё?<№  Ёt э?Ё<Ё└№ЁЁ?<Ё├ Ёu ю└№└?№Ё?№Ё u юЁ 0Ё  Ё?№№ w №  Ё  №  Ё  №  Ё                     F   T U∙TU@ └a   T U∙TU@ └a   T U∙TU@ └a   T U∙TU@ └a  ·№PUЎUPUPU@ └a  ·№PUЎUPUPU@ └a  ·№PUЎUPUPU@ └a ¤?ЎPU?Ё ЎUUU№@■Ё  └a ¤?ЎPU?Ё ЎUUU№@■Ё  └a ¤?ЎPU?Ё ЎUUU№@■Ё  └a  ∙P?їU№P№@UU └a  ∙P?їU№P№@UU └a  ∙P?їU№P№@UU └a  №P■ЁюU№ № ?U  └a  №P■ЁюU№ № ?U  └a  №P■ЁюU№ № ?U  └a ■U·PU PU  ў@UUЁ└a ■U·PU PU  ў@UUЁ└a ■U·PU PU  ў@UUЁ└a їTTP№@ T ■P └a їTTP№@ T ■P └a їTTP№@ T ■P └a їUUU№@ўЁ TU№ ■PU  └a їUUU№@ўЁ TU№ ■PU  └a їUUU№@ўЁ TU№ ■PU  └a √@№№№@UUЇTUU└ №?PU └a √@№№№@UUЇTUU└ №?PU └a √@№№№@UUЇTUU└ №?PU └a Є@U Ё TUЎ@UU└└T └a Є@U Ё TUЎ@UU└└T └a Є@U Ё TUЎ@UU└└T └a Є@U Ё TUЎ@UU└└T └a  WU■└ √@UЎPU└TUT └a  WU■└ √@UЎPU└TUT └a  WU■└ √@UЎPU└TUT └a   └  ?√@U└ЁT└TU№└└a   └  ?√@U└ЁT└TU№└└a   └  ?√@U└ЁT└TU№└└a №WUЁ ■?PU  №ЇTT@UU№ └a №WUЁ ■?PU  №ЇTT@UU№ └a №WUЁ ■?PU  №ЇTT@UU№ └a ЇT  № T ?ўTTT └a ЇT  № T ?ўTTT └a ЇT  № T ?ўTTT └a ■U°└P└T №T  └a ■U°└P└T №T  └a ■U°└P└T №T  └a ЄPU└PUU№PU№?└a ЄPU└PUU№PU№?└a ЄPU└PUU№PU№?└a  їTPUUU@Ё ¤UU■└ └a  їTPUUU@Ё ¤UU■└ └a  їTPUUU@Ё ¤UU■└ └a  ёT@UPUUЁ№ ¤@√Ё└  └a  ёT@UPUUЁ№ ¤@√Ё└  └a  ёT@UPUUЁ№ ¤@√Ё└  └a  ·TU?■Ё¤└   №└ └a  ·TU?■Ё¤└   №└ └a  ·TU?■Ё¤└   №└ └a  ·TU?■Ё¤└   №└ └a   ■Ё■№?  └a   ■Ё■№?  └a   ■Ё■№?  └a ·?√№Ё·@    └a ·?√№Ё·@    └a ·?√№Ё·@    └a ¤?∙?№Ё№ХZ└  ¤Ё└a ¤?∙?№Ё№ХZ└  ¤Ё└a ¤?∙?№Ё№ХZ└  ¤Ё└a   ■Ё · екЁ  ? └a   ■Ё · екЁ  ? └a   ■Ё · екЁ  ? └a   є№№  _й№ └   └a   є№№  _й№ └   └a   є№№  _й№ └   └a  √TU№∙@№PU °Wj№?№  └a  √TU№∙@№PU °Wj№?№  └a  √TU№∙@№PU °Wj№?№  └a  ЁT@UPUU№ЁWU °ХZ  └ №?└a  ЁT@UPUU№ЁWU °ХZ  └ №?└a  ЁT@UPUU№ЁWU °ХZ  └ №?└a  фTPU@U@№№U╒  еV└  ?Ё ■└a  фTPU@U@№№U╒  еV└  ?Ё ■└a  фTPU@U@№№U╒  еV└  ?Ё ■└a  уT└PUU _ Uї  _йVЁ  Ё ■└a  уT└PUU _ Uї  _йVЁ  Ё ■└a  уT└PUU _ Uї  _йVЁ  Ё ■└a є@UU└P└Tя  WU¤  WйЁ  Ёf є@UU└P└Tя  WU¤  WйЁ  Ёf є@UU└P└Tя  WU¤  WйЁ  Ёf є@UU└P└Tя  WU¤  WйЁ  Ёf ЇT  № T №U└_U ∙W╒ W Ёf ЇT  № T №U└_U ∙W╒ W Ёf ЇT  № T №U└_U ∙W╒ W Ёf №WUЁ ■?PU¤└ єЁW╒    W Ёf №WUЁ ■?PU¤└ єЁW╒    W Ёf №WUЁ ■?PU¤└ єЁW╒    W Ёf   └  ?№@U└ ё№Uї  W  └d   └  ?№@U└ ё№Uї  W  └d   └  ?№@U└ ё№Uї  W  └d  WU■└ ∙@U└ Ў_UU└  ╒ b  WU■└ ∙@U└ Ў_UU└  ╒ b  WU■└ ∙@U└ Ў_UU└  ╒ b я@U Ё TU└ їWP¤WЁ Uї ■└a я@U Ё TU└ їWP¤WЁ Uї ■└a я@U Ё TU└ їWP¤WЁ Uї ■└a √@№√№@UU └ Є└  Uї  №  _Ue √@№√№@UU └ Є└  Uї  №  _Ue √@№√№@UU └ Є└  Uї  №  _Ue ЇUUU№@U№Ё  └ ¤ ■Uїc ЇUUU№@U№Ё  └ ¤ ■Uїc ЇUUU№@U№Ё  └ ¤ ■Uїc їTUU№@°Ё  └  ї ¤_└ ■_¤b їTUU№@°Ё  └  ї ¤_└ ■_¤b їTUU№@°Ё  └  ї ¤_└ ■_¤b ■UэPU└ № ?Ё U√  WЁ ■W╒a ■UэPU└ № ?Ё U√  WЁ ■W╒a ■UэPU└ № ?Ё U√  WЁ ■W╒a ■UэPU└ № ?Ё U√  WЁ ■W╒a ъTUPU└ № ?Ё ·╒  Ёf ъTUPU└ № ?Ё ·╒  Ёf ъTUPU└ № ?Ё ·╒  Ёf  №PЁ№  №└№ ╒  №e  №PЁ№  №└№ ╒  №e  №PЁ№  №└№ ╒  №e ЎЁ PUё   № Uї  _e ЎЁ PUё   № Uї  _e ЎЁ PUё   № Uї  _e  ·PU№?¤? №№ї ¤_└d  ·PU№?¤? №№ї ¤_└d  ·PU№?¤? №№ї ¤_└d   T■└ √№U¤ ¤WЁc   T■└ √№U¤ ¤WЁc   T■└ √№U¤ ¤WЁc  №└ № _¤ ¤№b  №└ № _¤ ¤№b  №└ № _¤ ¤№b   ?  └ № _U ¤b   ?  └ № _U ¤b   ?  └ № _U ¤b   Ё ¤└ W ¤_└a   Ё ¤└ W ¤_└a   Ё ¤└ W ¤_└a   № ¤ЁW ■W└a   № ¤ЁW ■W└a   № ¤ЁW ■W└                                               ■  psiconv-0.9.8/examples/Sheet0000644000175000017500000000251007655260345012755 000000000000007mИиU шш╨╨аааа\c)efd\c1efdВ.╞AИаGeneralаFixedа*Scientific а"CurrencyаPercentаTriadа*True/falseаText аd/m$аm/d(аd/m/y,аm/d/y0аy/m/d4аd Mon8аd Mon y<а"dd Mon y@аMonDаMonthHаMon yLаMonth yPа*Month d,yyTа2d/m/yy h:m MXа.d/m/yy hh:m\а2m/d/yy h:m M`а.m/d/yy hh:mdа2yy/m/d h:m Mhа.yy/m/d hh:mlаh:m Mp░h:m:s M8tаhh:mxаhh:m:s 00 00 0`ъ 0 РЪЩЩЩЩЩ!@ 0$0(0,0004080<0@0 D0"H0$L0&P0(T0*X0,\0.`00d02h04l06p08t0:x0< аNumber аFloat аString ╥АоGсzо(@аData?АР ? ЁS╩ЙзkY *Ы╛_╓   ╚"Univers┼╟═╔┤Sheet1└├шўяИ&Sheet.app 9∙!Йpsiconv-0.9.8/examples/Sketch0000644000175000017500000001304007655260345013126 000000000000007m}Ь∙Uь ╟(L┤¤Ё?№  Ё ■└╧? ■  ¤Ё?№ ·Ё  ?└├? ■  ¤Ё?№ ·Ё  ?№├? ■  эЁ?< №├└ №├└ЁЁ└№> ■  эЁ?<Ё Ё└Ё└└№> ■  юЁ?<Ё└<Ё└ Ё└?№├? ■  юЁ?<№├├?<№├├ ЁЁ?№├? ■  юЁ?<№├├?<└├ Ё?№├? ■  юЁ?<№├├?<№ ├ ЁЁ ?№├? ■  ю└<Ё└<Ё├├ Ё└?№├? ■  э?Ё Ё├ Ё└?№№> ■  э└? №├└ №├ ЁЁ?№№> ■  ·  ?№ ├K ■  ·  ?№ ├K ■  ·  ?№ ├K ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  Q ■  ,  ■PЎTUUPU■ ,  ■PЎTUUPU■ ,  ■PЎTUUPU■ ,  ■PЎTUUPU■ ,  ·Ё@UUЎT@UU@U■ ,  ·Ё@UUЎT@UU@U■ ,  ·Ё@UUЎT@UU@U■ , ¤№щ@UT№└ TUTUЁ¤└   , ¤№щ@UT№└ TUTUЁ¤└   , ¤№щ@UT№└ TUTUЁ¤└   ,  ∙@T№°TЁ@ЁU■ ,  ∙@T№°TЁ@ЁU■ ,  ∙@T№°TЁ@ЁU■ ,  №@T■└яTЁ ?Ё  T№ ■ ,  №@T■└яTЁ ?Ё  T№ ■ ,  №@T■└яTЁ ?Ё  T№ ■ , їTUU@T @U■№ °UU└■ , їTUU@T @U■№ °UU└■ , їTUU@T @U■№ °UU└■ , їPUPU@Ё■P №  ■@■ , їPUPU@Ё■P №  ■@■ , їPUPU@Ё■P №  ■@■ , їTTUЁў└ PUЁ ■@U ■ , їTTUЁў└ PUЁ ■@U ■ , їTTUЁў└ PUЁ ■@U ■ , єЁЁUUєPUU Ё @U■ , єЁЁUUєPUU Ё @U■ , єЁЁUUєPUU Ё @U■ , ЄU№?└ PUU№UU?¤?P■ , ЄU№?└ PUU№UU?¤?P■ , ЄU№?└ PUU№UU?¤?P■ , ЄU№?└ PUU№UU?¤?P■ ,  _U■ √?UЎ@U?PUUPU■ ,  _U■ √?UЎ@U?PUUPU■ ,  _U■ √?UЎ@U?PUUPU■ ,   №U?ёP?PTTЁ?■ ,   №U?ёP?PTTЁ?■ ,   №U?ёP?PTTЁ?■ , №_U└  @U ЎЁPUPU№Ё  , №_U└  @U ЎЁPUPU№Ё  , №_U└  @U ЎЁPUPU№Ё  , єPU№ ?Ё ?P №ўPUPPU■ , єPU№ ?Ё ?P №ўPUPPU■ , єPU№ ?Ё ?P №ўPUPPU■ , єTUU?@?PU №TP ■ , єTUU?@?PU №TP ■ , єTUU?@?PU №TP ■ , Є@U?@UUTU№T@U №  , Є@U?@UUTU№T@U №  , Є@U?@UUTU№T@U №  ,  їP@UTUU└  ¤TU ?■ ,  їP@UTUU└  ¤TU ?■ ,  їP@UTUU└  ¤TU ?■ ,  ∙PU@U√└Ё ¤√└ ?■ ,  ∙PU@U√└Ё ¤√└ ?■ ,  ∙PU@U√└Ё ¤√└ ?■ ,  ·PU№■└¤   ■ ■ ,  ·PU№■└¤   ■ ■ ,  ·PU№■└¤   ■ ■ ,  ·PU№■└¤   ■ ■ ,   T■└■Ё  ■ ,   T■└■Ё  ■ ,   T■└■Ё  ■ , ·№T√Ё└√№  ■ , ·№T√Ё└√№  ■ , ·№T√Ё└√№  ■ , ¤№∙№Ё└№Tj  ■└■ , ¤№∙№Ё└№Tj  ■└■ , ¤№∙№Ё└№Tj  ■└■ ,   ї└ № Хк└ ■ ,   ї└ № Хк└ ■ ,   ї└ № Хк└ ■ ,   єЁЁ  еVЁ   ■ ,   єЁЁ  еVЁ   ■ ,   єЁЁ  еVЁ   ■ ,  ·PUЁяUЁ@U¤  _йЁ Ё    ,  ·PUЁяUЁ@U¤  _йЁ Ё    ,  ·PUЁяUЁ@U¤  _йЁ Ё    ,  ∙PU@UяЁW└_U¤  Wj№    ,  ∙PU@UяЁW└_U¤  Wj№    ,  ∙PU@UяЁW└_U¤  Wj№    ,  яP@UUUЁ ЁWU №ХZ  └  ■ ,  яP@UUUЁ ЁWU №ХZ  └  ■ ,  яP@UUUЁ ЁWU №ХZ  └  ■ ,  уP?@UUTU№№W╒  еZ└  ?└  ■ ,  уP?@UUTU№№W╒  еZ└  ?└  ■ ,  уP?@UUTU№№W╒  еZ└  ?└  ■ , єUU?@?PUя№ _№Uї  _еV└  ?└ ■  , єUU?@?PUя№ _№Uї  _еV└  ?└ ■  , єUU?@?PUя№ _№Uї  _еV└  ?└ ■  , єUU?@?PUя№ _№Uї  _еV└  ?└ ■  , єPU№ ?Ё ?Pя№  WU¤  _U _¤?└ ■  , єPU№ ?Ё ?Pя№  WU¤  _U _¤?└ ■  , єPU№ ?Ё ?Pя№  WU¤  _U _¤?└ ■  , №_U└  @U¤ єW└_U  № _¤?└ ■  , №_U└  @U¤ єW└_U  № _¤?└ ■  , №_U└  @U¤ єW└_U  № _¤?└ ■  ,   ¤U ЄЁW╒№ _¤ ?   ,   ¤U ЄЁW╒№ _¤ ?   ,   ¤U ЄЁW╒№ _¤ ?   ,  _U■ ∙?U Ў№UU  W ¤■№ ,  _U■ ∙?U Ў№UU  W ¤■№ ,  _U■ ∙?U Ў№UU  W ¤■№ , ЄU№?└ PUU ї_@ї_└  U╒  ■ , ЄU№?└ PUU ї_@ї_└  U╒  ■ , ЄU№?└ PUU ї_@ї_└  U╒  ■ , ЎЁЁU ё  W╒  WЁ  U¤   , ЎЁЁU ё  W╒  WЁ  U¤   , ЎЁЁU ё  W╒  WЁ  U¤   , ЇTTUЁU№└   ¤№ ■W╒ , ЇTTUЁU№└   ¤№ ■W╒ , ЇTTUЁU№└   ¤№ ■W╒ , їTPUUЁ№└    ╒ ¤ ■ї■  , їTPUUЁ№└    ╒ ¤ ■ї■  , їTPUUЁ№└    ╒ ¤ ■ї■  , їTUU@TЎ Ё  └  U√¤ _└  _■U , їTUU@TЎ Ё  └  U√¤ _└  _■U , їTUU@TЎ Ё  └  U√¤ _└  _■U , їTUU@TЎ Ё  └  U√¤ _└  _■U , їPU@T° Ё  └ ·W  W└ ■  , їPU@T° Ё  └ ·W  W└ ■  , їPU@T° Ё  └ ·W  W└ ■  ,  №@TЎЁ  ?Ё?Ё W ¤Ё ■  ,  №@TЎЁ  ?Ё?Ё W ¤Ё ■  ,  №@TЎЁ  ?Ё?Ё W ¤Ё ■  , Ў└ @UTЁ№ ?№?Ё W╒  №   , Ў└ @UTЁ№ ?№?Ё W╒  №   , Ў└ @UTЁ№ ?№?Ё W╒  №   ,  ·@UUЁ №№№ №Ё ╒ ¤   ,  ·@UUЁ №№№ №Ё ╒ ¤   ,  ·@UUЁ №№№ №Ё ╒ ¤   ,  ■P ? № √Ё Uї ¤_└ ,  ■P ? № √Ё Uї ¤_└ ,  ■P ? № √Ё Uї ¤_└ ,  №?№ №№ї ¤WЁ■  ,  №?№ №№ї ¤WЁ■  ,  №?№ №№ї ¤WЁ■  ,   № √№U¤ ■■№ ,   № √№U¤ ■■№ ,   № √№U¤ ■■№ ,   └ № _¤ ■■ ,   └ № _¤ ■■ ,   └ № _¤ ■■ ,   Ё №└_¤  _■ ,   Ё №└_¤  _■ ,   Ё №└_¤  _■ шш}&Paint.app}Йpsiconv-0.9.8/examples/TextEd0000644000175000017500000000056107655260345013106 000000000000007mЕЇcUX\cd1PROC : This is an example TextEd document. Hardly exciting,is it? TextEd is primarily used for OPLprogramming language source code.ENDP╨╨аааа\c▓efd\c║efdВ.╞AЕ*TextEd.appЕ┬ЙIpsiconv-0.9.8/examples/Word0000644000175000017500000001721610021156016012605 000000000000007m■ЯU]. Ф d╚"Times New RomanN123&Heading 1L"Times New Roman Ё < &Heading 2LЁ"Times New Roman Ё < &Heading 3L    :h3r h3r  %*J%:1%T%B%D%M%Y%/0%1%/1%2%/2%3%/3_h _vh3r ╨╨ аа\c√efdvThis is the header, centered.This line is bold and italic\cТef║d$1:21am 03-02-2004¤В.╞A 5This is an example Word file. This first paragraph has no special lay-out: it uses style Normal, which is the base style.This is a Heading 1Heading 1 is 14 points bold, with some space before and after, and 'keep with next' on (this paragraph is in Normal style again)This paragraph has several character layouts. It contains bold, italic, underline and strikethrough in several combinations, and is quite unreadable...Now we will illustrate the fonts. Font handling is not yet optimal; if a font is unknown to AbiWord, there is no fall-back to another font. Psion font support depends on the printer driver. Here we have Times New Roman, Arial and Courier New fonts, all in 10 points. From another printerdriver, I got Courier, univers and CGTimes.Of course, many font sizes are supported. small fonts (4 pts), 6 points, 8 points, 10 points, 12, 14, 16, 18, 20, 22, 24, 38, 50 points. Note that the set of fontsizes supported by Psion Word and the fontsizes supported by AbiWord are not the same, so we use the nearest equivalent.Dark grey, light grey, even white text can easily be generated; but though the Word application does not support other colors (except black), the file format can handle 24 bit colors in RGBencoding.Finally, we have superscriptand subscript text. Now we have had all character-level encodings - except background color, a feature that is not available in the Word application, but again supported in the file format. Sorry, no example.Now it is time to show you some special character. Most Psions use the IBM 1252 encoding internally, so we have to translate all character. Let's try character 170 to 180 decimal: к л м н о п ░ ▒ ▓ │ ┤ (high a, double <, hook, small minus, reserved sign, high line, degrees, plusminus, squared, cubed and accent acute). We also have many accents: фрсутхLet's go to paragraphs. This one is centeredThis one is flushed rightThis one is fully justified, but I don't think this line is long enough to display it - or is it?Anyway, the previous text was left justifiedThis text is indented 6 cm left and 3 cm right, except for the first line which is indented 7 cm. 2 left, 3 centered, 4 right 3 normal tabs...Tabs in the above line. Psion only knows about left, centered and right tabs, but you can define their position and add regular spaced ones.Line spacing tricks. 4 pts above, 10 pts below, spacing at least 10 pts, keep together, keep with next, widow protection and start newpage.Borders. This is not yet possible in AbiWord, but we have a left black solid border, a right dark grey double border, a dotdashed light grey top bottom and a white dotdotdashed bottom border, all 1 cm around the text, on a light grey background!Bullet. This is a normal bulletThis is a Euro-sign bullet in dark grey, 10 pts, without indentation behind it. A 22 point reserved sign bullet, combined with indentations.No more bullets. Note that there are no numbered lists in the Psion world. Bullets are supported in AbiWord, but always represented as a filled dot. Left of this is an inserted sketch (picture).This line has a line breakthat does not end the paragraphas well as hard spacesA page break above here.By the way, this document has a header and a footer. In the footer, things like page numbers are used that should be translated into fields. That is not yet implemented.That's all folks!YqSketchЇЇЦЮ╩O╙^(Ю  є ■    └ ■  ■ ?  └  №№  ■  ¤ №  └     Ё  ■  ■   └ ў?№  №  ■  ■?└  └ ■  №  ■╧ ■№   ¤Ё ■?Ё  №  № ■ ■№    № ■└  └ ·?Ё  ?Ё ■     ■?Ё     ·№  ?Ё ■№    ·Ё  ?Ё ■№ ·№  ?Ё ■№ └   ·Ё  ?Ё     ■?Ё ■№    ·№  №    └ ■?Ё ■?Ё■№ Ў  ?№  №  └  └ √?№ ■?Ё■ Ў   №  №  └ ■?Ё  ? └■?Ё№?Ё Ў  №  №  └ ■№  ?■?Ё№ └ Ў  └№  №  └   √?Ё └■?Ё№  Ё √ ?Ё №Ё№  └   ■№ ■?Ё№  ?Ё √└ № №ЁЁ  └  └ ■№ ■?Ё№  № √└   №?Ё№ ■?Ё  └  ? ■?Ё№  № √└ └  ■?└ ·?Ё  ?Ё ■?Ё¤   Ў└?Ё №  ?└ √№  ?Ё ■№¤   Ў└№ №  ?└  ■?Ё ■№¤  └ Ў└№ №  ?└  ■№ ■? ¤  └ Ў└  ?Ё  ?Ё  ■№ ■  ¤ ?Ё Ў└└  ?Ё  ?Ё  ■?Ё ■  ¤  № ■Ё √№  ?Ё   └ ■   ■№ ■?   є ■   ■№ ■№ ■       ■    └ ■    є ■  шш}&Paint.app}ЙИF¤* D ╚"Times New Roman╚"Times New Roman╚"Times New Roman╚"Times New RomanJ е7╚"Times New Roman(knе▄╚"Times New Roman k╚"Times New Roman ( P ╚   k╚"Times New Roman Yккк d 7ккк   UUUk╚"Times New Roman k    d ккк   UUUk│ХSwiss╚"Times New Roman k    d ккк   UUUk╚АUUUSwiss╚"Times New RomanY    d ккк   UUUk╚"Times New Romank   n▄7 d ккк   UUUk╕оSwiss╚"Times New RomanzБШ L ╚эb-Пb1Н М Ў P >Х0Y    d ккк   UUUk[к1!!   !  )╦"Times New Roman"Arial " Courier New; "Courier "Univers " CG Times"Times New Roman*"Times New RomanP"Times New Roman x"Times New RomanP"Times New Roman а"Times New Roman ╚"Times New RomanЁ"Times New Roman"Times New Roman@"Times New Romanh"Times New RomanР"Times New Roman╕"Times New Romanр"Times New Roman°"Times New Romanш"Times New RomanЪ╚"Times New Roman UUU╚"Times New Roman ккк╚"Times New Roman   ╚"Times New Romanб╚"Times New Roman╚"Times New Roman ╚"Times New Roman─╚"Times New Roman╚"Times New RomanQ└Yq/╚"Times New Roman"Word.app C"ч╣C┘ЙP