libofx-0.9.4/0000755000175000017500000000000011553134312010006 500000000000000libofx-0.9.4/inc/0000755000175000017500000000000011553134313010560 500000000000000libofx-0.9.4/inc/libofx.h0000644000175000017500000010041011553123351012130 00000000000000/*-*-c-*-******************************************************************* libofx.h - Main header file for the libofx API ------------------- copyright : (C) 2002 by Benoit Grégoire email : bock@step.polymtl.ca ***************************************************************************/ /**@file * \brief Main header file containing the LibOfx API * This file should be included for all applications who use this API. This header file will work with both C and C++ programs. The entire API is made of the following structures and functions. * All of the following ofx_proc_* functions are callbacks (Except ofx_proc_file which is the entry point). They must be implemented by your program, but can be left empty if not needed. They are called each time the associated structure is filled by the library. * Important note: The variables associated with every data element have a *_valid companion. Always check that data_valid == true before using. Not only will you ensure that the data is meaningfull, but also that pointers are valid and strings point to a null terminated string. Elements listed as mandatory are for information purpose only, do not trust the bank not to send you non-conforming data... */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef LIBOFX_H #define LIBOFX_H #include #define LIBOFX_MAJOR_VERSION 0 #define LIBOFX_MINOR_VERSION 9 #define LIBOFX_MICRO_VERSION 4 #define LIBOFX_BUILD_VERSION 0 #define LIBOFX_VERSION_RELEASE_STRING "0.9.4" #ifdef __cplusplus extern "C" { #else #define true 1 #define false 0 #endif #define OFX_ELEMENT_NAME_LENGTH 100 #define OFX_SVRTID2_LENGTH (36 + 1) #define OFX_CHECK_NUMBER_LENGTH (12 + 1) #define OFX_REFERENCE_NUMBER_LENGTH (32 + 1) #define OFX_FITID_LENGTH (255 + 1) #define OFX_TOKEN2_LENGTH (36 + 1) #define OFX_MEMO_LENGTH (255 + 1) #define OFX_MEMO2_LENGTH (390 + 1) #define OFX_BALANCE_NAME_LENGTH (32 + 1) #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1) #define OFX_CURRENCY_LENGTH (3 + 1) /* In ISO-4217 format */ #define OFX_BANKID_LENGTH (9 + 1) #define OFX_BRANCHID_LENGTH (22 + 1) #define OFX_ACCTID_LENGTH (22 + 1) #define OFX_ACCTKEY_LENGTH (22 + 1) #define OFX_BROKERID_LENGTH (22 + 1) /* Must be MAX of ++, + and + */ #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1) #define OFX_ACCOUNT_NAME_LENGTH 255 #define OFX_MARKETING_INFO_LENGTH (360 + 1) #define OFX_TRANSACTION_NAME_LENGTH (32 + 1) #define OFX_UNIQUE_ID_LENGTH (32 + 1) #define OFX_UNIQUE_ID_TYPE_LENGTH (10 + 1) #define OFX_SECNAME_LENGTH (32 + 1) #define OFX_TICKER_LENGTH (32 + 1) #define OFX_ORG_LENGTH (32 + 1) #define OFX_FID_LENGTH (32 + 1) #define OFX_USERID_LENGTH (32 + 1) #define OFX_USERPASS_LENGTH (32 + 1) #define OFX_URL_LENGTH (500 + 1) #define OFX_APPID_LENGTH (32) #define OFX_APPVER_LENGTH (32) #define OFX_HEADERVERSION_LENGTH (32) /* #define OFX_STATEMENT_CB 0; #define OFX_ACCOUNT_CB 1; #define OFX_TRACSACTION_CB 2; #define OFX_SECURITY_CB 3; #define OFX_STATUS_CB 4; */ typedef void * LibofxContextPtr; /** * \brief Initialise the library and return a new context. * @return the new context, to be used by the other functions. */ LibofxContextPtr libofx_get_new_context(); /** * \brief Free all ressources used by this context. * @return 0 if successfull. */ int libofx_free_context( LibofxContextPtr ); void libofx_set_dtd_dir(LibofxContextPtr libofx_context, const char *s); /** List of possible file formats */ enum LibofxFileFormat { AUTODETECT, /**< Not really a file format, used to tell the library to try to autodetect the format*/ OFX, /**< Open Financial eXchange (OFX/QFX) file */ OFC, /**< Microsoft Open Financial Connectivity (OFC)*/ QIF, /**< Intuit Quicken Interchange Format (QIF) */ UNKNOWN, /**< Unknown file format */ LAST /**< Not a file format, meant as a loop breaking condition */ }; struct LibofxFileFormatInfo { enum LibofxFileFormat format;/**< The file format enum */ const char * format_name; /**< Text version of the enum */ const char * description; /**< Description of the file format */ }; #ifndef OFX_AQUAMANIAC_UGLY_HACK1 const struct LibofxFileFormatInfo LibofxImportFormatList[] = { {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"}, {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"}, {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"}, {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"}, {LAST, "LAST", "Not a file format, meant as a loop breaking condition"} }; const struct LibofxFileFormatInfo LibofxExportFormatList[] = { {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"}, {LAST, "LAST", "Not a file format, meant as a loop breaking condition"} }; /** * \brief libofx_get_file_type returns a proper enum from a file type string. * @format_list The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList @file_type_string The string which contain the file format matching one of the format_name of the list. @return the file format, or UNKNOWN if the format wasn't recognised. */ enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string); /** * \brief get_file_format_description returns a string description of a LibofxFileType. * @format_list The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList @file_format The file format which should match one of the formats in the list. @return null terminated string suitable for debugging output or user communication. */ const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format); #endif /** * \brief libofx_proc_file is the entry point of the library. * * libofx_proc_file must be called by the client, with a list of 1 * or more OFX files to be parsed in command line format. */ int libofx_proc_file(LibofxContextPtr libofx_context, const char * p_filename, enum LibofxFileFormat ftype); /** * \brief An abstraction of an OFX STATUS element. * * The OfxStatusData structure represents a STATUS OFX element sent by the OFX server. Be carefull, you do not have much context except the entity name so your application should probably ignore this status if code==0. However, you should display a message if the status in non-zero, since an error probably occurred on the server side. * * In a future version of this API, OfxStatusData structures might be linked from the OFX structures they are related to. */ struct OfxStatusData { /** @name Additional information * To give a minimum of context, the name of the OFX SGML element where this is located is available. */ char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];/** Name of the OFX element this status is relevant to */ int ofx_element_name_valid; /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ int code; /**< Status code */ const char* name; /**< Code short name */ const char* description; /**< Code long description, from ofx_error_msg.h */ int code_valid; /**< If code_valid is true, so is name and description (They are obtained from a lookup table) */ /** Severity of the error */ enum Severity { INFO, /**< The status is an informational message */ WARN, /**< The status is a warning */ ERROR /**< The status is a true error */ } severity; int severity_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ char* server_message; /**< Explanation given by the server for the Status Code. Especially important for generic errors. */ int server_message_valid; /*@}*/ }; /** * \brief The callback function for the OfxStatusData stucture. * * An ofx_proc_status_cb event is sent everytime the server has * generated a OFX STATUS element. As such, it could be received at * any time(but not during other events). An OfxStatusData * structure is passed to this event, as well as a pointer to an * arbitrary data structure. */ typedef int (*LibofxProcStatusCallback)(const struct OfxStatusData data, void * status_data); /** * \brief An abstraction of an account * * The OfxAccountData structure gives information about a specific * account, including it's type, currency and unique id. * * When an OfxAccountData must be passed to functions which create * OFX requests related to a specific account, it must contain all * the info needed for an OFX request to identify an account. That * is: account_type, account_number, bank_id and branch_id */ struct OfxAccountData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ /** The account_id is actually built from for a bank account, and for a credit card account. account_id is meant to be computer-readable. It is a worldwide OFX unique identifier wich can be used for account matching, even in system with multiple users.*/ char account_id[OFX_ACCOUNT_ID_LENGTH]; /** The account_id_name is a string meant to allow the user to identify the account. Currently it is for a bank account and a credit card account an : for investment accounts. account_id_name is not meant to be computer-readable and is not garanteed to be unique.*/ char account_name[OFX_ACCOUNT_NAME_LENGTH]; int account_id_valid;/* Use for both account_id and account_name */ /** account_type tells you what kind of account this is. See the * AccountType enum */ enum AccountType { OFX_CHECKING, /**< A standard checking account */ OFX_SAVINGS, /**< A standard savings account */ OFX_MONEYMRKT, /**< A money market account */ OFX_CREDITLINE,/**< A line of credit */ OFX_CMA, /**< Cash Management Account */ OFX_CREDITCARD,/**< A credit card account */ OFX_INVESTMENT /**< An investment account */ } account_type; int account_type_valid; /** The currency is a string in ISO-4217 format */ char currency[OFX_CURRENCY_LENGTH]; int currency_valid; /** Corresponds to OFX */ char account_number[OFX_ACCTID_LENGTH]; int account_number_valid; /** Corresponds to OFX */ char bank_id[OFX_BANKID_LENGTH]; int bank_id_valid; char broker_id[OFX_BROKERID_LENGTH]; int broker_id_valid; char branch_id[OFX_BRANCHID_LENGTH]; int branch_id_valid; }; /** * \brief The callback function for the OfxAccountData stucture. * * The ofx_proc_account_cb event is always generated first, to allow * the application to create accounts or ask the user to match an * existing account before the ofx_proc_statement and * ofx_proc_transaction event are received. An OfxAccountData is * passed to this event. * Note however that this OfxAccountData structure will also be available as part of OfxStatementData structure passed to ofx_proc_statement event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcAccountCallback)(const struct OfxAccountData data, void * account_data); /** * \brief An abstraction of a security, such as a stock, mutual fund, etc. * * The OfxSecurityData stucture is used to hols the securyty * information inside a OfxTransactionData struct for investment * transactions. */ struct OfxSecurityData { /** @name OFX mandatory elements * * The OFX spec defines the following elements as mandatory. The * associated variables should all contain valid data but you * should not trust the servers. Check if the associated *_valid * is true before using them. */ char unique_id[OFX_UNIQUE_ID_LENGTH]; /**< The id of the security being traded.*/ int unique_id_valid; char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];/**< Usially "CUSIP" for FIs in north america*/ int unique_id_type_valid; char secname[OFX_SECNAME_LENGTH];/**< The full name of the security */ int secname_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ char ticker[OFX_TICKER_LENGTH];/**< The ticker symbol of the security */ int ticker_valid; double unitprice;/**< The price of each unit of the security, as of date_unitprice */ int unitprice_valid; time_t date_unitprice;/**< The date as of which the unit price was valid. */ int date_unitprice_valid; /** The currency is a string in ISO-4217 format. It overrides the one defined in the statement for the unit price */ char currency[OFX_CURRENCY_LENGTH]; int currency_valid; char memo[OFX_MEMO2_LENGTH];/**< Extra information not included in name */ int memo_valid; };/* end struct OfxSecurityData */ /** * \brief The callback function for the OfxSecurityData stucture. * * An ofx_proc_security_cb event is generated for any securities * listed in the ofx file. It is generated after ofx_proc_statement * but before ofx_proc_transaction. It is meant to be used to allow * the client to create a new commodity or security (such as a new * stock type). Please note however that this information is * usually also available as part of each OfxtransactionData. An OfxSecurityData structure is passed to this event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcSecurityCallback)(const struct OfxSecurityData data, void * security_data); typedef enum { OFX_CREDIT, /**< Generic credit */ OFX_DEBIT, /**< Generic debit */ OFX_INT, /**< Interest earned or paid (Note: Depends on signage of amount) */ OFX_DIV, /**< Dividend */ OFX_FEE, /**< FI fee */ OFX_SRVCHG, /**< Service charge */ OFX_DEP, /**< Deposit */ OFX_ATM, /**< ATM debit or credit (Note: Depends on signage of amount) */ OFX_POS, /**< Point of sale debit or credit (Note: Depends on signage of amount) */ OFX_XFER, /**< Transfer */ OFX_CHECK, /**< Check */ OFX_PAYMENT, /**< Electronic payment */ OFX_CASH, /**< Cash withdrawal */ OFX_DIRECTDEP, /**< Direct deposit */ OFX_DIRECTDEBIT,/**< Merchant initiated debit */ OFX_REPEATPMT, /**< Repeating payment/standing order */ OFX_OTHER /**< Somer other type of transaction */ } TransactionType; typedef enum { OFX_BUYDEBT, /**< Buy debt security */ OFX_BUYMF, /**< Buy mutual fund */ OFX_BUYOPT, /**< Buy option */ OFX_BUYOTHER, /**< Buy other security type */ OFX_BUYSTOCK, /**< Buy stock */ OFX_CLOSUREOPT, /**< Close a position for an option */ OFX_INCOME, /**< Investment income is realized as cash into the investment account */ OFX_INVEXPENSE, /**< Misc investment expense that is associated with a specific security */ OFX_JRNLFUND, /**< Journaling cash holdings between subaccounts within the same investment account */ OFX_JRNLSEC, /**< Journaling security holdings between subaccounts within the same investment account */ OFX_MARGININTEREST, /**< Margin interest expense */ OFX_REINVEST, /**< Reinvestment of income */ OFX_RETOFCAP, /**< Return of capital */ OFX_SELLDEBT, /**< Sell debt security. Used when debt is sold, called, or reached maturity */ OFX_SELLMF, /**< Sell mutual fund */ OFX_SELLOPT, /**< Sell option */ OFX_SELLOTHER, /**< Sell other type of security */ OFX_SELLSTOCK, /**< Sell stock */ OFX_SPLIT, /**< Stock or mutial fund split */ OFX_TRANSFER /**< Transfer holdings in and out of the investment account */ } InvTransactionType; typedef enum { DELETE, /**< The transaction with a fi_id matching fi_id_corrected should be deleted */ REPLACE /**< The transaction with a fi_id matching fi_id_corrected should be replaced with this one */ } FiIdCorrectionAction; /** * \brief An abstraction of a transaction in an account. * * The OfxTransactionData stucture contains all available * information about an actual transaction in an account. */ struct OfxTransactionData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ char account_id[OFX_ACCOUNT_ID_LENGTH];/**< Use this for matching with the relevant account in your application */ struct OfxAccountData * account_ptr; /**< Pointer to the full account structure, see OfxAccountData */ int account_id_valid; TransactionType transactiontype; int transactiontype_valid; /**< Investment transaction type. You should read this if transactiontype == OFX_OTHER. See OFX spec 1.6 p.442 to 445 for details*/ InvTransactionType invtransactiontype; int invtransactiontype_valid; /** Variation of the number of units of the commodity Suppose units is -10, ave unitprice is 1. If the commodity is stock, you have 10 less stock, but 10 more dollars in you amccount (fees not considered, see amount). If commodity is money, you have 10 less dollars in your pocket, but 10 more in your account */ double units; int units_valid; double unitprice; /**< Value of each unit, 1.00 if the commodity is money */ int unitprice_valid; double amount; /**< Total monetary amount of the transaction, signage will determine if money went in or out. amount is the total amount: -(units) * unitprice - various fees */ int amount_valid; char fi_id[256]; /**< Generated by the financial institution (fi), unique id of the transaction, to be used to detect duplicate downloads */ int fi_id_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ /** The id of the security being traded. Mandatory for investment transactions */ char unique_id[OFX_UNIQUE_ID_LENGTH]; int unique_id_valid; char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];/**< Usially "CUSIP" for FIs in north america*/ int unique_id_type_valid; struct OfxSecurityData *security_data_ptr; /** A pointer to the security's data.*/ int security_data_valid; time_t date_posted;/**< Date the transaction took effect (ex: date it appeared on your credit card bill). Setlement date; for stock split, execution date. * Mandatory for bank and credit card transactions */ int date_posted_valid; time_t date_initiated;/**< Date the transaction was initiated (ex: date you bought something in a store for credit card; trade date for stocks; day of record for stock split) * Mandatory for investment transactions */ int date_initiated_valid; time_t date_funds_available;/**< Date the funds are available (not always provided) (ex: the date you are allowed to withdraw a deposit */ int date_funds_available_valid; /** IMPORTANT: if fi_id_corrected is present, this transaction is meant to replace or delete the transaction with this fi_id. See OfxTransactionData::fi_id_correction_action to know what to do. */ char fi_id_corrected[256]; int fi_id_corrected_valid; /** The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken */ FiIdCorrectionAction fi_id_correction_action; int fi_id_correction_action_valid; /** Used for user initiated transaction such as payment or funds transfer. Can be seen as a confirmation number. */ char server_transaction_id[OFX_SVRTID2_LENGTH]; int server_transaction_id_valid; /** The check number is most likely an integer and can probably be converted properly with atoi(). However the spec allows for up to 12 digits, so it is not garanteed to work */ char check_number[OFX_CHECK_NUMBER_LENGTH]; int check_number_valid; /** Might present in addition to or instead of a check_number. Not necessarily a number */ char reference_number[OFX_REFERENCE_NUMBER_LENGTH]; int reference_number_valid; long int standard_industrial_code;/**< The standard industrial code can have at most 6 digits */ int standard_industrial_code_valid; char payee_id[OFX_SVRTID2_LENGTH];/**< The identifier of the payee */ int payee_id_valid; char name[OFX_TRANSACTION_NAME_LENGTH];/**< Can be the name of the payee or the description of the transaction */ int name_valid; char memo[OFX_MEMO2_LENGTH];/**< Extra information not included in name */ int memo_valid; double commission;/**< Commission paid to broker (investment transactions only) */ int commission_valid; double fees;/**< Fees applied to trade (investment transactions only) */ int fees_valid; double oldunits; /*number of units held before stock split */ int oldunits_valid; double newunits; /*number of units held after stock split */ int newunits_valid; /*********** NOT YET COMPLETE!!! *********************/ }; /** * \brief The callback function for the OfxTransactionData stucture. * * An ofx_proc_transaction_cb event is generated for every * transaction in the ofx response, after ofx_proc_statement (and * possibly ofx_proc_security is generated. An OfxTransactionData * structure is passed to this event, as well as a pointer to an * arbitrary data structure. */ typedef int (*LibofxProcTransactionCallback)(const struct OfxTransactionData data, void * transaction_data); /** * \brief An abstraction of an account statement. * * The OfxStatementData structure contains information about your * account at the time the ofx response was generated, including the * balance. A client should check that the total of his recorded * transactions matches the total given here, and warn the user if * they dont. */ struct OfxStatementData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ char currency[OFX_CURRENCY_LENGTH]; /**< The currency is a string in ISO-4217 format */ int currency_valid; char account_id[OFX_ACCOUNT_ID_LENGTH];/**< Use this for matching this statement with the relevant account in your application */ struct OfxAccountData * account_ptr; /**< Pointer to the full account structure, see OfxAccountData */ int account_id_valid; /** The actual balance, according to the FI. The user should be warned of any discrepency between this and the balance in the application */ double ledger_balance; int ledger_balance_valid; time_t ledger_balance_date;/**< Time of the ledger_balance snapshot */ int ledger_balance_date_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ double available_balance; /**< Amount of money available from the account. Could be the credit left for a credit card, or amount that can be withdrawn using INTERAC) */ int available_balance_valid; time_t available_balance_date;/** Time of the available_balance snapshot */ int available_balance_date_valid; /** The start time of this statement. * All the transactions between date_start and date_end should have been provided */ time_t date_start; int date_start_valid; /** The end time of this statement. * If provided, the user can use this date as the start date of his next statement request. He is then assured not to miss any transactions. */ time_t date_end; int date_end_valid; /** marketing_info could be special offers or messages from the bank, or just about anything else */ char marketing_info[OFX_MARKETING_INFO_LENGTH]; int marketing_info_valid; }; /** * \brief The callback function for the OfxStatementData stucture. * * The ofx_proc_statement_cb event is sent after all ofx_proc_transaction events have been sent. An OfxStatementData is passed to this event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcStatementCallback)(const struct OfxStatementData data, void * statement_data); /** \brief NOT YET SUPPORTED */ struct OfxCurrency { char currency[OFX_CURRENCY_LENGTH]; /**< Currency in ISO-4217 format */ double exchange_rate; /**< Exchange rate from the normal currency of the account */ int must_convert; /**< true or false */ }; /** * Set the status callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data); /** * Set the account callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data); /** * Set the security callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data); /** * Set the transaction callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data); /** * Set the statement callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data); /** * Parses the content of the given buffer. */ int libofx_proc_buffer(LibofxContextPtr ctx, const char *s, unsigned int size); /* **************************************** */ /** @name Creating OFX Files * * This group deals with creating OFX files */ //@{ /** * \brief Information returned by the OFX Partner Server about a financial institution */ struct OfxFiServiceInfo { char fid[OFX_FID_LENGTH]; char org[OFX_ORG_LENGTH]; char url[OFX_URL_LENGTH]; int accountlist; /**< Whether the FI makes a list of accounts available */ int statements; /**< Whether the FI supports online statement download */ int billpay; /**< Whether the FI supports online bill payment */ int investments; /**< Whether the FI supports investments */ }; /** * \brief Information sufficient to log into an financial institution * * Contains all the info needed for a user to log into a financial * institution and make requests for statements or post transactions. * An OfxFiLogin must be passed to all functions which create OFX * requests. */ struct OfxFiLogin { char fid[OFX_FID_LENGTH]; char org[OFX_ORG_LENGTH]; char userid[OFX_USERID_LENGTH]; char userpass[OFX_USERPASS_LENGTH]; char header_version[OFX_HEADERVERSION_LENGTH]; char appid[OFX_APPID_LENGTH]; char appver[OFX_APPVER_LENGTH]; }; #define OFX_AMOUNT_LENGTH (32 + 1) #define OFX_PAYACCT_LENGTH (32 + 1) #define OFX_STATE_LENGTH (5 + 1) #define OFX_POSTALCODE_LENGTH (11 + 1) #define OFX_NAME_LENGTH (32 + 1) struct OfxPayment { char amount[OFX_AMOUNT_LENGTH]; char account[OFX_PAYACCT_LENGTH]; char datedue[9]; char memo[OFX_MEMO_LENGTH]; }; struct OfxPayee { char name[OFX_NAME_LENGTH]; char address1[OFX_NAME_LENGTH]; char city[OFX_NAME_LENGTH]; char state[OFX_STATE_LENGTH]; char postalcode[OFX_POSTALCODE_LENGTH]; char phone[OFX_NAME_LENGTH]; }; /** * \brief Creates an OFX statement request in string form * * Creates a string which should be passed to an OFX server. This string is * an OFX request suitable to retrieve a statement for the @p account from the * @p fi * * @param fi Identifies the financial institution and the user logging in. * @param account Idenfities the account for which a statement is desired * @return string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free. */ char* libofx_request_statement( const struct OfxFiLogin* fi, const struct OfxAccountData* account, time_t date_from ); /** * \brief Creates an OFX account info (list) request in string form * * Creates a string which should be passed to an OFX server. This string is * an OFX request suitable to retrieve a list of accounts from the * @p fi * * @param fi Identifies the financial institution and the user logging in. * @return string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free. */ char* libofx_request_accountinfo( const struct OfxFiLogin* login ); char* libofx_request_payment( const struct OfxFiLogin* login, const struct OfxAccountData* account, const struct OfxPayee* payee, const struct OfxPayment* payment ); char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid ); //@} #ifdef __cplusplus } // end of extern "C" #endif #endif // end of LIBOFX_H libofx-0.9.4/inc/libofx.h.in0000644000175000017500000010056611552346574012566 00000000000000/*-*-c-*-******************************************************************* libofx.h - Main header file for the libofx API ------------------- copyright : (C) 2002 by Benoit Grégoire email : bock@step.polymtl.ca ***************************************************************************/ /**@file * \brief Main header file containing the LibOfx API * This file should be included for all applications who use this API. This header file will work with both C and C++ programs. The entire API is made of the following structures and functions. * All of the following ofx_proc_* functions are callbacks (Except ofx_proc_file which is the entry point). They must be implemented by your program, but can be left empty if not needed. They are called each time the associated structure is filled by the library. * Important note: The variables associated with every data element have a *_valid companion. Always check that data_valid == true before using. Not only will you ensure that the data is meaningfull, but also that pointers are valid and strings point to a null terminated string. Elements listed as mandatory are for information purpose only, do not trust the bank not to send you non-conforming data... */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef LIBOFX_H #define LIBOFX_H #include #define LIBOFX_MAJOR_VERSION @LIBOFX_MAJOR_VERSION@ #define LIBOFX_MINOR_VERSION @LIBOFX_MINOR_VERSION@ #define LIBOFX_MICRO_VERSION @LIBOFX_MICRO_VERSION@ #define LIBOFX_BUILD_VERSION @LIBOFX_BUILD_VERSION@ #define LIBOFX_VERSION_RELEASE_STRING "@LIBOFX_VERSION_RELEASE_STRING@" #ifdef __cplusplus extern "C" { #else #define true 1 #define false 0 #endif #define OFX_ELEMENT_NAME_LENGTH 100 #define OFX_SVRTID2_LENGTH (36 + 1) #define OFX_CHECK_NUMBER_LENGTH (12 + 1) #define OFX_REFERENCE_NUMBER_LENGTH (32 + 1) #define OFX_FITID_LENGTH (255 + 1) #define OFX_TOKEN2_LENGTH (36 + 1) #define OFX_MEMO_LENGTH (255 + 1) #define OFX_MEMO2_LENGTH (390 + 1) #define OFX_BALANCE_NAME_LENGTH (32 + 1) #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1) #define OFX_CURRENCY_LENGTH (3 + 1) /* In ISO-4217 format */ #define OFX_BANKID_LENGTH (9 + 1) #define OFX_BRANCHID_LENGTH (22 + 1) #define OFX_ACCTID_LENGTH (22 + 1) #define OFX_ACCTKEY_LENGTH (22 + 1) #define OFX_BROKERID_LENGTH (22 + 1) /* Must be MAX of ++, + and + */ #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1) #define OFX_ACCOUNT_NAME_LENGTH 255 #define OFX_MARKETING_INFO_LENGTH (360 + 1) #define OFX_TRANSACTION_NAME_LENGTH (32 + 1) #define OFX_UNIQUE_ID_LENGTH (32 + 1) #define OFX_UNIQUE_ID_TYPE_LENGTH (10 + 1) #define OFX_SECNAME_LENGTH (32 + 1) #define OFX_TICKER_LENGTH (32 + 1) #define OFX_ORG_LENGTH (32 + 1) #define OFX_FID_LENGTH (32 + 1) #define OFX_USERID_LENGTH (32 + 1) #define OFX_USERPASS_LENGTH (32 + 1) #define OFX_URL_LENGTH (500 + 1) #define OFX_APPID_LENGTH (32) #define OFX_APPVER_LENGTH (32) #define OFX_HEADERVERSION_LENGTH (32) /* #define OFX_STATEMENT_CB 0; #define OFX_ACCOUNT_CB 1; #define OFX_TRACSACTION_CB 2; #define OFX_SECURITY_CB 3; #define OFX_STATUS_CB 4; */ typedef void * LibofxContextPtr; /** * \brief Initialise the library and return a new context. * @return the new context, to be used by the other functions. */ LibofxContextPtr libofx_get_new_context(); /** * \brief Free all ressources used by this context. * @return 0 if successfull. */ int libofx_free_context( LibofxContextPtr ); void libofx_set_dtd_dir(LibofxContextPtr libofx_context, const char *s); /** List of possible file formats */ enum LibofxFileFormat { AUTODETECT, /**< Not really a file format, used to tell the library to try to autodetect the format*/ OFX, /**< Open Financial eXchange (OFX/QFX) file */ OFC, /**< Microsoft Open Financial Connectivity (OFC)*/ QIF, /**< Intuit Quicken Interchange Format (QIF) */ UNKNOWN, /**< Unknown file format */ LAST /**< Not a file format, meant as a loop breaking condition */ }; struct LibofxFileFormatInfo { enum LibofxFileFormat format;/**< The file format enum */ const char * format_name; /**< Text version of the enum */ const char * description; /**< Description of the file format */ }; #ifndef OFX_AQUAMANIAC_UGLY_HACK1 const struct LibofxFileFormatInfo LibofxImportFormatList[] = { {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"}, {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"}, {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"}, {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"}, {LAST, "LAST", "Not a file format, meant as a loop breaking condition"} }; const struct LibofxFileFormatInfo LibofxExportFormatList[] = { {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"}, {LAST, "LAST", "Not a file format, meant as a loop breaking condition"} }; /** * \brief libofx_get_file_type returns a proper enum from a file type string. * @format_list The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList @file_type_string The string which contain the file format matching one of the format_name of the list. @return the file format, or UNKNOWN if the format wasn't recognised. */ enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string); /** * \brief get_file_format_description returns a string description of a LibofxFileType. * @format_list The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList @file_format The file format which should match one of the formats in the list. @return null terminated string suitable for debugging output or user communication. */ const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format); #endif /** * \brief libofx_proc_file is the entry point of the library. * * libofx_proc_file must be called by the client, with a list of 1 * or more OFX files to be parsed in command line format. */ int libofx_proc_file(LibofxContextPtr libofx_context, const char * p_filename, enum LibofxFileFormat ftype); /** * \brief An abstraction of an OFX STATUS element. * * The OfxStatusData structure represents a STATUS OFX element sent by the OFX server. Be carefull, you do not have much context except the entity name so your application should probably ignore this status if code==0. However, you should display a message if the status in non-zero, since an error probably occurred on the server side. * * In a future version of this API, OfxStatusData structures might be linked from the OFX structures they are related to. */ struct OfxStatusData { /** @name Additional information * To give a minimum of context, the name of the OFX SGML element where this is located is available. */ char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];/** Name of the OFX element this status is relevant to */ int ofx_element_name_valid; /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ int code; /**< Status code */ const char* name; /**< Code short name */ const char* description; /**< Code long description, from ofx_error_msg.h */ int code_valid; /**< If code_valid is true, so is name and description (They are obtained from a lookup table) */ /** Severity of the error */ enum Severity { INFO, /**< The status is an informational message */ WARN, /**< The status is a warning */ ERROR /**< The status is a true error */ } severity; int severity_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ char* server_message; /**< Explanation given by the server for the Status Code. Especially important for generic errors. */ int server_message_valid; /*@}*/ }; /** * \brief The callback function for the OfxStatusData stucture. * * An ofx_proc_status_cb event is sent everytime the server has * generated a OFX STATUS element. As such, it could be received at * any time(but not during other events). An OfxStatusData * structure is passed to this event, as well as a pointer to an * arbitrary data structure. */ typedef int (*LibofxProcStatusCallback)(const struct OfxStatusData data, void * status_data); /** * \brief An abstraction of an account * * The OfxAccountData structure gives information about a specific * account, including it's type, currency and unique id. * * When an OfxAccountData must be passed to functions which create * OFX requests related to a specific account, it must contain all * the info needed for an OFX request to identify an account. That * is: account_type, account_number, bank_id and branch_id */ struct OfxAccountData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ /** The account_id is actually built from for a bank account, and for a credit card account. account_id is meant to be computer-readable. It is a worldwide OFX unique identifier wich can be used for account matching, even in system with multiple users.*/ char account_id[OFX_ACCOUNT_ID_LENGTH]; /** The account_id_name is a string meant to allow the user to identify the account. Currently it is for a bank account and a credit card account an : for investment accounts. account_id_name is not meant to be computer-readable and is not garanteed to be unique.*/ char account_name[OFX_ACCOUNT_NAME_LENGTH]; int account_id_valid;/* Use for both account_id and account_name */ /** account_type tells you what kind of account this is. See the * AccountType enum */ enum AccountType { OFX_CHECKING, /**< A standard checking account */ OFX_SAVINGS, /**< A standard savings account */ OFX_MONEYMRKT, /**< A money market account */ OFX_CREDITLINE,/**< A line of credit */ OFX_CMA, /**< Cash Management Account */ OFX_CREDITCARD,/**< A credit card account */ OFX_INVESTMENT /**< An investment account */ } account_type; int account_type_valid; /** The currency is a string in ISO-4217 format */ char currency[OFX_CURRENCY_LENGTH]; int currency_valid; /** Corresponds to OFX */ char account_number[OFX_ACCTID_LENGTH]; int account_number_valid; /** Corresponds to OFX */ char bank_id[OFX_BANKID_LENGTH]; int bank_id_valid; char broker_id[OFX_BROKERID_LENGTH]; int broker_id_valid; char branch_id[OFX_BRANCHID_LENGTH]; int branch_id_valid; }; /** * \brief The callback function for the OfxAccountData stucture. * * The ofx_proc_account_cb event is always generated first, to allow * the application to create accounts or ask the user to match an * existing account before the ofx_proc_statement and * ofx_proc_transaction event are received. An OfxAccountData is * passed to this event. * Note however that this OfxAccountData structure will also be available as part of OfxStatementData structure passed to ofx_proc_statement event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcAccountCallback)(const struct OfxAccountData data, void * account_data); /** * \brief An abstraction of a security, such as a stock, mutual fund, etc. * * The OfxSecurityData stucture is used to hols the securyty * information inside a OfxTransactionData struct for investment * transactions. */ struct OfxSecurityData { /** @name OFX mandatory elements * * The OFX spec defines the following elements as mandatory. The * associated variables should all contain valid data but you * should not trust the servers. Check if the associated *_valid * is true before using them. */ char unique_id[OFX_UNIQUE_ID_LENGTH]; /**< The id of the security being traded.*/ int unique_id_valid; char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];/**< Usially "CUSIP" for FIs in north america*/ int unique_id_type_valid; char secname[OFX_SECNAME_LENGTH];/**< The full name of the security */ int secname_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ char ticker[OFX_TICKER_LENGTH];/**< The ticker symbol of the security */ int ticker_valid; double unitprice;/**< The price of each unit of the security, as of date_unitprice */ int unitprice_valid; time_t date_unitprice;/**< The date as of which the unit price was valid. */ int date_unitprice_valid; /** The currency is a string in ISO-4217 format. It overrides the one defined in the statement for the unit price */ char currency[OFX_CURRENCY_LENGTH]; int currency_valid; char memo[OFX_MEMO2_LENGTH];/**< Extra information not included in name */ int memo_valid; };/* end struct OfxSecurityData */ /** * \brief The callback function for the OfxSecurityData stucture. * * An ofx_proc_security_cb event is generated for any securities * listed in the ofx file. It is generated after ofx_proc_statement * but before ofx_proc_transaction. It is meant to be used to allow * the client to create a new commodity or security (such as a new * stock type). Please note however that this information is * usually also available as part of each OfxtransactionData. An OfxSecurityData structure is passed to this event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcSecurityCallback)(const struct OfxSecurityData data, void * security_data); typedef enum { OFX_CREDIT, /**< Generic credit */ OFX_DEBIT, /**< Generic debit */ OFX_INT, /**< Interest earned or paid (Note: Depends on signage of amount) */ OFX_DIV, /**< Dividend */ OFX_FEE, /**< FI fee */ OFX_SRVCHG, /**< Service charge */ OFX_DEP, /**< Deposit */ OFX_ATM, /**< ATM debit or credit (Note: Depends on signage of amount) */ OFX_POS, /**< Point of sale debit or credit (Note: Depends on signage of amount) */ OFX_XFER, /**< Transfer */ OFX_CHECK, /**< Check */ OFX_PAYMENT, /**< Electronic payment */ OFX_CASH, /**< Cash withdrawal */ OFX_DIRECTDEP, /**< Direct deposit */ OFX_DIRECTDEBIT,/**< Merchant initiated debit */ OFX_REPEATPMT, /**< Repeating payment/standing order */ OFX_OTHER /**< Somer other type of transaction */ } TransactionType; typedef enum { OFX_BUYDEBT, /**< Buy debt security */ OFX_BUYMF, /**< Buy mutual fund */ OFX_BUYOPT, /**< Buy option */ OFX_BUYOTHER, /**< Buy other security type */ OFX_BUYSTOCK, /**< Buy stock */ OFX_CLOSUREOPT, /**< Close a position for an option */ OFX_INCOME, /**< Investment income is realized as cash into the investment account */ OFX_INVEXPENSE, /**< Misc investment expense that is associated with a specific security */ OFX_JRNLFUND, /**< Journaling cash holdings between subaccounts within the same investment account */ OFX_JRNLSEC, /**< Journaling security holdings between subaccounts within the same investment account */ OFX_MARGININTEREST, /**< Margin interest expense */ OFX_REINVEST, /**< Reinvestment of income */ OFX_RETOFCAP, /**< Return of capital */ OFX_SELLDEBT, /**< Sell debt security. Used when debt is sold, called, or reached maturity */ OFX_SELLMF, /**< Sell mutual fund */ OFX_SELLOPT, /**< Sell option */ OFX_SELLOTHER, /**< Sell other type of security */ OFX_SELLSTOCK, /**< Sell stock */ OFX_SPLIT, /**< Stock or mutial fund split */ OFX_TRANSFER /**< Transfer holdings in and out of the investment account */ } InvTransactionType; typedef enum { DELETE, /**< The transaction with a fi_id matching fi_id_corrected should be deleted */ REPLACE /**< The transaction with a fi_id matching fi_id_corrected should be replaced with this one */ } FiIdCorrectionAction; /** * \brief An abstraction of a transaction in an account. * * The OfxTransactionData stucture contains all available * information about an actual transaction in an account. */ struct OfxTransactionData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ char account_id[OFX_ACCOUNT_ID_LENGTH];/**< Use this for matching with the relevant account in your application */ struct OfxAccountData * account_ptr; /**< Pointer to the full account structure, see OfxAccountData */ int account_id_valid; TransactionType transactiontype; int transactiontype_valid; /**< Investment transaction type. You should read this if transactiontype == OFX_OTHER. See OFX spec 1.6 p.442 to 445 for details*/ InvTransactionType invtransactiontype; int invtransactiontype_valid; /** Variation of the number of units of the commodity Suppose units is -10, ave unitprice is 1. If the commodity is stock, you have 10 less stock, but 10 more dollars in you amccount (fees not considered, see amount). If commodity is money, you have 10 less dollars in your pocket, but 10 more in your account */ double units; int units_valid; double unitprice; /**< Value of each unit, 1.00 if the commodity is money */ int unitprice_valid; double amount; /**< Total monetary amount of the transaction, signage will determine if money went in or out. amount is the total amount: -(units) * unitprice - various fees */ int amount_valid; char fi_id[256]; /**< Generated by the financial institution (fi), unique id of the transaction, to be used to detect duplicate downloads */ int fi_id_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ /** The id of the security being traded. Mandatory for investment transactions */ char unique_id[OFX_UNIQUE_ID_LENGTH]; int unique_id_valid; char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];/**< Usially "CUSIP" for FIs in north america*/ int unique_id_type_valid; struct OfxSecurityData *security_data_ptr; /** A pointer to the security's data.*/ int security_data_valid; time_t date_posted;/**< Date the transaction took effect (ex: date it appeared on your credit card bill). Setlement date; for stock split, execution date. * Mandatory for bank and credit card transactions */ int date_posted_valid; time_t date_initiated;/**< Date the transaction was initiated (ex: date you bought something in a store for credit card; trade date for stocks; day of record for stock split) * Mandatory for investment transactions */ int date_initiated_valid; time_t date_funds_available;/**< Date the funds are available (not always provided) (ex: the date you are allowed to withdraw a deposit */ int date_funds_available_valid; /** IMPORTANT: if fi_id_corrected is present, this transaction is meant to replace or delete the transaction with this fi_id. See OfxTransactionData::fi_id_correction_action to know what to do. */ char fi_id_corrected[256]; int fi_id_corrected_valid; /** The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken */ FiIdCorrectionAction fi_id_correction_action; int fi_id_correction_action_valid; /** Used for user initiated transaction such as payment or funds transfer. Can be seen as a confirmation number. */ char server_transaction_id[OFX_SVRTID2_LENGTH]; int server_transaction_id_valid; /** The check number is most likely an integer and can probably be converted properly with atoi(). However the spec allows for up to 12 digits, so it is not garanteed to work */ char check_number[OFX_CHECK_NUMBER_LENGTH]; int check_number_valid; /** Might present in addition to or instead of a check_number. Not necessarily a number */ char reference_number[OFX_REFERENCE_NUMBER_LENGTH]; int reference_number_valid; long int standard_industrial_code;/**< The standard industrial code can have at most 6 digits */ int standard_industrial_code_valid; char payee_id[OFX_SVRTID2_LENGTH];/**< The identifier of the payee */ int payee_id_valid; char name[OFX_TRANSACTION_NAME_LENGTH];/**< Can be the name of the payee or the description of the transaction */ int name_valid; char memo[OFX_MEMO2_LENGTH];/**< Extra information not included in name */ int memo_valid; double commission;/**< Commission paid to broker (investment transactions only) */ int commission_valid; double fees;/**< Fees applied to trade (investment transactions only) */ int fees_valid; double oldunits; /*number of units held before stock split */ int oldunits_valid; double newunits; /*number of units held after stock split */ int newunits_valid; /*********** NOT YET COMPLETE!!! *********************/ }; /** * \brief The callback function for the OfxTransactionData stucture. * * An ofx_proc_transaction_cb event is generated for every * transaction in the ofx response, after ofx_proc_statement (and * possibly ofx_proc_security is generated. An OfxTransactionData * structure is passed to this event, as well as a pointer to an * arbitrary data structure. */ typedef int (*LibofxProcTransactionCallback)(const struct OfxTransactionData data, void * transaction_data); /** * \brief An abstraction of an account statement. * * The OfxStatementData structure contains information about your * account at the time the ofx response was generated, including the * balance. A client should check that the total of his recorded * transactions matches the total given here, and warn the user if * they dont. */ struct OfxStatementData { /** @name OFX mandatory elements * The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them. */ char currency[OFX_CURRENCY_LENGTH]; /**< The currency is a string in ISO-4217 format */ int currency_valid; char account_id[OFX_ACCOUNT_ID_LENGTH];/**< Use this for matching this statement with the relevant account in your application */ struct OfxAccountData * account_ptr; /**< Pointer to the full account structure, see OfxAccountData */ int account_id_valid; /** The actual balance, according to the FI. The user should be warned of any discrepency between this and the balance in the application */ double ledger_balance; int ledger_balance_valid; time_t ledger_balance_date;/**< Time of the ledger_balance snapshot */ int ledger_balance_date_valid; /** @name OFX optional elements * The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data. */ double available_balance; /**< Amount of money available from the account. Could be the credit left for a credit card, or amount that can be withdrawn using INTERAC) */ int available_balance_valid; time_t available_balance_date;/** Time of the available_balance snapshot */ int available_balance_date_valid; /** The start time of this statement. * All the transactions between date_start and date_end should have been provided */ time_t date_start; int date_start_valid; /** The end time of this statement. * If provided, the user can use this date as the start date of his next statement request. He is then assured not to miss any transactions. */ time_t date_end; int date_end_valid; /** marketing_info could be special offers or messages from the bank, or just about anything else */ char marketing_info[OFX_MARKETING_INFO_LENGTH]; int marketing_info_valid; }; /** * \brief The callback function for the OfxStatementData stucture. * * The ofx_proc_statement_cb event is sent after all ofx_proc_transaction events have been sent. An OfxStatementData is passed to this event, as well as a pointer to an arbitrary data structure. */ typedef int (*LibofxProcStatementCallback)(const struct OfxStatementData data, void * statement_data); /** \brief NOT YET SUPPORTED */ struct OfxCurrency { char currency[OFX_CURRENCY_LENGTH]; /**< Currency in ISO-4217 format */ double exchange_rate; /**< Exchange rate from the normal currency of the account */ int must_convert; /**< true or false */ }; /** * Set the status callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data); /** * Set the account callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data); /** * Set the security callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data); /** * Set the transaction callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data); /** * Set the statement callback in the given context. * @param ctx context * @param cb callback function * @param user_data user data to be passed to the callback */ void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data); /** * Parses the content of the given buffer. */ int libofx_proc_buffer(LibofxContextPtr ctx, const char *s, unsigned int size); /* **************************************** */ /** @name Creating OFX Files * * This group deals with creating OFX files */ //@{ /** * \brief Information returned by the OFX Partner Server about a financial institution */ struct OfxFiServiceInfo { char fid[OFX_FID_LENGTH]; char org[OFX_ORG_LENGTH]; char url[OFX_URL_LENGTH]; int accountlist; /**< Whether the FI makes a list of accounts available */ int statements; /**< Whether the FI supports online statement download */ int billpay; /**< Whether the FI supports online bill payment */ int investments; /**< Whether the FI supports investments */ }; /** * \brief Information sufficient to log into an financial institution * * Contains all the info needed for a user to log into a financial * institution and make requests for statements or post transactions. * An OfxFiLogin must be passed to all functions which create OFX * requests. */ struct OfxFiLogin { char fid[OFX_FID_LENGTH]; char org[OFX_ORG_LENGTH]; char userid[OFX_USERID_LENGTH]; char userpass[OFX_USERPASS_LENGTH]; char header_version[OFX_HEADERVERSION_LENGTH]; char appid[OFX_APPID_LENGTH]; char appver[OFX_APPVER_LENGTH]; }; #define OFX_AMOUNT_LENGTH (32 + 1) #define OFX_PAYACCT_LENGTH (32 + 1) #define OFX_STATE_LENGTH (5 + 1) #define OFX_POSTALCODE_LENGTH (11 + 1) #define OFX_NAME_LENGTH (32 + 1) struct OfxPayment { char amount[OFX_AMOUNT_LENGTH]; char account[OFX_PAYACCT_LENGTH]; char datedue[9]; char memo[OFX_MEMO_LENGTH]; }; struct OfxPayee { char name[OFX_NAME_LENGTH]; char address1[OFX_NAME_LENGTH]; char city[OFX_NAME_LENGTH]; char state[OFX_STATE_LENGTH]; char postalcode[OFX_POSTALCODE_LENGTH]; char phone[OFX_NAME_LENGTH]; }; /** * \brief Creates an OFX statement request in string form * * Creates a string which should be passed to an OFX server. This string is * an OFX request suitable to retrieve a statement for the @p account from the * @p fi * * @param fi Identifies the financial institution and the user logging in. * @param account Idenfities the account for which a statement is desired * @return string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free. */ char* libofx_request_statement( const struct OfxFiLogin* fi, const struct OfxAccountData* account, time_t date_from ); /** * \brief Creates an OFX account info (list) request in string form * * Creates a string which should be passed to an OFX server. This string is * an OFX request suitable to retrieve a list of accounts from the * @p fi * * @param fi Identifies the financial institution and the user logging in. * @return string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free. */ char* libofx_request_accountinfo( const struct OfxFiLogin* login ); char* libofx_request_payment( const struct OfxFiLogin* login, const struct OfxAccountData* account, const struct OfxPayee* payee, const struct OfxPayment* payment ); char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid ); //@} #ifdef __cplusplus } // end of extern "C" #endif #endif // end of LIBOFX_H libofx-0.9.4/inc/Makefile.am0000644000175000017500000000003611544727432012545 00000000000000pkginclude_HEADERS = libofx.h libofx-0.9.4/inc/Makefile.in0000644000175000017500000003453011553123277012561 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = inc DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libofx.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = libofx.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkginclude_HEADERS = libofx.h 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu inc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu inc/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 $(am__aclocal_m4_deps): libofx.h: $(top_builddir)/config.status $(srcdir)/libofx.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pkgincludeHEADERS # 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: libofx-0.9.4/config/0000755000175000017500000000000011553134312011253 500000000000000libofx-0.9.4/config/install-sh0000755000175000017500000003253711500011217013177 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; 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 if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $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 "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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 if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$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 $cpprog $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 $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 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. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libofx-0.9.4/config/depcomp0000755000175000017500000004426711500011217012553 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see . # 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'. DEPDIR directory where to store dependencies. 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 $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; 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 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 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 cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" 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. 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 tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. 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 tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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 # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done 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 "X$1" != 'X--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 "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi 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. -arch) eat=yes ;; -*|$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 "X$1" != 'X--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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [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. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # 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 ;; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libofx-0.9.4/config/ltmain.sh0000755000175000017500000073341511535036432013037 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [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 # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # 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 `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 # 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # 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: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # 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='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # 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 </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # 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 () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" 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. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # 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 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) 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" 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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface 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: $progname [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." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" 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 func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # 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 } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug 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. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $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" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # 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" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # 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) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -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. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; 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. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # 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 func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_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 func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile="$func_basename_result" 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" 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 anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_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 progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # 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/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; 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 } # 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 () { $opt_debug 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 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac 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_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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' # 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+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' 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 "\ # 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 " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ 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 "\ # 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 "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ 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* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 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 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #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 S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_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 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"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; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append 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" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$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 func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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. func_append 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 func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; 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 ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" 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* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # 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 System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" 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*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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. func_append 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 func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool 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. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" 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\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_duplicate_deps ; 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 $opt_duplicate_compiler_generated_deps; 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 dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; 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 # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi 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 "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" 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|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; 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 func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" 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 func_dirname "$lib" "" "." ladir="$func_dirname_result" 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 *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; 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 func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # 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) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; 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 use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac 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 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` 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 func_fatal_error "cannot find name of link library for \`$lib'" 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 $opt_duplicate_deps ; 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 func_fatal_error "\`$lib' is not a convenience library" 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 func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" 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 func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # 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 func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" 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" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $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*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; 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 $opt_duplicate_deps ; 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 "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; 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 use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && 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 shift realname="$1" 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* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then 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 && test "$hardcode_direct_absolute" = no; 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 func_fatal_configuration "unsupported hardcode properties" 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 && test "$hardcode_direct_absolute" = no; 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 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*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result 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 $opt_duplicate_deps ; 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 path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= 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 "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi 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" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # 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*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" 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 test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # 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="$1" number_minor="$2" number_revision="$3" # # 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|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; 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]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 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) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result 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 func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; 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 func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= 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 | *.gcno) ;; $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 test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" 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 "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -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* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # 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. $opt_dry_run || $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 -e 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 ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result 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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 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 ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac 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" | $Xsed -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 with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # 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 shift realname="$1" 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" linknames= 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` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $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" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= 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 $opt_dry_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:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append 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~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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 test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "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" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi 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\" test "X$libobjs" = "X " && libobjs= 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_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 "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_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 and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" 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" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_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" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." 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 / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" 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* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; 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 func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; 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. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status 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. $opt_dry_run || $RM $output # Link the executable and exit func_show_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" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" 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. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } 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 $symfileobj" 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" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" 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 # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$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 func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 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 func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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. $opt_dry_run || { 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) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac 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 | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug 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 test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" 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 func_lalib_p "$file"; then func_source $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" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $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) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $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 func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # 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 func_show_eval "$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 func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # 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: # vi:sw=2 libofx-0.9.4/config/missing0000755000175000017500000002623311500011217012566 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 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, see . # 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=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # 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 ;; -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' autom4te touch the output file, or create a stub one 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] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) 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*) 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*) 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*) 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*) 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) 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." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libofx-0.9.4/config/config.sub0000755000175000017500000010344511371534605013174 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2010-01-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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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 GNU 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. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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, 2006, 2007, 2008, 2009, 2010 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 ;; * ) 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-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-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 | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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 | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # 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-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # 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 ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; 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 ;; cr16) basic_machine=cr16-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 ;; dicos) basic_machine=i686-pc os=-dicos ;; 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 ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; 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 ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; 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 ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; 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 ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; 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 ;; z80-*-coff) basic_machine=z80-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 ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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. -auroraux) os=-auroraux ;; -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* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -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* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -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* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # 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* | -haiku* \ | -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 ;; -dicos*) os=-dicos ;; -nacl*) ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-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 ;; mep-*) os=-elf ;; 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 ;; *-haiku) os=-haiku ;; *-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 ;; -cnk*|-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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libofx-0.9.4/config/config.guess0000755000175000017500000012763711371534605013542 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, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2009-12-30' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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 (context # diff format) to and include a 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. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 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, 2006, 2007, 2008, 2009, 2010 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 "$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 ; set_cc_for_build= ;' # 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 ;; sh5el) machine=sh5le-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 -q __ELF__ 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 ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; 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 ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; 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 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; 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 ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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 ;; 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 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; 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 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; 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 && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; 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 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; 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 ;; *: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 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi 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 ;; *:AIX:*:[456]) 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 ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; 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 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; 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 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *: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 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; 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 -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #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; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; 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 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; 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 ;; 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 ;; 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 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; 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 ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. 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 ;; 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 ;; 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *: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 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *: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 ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *: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 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; 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\n"); 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # 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 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; 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: libofx-0.9.4/ChangeLog0000644000175000017500000006455511544727432011532 000000000000002011-01-12 Christian Stimming * configure.in: Release 0.9.2 with the previous bugfixes. * lib/ofx_preproc.cpp: Win32: Add gnucash patch that looks up the dtd installation directory from the current executable's location. 2010-10-26 Benoit Grégoire * Apply patch by Geert Janssens to fix crash on invalid date format 2010-04-27 Benoit Grégoire * Patch by ajseward with some additional fixes to allow wraping the library in python. 2010-02-04 Benoit Grégoire * Applied a patch provided by Thomas Baumgart which fixes bug #5 (Transaction posting date off by one) 2009-05-15 Benoit Grégoire * Various C++ include fixes for building with recent compilers. Patch by Bill Nottingham 2009-02-09 Christian Stimming * configure.in: Release 0.9.1 with the bugfix for gnucash 2008-12-06 Christian Stimming * lib/ofx_preproc.cpp: Add more sanity checks on string length. I forgot the bug which required those to be fixed, but I fixed them anyway. * lib/ofx_preproc.cpp: Fix gnucash crash on OFX files with non-ascii characters and very long lines. See http://bugzilla.gnome.org/show_bug.cgi?id=528306 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493597. Patch was copied from the latter. Patch by Jerome Vouillon. 20/11/2007 Martin Preuss * updated specfile 19/11/2007 Martin Preuss * Release 0.9.0 12/11/2007 Martin Preuss * ofx_preproc.cpp: Increased size of file name buffer (50 was too small) 28/9/2007 Martin Preuss * libofx.h: added some fields to OfxFiLogin: - header_version - appid - appver It seems to become necessary with some new servers to modify these fields by the application. 27/9/2007 Martin Preuss * ofx_request_statement.cpp: Incremented versions written to the request * libofx.h, ofx_utilities.cpp: replaced some char* with "const char*" to make GCC happy, wrapped arithmetic calculations in macro definitions in brackets to avoid mathematical problems * libofx.h: Removed this file, replaced it with libofx.h.in. This is used to create libofx.h which now includes some subst variables conveying the version of LibOFX to source files. Introduced LIBOFX_BUILD_VERSION and LIBOFX_VERSION_RELEASE_STRING to distinguish even CVS versions. Added function libofx_set_dtd_dir() which allows to set the folder in which DTD files are stored. This is needed for local installations (e.g. WIN32) * libofx.pc.in: depending libraries don't need to link against OpenSP themselves, since LibOFX encapsulates it, no need to propagate unnecessary dependencies * ofx_utilities.{cpp,h}: added a function to generate a temp file name (works on WIN32 and Linux) 24/1/2007: Benoit Grégoire * ofx_preproc.cpp: Now parses the OFX headers to determine the input charset and encoding, and uses libiconv (if available) to convert the encoding since OpenSP can't do it. The default output is now UTF-8. This will "do the right thing" for Gnucash 2 and any client that uses UTF-8 strings, but we should add an interface to let the client chose his prefered output encoding. 9/1/2007: Benoit Grégoire * Adapted patch by Christian Lupien to add processing of the different bank account types in OfxPaymentRequest. Took this oportunity to correct an API duplication problem before it get's even more complicated to fix: deleted OfxAccountInfo (OfxAccountData should be used instead) and the global scopt AccountType enum (use the one in OfxAccountData). Both of these changes will require source code change in aqbanking. * Bump the version and soname right now so aqbanking can detect it. 8/1/2007: Benoit Grégoire * Release 0.8.3 27/9/2006 Martin Preuss * lib/ofx_preproc.cpp: Make sure all results of string::find are inside the string's length; make sure to erase parts of the string only if the string is long enough. Fixes crash http://bugzilla.gnome.org/show_bug.cgi?id=353986 Patch supplied by Christian Stimming from GnuCash 25/8/2006: Benoit Grégoire * Fix datatype mismatch in ofx_preproc.cpp * Fix gengetopt related build problems on debian based distribution. * Remove massage about dependency on Qt, qhich is no longuer true * Fix ofxconnect headers not being distributed * Remove cmdline.c and cmdline.h which shouldn't be versionned * Release 0.8.2 3/8/2006 David Resier * Added fields used in stock splits (newunits, oldunits) Patch applied by Ace Jones 28/7/2006 Ace Jones * Fixed a compilation bug on GCC 4.1 20/7/2006: Benoit Grégoire * Revert last change to ofxdump, as it requires a system-dependent header (plus it didn't compile on my system) * Make both curl and libxml++ optional for compilation. * Add some debug output. * Update tree.hh 15/7/2006 Ace Jones * Modified build script to not build ofxconnect if libxml++1.0 is missing. 12/6/2006 Ace Jones * Fixed a compilation bug on GCC 4.1 28/3/2006 Ace Jones * Fixed an improper header reference in ofxpartner.cpp/h * Fixed a segfault if ofxdump is run without a file 28/2/2006 Ace Jones * Removed Qt requirement accidentally introduced in my last checkin 20/2/2006 Ace Jones * Added sample code to ofxconnect to demonstrate how to contact the OFX partner server 15/2/2006 Ace Jones * Fixed #1408764. Buffer overrun in MESSAGE tag handling. * Fixed a memory leak in OfxStatusContainer::add_attribute() 20/1/2006 Ace Jones * Print out bank id, branch id, and account number in ofxdump * Fixed a bug under gcc 4.0.2 64-bit where errno is not found in ofxdump * Fixed a build problem where @LIBOBJ@ was not being substituted 16/1/2006 Ace Jones * Added OfxFiServiceInfo struct. Need this for communicating with the partner server. Will add the code for that next. * Added broker_id to OfxAccountData 17/12/2005 Ace Jones * Fixed ofxdump to give a reasonable error if you run it on a file that doesn't exist. * Added proper libcurl.m4 to check for existence & compilability of libcurl * Make libcurl optional again by handling its absense in ofxconnect 17/11/2005 Martin Preuss * added pkg-config file to spec file * fixed spec file (was mentioning libraries twice) 1/10/2005 Ace Jones * Bumped version to 0.8.1 (due to transaction struct change) * Added a pkg-config file 25/9/2005 Ace Jones * Brought in new tree.hh from http://www.aei.mpg.de/~peekas/tree * Removed a workaround in all uses of tree::number_of_siblings(). This appears to work around a bug in tree.h which caused the siblings to be overcounted. That bug is fixed, so this workaround is not needed. 24/9/2005 Ace Jones * Fixed a namespace bug that's fatal on GCC4.0 Submitted by Christian Stimming 27/8/2005 Ace Jones * Added fees and commission fields to transaction structure (and fill them in) 31/7/2005: Benoit Grégoire * Release 0.8.0 * configure.in: Update libtool version number. Make curl check fatal untill there is code to conditionally not compile ofxconnect when CURL is unavailable. * Fix the build system so that discheck will finally run properly. 11/7/2005 Ace Jones * Upgraded the app version for OFX Requests (some banks are denying the old version now) * Moved bank & broker ID's from OfxFiLogin to OfxAccountInfo, which is more accurate * Renamed a couple AccountType enums to be consistent with the others 22/4/2005 Martin Preuss * added fields bank_id, bank_id_valid, branch_id, branch_id_valid, account_number and account_number_valid to OfxAccountData according to discussion on LibOFX mailinglist. 19/4/2005 Ace Jones * Improved ofxconnect to do the POST operation itself * Improved the ofxconnect unit test to be mostly cleartext except the server login information. 20/4/2005 Martin Preuss * inserted an \"#ifndef\" before definition of static variables to allow include from multiple source files of a project 18/4/2005: Ace Jones * Added libofx_request_statement API, and underlying support classes, to create an OFX statement request * Added libofx_request_accountinfo API to create an OFX account into request * Added ofxconnect sample app to demonstrate & test new API's (try "make check" in the ofxconnect folder). Read README.privateserver first. 24/11/2004: Benoit Grégoire * Apply Christian Stimming's patch for rpm building. Also adds a make rpm target. 08/10/2004: Benoit Grégoire * Release 0.7.0 * configure.in: Update libtool version number. 21/9/2004 Benoit Grégoire * Really remove callback.hh and callback.cpp * Fix compile with gcc 3.4. This also needs to be applied to the stable branch. * Fix tree handling for securities, which caused the callbacks never to be called. 31/8/2004 Benoit Grégoire * Remove obsolete files callback.hh and callback.cpp * More makefile fixes in lib 1/9/2004 Martin Preuss * simplified internal callback mechanism (removed CallbackRegistry, it is easier this way) * protected members of LibOfxContext (you need to call methods to get/set them) * added functions which allow to set each callback individually. If you are not interested in a particular callback you don't need to set it * removed the all-callback setter * all callbacks now pass LibOfxContext which either propagates the callback or silently ignores it (for callbacks which haven't been set) * a few Makefile fixes in lib * adjusted ofxdump and ofx2qif to these changes 31/8/2004 Benoit Grégoire * Revamp the callback architecture according to discussion with Martin Preuss. This is much cleaner and extensible, although a long way from perfect. * Autoconf fixes from Martin Preuss 23/4/2004 Benoit Grégoire * At long last, a flexible and extendable command line parser is used in ofxdump. This was essential for debuging, and even more essential for developing Direct Connect. Immediate benefits are that you can set the desired debug output without recompiling. Check ofxdump --help for options. * configure.in: gengetopt will be used if available. * lib/Makefile.am: * ofxdump/Makefile.am * ofxdump/ofxdump.cpp * lib/getopt.c lib/getopt1.c lib/gnugetopt.h: Required in case getopt_long() isn't available. * ofxdump/cmdline.ggo: Command line argument definitions. * ofxdump/cmdline.c,h: Files generated by gengetopt, must be in CVS so developers don't have to have gengetopt installed. * Much improved file format handling. Supported file formats can now be listed and described. * inc/libofx.h: * lib/context.hh * lib/file_preproc.cpp * lib/file_preproc.hh 8/4/2004 Benoit Grégoire * Multiple files: Working (but incomplete) OFC import. Still need cleanup. Pass context everywhere. Begin cleaning up tree handling. * lib/tree.hh: Upgrade to latest version 31/3/2004 Benoit Grégoire * lib/context.cpp,hh: New files. Create a global libofx object to allow the library to cleanly keep state. This will allow much cleanup, and is needed for the move to a DOM style interface. Other files ajusted to match. 7/3/2004 Benoit Grégoire * lib/ofc_sgml.cpp/hh: New files. Splits code path for OFC and OFX to keep things understandeable. Some more OFC parsing. Now waiting to implement global libofx context object passed everywhere to make further progress. * lib/messages.cpp: Move the definition of the required globals for displaying line numbers there, as it's the only place they are read. 3/3/2004 Benoit Grégoire * Many... * lib/file_preproc.cpp, lib/file_preproc.hh: Add file format autodetection architecture, can currently distinguish between OFX and OFC files. Note that because of this change, the main entry point of the library is now in file_preproc.cpp. * dtd/ofc.dtd, lib/ofx_sgml.cpp, lib/ofx_preproc.cpp: Add embryo of OFC (Microsoft Open Financial Connectivity) to LibOFX. The SGML parses succesfully, but LibOFX does not yet know what to do with it. Big thanks to Jeremy Jongsma jeremy at jongsma.org for finally finding the required DTD. I haven't yet decided if its better to to add this support to ofx_proc_sgml.cpp (easier to maintain, less code duplication), or to create a ofc_proc_sgml.cpp (easier to understand, cleaner code). 3/2/2004 Benoit Grégoire * inc/libofx.h lib/ofx_preproc.cpp lib/tree.hh ofx2qif/ofx2qif.c ofxdump/ofxdump.cpp: Make it compile. I may have misunderstood what Ryan wanted to do with the prototypes in libofx.h. If so, sorry. Note: I don't think that the void * passed as arguments are saved in the registry yet. 18/1/2004 Ryan P Bobko * inc/libofx.h * lib/ofx_container_statement.cpp * lib/ofx_container_account.cpp * lib/ofx_container_transaction.cpp * lib/ofx_container_security.cpp * lib/ofx_containers_misc.cpp * ofxdump/ofxdump.cpp * ofx2qif/ofx2qif.c: all these files: improved callback registry by including a void pointer to arbitrary data (which can be set by the client in ofx_prep_cb). The pointer gets passed to the callback function as the second argument. 14/1/2004 Benoit Grégoire * Merge initial Callback registration patch by Ryan P Bobko. Touches most files. 14/1/2004 Benoit Grégoire RELEASE LibOfx 0.6.6 * configure.in: Change version number * NEWS: Update for release * Makefile.am: Add version number to docdir name * libofx.spec.in: Remove known_bugs.txt 14/1/2004 Benoit Grégoire * dtd/Makefile.am, dtd/opensp.dcl, * lib/ofx_preproc.[cpp,hh],: Add SGML declaration to be parsed before the DTD. Makes us immune to changes to default settings. Should get rid of "end tag for "MEMO" omitted, but OMITTAG NO was specified" type of messages and greatly help the parser. * lib/ofx_sgml.cpp: Get rid of OpenSP 1.3.1 compatibility code, which makes the code much easier to understand and debug. Combined with the change obove, it should practically eliminate the parsing ambiguity that made libofx so verbose and ocasionally miss data. More defensive coding to warn of malformed files. This probably means that compatibility with OpenSP 1.3.1 cannot come back. However with the change above it may work after all. Somebody please test this... * lib/messages.cpp: Finally implement displaying line numbers in the error output. This can be turned off by the clients by setting the ofx_show_position global. These should all get setter functions in the API re-write. 6/12/2003 Benoit Grégoire * lib/ofx_container_transaction.cpp: Fix an infinite loop when searching for a parent statement for a transaction if it isn't the immediate parent. Thanks to stephen.a.prior A T ntlworld.ie for the catch. 12/9/2003 Benoit Grégoire RELEASE LibOfx 0.6.5 * configure.in: Change version number * NEWS: Update for release * lib/ofx_utilities.cpp: Change date handling to fix problems with the majority of banks diverging from the specs. Should fix problems with the day being off by one for some countries. * doc/implementation_notes.txt: Moved contents in the doxygen docs. * doc/Makefile.am: Fix the path for the html docs. 2/5/2003 Benoit Grégoire * lib/ofx_utilities.cpp: Add #include to fix compile error on freebsd and possibly all gcc2 based distro. 15/4/2003 Benoit Grégoire * lib/ofx_preproc.cpp: Fix for really broken files that do not have a newline after the ofx header. Fixes bug #721732 12/4/2003 Benoit Grégoire RELEASE LibOfx 0.6.4 * configure.in: Change version number * NEWS: Update for release * lib/ofx_utilities.cpp: Fix bug in ofxamount_to_double() triggered by the client setting the locale. If the locale used ',' as decimal separator, it would get normalised to '.' and atof() would fail. Now normalises to (localeconv())->decimal_point. Closes gnucash bug 105481 18/3/2003 Benoit Grégoire RELEASE LibOfx 0.6.3 * NEWS: Update for release * Makefile.am: Remove references to known_bugx.txt 16/3/2003 Benoit Grégoire * configure.in: Remove --with-opensp-multibyte configure option (it is now the default). There is now a --with-no-opensp-multibyte instead, to force libofx to assume that OpenSP was NOT compiled with SP_MULTI_BYTE defined. * doc/doxygen.cfg: Remove, this file is now generated from doc/doxygen.cfg.in * known_bugx.txt: Remove file, since we now have a bugtracker. * README: Update * INSTALL: Delete and replace by FAQ, update content. 11/3/2003 Benoit Grégoire * ofxdump/ofxdump.cpp: Remove comand line arguments debug output. * lib/ofx_container_main.cpp: Fix compiler warnings reported by Derek Atkins * Misc build system cleanup 24/2/2003 Benoit Grégoire * ofx2qif/ofx2qif.c: Apply patch by Scott Gifford to fix ofx2qif crash. * Add a bunch of .cvsignore files 3/2/2003 Benoit Grégoire * dtd/ofx160.dtd: Correct the dtd to fix the "content model is ambiguous" errors reported by opensp. 27/1/2003 Thomas Frayne * ofxdump/ofxdump.cpp: Add command options: --version, -V, --help 3/2/2003 Benoit Grégoire * lib/ofx_utilities.cpp: Fix ofxdate_to_time_t() that wouldn't compile on sun. 23/1/2003 Benoit Grégoire * lib/ofx_container_transaction.cpp: Explicitely ignore since it should always be equal to UNITS*UNITPRICE, and using it may lead to rounding errors. 22/1/2003 Benoit Grégoire * autogen.sh: Run libtoolize, and reorder the commands. The order is now: libtoolize,aclocal, autoheader, automake, autoconf and configure 11/1/2003 Benoit Grégoire * lib/ofx_utilities.cpp: Really fix problems for big endian machines. * INSTALL: Document the --with-opensp-multibyte workaround for when headers in package lie about the compile option of OpenSP (usually because they were not compiled at the same time). This is the case with the OpenJade package distributed in Mandrake cooker, and perhaps others. * configure.in: add --with-opensp-multibyte option 10/1/2003 Benoit Grégoire * lib/ofx_utilities.cpp: Try to fix problems for big endian machines. 9/1/2003 Benoit Grégoire * configure.in: Add /usr/local/include to OpenSP's include search path. * INSTALL: Add FAQ for "bug" http://sourceforge.net/tracker/index.php?func=detail&aid=654591&group_id=61170&atid=496353 9/1/2003 Benoit Grégoire * lib/ofx_utilities.cpp: Remove the ugly get_sp_char_size() hack and use SP_MULTI_BYTE in config.h instead. This probably fixes the "libofx not working on big endian machines" bug. 9/1/2003 Benoit Grégoire * configure.in: Now detect if OpenSP was compiled with SP_MULTI_BYTE, and put the result in config. * INSTALL: Update for GNU build system. 04/12/2002 Peter O'Gorman * doc/Makefile.am: Make DESTDIR work * lib/Makefile.am: Changed version_info to version-info and modified the version to be what libtool expects. 24/11/2002 Chris Lyttle * libofx.spec.in: updated for new docs 24/11/2002 Benoit Grégoire * configure.in, doc/Makefile.am: Improve doxygen doc generation, and enable make install without the doc. 24/11/2002 Benoit Grégoire * ofx_sgml.cpp: Hopefully fix incompatibilities with BOTH OpenSP 1.3.x and OpenSP >= 1.4 * Makefile.am, doc/Makefile.am: Doxygen API and internal doc now integrated in the build system. It will be distributed and install with the tarballs, and can be build in libofx-cvs using make doc. * autogen.sh: Re-enable maintainer-mode. * doc/Makefile: Deleted * doc/resume_presentation.pdf: Deleted, too outdated. See project report on the libofx website instead. 23/11/2002 Chris Lyttle * libofx.spec.in: added for rpm builds * Makefile.am: added lines spec to EXTRA_DIST * configure.in: added spec.in line * autogen.sh: changed configure line to see arguments 18/11/2002 Benoit Grégoire * ofx_sgml.cpp: Fix critical bug. Parsing of a file would fail and hang for users of OpenSP 1.5pre5 (and possibly others). Simplify workaround of OpenSP 1.3 bugs, more code is now shared. * configure.in: Update for release 0.6.1 18/11/2002 Benoit Grégoire * Update build files for release of libofx 0.6.0 30/10/2002 Benoit Grégoire * inc/libofx.h lib/ofx_container_transaction.cpp ofxdump/ofxdump.cpp: Created a new invtransactiontype enum to replace the invtranstype string 30/10/2002 Benoit Grégoire * lib/ofx_sgml.cpp: Added yet more spagetti code and global variables to improve the work around for OpenSP 1.3 bugs. I beg of you, please convince your distro to make openjade and the OpenSP library independently upgradable. 30/10/2002 Benoit Grégoire * configure.in: Apply Derek Atkins patch needed to build on > RH7.3 using the "distributed" version of openjade. 29/10/2002 Benoit Grégoire * lib/ofx_preproc.cpp doc/tag_striper_test.txt: Proprietary tag striper is now much smarter and read routines have been fixed. Importing a file written on a single line should now be possible. Added a test file for the proprietary tag striper . 29/10/2002 Benoit Grégoire * configure.in: Work around autoconf 2.1 not supporting AC_LANG() 21/10/2002 Benoit Grégoire * ofxdump/ofxdump.cpp: Add support for invtranstype in ofx_proc_transaction_cb() 21/10/2002 Benoit Grégoire * lib/ofx_preproc.cpp: Abort if DTD was not found 20/10/2002 Benoit Grégoire * Fix debug output * Begin fixing ofx2qif for the new transaction ordering code 17/10/2002 Benoit Grégoire * Implemented internal container trees, allowing transaction reordering and security lookups * Complete investment transaction support * Converted the build system to automake/autoconf, mostly contributed by "Peter O'Gorman" LibOFX 0.?????????: -Add an account_name to the OfxAccountData struct. It contains a human readable identifier of the account. -Include file location seems to have changed in recent versions of OpenSP. Included old and new case. -Profiling now possible. It is now posible to use "make static". Statically linked ofxdump and ofx2qif will be created, with profiling enabled. LibOFX 0.3: -MUCH improved documentation. Full API and internals reference in doc/html/ -Major update to ofx2qif. It will now generate the !Account QIF construct, which should improbe compatibility with other accounting software. -gcc3.2 caused problems with ld, now use gcc to link. Should solve the "undefined symbol:__dso_handle" runtime problem with Mandrake cooker. -There is now a workaround in the code to make it work with the OpenSP version (1.3.4) distributed with OpenJADE. However, this is not guaranteed to work, and it might cause errors in your financial data, and might not be present in future versions. Use at your own risk, you've been warned. -LibOFX can now be installed in "unorthodox" directories, such as ~/experimental, and still find it's dtd. You must modify the prefix in common.m (recommended) or put it in the command line of BOTH make and make install. -LibOFX is now officially in beta. Since one application now uses it (GnuCash), from now on, the library soname will be bumped if binary compatibility is broken. LibOFX 0.24: -Fix include files for gcc2 LibOFX 0.23: -Hacked in runtime detection of OpenSP's SGMLApplication::Char size. This should fix the hairy problems some people were experiencing with garbled Output with some versions of OpenSP. -Installation instruction have been improved. -OpenSP include files are no longer distributed with LibOFX. LibOFX 0.22: -make install will now copy libofx.h in the appropriate include directory. LibOFX 0.21: -Files were still created in current directory. Now force /tmp to be used LibOFX 0.2: -The input OFX file's directory no longer need to be writable, and no stale files are left behind. -Prefixed all enum names with OFX to avoid collision with client software (Gnucash in particular) -Changed all money amounts from float to double -Fixed constructors to avoid some "holdover" data LibOFX 0.122: -Always show two decimals for money in ofxdump. -Fix dates off by two month (Scott Drennan) -Fix ofx2qif account type for CREDITCARD (Scott Drennan) LibOFX 0.121: -Fix makefiles for users who do not have ldconfig in their path to create local links. LibOFX 0.12: -LibOFX can now be transparently used by both C and C++, using the same include file (libofx.h) -ofx2qif rewritten in C, to ensure that C compatibility will be maintained and tested. -Added target uninstall to all makefiles -Various other makefile improvements LibOFX 0.11: -Added ofx sample files extracted from the OFX 1.60 and 2.01 specifications in DOC. -Fix compile problems with G++2.9.6 -Makefiles updated -Require a recent version of OpenSP, doesn't work well the one included in OpenJADE (At least on Mandrake). -Fixed the algorithm for proprietary tag striping. LibOFX 0.1: -Initial public release libofx-0.9.4/configure.in0000644000175000017500000002652711553066017012261 00000000000000## -*-m4-*- dnl Process this file with autoconf to produce a configure script. # FILE: # configure.in # # FUNCTION: # implements checks for a variety of system-specific functions AC_INIT(inc/libofx.h.in) AM_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR(config) AC_PROG_CC AC_PROG_CXX #AC_PROG_RANLIB m4_include([libcurl.m4]) LIBOFX_MAJOR_VERSION=0 LIBOFX_MINOR_VERSION=9 LIBOFX_MICRO_VERSION=4 # this number is just incremented for every major change in CVS, also across # releases to emulate the Revision variable of SVN (which isn't available # with CVS) LIBOFX_BUILD_VERSION=0 LIBOFX_TAG_VERSION="stable" case "$LIBOFX_TAG_VERSION" in cvs|svn|git) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION.r${LIBOFX_BUILD_VERSION}" ;; stable) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION" ;; *) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION" # add TAG LIBOFX_VERSION_RELEASE_STRING="${LIBOFX_VERSION_RELEASE_STRING}${GWENHYWFAR_VERSION_TAG}" ;; esac LIBOFX_VERSION=$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION AC_SUBST(LIBOFX_MAJOR_VERSION) AC_SUBST(LIBOFX_MINOR_VERSION) AC_SUBST(LIBOFX_MICRO_VERSION) AC_SUBST(LIBOFX_BUILD_VERSION) AC_SUBST(LIBOFX_VERSION_RELEASE_STRING) AC_SUBST(LIBOFX_VERSION) AM_INIT_AUTOMAKE(libofx,$LIBOFX_VERSION_RELEASE_STRING) LIBOFX_SO_CURRENT=4 LIBOFX_SO_REVISION=2 LIBOFX_SO_AGE=0 LIBOFX_SO_EFFECTIVE="`echo \$(($LIBOFX_SO_CURRENT-$LIBOFX_SO_AGE))`" AC_SUBST(LIBOFX_SO_CURRENT) AC_SUBST(LIBOFX_SO_REVISION) AC_SUBST(LIBOFX_SO_AGE) #AM_MAINTAINER_MODE AC_PROG_INSTALL AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_RC AM_PROG_LIBTOOL AC_ISC_POSIX AC_C_BIGENDIAN AC_PROG_MAKE_SET AC_HEADER_STDC AQ_CHECK_OS AC_ARG_WITH(opensp-includes, [ --with-opensp-includes=PATH specify where to look for OpenSP includes - default is /usr/include/OpenSP)], OPENSPINCLUDES="$with_opensp_includes", OPENSPINCLUDES="" ) AC_ARG_WITH(opensp-libs, [ --with-opensp-libs=PATH specify where to look for libosp - default is /usr/lib], OPENSPLIBPATH="$with_opensp_libs", OPENSPLIBPATH="/usr/lib") echo $OPENSPLIBPATH for d in /usr/include/OpenSP /usr/local/include/OpenSP /usr/include/sp/generic /usr/local/include/sp/generic; do if test "x$OPENSPINCLUDES" = x; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$d" AC_MSG_CHECKING(for ParserEventGenerator.h in $d) AC_TRY_CPP([#include ], [ AC_MSG_RESULT(yes); OPENSPINCLUDES=$d ], [ AC_MSG_RESULT(no) ]) CPPFLAGS="$save_CPPFLAGS" fi done ##Detect if OpenSP was compiled with SP_MULTI_BYTE, and put the result in config.h ## #if 0 ##This test works for me, but breaks for most distro because the config.h installed isn't really the one that was used to compile OpenSP ## So --with-opensp-multibyte is now the default. AC_DEFUN([CHECK_SP_MULTI_BYTE], [ AC_CACHE_VAL(ox_sp_multibyte, [ for d in $OPENSPINCLUDES/config.h $OPENSPINCLUDES/../config.h $OPENSPINCLUDES/../include/config.h ; do if test "x$OPENSPCONFIG_H" = x; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -DOPENSPCONFIG_H=\"$d\"" AC_MSG_CHECKING(for OpenSP's config.h in $d) AC_TRY_CPP([#include OPENSPCONFIG_H], [ AC_MSG_RESULT(yes); OPENSPCONFIG_H=$d ], [ AC_MSG_RESULT(no) ]) CPPFLAGS="$save_CPPFLAGS" fi done if test "x$OPENSPCONFIG_H" = x; then AC_MSG_ERROR([OpenSP's config.h not found]) fi AC_MSG_CHECKING(for if OpenSP's was compiled with SP_MULTI_BYTE) ox_sp_multibyte=`sed 's/^#.*SP_MULTI_BYTE[ \t]*\([01]\)/\1/;t;d' < \ $OPENSPCONFIG_H`]) if test x"$ox_sp_multibyte" != x ;then AC_DEFINE_UNQUOTED(SP_MULTI_BYTE, $ox_sp_multibyte, [SP_MULTI_BYTE value from when OpenSP was compiled]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ]) #endif AC_ARG_WITH(no-opensp-multibyte, [ --with-no-opensp-multibyte Force libofx to compile with the assumption that OpenSP was NOT compiled with SP_MULTI_BYTE defined], , AC_DEFINE(SP_MULTI_BYTE, 1, [SP_MULTI_BYTE value from when OpenSP was compiled]) ) ##if test x"$SP_MULTI_BYTE" == x ;then ##CHECK_SP_MULTI_BYTE ##fi ac_save_CPPFLAGS="$CPPFLAGS" if test "x$OPENSPINCLUDES" != x ; then CPPFLAGS="-I$OPENSPINCLUDES $CPPFLAGS" fi AC_LANG_CPLUSPLUS AC_CHECK_HEADERS([ParserEventGeneratorKit.h SGMLApplication.h EventGenerator.h], [] , [ AC_MSG_ERROR([OpenSP includes not found]) ], [] ) OPENSPLIBS="-L$OPENSPLIBPATH -losp" ac_save_LIBS="$LIBS" LIBS="$OPENSPLIBS $LIBS" AC_MSG_CHECKING([for libosp]) ##dnl This is code from the opensp documentation, I modified it a little ##dnl It is really just a link test rather than a run test, it does nothing AC_LANG_CPLUSPLUS AC_TRY_RUN([ #include "ParserEventGeneratorKit.h" using namespace std; class OutlineApplication : public SGMLApplication { public: OutlineApplication() { } void startElement(const StartElementEvent &event) { } void endElement(const EndElementEvent &) { } }; int main(int argc, char **argv) { ParserEventGeneratorKit parserKit; EventGenerator *egp = parserKit.makeEventGenerator(argc - 1, argv + 1); OutlineApplication app; } ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([unable to link a test program, is OpenSP installed?])], [AC_MSG_RESULT([unknown, assumed OK])]) CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" # check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/ # ---------------------------------------------------------------------------- AC_DEFUN([BB_ENABLE_DOXYGEN], [ AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)]) AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes]) AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no]) if test "x$enable_doxygen" = xno; then enable_doc=no else AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) if test x$DOXYGEN = x; then if test "x$enable_doxygen" = xyes; then AC_MSG_ERROR([could not find doxygen]) fi enable_doc=no else enable_doc=yes AC_PATH_PROG(DOT, dot, , $PATH) fi fi AM_CONDITIONAL(DOC, test x$enable_doc = xyes) if test x$DOT = x; then if test "x$enable_dot" = xyes; then AC_MSG_ERROR([could not find dot]) fi enable_dot=no else enable_dot=yes fi AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue) AC_SUBST(enable_dot) AC_SUBST(enable_html_docs) AC_SUBST(enable_latex_docs) ]) # check for doxygen # ---------------------------------------------------------------------------- BB_ENABLE_DOXYGEN # Check if getopt_long is available # ---------------------------------------------------------------------------- dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/adl_func_getopt_long.html dnl AC_DEFUN([adl_FUNC_GETOPT_LONG], [AC_PREREQ(2.49)dnl # clean out junk possibly left behind by a previous configuration rm -f lib/getopt.h # Check for getopt_long support AC_CHECK_HEADERS([getopt.h]) AC_CHECK_FUNCS([getopt_long],, [# FreeBSD has a gnugetopt library for this AC_CHECK_LIB([gnugetopt],[getopt_long],[AC_DEFINE([HAVE_GETOPT_LONG])], [# use the GNU replacement AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1) AC_CONFIG_LINKS([lib/getopt.h:lib/gnugetopt.h])])])]) dnl check for getopt in standard library adl_FUNC_GETOPT_LONG AM_CONDITIONAL(NO_GETOPTLONG, test "$ac_cv_func_getopt_long" = no ) # gengetopt command line parser generation AC_ARG_ENABLE(gengetopt, AS_HELP_STRING(--disable-gengetopt,Disable rebuilding of command line parser with gengetopt), [case "${enableval}" in yes) gengetopt=yes ;; no) gengetopt=no ;; *) AC_MSG_ERROR([bad value ${enableval} for --disable-gengetopt]) ;; esac],[gengetopt=yes]) if test x$gengetopt = xyes ; then AC_CHECK_PROG(have_gengetopt, gengetopt, yes, no) if test x$have_gengetopt = xno ; then AC_MSG_WARN([*** Not rebuilding command line parser as gengetopt is not found ***]) gengetopt=no fi fi AM_CONDITIONAL(USE_GENGETOPT, test "x$gengetopt" = xyes) # check for curl # ---------------------------------------------------------------------------- LIBCURL_CHECK_CONFIG([yes],[7.9.7], [libcurl_available=yes], [libcurl_available=no]) if test "$libcurl_available" = no; then AC_MSG_WARN([libcurl is not available. ofxconnect (Direct connect samples) will NOT be built.]) fi PKG_CHECK_MODULES(LIBXMLPP,libxml++-2.6 >= 2.6, [ AC_DEFINE(HAVE_LIBXMLPP, 1, [Defined if libxml++ is available]) have_libxmlpp=yes], [AC_MSG_WARN([libxml++ 2.6 is not available. ofxconnect (Direct connect samples) will NOT be built.]) have_libxmlpp=no]) #PKG_CHECK_MODULES(QT,qt-mt >= 3.2, # [AC_DEFINE(HAVE_QT, 1, [Defined if Qt Gui is available])], # [AC_MSG_WARN([Qt is not available. Some experimental direct connect samples will not be fully functional.])]) build_ofxconnect=no if test "$libcurl_available" = yes; then if test "$have_libxmlpp" = yes; then build_ofxconnect=yes fi fi AM_CONDITIONAL([BUILD_OFXCONNECT], [test "$build_ofxconnect" = yes]) # check for iconv # ---------------------------------------------------------------------------- AC_ARG_WITH(iconv, [ --with-iconv[[=DIR]] add ICONV support (on)]) WITH_ICONV=0 if test "$with_iconv" = "no" ; then echo Disabling ICONV support else if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" # Export this since our headers include iconv.h XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" ICONV_LIBS="-L$with_iconv/lib" fi AC_CHECK_HEADER(iconv.h, AC_MSG_CHECKING(for iconv) AC_TRY_LINK([#include #include ],[ iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL);],[ AC_MSG_RESULT(yes) WITH_ICONV=1],[ AC_MSG_RESULT(no) AC_MSG_CHECKING(for iconv in -liconv) _ldflags="${LDFLAGS}" _libs="${LIBS}" LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" AC_TRY_LINK([#include #include ],[ iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL);],[ AC_MSG_RESULT(yes) WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" LIBS="${_libs}" LDFLAGS="${_ldflags}"],[ AC_MSG_RESULT(no) LIBS="${_libs}" LDFLAGS="${_ldflags}"])])) fi AC_DEFINE_UNQUOTED(HAVE_ICONV, $WITH_ICONV, [Defined if libxml++ is available]) AC_SUBST(WITH_ICONV) AC_SUBST(ICONV_LIBS) AC_SUBST(ofxconnect) AC_SUBST(OPENSPINCLUDES) AC_SUBST(OPENSPLIBS) AC_SUBST(LIBXMLPP_CFLAGS) AC_SUBST(LIBXMLPP_LIBS) AC_SUBST(QT_CFLAGS) AC_SUBST(QT_CFLAGS) LIBOFX_DTD_DIR='${datadir}/libofx/dtd' AC_SUBST(LIBOFX_DTD_DIR) AC_CONFIG_FILES([Makefile]) AC_OUTPUT( libofx.spec libofx.pc libofx.lsm m4/Makefile lib/Makefile inc/Makefile inc/libofx.h dtd/Makefile doc/Makefile ofx2qif/Makefile ofxdump/Makefile ofxconnect/Makefile ) libofx-0.9.4/libofx.pc.in0000644000175000017500000000057711544727432012166 00000000000000# libofx pkg-config source file prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libofx Description: libofx is a library for processing Open Financial eXchange (OFX) data Version: @VERSION@ Requires: Conflicts: #Libs: -L${libdir} @OPENSPLIBS@ -lofx #Cflags: -I${includedir} -I@OPENSPINCLUDES@ Libs: -L${libdir} -lofx Cflags: -I${includedir} libofx-0.9.4/totest.txt0000644000175000017500000000155411544727432012031 00000000000000This is a list of implemented but untested features OFX aggregates: inside - and - and (trivial) - (trivial) - (trivial) - and (trivial) TODO: -Write checking after tag closing that all ofx mandatory structures are present -Write currency conversion routine inside transaction lists -Stock and investment account support. This is not trivial -OFX export UNIMPLEMENTED: -In , the field , some sort of checksum. See spec 1.6, p. 179. I dont know how to use it. This fiels represents "Check digits" in Belgium, D.C. in Spain, "Clé" in France and "CIN" in Italy. Can someone from one of these country telle me how to use it? -Fully implemented structures (all mandatory and all optional information): Bank Statement Download: - libofx-0.9.4/ofx2qif/0000755000175000017500000000000011553134315011367 500000000000000libofx-0.9.4/ofx2qif/Makefile.am0000644000175000017500000000021011553124140013327 00000000000000bin_PROGRAMS = ofx2qif ofx2qif_LDADD = $(top_builddir)/lib/libofx.la ofx2qif_SOURCES = ofx2qif.c AM_CPPFLAGS = \ -I${top_builddir}/inc libofx-0.9.4/ofx2qif/ofx2qif.c0000644000175000017500000002151011544727432013040 00000000000000/*************************************************************************** ofx2qif.c ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Code for ofx2qif utility. C example code * * ofx2qif is a OFX "file" to QIF (Quicken Interchange Format) converter. It was written as a second code example, and as a way for LibOFX to immediately provide something usefull, and to give people a reason to try the library. It is not recommended that financial software use the output of this utility for OFX support. The QIF file format is very primitive, and much information is lost. The utility curently supports every tansaction tags of the QIF format except the address lines, and supports many of the !Account tags. It should generate QIF files that will import sucesfully in just about every software with QIF support. * * I do not plan on improving working this utility much further, however be I would be more than happy to accept contributions. If you are interested in hacking on ofx2qif, links to QIF documentation are available on the LibOFX home page. * * ofx2qif is meant to be the C code example and demo of the library. It uses many of the functions and structures of the LibOFX API. Note that unlike ofxdump, all error output is disabled by default. * * usage: ofx2qif path_to_ofx_file/ofx_filename > output_filename.qif */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include "libofx.h" #define QIF_FILE_MAX_SIZE 256000 int ofx_proc_transaction_cb(const struct OfxTransactionData data, void * transaction_data) { char dest_string[255]; char trans_buff[4096]; struct tm temp_tm; char trans_list_buff[QIF_FILE_MAX_SIZE]; trans_list_buff[0]='\0'; if(data.date_posted_valid==true){ temp_tm = *localtime(&(data.date_posted)); sprintf(trans_buff, "D%d%s%d%s%d%s", temp_tm.tm_mday, "/", temp_tm.tm_mon+1, "/", temp_tm.tm_year+1900, "\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } if(data.amount_valid==true){ sprintf(trans_buff, "T%.2f%s",data.amount,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } if(data.check_number_valid==true){ sprintf(trans_buff, "N%s%s",data.check_number,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } else if(data.reference_number_valid==true){ sprintf(trans_buff, "N%s%s",data.reference_number,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } if(data.name_valid==true){ sprintf(trans_buff, "P%s%s",data.name,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } if(data.memo_valid==true){ sprintf(trans_buff, "M%s%s",data.memo,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } /* Add PAYEE and ADRESS here once supported by the library */ if(data.transactiontype_valid==true){ switch(data.transactiontype){ case OFX_CREDIT: strncpy(dest_string, "Generic credit", sizeof(dest_string)); break; case OFX_DEBIT: strncpy(dest_string, "Generic debit", sizeof(dest_string)); break; case OFX_INT: strncpy(dest_string, "Interest earned or paid (Note: Depends on signage of amount)", sizeof(dest_string)); break; case OFX_DIV: strncpy(dest_string, "Dividend", sizeof(dest_string)); break; case OFX_FEE: strncpy(dest_string, "FI fee", sizeof(dest_string)); break; case OFX_SRVCHG: strncpy(dest_string, "Service charge", sizeof(dest_string)); break; case OFX_DEP: strncpy(dest_string, "Deposit", sizeof(dest_string)); break; case OFX_ATM: strncpy(dest_string, "ATM debit or credit (Note: Depends on signage of amount)", sizeof(dest_string)); break; case OFX_POS: strncpy(dest_string, "Point of sale debit or credit (Note: Depends on signage of amount)", sizeof(dest_string)); break; case OFX_XFER: strncpy(dest_string, "Transfer", sizeof(dest_string)); break; case OFX_CHECK: strncpy(dest_string, "Check", sizeof(dest_string)); break; case OFX_PAYMENT: strncpy(dest_string, "Electronic payment", sizeof(dest_string)); break; case OFX_CASH: strncpy(dest_string, "Cash withdrawal", sizeof(dest_string)); break; case OFX_DIRECTDEP: strncpy(dest_string, "Direct deposit", sizeof(dest_string)); break; case OFX_DIRECTDEBIT: strncpy(dest_string, "Merchant initiated debit", sizeof(dest_string)); break; case OFX_REPEATPMT: strncpy(dest_string, "Repeating payment/standing order", sizeof(dest_string)); break; case OFX_OTHER: strncpy(dest_string, "Other", sizeof(dest_string)); break; default : strncpy(dest_string, "Unknown transaction type", sizeof(dest_string)); break; } sprintf(trans_buff, "L%s%s",dest_string,"\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); } strcpy(trans_buff, "^\n"); strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff)); fputs(trans_list_buff,stdout); return 0; }/* end ofx_proc_transaction() */ int ofx_proc_statement_cb(const struct OfxStatementData data, void * statement_data) { struct tm temp_tm; printf("!Account\n"); if(data.account_id_valid==true){ /* Use the account id as the qif name of the account */ printf("N%s%s",data.account_id,"\n"); } if(data.account_ptr->account_type_valid==true) { switch(data.account_ptr->account_type){ case OFX_CHECKING : printf("TBank\n"); break; case OFX_SAVINGS : printf("TBank\n"); break; case OFX_MONEYMRKT : printf("TOth A\n"); break; case OFX_CREDITLINE : printf("TOth L\n"); break; case OFX_CMA : printf("TOth A\n"); break; case OFX_CREDITCARD : printf("TCCard\n"); break; default: perror("WRITEME: ofx_proc_account() This is an unknown account type!"); } } printf("DOFX online account\n"); if(data.ledger_balance_date_valid==true){ temp_tm = *localtime(&(data.ledger_balance_date)); printf("/%d%s%d%s%d%s", temp_tm.tm_mday, "/", temp_tm.tm_mon+1, "/", temp_tm.tm_year+1900, "\n"); } if(data.ledger_balance_valid==true){ printf("$%.2f%s",data.ledger_balance,"\n"); } printf("^\n"); /*The transactions will follow, here is the header */ if(data.account_ptr->account_type_valid==true){ switch(data.account_ptr->account_type){ case OFX_CHECKING : printf("!Type:Bank\n"); break; case OFX_SAVINGS : printf("!Type:Bank\n"); break; case OFX_MONEYMRKT : printf("!Type:Oth A\n"); break; case OFX_CREDITLINE : printf("!Type:Oth L\n"); break; case OFX_CMA : printf("!Type:Oth A\n"); break; case OFX_CREDITCARD : printf("!Type:CCard\n"); break; default: perror("WRITEME: ofx_proc_account() This is an unknown account type!"); } } return 0; }/* end ofx_proc_statement() */ int ofx_proc_account_cb(const struct OfxAccountData data, void * account_data) { char dest_string[255]=""; // strncat(trans_list_buff, dest_string, QIF_FILE_MAX_SIZE - strlen(trans_list_buff)); fputs(dest_string,stdout); return 0; }/* end ofx_proc_account() */ int main (int argc, char *argv[]) { extern int ofx_PARSER_msg; extern int ofx_DEBUG_msg; extern int ofx_WARNING_msg; extern int ofx_ERROR_msg; extern int ofx_INFO_msg; extern int ofx_STATUS_msg; ofx_PARSER_msg = false; ofx_DEBUG_msg = false; ofx_WARNING_msg = false; ofx_ERROR_msg = false; ofx_INFO_msg = false; ofx_STATUS_msg = false; LibofxContextPtr libofx_context = libofx_get_new_context(); ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0); ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0); ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0); if(argc >= 2){ libofx_proc_file(libofx_context, argv[1], OFX); } return libofx_free_context(libofx_context); } libofx-0.9.4/ofx2qif/Makefile.in0000644000175000017500000004121311553124267013362 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ofx2qif$(EXEEXT) subdir = ofx2qif DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ofx2qif_OBJECTS = ofx2qif.$(OBJEXT) ofx2qif_OBJECTS = $(am_ofx2qif_OBJECTS) ofx2qif_DEPENDENCIES = $(top_builddir)/lib/libofx.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(ofx2qif_SOURCES) DIST_SOURCES = $(ofx2qif_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ofx2qif_LDADD = $(top_builddir)/lib/libofx.la ofx2qif_SOURCES = ofx2qif.c AM_CPPFLAGS = \ -I${top_builddir}/inc 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ofx2qif/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ofx2qif/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ofx2qif$(EXEEXT): $(ofx2qif_OBJECTS) $(ofx2qif_DEPENDENCIES) @rm -f ofx2qif$(EXEEXT) $(LINK) $(ofx2qif_OBJECTS) $(ofx2qif_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx2qif.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) installdirs: for dir in "$(DESTDIR)$(bindir)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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 .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ 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 # 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: libofx-0.9.4/AUTHORS0000644000175000017500000000023411544727432011010 00000000000000Benoit Gr�goire Peter O'Gorman Ace Jones Martin Preuss Contributors: libofx-0.9.4/configure0000755000175000017500000215722411553123300011645 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_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 <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { 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. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="inc/libofx.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOFX_DTD_DIR QT_CFLAGS OPENSPLIBS OPENSPINCLUDES ofxconnect ICONV_LIBS WITH_ICONV BUILD_OFXCONNECT_FALSE BUILD_OFXCONNECT_TRUE LIBXMLPP_LIBS LIBXMLPP_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LIBCURL LIBCURL_CPPFLAGS _libcurl_config USE_GENGETOPT_FALSE USE_GENGETOPT_TRUE have_gengetopt NO_GETOPTLONG_FALSE NO_GETOPTLONG_TRUE LIBOBJS enable_latex_docs enable_html_docs enable_dot ENABLE_DOXYGEN_FALSE ENABLE_DOXYGEN_TRUE DOC_FALSE DOC_TRUE DOT DOXYGEN INSTALL_DLL_TARGET MAKE_DLL_TARGET OS_TYPE OSYSTEM CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBOFX_SO_AGE LIBOFX_SO_REVISION LIBOFX_SO_CURRENT am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LIBOFX_VERSION LIBOFX_VERSION_RELEASE_STRING LIBOFX_BUILD_VERSION LIBOFX_MICRO_VERSION LIBOFX_MINOR_VERSION LIBOFX_MAJOR_VERSION ac_ct_CXX CXXFLAGS CXX OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_opensp_includes with_opensp_libs with_no_opensp_multibyte enable_doxygen enable_dot enable_html_docs enable_latex_docs enable_gengetopt with_libcurl with_iconv ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBXMLPP_CFLAGS LIBXMLPP_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 $as_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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --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-libtool-lock avoid locking (might break parallel builds) --enable-doxygen enable documentation generation with doxygen (auto) --enable-dot use 'dot' to generate graphs in doxygen (auto) --enable-html-docs enable HTML generation with doxygen (yes) --enable-latex-docs enable LaTeX documentation generation with doxygen (no) --disable-gengetopt Disable rebuilding of command line parser with gengetopt Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-opensp-includes=PATH specify where to look for OpenSP includes - default is /usr/include/OpenSP) --with-opensp-libs=PATH specify where to look for libosp - default is /usr/lib --with-no-opensp-multibyte Force libofx to compile with the assumption that OpenSP was NOT compiled with SP_MULTI_BYTE defined --with-libcurl=DIR look for the curl library in DIR --with-iconv[=DIR] add ICONV support (on) 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBXMLPP_CFLAGS C compiler flags for LIBXMLPP, overriding pkg-config LIBXMLPP_LIBS linker flags for LIBXMLPP, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.67 Copyright (C) 2010 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 fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_header_compile # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_func cat >config.log <<_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.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in config "$srcdir"/config; 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$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 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 #AC_PROG_RANLIB # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], # [ACTION-IF-YES], [ACTION-IF-NO]) # ---------------------------------------------------------- # David Shaw Jun-21-2005 # # Checks for libcurl. DEFAULT-ACTION is the string yes or no to # specify whether to default to --with-libcurl or --without-libcurl. # If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the # minimum version of libcurl to accept. Pass the version as a regular # version number like 7.10.1. If not supplied, any version is # accepted. ACTION-IF-YES is a list of shell commands to run if # libcurl was successfully found and passed the various tests. # ACTION-IF-NO is a list of shell commands that are run otherwise. # Note that using --without-libcurl does run ACTION-IF-NO. # # This macro defines HAVE_LIBCURL if a working libcurl setup is found, # and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary values. # Other useful defines are LIBCURL_FEATURE_xxx where xxx are the # various features supported by libcurl, and LIBCURL_PROTOCOL_yyy # where yyy are the various protocols supported by libcurl. Both xxx # and yyy are capitalized. See the list of AH_TEMPLATEs at the top of # the macro for the complete list of possible defines. Shell # variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also # defined to 'yes' for those features and protocols that were found. # Note that xxx and yyy keep the same capitalization as in the # curl-config list (e.g. it's "HTTP" and not "http"). # # Users may override the detected values by doing something like: # LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure # # For the sake of sanity, this macro assumes that any libcurl that is # found is after version 7.7.2, the first version that included the # curl-config script. Note that it is very important for people # packaging binary versions of libcurl to include this script! # Without curl-config, we can only guess what protocols are available. LIBOFX_MAJOR_VERSION=0 LIBOFX_MINOR_VERSION=9 LIBOFX_MICRO_VERSION=4 # this number is just incremented for every major change in CVS, also across # releases to emulate the Revision variable of SVN (which isn't available # with CVS) LIBOFX_BUILD_VERSION=0 LIBOFX_TAG_VERSION="stable" case "$LIBOFX_TAG_VERSION" in cvs|svn|git) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION.r${LIBOFX_BUILD_VERSION}" ;; stable) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION" ;; *) LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION" # add TAG LIBOFX_VERSION_RELEASE_STRING="${LIBOFX_VERSION_RELEASE_STRING}${GWENHYWFAR_VERSION_TAG}" ;; esac LIBOFX_VERSION=$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION am__api_version='1.11' # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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=libofx VERSION=$LIBOFX_VERSION_RELEASE_STRING 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 LIBOFX_SO_CURRENT=4 LIBOFX_SO_REVISION=2 LIBOFX_SO_AGE=0 LIBOFX_SO_EFFECTIVE="`echo \$(($LIBOFX_SO_CURRENT-$LIBOFX_SO_AGE))`" #AM_MAINTAINER_MODE enable_dlopen=yes # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&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 variants of GNU ld 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 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_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" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:5598: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:5601: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:5604: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&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* | cegcc*) # 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 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` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$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' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&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 aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) 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', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) 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|DragonFly)/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 ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; 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* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-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=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) 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 ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&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]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; 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 # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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 <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_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\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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 -rf 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 6807 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; 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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$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 ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&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 : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$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 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 "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } 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 else _lt_caught_CXX_error=yes fi # Set options # Check whether --enable-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 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 --with-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 # Check whether --enable-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 # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF 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. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&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 <<_LT_EOF 1>&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 _LT_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&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 <<_LT_EOF 1>&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 _LT_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script 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;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8728: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8732: \$? = $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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # 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' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries 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' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; 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 ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) 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* | cygwin* | pw32* | os2* | cegcc*) # 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' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) 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 ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9067: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9071: \$? = $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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_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 # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9172: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9176: \$? = $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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9227: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9231: \$? = $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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # 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_|_GLOBAL__F[ID]_.*' # 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. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=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}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. 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 supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [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 # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&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. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) 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 ;; esac ;; 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* | cegcc*) # _LT_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 '\''/^[BCDGRS][ ]/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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-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*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&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. _LT_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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 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 ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) 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" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= 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 "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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].*|aix[5-9]*) 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_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' 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 : 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' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no 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 export_dynamic_flag_spec='${wl}-bexpall' # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi fi rm -f core 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi fi rm -f core 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' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) 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 ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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 "X$deplibs" | $Xsed -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*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 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* | dragonfly*) 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*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=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 fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-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 ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes 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' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 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 else ld_shlibs=no 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' 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' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; 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 if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic 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\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi 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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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* | cegcc*) # 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}${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`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" 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 ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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' ;; interix[3-9]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | 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' ;; 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=qnx 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='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent 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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; 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 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* | cegcc*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""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 ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" 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" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&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 <<_LT_EOF #line 11611 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 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_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&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 <<_LT_EOF #line 11707 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 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_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$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 striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&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" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&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 ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } 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" ac_ext=cpp 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= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_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 # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # 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 $as_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 $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when 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 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&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 variants of GNU ld 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 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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].*|aix[5-9]*) 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_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' 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 : 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' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 export_dynamic_flag_spec_CXX='${wl}-bexpall' # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi fi rm -f core 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi fi rm -f core 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' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -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${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}" fi 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 ;; freebsd[12]*) # 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* | dragonfly*) # 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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) 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 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_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*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) 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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) 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 ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; 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 "X-set_version $verstring" | $Xsed` -update_registry ${output_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) 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 "X$list" | $Xsed' 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* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) 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' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no 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' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # 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' ;; esac ;; 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*) 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::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | 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. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) 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 "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) 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 "X-set_version $verstring" | $Xsed` -update_registry ${output_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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) 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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac 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 ;; 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++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -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} ${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 compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # 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' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # 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= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 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 # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # 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' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries 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= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # 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_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* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${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='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; 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* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; 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' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; 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*) ;; 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 ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13663: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13667: \$? = $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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_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 # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13762: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13766: \$? = $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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13814: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13818: \$? = $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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # 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* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_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\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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* | cegcc*) # 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}${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`' 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 ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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' ;; interix[3-9]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | 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' ;; 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=qnx 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='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&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-existent 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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; 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 fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != 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 ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # check for OS { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } OSYSTEM="" OS_TYPE="" MAKE_DLL_TARGET="" INSTALL_DLL_TARGET="" cat >>confdefs.h <<_ACEOF #define OS_NAME "$host" _ACEOF case "$host" in *-linux*) OSYSTEM="linux" $as_echo "#define OS_LINUX 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-solaris*) OSYSTEM="solaris" $as_echo "#define OS_SOLARIS 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-darwin*) OSYSTEM="osx" $as_echo "#define OS_DARWIN 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-openbsd*) OSYSTEM="openbsd" $as_echo "#define OS_OPENBSD 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-freebsd*) OSYSTEM="freebsd" $as_echo "#define OS_FREEBSD 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-netbsd*) OSYSTEM="netbsd" $as_echo "#define OS_NETBSD 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-beos*) OSYSTEM="beos" $as_echo "#define OS_BEOS 1" >>confdefs.h $as_echo "#define OS_POSIX 1" >>confdefs.h OS_TYPE="posix" ;; *-win32*) OSYSTEM="windows" $as_echo "#define OS_WIN32 1" >>confdefs.h OS_TYPE="windows" cat >>confdefs.h <<_ACEOF #define BUILDING_DLL 1 _ACEOF MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-mingw32*) OSYSTEM="windows" $as_echo "#define OS_WIN32 1" >>confdefs.h OS_TYPE="windows" cat >>confdefs.h <<_ACEOF #define BUILDING_DLL 1 _ACEOF MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-palmos*) OSYSTEM="palmos" $as_echo "#define OS_PALMOS 1" >>confdefs.h OS_TYPE="palmos" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue." >&5 $as_echo "$as_me: WARNING: Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue." >&2;} OSYSTEM="unknown" OS_TYPE="posix" $as_echo "#define OS_POSIX 1" >>confdefs.h ;; esac cat >>confdefs.h <<_ACEOF #define OS_SHORTNAME "$OSYSTEM" _ACEOF cat >>confdefs.h <<_ACEOF #define OS_TYPE "$OS_TYPE" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS_TYPE" >&5 $as_echo "$OS_TYPE" >&6; } # Check whether --with-opensp-includes was given. if test "${with_opensp_includes+set}" = set; then : withval=$with_opensp_includes; OPENSPINCLUDES="$with_opensp_includes" else OPENSPINCLUDES="" fi # Check whether --with-opensp-libs was given. if test "${with_opensp_libs+set}" = set; then : withval=$with_opensp_libs; OPENSPLIBPATH="$with_opensp_libs" else OPENSPLIBPATH="/usr/lib" fi echo $OPENSPLIBPATH for d in /usr/include/OpenSP /usr/local/include/OpenSP /usr/include/sp/generic /usr/local/include/sp/generic; do if test "x$OPENSPINCLUDES" = x; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$d" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ParserEventGenerator.h in $d" >&5 $as_echo_n "checking for ParserEventGenerator.h in $d... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; OPENSPINCLUDES=$d else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$save_CPPFLAGS" fi done ##Detect if OpenSP was compiled with SP_MULTI_BYTE, and put the result in config.h ## #if 0 ##This test works for me, but breaks for most distro because the config.h installed isn't really the one that was used to compile OpenSP ## So --with-opensp-multibyte is now the default. #endif # Check whether --with-no-opensp-multibyte was given. if test "${with_no_opensp_multibyte+set}" = set; then : withval=$with_no_opensp_multibyte; else $as_echo "#define SP_MULTI_BYTE 1" >>confdefs.h fi ##if test x"$SP_MULTI_BYTE" == x ;then ##CHECK_SP_MULTI_BYTE ##fi ac_save_CPPFLAGS="$CPPFLAGS" if test "x$OPENSPINCLUDES" != x ; then CPPFLAGS="-I$OPENSPINCLUDES $CPPFLAGS" fi ac_ext=cpp 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 for ac_header in ParserEventGeneratorKit.h SGMLApplication.h EventGenerator.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else as_fn_error $? "OpenSP includes not found" "$LINENO" 5 fi done OPENSPLIBS="-L$OPENSPLIBPATH -losp" ac_save_LIBS="$LIBS" LIBS="$OPENSPLIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libosp" >&5 $as_echo_n "checking for libosp... " >&6; } ##dnl This is code from the opensp documentation, I modified it a little ##dnl It is really just a link test rather than a run test, it does nothing ac_ext=cpp 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 "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown, assumed OK" >&5 $as_echo "unknown, assumed OK" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "ParserEventGeneratorKit.h" using namespace std; class OutlineApplication : public SGMLApplication { public: OutlineApplication() { } void startElement(const StartElementEvent &event) { } void endElement(const EndElementEvent &) { } }; int main(int argc, char **argv) { ParserEventGeneratorKit parserKit; EventGenerator *egp = parserKit.makeEventGenerator(argc - 1, argv + 1); OutlineApplication app; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "unable to link a test program, is OpenSP installed?" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" # check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/ # ---------------------------------------------------------------------------- # check for doxygen # ---------------------------------------------------------------------------- # Check whether --enable-doxygen was given. if test "${enable_doxygen+set}" = set; then : enableval=$enable_doxygen; fi # Check whether --enable-dot was given. if test "${enable_dot+set}" = set; then : enableval=$enable_dot; fi # Check whether --enable-html-docs was given. if test "${enable_html_docs+set}" = set; then : enableval=$enable_html_docs; else enable_html_docs=yes fi # Check whether --enable-latex-docs was given. if test "${enable_latex_docs+set}" = set; then : enableval=$enable_latex_docs; else enable_latex_docs=no fi if test "x$enable_doxygen" = xno; then enable_doc=no else # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DOXYGEN+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$DOXYGEN = x; then if test "x$enable_doxygen" = xyes; then as_fn_error $? "could not find doxygen" "$LINENO" 5 fi enable_doc=no else enable_doc=yes # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DOT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DOT="$DOT" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DOT=$ac_cv_path_DOT if test -n "$DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 $as_echo "$DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test x$enable_doc = xyes; then DOC_TRUE= DOC_FALSE='#' else DOC_TRUE='#' DOC_FALSE= fi if test x$DOT = x; then if test "x$enable_dot" = xyes; then as_fn_error $? "could not find dot" "$LINENO" 5 fi enable_dot=no else enable_dot=yes fi if test x$enable_doc = xtrue; then ENABLE_DOXYGEN_TRUE= ENABLE_DOXYGEN_FALSE='#' else ENABLE_DOXYGEN_TRUE='#' ENABLE_DOXYGEN_FALSE= fi # Check if getopt_long is available # ---------------------------------------------------------------------------- # clean out junk possibly left behind by a previous configuration rm -f lib/getopt.h # Check for getopt_long support for ac_header in getopt.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF fi done for ac_func in getopt_long do : ac_fn_cxx_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG 1 _ACEOF else # FreeBSD has a gnugetopt library for this { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lgnugetopt" >&5 $as_echo_n "checking for getopt_long in -lgnugetopt... " >&6; } if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnugetopt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getopt_long (); int main () { return getopt_long (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gnugetopt_getopt_long=yes else ac_cv_lib_gnugetopt_getopt_long=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 $as_echo "$ac_cv_lib_gnugetopt_getopt_long" >&6; } if test "x$ac_cv_lib_gnugetopt_getopt_long" = x""yes; then : $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h else # use the GNU replacement case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; esac case " $LIBOBJS " in *" getopt1.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;; esac ac_config_links="$ac_config_links lib/getopt.h:lib/gnugetopt.h" fi fi done if test "$ac_cv_func_getopt_long" = no ; then NO_GETOPTLONG_TRUE= NO_GETOPTLONG_FALSE='#' else NO_GETOPTLONG_TRUE='#' NO_GETOPTLONG_FALSE= fi # gengetopt command line parser generation # Check whether --enable-gengetopt was given. if test "${enable_gengetopt+set}" = set; then : enableval=$enable_gengetopt; case "${enableval}" in yes) gengetopt=yes ;; no) gengetopt=no ;; *) as_fn_error $? "bad value ${enableval} for --disable-gengetopt" "$LINENO" 5 ;; esac else gengetopt=yes fi if test x$gengetopt = xyes ; then # Extract the first word of "gengetopt", so it can be a program name with args. set dummy gengetopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_gengetopt+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$have_gengetopt"; then ac_cv_prog_have_gengetopt="$have_gengetopt" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_gengetopt="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_gengetopt" && ac_cv_prog_have_gengetopt="no" fi fi have_gengetopt=$ac_cv_prog_have_gengetopt if test -n "$have_gengetopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gengetopt" >&5 $as_echo "$have_gengetopt" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$have_gengetopt = xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Not rebuilding command line parser as gengetopt is not found ***" >&5 $as_echo "$as_me: WARNING: *** Not rebuilding command line parser as gengetopt is not found ***" >&2;} gengetopt=no fi fi if test "x$gengetopt" = xyes; then USE_GENGETOPT_TRUE= USE_GENGETOPT_FALSE='#' else USE_GENGETOPT_TRUE='#' USE_GENGETOPT_FALSE= fi # check for curl # ---------------------------------------------------------------------------- # Check whether --with-libcurl was given. if test "${with_libcurl+set}" = set; then : withval=$with_libcurl; _libcurl_with=$withval else _libcurl_with=yes fi if test "$_libcurl_with" != "no" ; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'" _libcurl_try_link=yes if test -d "$_libcurl_with" ; then CPPFLAGS="${CPPFLAGS} -I$withval/include" LDFLAGS="${LDFLAGS} -L$withval/lib" fi # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path__libcurl_config+set}" = set; then : $as_echo_n "(cached) " >&6 else case $_libcurl_config in [\\/]* | ?:[\\/]*) ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi _libcurl_config=$ac_cv_path__libcurl_config if test -n "$_libcurl_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5 $as_echo "$_libcurl_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$_libcurl_config != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5 $as_echo_n "checking for the version of libcurl... " >&6; } if test "${libcurl_cv_lib_curl_version+set}" = set; then : $as_echo_n "(cached) " >&6 else libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_version" >&5 $as_echo "$libcurl_cv_lib_curl_version" >&6; } _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse` _libcurl_wanted=`echo 7.9.7 | $_libcurl_version_parse` if test $_libcurl_wanted -gt 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.9.7" >&5 $as_echo_n "checking for libcurl >= version 7.9.7... " >&6; } if test "${libcurl_cv_lib_version_ok+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $_libcurl_version -ge $_libcurl_wanted ; then libcurl_cv_lib_version_ok=yes else libcurl_cv_lib_version_ok=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_version_ok" >&5 $as_echo "$libcurl_cv_lib_version_ok" >&6; } fi if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then if test x"$LIBCURL_CPPFLAGS" = "x" ; then LIBCURL_CPPFLAGS=`$_libcurl_config --cflags` fi if test x"$LIBCURL" = "x" ; then LIBCURL=`$_libcurl_config --libs` # This is so silly, but Apple actually has a bug in their # curl-config script. Fixed in Tiger, but there are still # lots of Panther installs around. case "${host}" in powerpc-apple-darwin7*) LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'` ;; esac fi # All curl-config scripts support --feature _libcurl_features=`$_libcurl_config --feature` # Is it modern enough to have --protocols? (7.12.4) if test $_libcurl_version -ge 461828 ; then _libcurl_protocols=`$_libcurl_config --protocols` fi else _libcurl_try_link=no fi unset _libcurl_wanted fi if test $_libcurl_try_link = yes ; then # we didn't find curl-config, so let's see if the user-supplied # link line (or failing that, "-lcurl") is enough. LIBCURL=${LIBCURL-"-lcurl"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5 $as_echo_n "checking whether libcurl is usable... " >&6; } if test "${libcurl_cv_lib_curl_usable+set}" = set; then : $as_echo_n "(cached) " >&6 else _libcurl_save_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS" _libcurl_save_libs=$LIBS LIBS="$LIBS $LIBCURL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { /* Try and use a few common options to force a failure if we are missing symbols or can't link. */ int x; curl_easy_setopt(NULL,CURLOPT_URL,NULL); x=CURL_ERROR_SIZE; x=CURLOPT_WRITEFUNCTION; x=CURLOPT_FILE; x=CURLOPT_ERRORBUFFER; x=CURLOPT_STDERR; x=CURLOPT_VERBOSE; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : libcurl_cv_lib_curl_usable=yes else libcurl_cv_lib_curl_usable=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs unset _libcurl_save_cppflags unset _libcurl_save_libs fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_usable" >&5 $as_echo "$libcurl_cv_lib_curl_usable" >&6; } if test $libcurl_cv_lib_curl_usable = yes ; then # Does curl_free() exist in this version of libcurl? # If not, fake it with free() _libcurl_save_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS" _libcurl_save_libs=$LIBS LIBS="$LIBS $LIBCURL" ac_fn_cxx_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free" if test "x$ac_cv_func_curl_free" = x""yes; then : else $as_echo "#define curl_free free" >>confdefs.h fi CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs unset _libcurl_save_cppflags unset _libcurl_save_libs $as_echo "#define HAVE_LIBCURL 1" >>confdefs.h for _libcurl_feature in $_libcurl_features ; do cat >>confdefs.h <<_ACEOF #define `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1 _ACEOF eval `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes done if test "x$_libcurl_protocols" = "x" ; then # We don't have --protocols, so just assume that all # protocols are available _libcurl_protocols="HTTP FTP GOPHER FILE TELNET LDAP DICT" if test x$libcurl_feature_SSL = xyes ; then _libcurl_protocols="$_libcurl_protocols HTTPS" # FTPS wasn't standards-compliant until version # 7.11.0 if test $_libcurl_version -ge 461568; then _libcurl_protocols="$_libcurl_protocols FTPS" fi fi fi for _libcurl_protocol in $_libcurl_protocols ; do cat >>confdefs.h <<_ACEOF #define `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1 _ACEOF eval `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes done fi fi unset _libcurl_try_link unset _libcurl_version_parse unset _libcurl_config unset _libcurl_feature unset _libcurl_features unset _libcurl_protocol unset _libcurl_protocols unset _libcurl_version fi if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then # This is the IF-NO path libcurl_available=no else # This is the IF-YES path libcurl_available=yes fi unset _libcurl_with if test "$libcurl_available" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl is not available. ofxconnect (Direct connect samples) will NOT be built." >&5 $as_echo "$as_me: WARNING: libcurl is not available. ofxconnect (Direct connect samples) will NOT be built." >&2;} fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXMLPP" >&5 $as_echo_n "checking for LIBXMLPP... " >&6; } if test -n "$LIBXMLPP_CFLAGS"; then pkg_cv_LIBXMLPP_CFLAGS="$LIBXMLPP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml++-2.6 >= 2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml++-2.6 >= 2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXMLPP_CFLAGS=`$PKG_CONFIG --cflags "libxml++-2.6 >= 2.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXMLPP_LIBS"; then pkg_cv_LIBXMLPP_LIBS="$LIBXMLPP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml++-2.6 >= 2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml++-2.6 >= 2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXMLPP_LIBS=`$PKG_CONFIG --libs "libxml++-2.6 >= 2.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXMLPP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml++-2.6 >= 2.6" 2>&1` else LIBXMLPP_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml++-2.6 >= 2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXMLPP_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxml++ 2.6 is not available. ofxconnect (Direct connect samples) will NOT be built." >&5 $as_echo "$as_me: WARNING: libxml++ 2.6 is not available. ofxconnect (Direct connect samples) will NOT be built." >&2;} have_libxmlpp=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxml++ 2.6 is not available. ofxconnect (Direct connect samples) will NOT be built." >&5 $as_echo "$as_me: WARNING: libxml++ 2.6 is not available. ofxconnect (Direct connect samples) will NOT be built." >&2;} have_libxmlpp=no else LIBXMLPP_CFLAGS=$pkg_cv_LIBXMLPP_CFLAGS LIBXMLPP_LIBS=$pkg_cv_LIBXMLPP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LIBXMLPP 1" >>confdefs.h have_libxmlpp=yes fi #PKG_CHECK_MODULES(QT,qt-mt >= 3.2, # [AC_DEFINE(HAVE_QT, 1, [Defined if Qt Gui is available])], # [AC_MSG_WARN([Qt is not available. Some experimental direct connect samples will not be fully functional.])]) build_ofxconnect=no if test "$libcurl_available" = yes; then if test "$have_libxmlpp" = yes; then build_ofxconnect=yes fi fi if test "$build_ofxconnect" = yes; then BUILD_OFXCONNECT_TRUE= BUILD_OFXCONNECT_FALSE='#' else BUILD_OFXCONNECT_TRUE='#' BUILD_OFXCONNECT_FALSE= fi # check for iconv # ---------------------------------------------------------------------------- # Check whether --with-iconv was given. if test "${with_iconv+set}" = set; then : withval=$with_iconv; fi WITH_ICONV=0 if test "$with_iconv" = "no" ; then echo Disabling ICONV support else if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" # Export this since our headers include iconv.h XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" ICONV_LIBS="-L$with_iconv/lib" fi ac_fn_cxx_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_ICONV=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 $as_echo_n "checking for iconv in -liconv... " >&6; } _ldflags="${LDFLAGS}" _libs="${LIBS}" LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open ("",""); iconv (cd, NULL, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" LIBS="${_libs}" LDFLAGS="${_ldflags}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBS="${_libs}" LDFLAGS="${_ldflags}" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi cat >>confdefs.h <<_ACEOF #define HAVE_ICONV $WITH_ICONV _ACEOF LIBOFX_DTD_DIR='${datadir}/libofx/dtd' ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files libofx.spec libofx.pc libofx.lsm m4/Makefile lib/Makefile inc/Makefile inc/libofx.h dtd/Makefile doc/Makefile ofx2qif/Makefile ofxdump/Makefile ofxconnect/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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${DOC_TRUE}" && test -z "${DOC_FALSE}"; then as_fn_error $? "conditional \"DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DOXYGEN_TRUE}" && test -z "${ENABLE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_GETOPTLONG_TRUE}" && test -z "${NO_GETOPTLONG_FALSE}"; then as_fn_error $? "conditional \"NO_GETOPTLONG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_GENGETOPT_TRUE}" && test -z "${USE_GENGETOPT_FALSE}"; then as_fn_error $? "conditional \"USE_GENGETOPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_OFXCONNECT_TRUE}" && test -z "${BUILD_OFXCONNECT_FALSE}"; then as_fn_error $? "conditional \"BUILD_OFXCONNECT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent 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 links: $config_links Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "lib/getopt.h") CONFIG_LINKS="$CONFIG_LINKS lib/getopt.h:lib/gnugetopt.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libofx.spec") CONFIG_FILES="$CONFIG_FILES libofx.spec" ;; "libofx.pc") CONFIG_FILES="$CONFIG_FILES libofx.pc" ;; "libofx.lsm") CONFIG_FILES="$CONFIG_FILES libofx.lsm" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;; "inc/libofx.h") CONFIG_FILES="$CONFIG_FILES inc/libofx.h" ;; "dtd/Makefile") CONFIG_FILES="$CONFIG_FILES dtd/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "ofx2qif/Makefile") CONFIG_FILES="$CONFIG_FILES ofx2qif/Makefile" ;; "ofxdump/Makefile") CONFIG_FILES="$CONFIG_FILES ofxdump/Makefile" ;; "ofxconnect/Makefile") CONFIG_FILES="$CONFIG_FILES ofxconnect/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 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_LINKS+set}" = set || CONFIG_LINKS=$config_links 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # 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. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. 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 " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # 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 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # 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 # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # 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 # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # 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 # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # 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 # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # 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 # 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 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # 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 # 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 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # 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 a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # 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 DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # 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 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_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 # 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 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps 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 # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # 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 # 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 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # 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 a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # 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 DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_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 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_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 # 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 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX 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 # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi libofx-0.9.4/libofx.spec0000644000175000017500000000421411553123351012067 00000000000000%define name libofx %define version 0.9.4 %define release 1 %define prefix /usr Summary: The LibOFX library is designed to allow applications to very easily support OFX command responses Name: %{name} Version: %{version} Release: %{release} Source: http://download.sourceforge.net/libofx/%{name}-%{version}.tar.gz Requires: openjade >= 1.3.1 Group: Libraries/System License: GPL Packager: Chris Lyttle BuildRoot: %{_tmppath}/%{name}-%{version}-root Prereq: /sbin/ldconfig %description This is the LibOFX library. It is a API designed to allow applications to very easily support OFX command responses, usually provided by financial institutions. See http://www.ofx.net/ofx/default.asp for details and specification. LibOFX is based on the excellent OpenSP library written by James Clark, and now part of the OpenJADE http://openjade.sourceforge.net/ project. OpenSP by itself is not widely distributed. OpenJADE 1.3.1 includes a version on OpenSP that will link, however, it has some major problems with LibOFX and isn't recommended. Since LibOFX uses the generic interface to OpenSP, it should be compatible with all recent versions of OpenSP (It has been developed with OpenSP-1.5pre5). LibOFX is written in C++, but provides a C style interface usable transparently from both C and C++ using a single include file. %prep %setup -q %build ./configure --prefix=%{_prefix} \ --libdir=%{_libdir} --datadir=%{_datadir} \ --includedir=%{_includedir} make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{prefix} LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} make prefix=$RPM_BUILD_ROOT%{_prefix} \ libdir=$RPM_BUILD_ROOT%{_libdir} \ datadir=$RPM_BUILD_ROOT%{_datadir} \ includedir=$RPM_BUILD_ROOT%{_includedir} install %makeinstall %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so* %{_libdir}/pkgconfig/libofx.pc %{_includedir}/* %{_datadir}/%{name}/dtd/* %{_datadir}/doc/%{name} %changelog * Sat Nov 23 2002 Chris Lyttle - Created spec file libofx-0.9.4/README0000644000175000017500000001021711552346574010625 00000000000000Copyright (c) 2002-2010 Benoit Grégoire This is the LibOFX library. It is a API designed to allow applications to very easily support OFX command responses, usually provided by financial institutions. See http://www.ofx.net/ofx/default.asp for details and specification. This project was first started as my end of degree project, with the objective to add OFX support to GnuCash http://www.gnucash.org/ If you can read French, the original project presentation is included in the doc directory. I finally decided to make it into a generic library, so all OpenSource financial software can benefit. LibOFX is based on the excellent OpenSP library written by James Clark, and now part of the OpenJADE http://openjade.sourceforge.net/ project. OpenSP by itself is not widely distributed. OpenJADE 1.3.1 includes a version on OpenSP that will link, however, it has some major problems with LibOFX and isn't recommended. Since LibOFX uses the generic interface to OpenSP, it should be compatible with all recent versions of OpenSP (It has been developed with OpenSP-1.5pre5). LibOFX is written in C++, but provides a C style interface usable transparently from both C and C++ using a single include file. In addition to the library, three utilities are included with libofx ofxdump: ofxdump prints to stdout, in human readable form, everything the library understands about a particular ofx response file, and sends errors to stderr. It is as C++ code example and demo of the library (it uses every functions and every structures of LibOFX) usage: ofxdump path_to_ofx_file/ofx_filename ofx2qif: ofx2qif is a OFX "file" to QIF (Quicken Interchange Format) converter. It was written as a C code example, and as a way for LibOFX to immediately provide something usefull, as an incentive for people to try out the library. It is not recommended that financial software use the output of this utility for OFX support. The QIF file format is very primitive, and much information is lost. The utility curently supports every tansaction tags of the qif format except the address lines, and supports many of the tags of !Account. It should generate QIF files that will import sucesfully in just about every software with QIF support. I do not plan on working on this utility much further, but I would be more than happy to accept contributions. usage: ofx2qif path_to_ofx_file/ofx_filename > output_filename.qif ofxconnect: sample app to demonstrate & test new direct connect API's (try "make check" in the ofxconnect folder). Read README.privateserver first. LibOFX strives to achieve the following design goals: -Simplicity: OFX is a VERY complex spec. However, few if any software needs all this complexity. The library tries to hide this complexity by "flattening" the data structures, doing timezone conversions, currency conversion, etc. -Data directly usable from C, without conversion: A date is a C time_t, money is a float, strings are char[], etc. -C style interface: Although LibOFX is written in C++, it provides an interface usable transparently from both C and C++, using a single header file. LibOFX was implemented directly from the full OFX 1.6 spec, and currently supports: * Banking transactions and statements. * Credit card and statements. * Investment transactions. * OFX 2.0 Future projects for libofx include: * Header parsing * DTD autodetection * Currency conversion * QIF import * QIF export (integrated inside the library) * OFX export Full documentation of the API and library internals generated using doxygen is available. For a quick start, you should learn all you need to know to get started by reading the libofx.h file in the INC directory, and ofxdump.cpp in the ofxdump directory. Call for help: -Please note that despite a very detailled spec, OFX is by nature very hard to test. I only have access to the specifications examples, and my own bank (Desjardins). But I need people to run as many ofx files from different banks as they can thru libofx, and report the result. -This is my first attempt at writing an API. I need comments from financial software writers about inc/libofx.h What do YOU need? Benoit Grégoire benoitg@coeus.ca libofx-0.9.4/doc/0000755000175000017500000000000011553134313010554 500000000000000libofx-0.9.4/doc/tag_striper_test.txt0000644000175000017500000000121111544727432014624 00000000000000 This should be strippedThis should not be stripped This should not be strippedThis should be strippedThis should not be stripped This should not be strippedThis should be stripped This should not be strippedThis should be strippedThis should not be stripped This should not be strippedThis should be stripped This should be stripped libofx-0.9.4/doc/doxygen.cfg0000644000175000017500000021162111551413147012640 00000000000000# Doxyfile 1.7.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = LibOFX # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = NO # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = NO # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = doxygen.log #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [0,1..20]) # that doxygen will group on one line in the generated HTML documentation. # Note that a value of 0 will completely suppress the enum values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing # MathJax, but it is strongly recommended to install a local copy of MathJax # before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will write a font called Helvetica to the output # directory and reference it in all dot files that doxygen generates. # When you want a differently looking font you can specify the font name # using DOT_FONTNAME. You need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, svg, gif or svg. # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES libofx-0.9.4/doc/html/0000755000175000017500000000000011553133251011520 500000000000000libofx-0.9.4/doc/html/classtree_1_1pre__order__iterator.png0000644000175000017500000000203311553133251020702 00000000000000‰PNG  IHDR\PûŸ[ÐPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ªIDATxíks„ EéÿÿÉýhBÂÃǶ»õÜéÔUˆ‡køº|¡9-›`1‹ìkE3Òæ‚Æ$2Ha.Ì…¹0æB˜ sý•¹d”(I2æîÐpÎ8æÈÓÓæÙmær1o@ê “ß6ב…¤Dd]e•ük»´WêgÈjЬâ&Mw™”$M¾ýË ¹˜^¦/ªñ¢Sæ١ΕÞ}/>¿Oç3 3J–S‘:_ý…—’²U‘èDÓÉŒŠªk:ܹ@6m.S½NHÊgÔüÅ5xQÕiv나væ~»­uÕ\ ;b.) RJK‘Ò}R&dÍy)=ä_fÿ&Í´¥eI•xUý%sì@çÒ–žû [ƒþ…¸ˆ S>ê .)u~µ>Áà d'ŽÅº°Ó=^îRõoÓê­«b†ŒëÙï?¬AªX2·¼¨óíGî0CµÓ«îöF¾ÊV­™$¥î7I¿iÓË,‡VŠQ7'ͲIsÍ«Ýÿ—†æÙíæêƒ’¤‹!7ëÜŠ÷™ëAÈ®~†OÑë9È …¹0æÂ\˜ a.Ì…¹0×'› ÍI™ EöFú~˪ÞZ ƒÈþÔ7¨@)}(P R û LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- p -

libofx-0.9.4/doc/html/ftv2link.png0000644000175000017500000000137211553133251013710 00000000000000‰PNG  IHDRÚ}\ˆÁIDATxíOOGÆ3;ûÇÞ]oL²¶± n %HP•´IÀ¢9´QL•¢*UÕSOáTõ–ckýýý¹µj8DT¥@«@ˆk †lÃNEMrÁ›À!=õ•æ2Ò¾¿}Ÿgž™«ÐZó6K¾Õîÿ@õÚüíºîD´Ú‡t"žï¶iì¶ð] ÇV¤\‹|èRÈxâu£Z­žØœ_ú»šíKâ%MÜ„‰c+Ž"a+êÏ÷Iû…ŒÇüb SÉj:åÜ;“D†!²»„X¦—0ñ]‹|èñäÙ.ùÐåË!óK5ÿµ{Rb=0 ù "¥@)‰ë(|×du½@>t¹<–åÑã:õfOHOŽêøïtÔZ£é‚’ò¡Ç?þÊN³C>t \‹g[M²ç“§ó`y­QÍ]p‘RPÛÞÂdÂd»ÑÂOšô‡.Ùó.é”Mʵ¨mdxàÜ /â'0$BÀ£ßëh­¹öq_6hµéK9˜J2Ý!á(VÖLŽç|›‹¥4Q¤iwº™9S’¥ܘäË™®OòÍ­1fÊ%îÍ•ùäR÷  [xÖÙ’ Dw-®l1¿TãÅ^‡ÍÆ>…ŒÇP1`ie‹Í&ß~5cǶ‰ŸÀR†”ú}®Žg™­Œpçö|ñé£ïô1[ữ/!¥À0âo‹xôqØ<\cqe‹¡bÀêzã„“ã¹× ýÆStcjÙÊû|vu §ÊÈã@žE)Zk”’2Þ«‹¯˜õÏ¢ÿ‚ÛT c®žE‘fòó»<]þËî6‰«vë¹w¯ðýݹÓ*å’¨ütÿÿ'óßúªWİa\ÔØIEND®B`‚libofx-0.9.4/doc/html/nav_h.png0000644000175000017500000000014111553133250013234 00000000000000‰PNG  IHDR ,é@(IDATxíݱ 0 A½2°ÁU¶— !kÜJrª¯ƒžZýÿÆo‡üèIEND®B`‚libofx-0.9.4/doc/html/functions_vars.html0000644000175000017500000006545111553133250015403 00000000000000 LibOFX: Data Fields - Variables
 

- a -

- b -

- c -

- d -

- e -

- f -

- h -

- i -

- l -

- m -

- n -

- o -

- p -

- r -

- s -

- t -

- u -

- v -

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__preproc_8hh_source.html0000644000175000017500000001406111553133250021622 00000000000000 LibOFX: ofx_preproc.hh Source File

ofx_preproc.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_preproc.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #ifndef OFX_PREPROC_H
00021 #define OFX_PREPROC_H
00022 
00023 #include "context.hh"
00024 
00025 #define OPENSPDCL_FILENAME "opensp.dcl"
00026 #define OFX160DTD_FILENAME "ofx160.dtd"
00027 #define OFCDTD_FILENAME "ofc.dtd"
00028 
00030 string sanitize_proprietary_tags(string input_string);
00032 string find_dtd(LibofxContextPtr ctx, string dtd_filename);
00039 int ofx_proc_file(LibofxContextPtr libofx_context, const char *);
00040 
00041 #endif
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request_8hh.html0000644000175000017500000001130311553133250020254 00000000000000 LibOFX: ofx_request.hh File Reference

ofx_request.hh File Reference

Declaration of an OfxRequests to create an OFX file containing a generic request . More...

Go to the source code of this file.

Data Structures

class  OfxRequest
 A generic request. More...

Functions

Some general helper functions
string time_t_to_ofxdatetime (time_t time)
string time_t_to_ofxdate (time_t time)
string OfxHeader (const char *hver)

Detailed Description

Declaration of an OfxRequests to create an OFX file containing a generic request .

Definition in file fx-0.9.4/lib/ofx_request.hh.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__accountinfo_8hh.html0000644000175000017500000000727711553133250023022 00000000000000 LibOFX: ofx_request_accountinfo.hh File Reference

ofx_request_accountinfo.hh File Reference

Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user. More...

Go to the source code of this file.

Data Structures

class  OfxAccountInfoRequest
 An account information request. More...

Detailed Description

Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user.

Definition in file fx-0.9.4/lib/ofx_request_accountinfo.hh.

libofx-0.9.4/doc/html/functions_0x76.html0000644000175000017500000001161611553133250015126 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- v -

libofx-0.9.4/doc/html/ftv2blank.png0000644000175000017500000000012211553133251014032 00000000000000‰PNG  IHDRɪ|IDATxíÝÁ¡ó§žÆEG–ë›ÂºIEND®B`‚libofx-0.9.4/doc/html/classOfxPushUpContainer.html0000644000175000017500000002344011553133250017122 00000000000000 LibOFX: OfxPushUpContainer Class Reference

OfxPushUpContainer Class Reference

A container to hold a OFX SGML element for which you want the parent to process it's data elements. More...

Inheritance diagram for OfxPushUpContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxPushUpContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxPushUpContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Detailed Description

A container to hold a OFX SGML element for which you want the parent to process it's data elements.

When you use add_attribute on an OfxPushUpContainer, the add_attribute is redirected to the parent container.

Definition at line 87 of file ofx_containers.hh.


Member Function Documentation

void OfxPushUpContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 62 of file ofx_containers_misc.cpp.

void OfxPushUpContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__preproc_8cpp.html0000644000175000017500000003406211553133250015751 00000000000000 LibOFX: ofx_preproc.cpp File Reference

ofx_preproc.cpp File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Defines

#define DIRSEP   "/"
#define LIBOFX_DEFAULT_INPUT_ENCODING   "CP1252"
#define LIBOFX_DEFAULT_OUTPUT_ENCODING   "UTF-8"

Functions

int ofx_proc_file (LibofxContextPtr ctx, const char *p_filename)
 File pre-processing of OFX AND for OFC files.
int libofx_proc_buffer (LibofxContextPtr ctx, const char *s, unsigned int size)
string sanitize_proprietary_tags (string input_string)
 Removes proprietary tags and comments.
string find_dtd (LibofxContextPtr ctx, string dtd_filename)
 Find the appropriate DTD for the file version.

Variables

const int DTD_SEARCH_PATH_NUM = 3
 The number of different paths to search for DTDs.
const char * DTD_SEARCH_PATH [DTD_SEARCH_PATH_NUM]
 The list of paths to search for the DTDs.
const unsigned int READ_BUFFER_SIZE = 1024

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file ofx_preproc.cpp.


Function Documentation

string find_dtd ( LibofxContextPtr  ctx,
string  dtd_filename 
)

Find the appropriate DTD for the file version.

This function will try to find a DTD matching the requested_version and return the full path of the DTD found (or an empty string if unsuccessful)

Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly

It will look, in (order)

1- The environment variable OFX_DTD_PATH (if present) 2- On windows only, a relative path specified by get_dtd_installation_directory() 3- The path specified by the makefile in MAKEFILE_DTD_PATH, thru LIBOFX_DTD_DIR in configure (if present) 4- Any hardcoded paths in DTD_SEARCH_PATH

Definition at line 636 of file ofx_preproc.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().

int libofx_proc_buffer ( LibofxContextPtr  ctx,
const char *  s,
unsigned int  size 
)

Parses the content of the given buffer.

Definition at line 326 of file ofx_preproc.cpp.

int ofx_proc_file ( LibofxContextPtr  ctx,
const char *  p_filename 
)

File pre-processing of OFX AND for OFC files.

ofx_proc_file process an ofx or ofc file.

Takes care of comment striping, dtd locating, etc.

Definition at line 81 of file ofx_preproc.cpp.

Referenced by libofx_proc_file().

string sanitize_proprietary_tags ( string  input_string)

Removes proprietary tags and comments.

This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it

Definition at line 487 of file ofx_preproc.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().


Variable Documentation

Initial value:
{



  "/usr/local/share/libofx/dtd",
  "/usr/share/libofx/dtd",
  "~"
}

The list of paths to search for the DTDs.

Definition at line 66 of file ofx_preproc.cpp.

Referenced by find_dtd().

libofx-0.9.4/doc/html/index.html0000644000175000017500000000767711553133250013455 00000000000000 LibOFX: LibOFX developer's manual

LibOFX developer's manual

Introduction

This is the documentation for the LibOFX library and it's utilities. It should always be up to date since it is generated directly from the source files using Doxygen. This documentation covers the internals as well as the API of libofx. Before you dive into this documentation, you should have read the README and the other files included at the top level of the distribution.

Quick links

These are the most important sections of the doc. The rest covers the library internals and is a work in progress. The documentation for the different functions is mostly complete, but documention for the objects is not.

API documentation

If you are only interested in the API. It's covered entirely in the libofx.h section.

ofxdump documentation

The user documentation for the ofxdump utility is on the ofxdump.cpp page.

ofx2qif documentation

The user documentation for the ofx2qif converter is on the ofx2qif.c page.

Contacts

Web Site

News about LibOFX as well as the latest version can always be found at http://libofx.sourceforge.net/

Email

If you have any questions not covered in this documentation or the web site, do not hesitate to email me:

Benoit Gr�goire mailto:benoitg@coeus.ca

libofx-0.9.4/doc/html/ftv2folderopen.png0000644000175000017500000000111611553133251015104 00000000000000‰PNG  IHDRÚ}\ˆIDATxí]?oÓ@ÿÝ%&uÚÔ¾8N„hJÛ´MÔRD‘˜ø |¦LÌfebç;° ±#&t H•ŠT–"U(Q”¶¹÷]í:µ“2P„%KÏwÖïÏû½³WÁ̸ÌK^*ú?APœ´Ñ=ð^·"ÆÈF†°¶ècc%„`¯ÛG#(£äà­Ñw¾âýî!ƒ! PR <¼¿žK\ˆ¢(—`wÿ[ä%¤`œ¢D¨\þ Bå¯ÌÀ›»‚Ù²ƒÞà7×kOóp2cúâåGî † ÓåxŸ™aˆ!…JÌ b0Ûêsxô`kÌIÆÁ«7ûÑÕ¡rѨ–QS.B墿ŸÝçBUJ<þ|)©? pïNsÌInÃ#ƒ‚+“¿IEND®B`‚libofx-0.9.4/doc/html/ofx__request_8hh_source.html0000644000175000017500000001760211553133250017165 00000000000000 LibOFX: ofx_request.hh Source File

ofx_request.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQUEST_H
00021 #define OFX_REQUEST_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_aggregate.hh"
00026 
00027 using namespace std;
00028 
00036 class OfxRequest: public OfxAggregate
00037 {
00038 public:
00045   OfxRequest(const OfxFiLogin& fi): OfxAggregate("OFX"), m_login(fi) {}
00046 
00047 //protected:
00048 public:
00055   OfxAggregate SignOnRequest(void) const;
00056 
00068   OfxAggregate RequestMessage(const string& msgtype, const string& trntype, const OfxAggregate& aggregate ) const;
00069 
00070 protected:
00071   OfxFiLogin m_login;
00072 };
00073 
00078 
00079 string time_t_to_ofxdatetime( time_t time );
00080 string time_t_to_ofxdate( time_t time );
00081 string OfxHeader(const char *hver);
00082 
00084 
00085 #endif // OFX_REQUEST_H
libofx-0.9.4/doc/html/ofxdump_8cpp.html0000644000175000017500000001633211553133250014746 00000000000000 LibOFX: ofxdump.cpp File Reference

ofxdump.cpp File Reference

Code for ofxdump utility. C++ example code. More...

Go to the source code of this file.

Functions

int ofx_proc_security_cb (struct OfxSecurityData data, void *security_data)
int ofx_proc_transaction_cb (struct OfxTransactionData data, void *transaction_data)
int ofx_proc_statement_cb (struct OfxStatementData data, void *statement_data)
int ofx_proc_account_cb (struct OfxAccountData data, void *account_data)
int ofx_proc_status_cb (struct OfxStatusData data, void *status_data)
int main (int argc, char *argv[])

Detailed Description

Code for ofxdump utility. C++ example code.

ofxdump prints to stdout, in human readable form, everything the library understands about a particular ofx response file, and sends errors to stderr. To know exactly what the library understands about of a particular ofx response file, just call ofxdump on that file.

ofxdump is meant as both a C++ code example and a developper/debuging tool. It uses every function and every structure of the LibOFX API. By default, WARNING, INFO, ERROR and STATUS messages are enabled. You can change these defaults at the top of ofxdump.cpp

usage: ofxdump path_to_ofx_file/ofx_filename

Definition in file ofxdump.cpp.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Tell ofxdump what you want it to send to stderr. See messages.cpp for more details

Definition at line 371 of file ofxdump.cpp.

libofx-0.9.4/doc/html/ofx__preproc_8cpp_source.html0000644000175000017500000021740011553133250017330 00000000000000 LibOFX: ofx_preproc.cpp Source File

ofx_preproc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002           ofx_preproc.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�oir
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #include "../config.h"
00021 #include <iostream>
00022 #include <fstream>
00023 #include <stdlib.h>
00024 #include <stdio.h>
00025 #include <string>
00026 #include "ParserEventGeneratorKit.h"
00027 #include "libofx.h"
00028 #include "messages.hh"
00029 #include "ofx_sgml.hh"
00030 #include "ofc_sgml.hh"
00031 #include "ofx_preproc.hh"
00032 #include "ofx_utilities.hh"
00033 #ifdef HAVE_ICONV
00034 #include <iconv.h>
00035 #endif
00036 
00037 #ifdef OS_WIN32
00038 # define DIRSEP "\\"
00039 #else
00040 # define DIRSEP "/"
00041 #endif
00042 
00043 #ifdef OS_WIN32
00044 # include "win32.hh"
00045 # include <windows.h> // for GetModuleFileName()
00046 # undef ERROR
00047 # undef DELETE
00048 #endif
00049 
00050 #define LIBOFX_DEFAULT_INPUT_ENCODING "CP1252"
00051 #define LIBOFX_DEFAULT_OUTPUT_ENCODING "UTF-8"
00052 
00053 using namespace std;
00057 #ifdef MAKEFILE_DTD_PATH
00058 const int DTD_SEARCH_PATH_NUM = 4;
00059 #else
00060 const int DTD_SEARCH_PATH_NUM = 3;
00061 #endif
00062 
00066 const char *DTD_SEARCH_PATH[DTD_SEARCH_PATH_NUM] =
00067 {
00068 #ifdef MAKEFILE_DTD_PATH
00069   MAKEFILE_DTD_PATH ,
00070 #endif
00071   "/usr/local/share/libofx/dtd",
00072   "/usr/share/libofx/dtd",
00073   "~"
00074 };
00075 const unsigned int READ_BUFFER_SIZE = 1024;
00076 
00081 int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename)
00082 {
00083   LibofxContext *libofx_context;
00084   bool ofx_start = false;
00085   bool ofx_end = false;
00086 
00087   ifstream input_file;
00088   ofstream tmp_file;
00089   char buffer[READ_BUFFER_SIZE];
00090   char iconv_buffer[READ_BUFFER_SIZE * 2];
00091   string s_buffer;
00092   char *filenames[3];
00093   char tmp_filename[256];
00094   int tmp_file_fd;
00095 #ifdef HAVE_ICONV
00096   iconv_t conversion_descriptor;
00097 #endif
00098   libofx_context = (LibofxContext*)ctx;
00099 
00100   if (p_filename != NULL && strcmp(p_filename, "") != 0)
00101   {
00102     message_out(DEBUG, string("ofx_proc_file():Opening file: ") + p_filename);
00103 
00104     input_file.open(p_filename);
00105     if (!input_file)
00106     {
00107       message_out(ERROR, "ofx_proc_file():Unable to open the input file " + string(p_filename));
00108     }
00109 
00110     mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
00111 
00112     message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename));
00113     tmp_file_fd = mkstemp(tmp_filename);
00114     if(tmp_file_fd)
00115     {
00116     tmp_file.open(tmp_filename);
00117     if (!tmp_file)
00118       {
00119         message_out(ERROR, "ofx_proc_file():Unable to open the created temp file " + string(tmp_filename));
00120         return -1;
00121       }
00122     }
00123     else
00124     {
00125         message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename));
00126         return -1;
00127     }
00128 
00129     if (input_file && tmp_file)
00130     {
00131       int header_separator_idx;
00132       string header_name;
00133       string header_value;
00134       string ofx_encoding;
00135       string ofx_charset;
00136       do
00137       {
00138         input_file.getline(buffer, sizeof(buffer), '\n');
00139         //cout<<buffer<<"\n";
00140         s_buffer.assign(buffer);
00141         //cout<<"input_file.gcount(): "<<input_file.gcount()<<" sizeof(buffer): "<<sizeof(buffer)<<endl;
00142         if (input_file.gcount() < (sizeof(buffer) - 1))
00143         {
00144           s_buffer.append("\n");
00145         }
00146         else if ( !input_file.eof() && input_file.fail())
00147         {
00148           input_file.clear();
00149         }
00150         int ofx_start_idx;
00151         if (ofx_start == false &&
00152             (
00153               (libofx_context->currentFileType() == OFX &&
00154                ((ofx_start_idx = s_buffer.find("<OFX>")) !=
00155                 string::npos || (ofx_start_idx = s_buffer.find("<ofx>")) != string::npos))
00156               || (libofx_context->currentFileType() == OFC &&
00157                   ((ofx_start_idx = s_buffer.find("<OFC>")) != string::npos ||
00158                    (ofx_start_idx = s_buffer.find("<ofc>")) != string::npos))
00159             )
00160            )
00161         {
00162           ofx_start = true;
00163           s_buffer.erase(0, ofx_start_idx); //Fix for really broken files that don't have a newline after the header.
00164           message_out(DEBUG, "ofx_proc_file():<OFX> or <OFC> has been found");
00165 #ifdef HAVE_ICONV
00166           string fromcode;
00167           string tocode;
00168           if (ofx_encoding.compare("USASCII") == 0)
00169           {
00170             if (ofx_charset.compare("ISO-8859-1") == 0 || ofx_charset.compare("8859-1") == 0)
00171             {
00172               fromcode = "ISO-8859-1";
00173             }
00174             else if (ofx_charset.compare("1252") == 0)
00175             {
00176               fromcode = "CP1252";
00177             }
00178             else if (ofx_charset.compare("NONE") == 0)
00179             {
00180               fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00181             }
00182             else
00183             {
00184               fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00185             }
00186           }
00187           else if (ofx_encoding.compare("UTF-8") == 0)
00188           {
00189             fromcode = "UTF-8";
00190           }
00191           else
00192           {
00193             fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00194           }
00195           tocode = LIBOFX_DEFAULT_OUTPUT_ENCODING;
00196           message_out(DEBUG, "ofx_proc_file(): Setting up iconv for fromcode: " + fromcode + ", tocode: " + tocode);
00197           conversion_descriptor = iconv_open (tocode.c_str(), fromcode.c_str());
00198 #endif
00199         }
00200         else
00201         {
00202           //We are still in the headers
00203           if ((header_separator_idx = s_buffer.find(':')) != string::npos)
00204           {
00205             //Header processing
00206             header_name.assign(s_buffer.substr(0, header_separator_idx));
00207             header_value.assign(s_buffer.substr(header_separator_idx + 1));
00208             while ( header_value[header_value.length() -1 ] == '\n' ||
00209                     header_value[header_value.length() -1 ] == '\r' )
00210               header_value.erase(header_value.length() - 1);
00211             message_out(DEBUG, "ofx_proc_file():Header: " + header_name + " with value: " + header_value + " has been found");
00212             if (header_name.compare("ENCODING") == 0)
00213             {
00214               ofx_encoding.assign(header_value);
00215             }
00216             if (header_name.compare("CHARSET") == 0)
00217             {
00218               ofx_charset.assign(header_value);
00219             }
00220           }
00221         }
00222 
00223         if (ofx_start == true && ofx_end == false)
00224         {
00225           s_buffer = sanitize_proprietary_tags(s_buffer);
00226           //cout<< s_buffer<<"\n";
00227 #ifdef HAVE_ICONV
00228           memset(iconv_buffer, 0, READ_BUFFER_SIZE * 2);
00229           size_t inbytesleft = strlen(s_buffer.c_str());
00230           size_t outbytesleft = READ_BUFFER_SIZE * 2 - 1;
00231 #ifdef OS_WIN32
00232           const char * inchar = (const char *)s_buffer.c_str();
00233 #else
00234           char * inchar = (char *)s_buffer.c_str();
00235 #endif
00236           char * outchar = iconv_buffer;
00237           int iconv_retval = iconv (conversion_descriptor,
00238                                     &inchar, &inbytesleft,
00239                                     &outchar, &outbytesleft);
00240           if (iconv_retval == -1)
00241           {
00242             message_out(ERROR, "ofx_proc_file(): Conversion error");
00243           }
00244           s_buffer = iconv_buffer;
00245 #endif
00246           tmp_file.write(s_buffer.c_str(), s_buffer.length());
00247         }
00248 
00249         if (ofx_start == true &&
00250             (
00251               (libofx_context->currentFileType() == OFX &&
00252                ((ofx_start_idx = s_buffer.find("</OFX>")) != string::npos ||
00253                 (ofx_start_idx = s_buffer.find("</ofx>")) != string::npos))
00254               || (libofx_context->currentFileType() == OFC &&
00255                   ((ofx_start_idx = s_buffer.find("</OFC>")) != string::npos ||
00256                    (ofx_start_idx = s_buffer.find("</ofc>")) != string::npos))
00257             )
00258            )
00259         {
00260           ofx_end = true;
00261           message_out(DEBUG, "ofx_proc_file():</OFX> or </OFC>  has been found");
00262         }
00263 
00264       }
00265       while (!input_file.eof() && !input_file.bad());
00266     }
00267     input_file.close();
00268     tmp_file.close();
00269 #ifdef HAVE_ICONV
00270     iconv_close(conversion_descriptor);
00271 #endif
00272     char filename_openspdtd[255];
00273     char filename_dtd[255];
00274     char filename_ofx[255];
00275     strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file
00276     if (libofx_context->currentFileType() == OFX)
00277     {
00278       strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file
00279     }
00280     else if (libofx_context->currentFileType() == OFC)
00281     {
00282       strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file
00283     }
00284     else
00285     {
00286       message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00287     }
00288 
00289     if ((string)filename_dtd != "" && (string)filename_openspdtd != "")
00290     {
00291       strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file
00292       filenames[0] = filename_openspdtd;
00293       filenames[1] = filename_dtd;
00294       filenames[2] = filename_ofx;
00295       if (libofx_context->currentFileType() == OFX)
00296       {
00297         ofx_proc_sgml(libofx_context, 3, filenames);
00298       }
00299       else if (libofx_context->currentFileType() == OFC)
00300       {
00301         ofc_proc_sgml(libofx_context, 3, filenames);
00302       }
00303       else
00304       {
00305         message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00306       }
00307       if (remove(tmp_filename) != 0)
00308       {
00309         message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename));
00310       }
00311     }
00312     else
00313     {
00314       message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting");
00315     }
00316   }
00317   else
00318   {
00319     message_out(ERROR, "ofx_proc_file():No input file specified");
00320   }
00321   return 0;
00322 }
00323 
00324 
00325 
00326 int libofx_proc_buffer(LibofxContextPtr ctx,
00327                        const char *s, unsigned int size)
00328 {
00329   ofstream tmp_file;
00330   string s_buffer;
00331   char *filenames[3];
00332   char tmp_filename[256];
00333   int tmp_file_fd;
00334   ssize_t pos;
00335   LibofxContext *libofx_context;
00336 
00337   libofx_context = (LibofxContext*)ctx;
00338 
00339   if (size == 0)
00340   {
00341     message_out(ERROR,
00342                 "ofx_proc_file(): bad size");
00343     return -1;
00344   }
00345   s_buffer = string(s, size);
00346 
00347   mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
00348   message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename));
00349   tmp_file_fd = mkstemp(tmp_filename);
00350   if(tmp_file_fd)
00351   {
00352   tmp_file.open(tmp_filename);
00353   if (!tmp_file)
00354     {
00355       message_out(ERROR, "ofx_proc_file():Unable to open the created output file " + string(tmp_filename));
00356       return -1;
00357     }
00358   }
00359   else
00360   {
00361       message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename));
00362       return -1;
00363   }
00364 
00365   if (libofx_context->currentFileType() == OFX)
00366   {
00367     pos = s_buffer.find("<OFX>");
00368     if (pos == string::npos)
00369       pos = s_buffer.find("<ofx>");
00370   }
00371   else if (libofx_context->currentFileType() == OFC)
00372   {
00373     pos = s_buffer.find("<OFC>");
00374     if (pos == string::npos)
00375       pos = s_buffer.find("<ofc>");
00376   }
00377   else
00378   {
00379     message_out(ERROR, "ofx_proc(): unknown file type");
00380     return -1;
00381   }
00382   if (pos == string::npos || pos > s_buffer.size())
00383   {
00384     message_out(ERROR, "ofx_proc():<OFX> has not been found");
00385     return -1;
00386   }
00387   else
00388   {
00389     // erase everything before the OFX tag
00390     s_buffer.erase(0, pos);
00391     message_out(DEBUG, "ofx_proc_file():<OF?> has been found");
00392   }
00393 
00394   if (libofx_context->currentFileType() == OFX)
00395   {
00396     pos = s_buffer.find("</OFX>");
00397     if (pos == string::npos)
00398       pos = s_buffer.find("</ofx>");
00399   }
00400   else if (libofx_context->currentFileType() == OFC)
00401   {
00402     pos = s_buffer.find("</OFC>");
00403     if (pos == string::npos)
00404       pos = s_buffer.find("</ofc>");
00405   }
00406   else
00407   {
00408     message_out(ERROR, "ofx_proc(): unknown file type");
00409     return -1;
00410   }
00411 
00412   if (pos == string::npos || pos > s_buffer.size())
00413   {
00414     message_out(ERROR, "ofx_proc():</OF?> has not been found");
00415     return -1;
00416   }
00417   else
00418   {
00419     // erase everything after the /OFX tag
00420     if (s_buffer.size() > pos + 6)
00421       s_buffer.erase(pos + 6);
00422     message_out(DEBUG, "ofx_proc_file():<OFX> has been found");
00423   }
00424 
00425   s_buffer = sanitize_proprietary_tags(s_buffer);
00426   tmp_file.write(s_buffer.c_str(), s_buffer.length());
00427 
00428   tmp_file.close();
00429 
00430   char filename_openspdtd[255];
00431   char filename_dtd[255];
00432   char filename_ofx[255];
00433   strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file
00434   if (libofx_context->currentFileType() == OFX)
00435   {
00436     strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file
00437   }
00438   else if (libofx_context->currentFileType() == OFC)
00439   {
00440     strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file
00441   }
00442   else
00443   {
00444     message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00445   }
00446 
00447   if ((string)filename_dtd != "" && (string)filename_openspdtd != "")
00448   {
00449     strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file
00450     filenames[0] = filename_openspdtd;
00451     filenames[1] = filename_dtd;
00452     filenames[2] = filename_ofx;
00453     if (libofx_context->currentFileType() == OFX)
00454     {
00455       ofx_proc_sgml(libofx_context, 3, filenames);
00456     }
00457     else if (libofx_context->currentFileType() == OFC)
00458     {
00459       ofc_proc_sgml(libofx_context, 3, filenames);
00460     }
00461     else
00462     {
00463       message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00464     }
00465     if (remove(tmp_filename) != 0)
00466     {
00467       message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename));
00468     }
00469   }
00470   else
00471   {
00472     message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting");
00473   }
00474 
00475   return 0;
00476 }
00477 
00478 
00479 
00480 
00481 
00482 
00487 string sanitize_proprietary_tags(string input_string)
00488 {
00489   unsigned int i;
00490   size_t input_string_size;
00491   bool strip = false;
00492   bool tag_open = false;
00493   int tag_open_idx = 0; //Are we within < > ?
00494   bool closing_tag_open = false; //Are we within </ > ?
00495   int orig_tag_open_idx = 0;
00496   bool proprietary_tag = false; //Are we within a proprietary element?
00497   bool proprietary_closing_tag = false;
00498   int crop_end_idx = 0;
00499   char buffer[READ_BUFFER_SIZE] = "";
00500   char tagname[READ_BUFFER_SIZE] = "";
00501   int tagname_idx = 0;
00502   char close_tagname[READ_BUFFER_SIZE] = "";
00503 
00504   for (i = 0; i < READ_BUFFER_SIZE; i++)
00505   {
00506     buffer[i] = 0;
00507     tagname[i] = 0;
00508     close_tagname[i] = 0;
00509   }
00510 
00511   input_string_size = input_string.size();
00512 
00513   for (i = 0; i <= input_string_size; i++)
00514   {
00515     if (input_string.c_str()[i] == '<')
00516     {
00517       tag_open = true;
00518       tag_open_idx = i;
00519       if (proprietary_tag == true && input_string.c_str()[i+1] == '/')
00520       {
00521         //We are now in a closing tag
00522         closing_tag_open = true;
00523         //cout<<"Comparaison: "<<tagname<<"|"<<&(input_string.c_str()[i+2])<<"|"<<strlen(tagname)<<endl;
00524         if (strncmp(tagname, &(input_string.c_str()[i+2]), strlen(tagname)) != 0)
00525         {
00526           //If it is the begining of an other tag
00527           //cout<<"DIFFERENT!"<<endl;
00528           crop_end_idx = i - 1;
00529           strip = true;
00530         }
00531         else
00532         {
00533           //Otherwise, it is the start of the closing tag of the proprietary tag
00534           proprietary_closing_tag = true;
00535         }
00536       }
00537       else if (proprietary_tag == true)
00538       {
00539         //It is the start of a new tag, following a proprietary tag
00540         crop_end_idx = i - 1;
00541         strip = true;
00542       }
00543     }
00544     else if (input_string.c_str()[i] == '>')
00545     {
00546       tag_open = false;
00547       closing_tag_open = false;
00548       tagname[tagname_idx] = 0;
00549       tagname_idx = 0;
00550       if (proprietary_closing_tag == true)
00551       {
00552         crop_end_idx = i;
00553         strip = true;
00554       }
00555     }
00556     else if (tag_open == true && closing_tag_open == false)
00557     {
00558       if (input_string.c_str()[i] == '.')
00559       {
00560         if (proprietary_tag != true)
00561         {
00562           orig_tag_open_idx = tag_open_idx;
00563           proprietary_tag = true;
00564         }
00565       }
00566       tagname[tagname_idx] = input_string.c_str()[i];
00567       tagname_idx++;
00568     }
00569     //cerr <<i<<endl;
00570     if (strip == true && orig_tag_open_idx < input_string.size())
00571     {
00572       input_string.copy(buffer, (crop_end_idx - orig_tag_open_idx) + 1, orig_tag_open_idx);
00573       message_out(INFO, "sanitize_proprietary_tags() (end tag or new tag) removed: " + string(buffer));
00574       input_string.erase(orig_tag_open_idx, (crop_end_idx - orig_tag_open_idx) + 1);
00575       i = orig_tag_open_idx - 1;
00576       proprietary_tag = false;
00577       proprietary_closing_tag = false;
00578       closing_tag_open = false;
00579       tag_open = false;
00580       strip = false;
00581     }
00582 
00583   }//end for
00584   if (proprietary_tag == true && orig_tag_open_idx < input_string.size())
00585   {
00586     if (crop_end_idx == 0)   //no closing tag
00587     {
00588       crop_end_idx = input_string.size() - 1;
00589     }
00590     input_string.copy(buffer, (crop_end_idx - orig_tag_open_idx) + 1, orig_tag_open_idx);
00591     message_out(INFO, "sanitize_proprietary_tags() (end of line) removed: " + string(buffer));
00592     input_string.erase(orig_tag_open_idx, (crop_end_idx - orig_tag_open_idx) + 1);
00593   }
00594   return input_string;
00595 }
00596 
00597 
00598 #ifdef OS_WIN32
00599 static std::string get_dtd_installation_directory()
00600 {
00601   // Partial implementation of
00602   // http://developer.gnome.org/doc/API/2.0/glib/glib-Windows-Compatibility-Functions.html#g-win32-get-package-installation-directory
00603   char ch_fn[MAX_PATH], *p;
00604   std::string str_fn;
00605 
00606   if (!GetModuleFileName(NULL, ch_fn, MAX_PATH)) return "";
00607 
00608   if ((p = strrchr(ch_fn, '\\')) != NULL)
00609     * p = '\0';
00610 
00611   p = strrchr(ch_fn, '\\');
00612   if (p && (_stricmp(p + 1, "bin") == 0 ||
00613             _stricmp(p + 1, "lib") == 0))
00614     *p = '\0';
00615 
00616   str_fn = ch_fn;
00617   str_fn += "\\share\\libofx\\dtd";
00618 
00619   return str_fn;
00620 }
00621 #endif
00622 
00623 
00636 string find_dtd(LibofxContextPtr ctx, string dtd_filename)
00637 {
00638   string dtd_path_filename;
00639   char *env_dtd_path;
00640 
00641   dtd_path_filename = reinterpret_cast<const LibofxContext*>(ctx)->dtdDir();
00642   if (!dtd_path_filename.empty())
00643   {
00644     dtd_path_filename.append(dtd_filename);
00645     ifstream dtd_file(dtd_path_filename.c_str());
00646     if (dtd_file)
00647     {
00648       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00649       return dtd_path_filename;
00650     }
00651   }
00652 
00653 #ifdef OS_WIN32
00654   dtd_path_filename = get_dtd_installation_directory();
00655   if (!dtd_path_filename.empty())
00656   {
00657         dtd_path_filename.append(DIRSEP);
00658     dtd_path_filename.append(dtd_filename);
00659     ifstream dtd_file(dtd_path_filename.c_str());
00660     if (dtd_file)
00661     {
00662       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00663       return dtd_path_filename;
00664     }
00665   }
00666 #endif
00667   /* Search in environement variable OFX_DTD_PATH */
00668   env_dtd_path = getenv("OFX_DTD_PATH");
00669   if (env_dtd_path)
00670   {
00671     dtd_path_filename.append(env_dtd_path);
00672     dtd_path_filename.append(DIRSEP);
00673     dtd_path_filename.append(dtd_filename);
00674     ifstream dtd_file(dtd_path_filename.c_str());
00675     if (!dtd_file)
00676     {
00677       message_out(STATUS, "find_dtd():OFX_DTD_PATH env variable was was present, but unable to open the file " + dtd_path_filename);
00678     }
00679     else
00680     {
00681       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00682       return dtd_path_filename;
00683     }
00684   }
00685 
00686   for (int i = 0; i < DTD_SEARCH_PATH_NUM; i++)
00687   {
00688     dtd_path_filename = DTD_SEARCH_PATH[i];
00689     dtd_path_filename.append(DIRSEP);
00690     dtd_path_filename.append(dtd_filename);
00691     ifstream dtd_file(dtd_path_filename.c_str());
00692     if (!dtd_file)
00693     {
00694       message_out(DEBUG, "find_dtd():Unable to open the file " + dtd_path_filename);
00695     }
00696     else
00697     {
00698       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00699       return dtd_path_filename;
00700     }
00701   }
00702 
00703   message_out(ERROR, "find_dtd():Unable to find the DTD named " + dtd_filename);
00704   return "";
00705 }
00706 
00707 
libofx-0.9.4/doc/html/context_8cpp_source.html0000644000175000017500000004603211553133250016330 00000000000000 LibOFX: context.cpp Source File

context.cpp

00001 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 #include <config.h>
00014 #include "context.hh"
00015 
00016 using namespace std;
00017 
00018 
00019 
00020 LibofxContext::LibofxContext()
00021   : _current_file_type(OFX)
00022   , _statusCallback(0)
00023   , _accountCallback(0)
00024   , _securityCallback(0)
00025   , _transactionCallback(0)
00026   , _statementCallback(0)
00027   , _statementData(0)
00028   , _accountData(0)
00029   , _transactionData(0)
00030   , _securityData(0)
00031   , _statusData(0)
00032 {
00033 
00034 }
00035 
00036 
00037 
00038 LibofxContext::~LibofxContext()
00039 {
00040 }
00041 
00042 
00043 
00044 LibofxFileFormat LibofxContext::currentFileType() const
00045 {
00046   return _current_file_type;
00047 }
00048 
00049 
00050 
00051 void LibofxContext::setCurrentFileType(LibofxFileFormat t)
00052 {
00053   _current_file_type = t;
00054 }
00055 
00056 
00057 
00058 int LibofxContext::statementCallback(const struct OfxStatementData data)
00059 {
00060   if (_statementCallback)
00061     return _statementCallback(data, _statementData);
00062   return 0;
00063 }
00064 
00065 
00066 
00067 int LibofxContext::accountCallback(const struct OfxAccountData data)
00068 {
00069   if (_accountCallback)
00070     return _accountCallback(data, _accountData);
00071   return 0;
00072 }
00073 
00074 
00075 
00076 int LibofxContext::transactionCallback(const struct OfxTransactionData data)
00077 {
00078   if (_transactionCallback)
00079     return _transactionCallback(data, _transactionData);
00080   return 0;
00081 }
00082 
00083 
00084 
00085 int LibofxContext::securityCallback(const struct OfxSecurityData data)
00086 {
00087   if (_securityCallback)
00088     return _securityCallback(data, _securityData);
00089   return 0;
00090 }
00091 
00092 
00093 
00094 int LibofxContext::statusCallback(const struct OfxStatusData data)
00095 {
00096   if (_statusCallback)
00097     return _statusCallback(data, _statusData);
00098   return 0;
00099 }
00100 
00101 
00102 void LibofxContext::setStatusCallback(LibofxProcStatusCallback cb,
00103                                       void *user_data)
00104 {
00105   _statusCallback = cb;
00106   _statusData = user_data;
00107 }
00108 
00109 
00110 
00111 void LibofxContext::setAccountCallback(LibofxProcAccountCallback cb,
00112                                        void *user_data)
00113 {
00114   _accountCallback = cb;
00115   _accountData = user_data;
00116 }
00117 
00118 
00119 
00120 void LibofxContext::setSecurityCallback(LibofxProcSecurityCallback cb,
00121                                         void *user_data)
00122 {
00123   _securityCallback = cb;
00124   _securityData = user_data;
00125 }
00126 
00127 
00128 
00129 void LibofxContext::setTransactionCallback(LibofxProcTransactionCallback cb,
00130     void *user_data)
00131 {
00132   _transactionCallback = cb;
00133   _transactionData = user_data;
00134 }
00135 
00136 
00137 
00138 void LibofxContext::setStatementCallback(LibofxProcStatementCallback cb,
00139     void *user_data)
00140 {
00141   _statementCallback = cb;
00142   _statementData = user_data;
00143 }
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00153 LibofxContextPtr libofx_get_new_context()
00154 {
00155   return new LibofxContext();
00156 }
00157 
00158 int libofx_free_context( LibofxContextPtr libofx_context_param)
00159 {
00160   delete (LibofxContext *)libofx_context_param;
00161   return 0;
00162 }
00163 
00164 
00165 
00166 void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
00167                         const char *s)
00168 {
00169   ((LibofxContext*)libofx_context)->setDtdDir(s);
00170 }
00171 
00172 
00173 
00174 
00175 
00176 
00177 extern "C" {
00178   void ofx_set_status_cb(LibofxContextPtr ctx,
00179                          LibofxProcStatusCallback cb,
00180                          void *user_data)
00181   {
00182     ((LibofxContext*)ctx)->setStatusCallback(cb, user_data);
00183   }
00184 
00185 
00186   void ofx_set_account_cb(LibofxContextPtr ctx,
00187                           LibofxProcAccountCallback cb,
00188                           void *user_data)
00189   {
00190     ((LibofxContext*)ctx)->setAccountCallback(cb, user_data);
00191   }
00192 
00193 
00194 
00195   void ofx_set_security_cb(LibofxContextPtr ctx,
00196                            LibofxProcSecurityCallback cb,
00197                            void *user_data)
00198   {
00199     ((LibofxContext*)ctx)->setSecurityCallback(cb, user_data);
00200   }
00201 
00202 
00203 
00204   void ofx_set_transaction_cb(LibofxContextPtr ctx,
00205                               LibofxProcTransactionCallback cb,
00206                               void *user_data)
00207   {
00208     ((LibofxContext*)ctx)->setTransactionCallback(cb, user_data);
00209   }
00210 
00211 
00212 
00213   void ofx_set_statement_cb(LibofxContextPtr ctx,
00214                             LibofxProcStatementCallback cb,
00215                             void *user_data)
00216   {
00217     ((LibofxContext*)ctx)->setStatementCallback(cb, user_data);
00218   }
00219 
00220 
00221 
00222 
00223 }
00224 
00225 
00226 
00227 
00228 
00229 
00230 
00231 
00232 
00233 
libofx-0.9.4/doc/html/ofx__aggregate_8hh_source.html0000644000175000017500000001733011553133250017421 00000000000000 LibOFX: ofx_aggregate.hh Source File

ofx_aggregate.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_aggregate.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_AGGREGATE_H
00021 #define OFX_AGGREGATE_H
00022 
00023 #include <string>
00024 
00025 using namespace std;
00026 
00042 class OfxAggregate
00043 {
00044 public:
00050   OfxAggregate( const string& tag ): m_tag( tag )
00051   {}
00052 
00059   void Add( const string& tag, const string& data )
00060   {
00061     m_contents += string("<") + tag + string(">") + data + string("\r\n");
00062   }
00063 
00069   void Add( const OfxAggregate& sub )
00070   {
00071     m_contents += sub.Output();
00072   }
00073 
00079   string Output( void ) const
00080   {
00081     return string("<") + m_tag + string(">\r\n") + m_contents + string("</") + m_tag + string(">\r\n");
00082   }
00083 
00084 private:
00085   string m_tag;
00086   string m_contents;
00087 };
00088 
00089 #endif // OFX_AGGREGATE_H
libofx-0.9.4/doc/html/ofxpartner_8cpp.html0000644000175000017500000001422111553133250015447 00000000000000 LibOFX: ofxpartner.cpp File Reference

ofxpartner.cpp File Reference

Methods for connecting to the OFX partner server to retrieve OFX server information. More...

Go to the source code of this file.

Functions

bool OfxPartner::post (const string &request, const string &url, const string &filename)
void OfxPartner::ValidateIndexCache (void)
vector< string > OfxPartner::BankNames (void)
vector< string > OfxPartner::FipidForBank (const string &bank)
OfxFiServiceInfo OfxPartner::ServiceInfo (const std::string &fipid)

Variables

const string OfxPartner::kBankFilename = "ofx-bank-index.xml"
const string OfxPartner::kCcFilename = "ofx-cc-index.xml"
const string OfxPartner::kInvFilename = "ofx-inv-index.xml"

Detailed Description

Methods for connecting to the OFX partner server to retrieve OFX server information.

Definition in file ofxpartner.cpp.

libofx-0.9.4/doc/html/config_8h_source.html0000644000175000017500000004413611553133250015561 00000000000000 LibOFX: config.h Source File

config.h

00001 /* config.h.  Generated from config.h.in by configure.  */
00002 /* config.h.in.  Generated from configure.in by autoheader.  */
00003 
00004 /* Define if building universal (internal helper macro) */
00005 /* #undef AC_APPLE_UNIVERSAL_BUILD */
00006 
00007 /* if DLL is to be built */
00008 /* #undef BUILDING_DLL */
00009 
00010 /* Define to 1 if you have the <dlfcn.h> header file. */
00011 #define HAVE_DLFCN_H 1
00012 
00013 /* Define to 1 if you have the <EventGenerator.h> header file. */
00014 #define HAVE_EVENTGENERATOR_H 1
00015 
00016 /* Define to 1 if you have the <getopt.h> header file. */
00017 #define HAVE_GETOPT_H 1
00018 
00019 /* Define to 1 if you have the `getopt_long' function. */
00020 #define HAVE_GETOPT_LONG 1
00021 
00022 /* Defined if libxml++ is available */
00023 #define HAVE_ICONV 1
00024 
00025 /* Define to 1 if you have the <inttypes.h> header file. */
00026 #define HAVE_INTTYPES_H 1
00027 
00028 /* Define to 1 if you have a functional curl library. */
00029 #define HAVE_LIBCURL 1
00030 
00031 /* Defined if libxml++ is available */
00032 #define HAVE_LIBXMLPP 1
00033 
00034 /* Define to 1 if you have the <memory.h> header file. */
00035 #define HAVE_MEMORY_H 1
00036 
00037 /* Define to 1 if you have the <ParserEventGeneratorKit.h> header file. */
00038 #define HAVE_PARSEREVENTGENERATORKIT_H 1
00039 
00040 /* Define to 1 if you have the <SGMLApplication.h> header file. */
00041 #define HAVE_SGMLAPPLICATION_H 1
00042 
00043 /* Define to 1 if you have the <stdint.h> header file. */
00044 #define HAVE_STDINT_H 1
00045 
00046 /* Define to 1 if you have the <stdlib.h> header file. */
00047 #define HAVE_STDLIB_H 1
00048 
00049 /* Define to 1 if you have the <strings.h> header file. */
00050 #define HAVE_STRINGS_H 1
00051 
00052 /* Define to 1 if you have the <string.h> header file. */
00053 #define HAVE_STRING_H 1
00054 
00055 /* Define to 1 if you have the <sys/stat.h> header file. */
00056 #define HAVE_SYS_STAT_H 1
00057 
00058 /* Define to 1 if you have the <sys/types.h> header file. */
00059 #define HAVE_SYS_TYPES_H 1
00060 
00061 /* Define to 1 if you have the <unistd.h> header file. */
00062 #define HAVE_UNISTD_H 1
00063 
00064 /* Defined if libcurl supports AsynchDNS */
00065 /* #undef LIBCURL_FEATURE_ASYNCHDNS */
00066 
00067 /* Defined if libcurl supports IPv6 */
00068 #define LIBCURL_FEATURE_IPV6 1
00069 
00070 /* Defined if libcurl supports KRB4 */
00071 /* #undef LIBCURL_FEATURE_KRB4 */
00072 
00073 /* Defined if libcurl supports libz */
00074 #define LIBCURL_FEATURE_LIBZ 1
00075 
00076 /* Defined if libcurl supports SSL */
00077 #define LIBCURL_FEATURE_SSL 1
00078 
00079 /* Defined if libcurl supports DICT */
00080 #define LIBCURL_PROTOCOL_DICT 1
00081 
00082 /* Defined if libcurl supports FILE */
00083 #define LIBCURL_PROTOCOL_FILE 1
00084 
00085 /* Defined if libcurl supports FTP */
00086 #define LIBCURL_PROTOCOL_FTP 1
00087 
00088 /* Defined if libcurl supports FTPS */
00089 #define LIBCURL_PROTOCOL_FTPS 1
00090 
00091 /* Defined if libcurl supports GOPHER */
00092 #define LIBCURL_PROTOCOL_GOPHER 1
00093 
00094 /* Defined if libcurl supports HTTP */
00095 #define LIBCURL_PROTOCOL_HTTP 1
00096 
00097 /* Defined if libcurl supports HTTPS */
00098 #define LIBCURL_PROTOCOL_HTTPS 1
00099 
00100 /* Defined if libcurl supports LDAP */
00101 #define LIBCURL_PROTOCOL_LDAP 1
00102 
00103 /* Defined if libcurl supports TELNET */
00104 #define LIBCURL_PROTOCOL_TELNET 1
00105 
00106 /* Define to the sub-directory in which libtool stores uninstalled libraries.
00107    */
00108 #define LT_OBJDIR ".libs/"
00109 
00110 /* if BeOS is used */
00111 /* #undef OS_BEOS */
00112 
00113 /* if Apple Darwin is used */
00114 /* #undef OS_DARWIN */
00115 
00116 /* if FreeBSD is used */
00117 /* #undef OS_FREEBSD */
00118 
00119 /* if linux is used */
00120 #define OS_LINUX 1
00121 
00122 /* host system */
00123 #define OS_NAME "x86_64-unknown-linux-gnu"
00124 
00125 /* if NetBSD is used */
00126 /* #undef OS_NETBSD */
00127 
00128 /* if OpenBSD is used */
00129 /* #undef OS_OPENBSD */
00130 
00131 /* if PalmOS is used */
00132 /* #undef OS_PALMOS */
00133 
00134 /* if this is a POSIX system */
00135 #define OS_POSIX 1
00136 
00137 /* host system */
00138 #define OS_SHORTNAME "linux"
00139 
00140 /* if Solaris is used */
00141 /* #undef OS_SOLARIS */
00142 
00143 /* system type */
00144 #define OS_TYPE "posix"
00145 
00146 /* if WIN32 is used */
00147 /* #undef OS_WIN32 */
00148 
00149 /* Name of package */
00150 #define PACKAGE "libofx"
00151 
00152 /* Define to the address where bug reports for this package should be sent. */
00153 #define PACKAGE_BUGREPORT ""
00154 
00155 /* Define to the full name of this package. */
00156 #define PACKAGE_NAME ""
00157 
00158 /* Define to the full name and version of this package. */
00159 #define PACKAGE_STRING ""
00160 
00161 /* Define to the one symbol short name of this package. */
00162 #define PACKAGE_TARNAME ""
00163 
00164 /* Define to the home page for this package. */
00165 #define PACKAGE_URL ""
00166 
00167 /* Define to the version of this package. */
00168 #define PACKAGE_VERSION ""
00169 
00170 /* SP_MULTI_BYTE value from when OpenSP was compiled */
00171 #define SP_MULTI_BYTE 1
00172 
00173 /* Define to 1 if you have the ANSI C header files. */
00174 #define STDC_HEADERS 1
00175 
00176 /* Version number of package */
00177 #define VERSION "0.9.4"
00178 
00179 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
00180    significant byte first (like Motorola and SPARC, unlike Intel). */
00181 #if defined AC_APPLE_UNIVERSAL_BUILD
00182 # if defined __BIG_ENDIAN__
00183 #  define WORDS_BIGENDIAN 1
00184 # endif
00185 #else
00186 # ifndef WORDS_BIGENDIAN
00187 /* #  undef WORDS_BIGENDIAN */
00188 # endif
00189 #endif
00190 
00191 /* Define curl_free() as free() if our version of curl lacks curl_free. */
00192 /* #undef curl_free */
libofx-0.9.4/doc/html/ftv2doc.png0000644000175000017500000000137211553133251013520 00000000000000‰PNG  IHDRÚ}\ˆÁIDATxíOOGÆ3;ûÇÞ]oL²¶± n %HP•´IÀ¢9´QL•¢*UÕSOáTõ–ckýýý¹µj8DT¥@«@ˆk †lÃNEMrÁ›À!=õ•æ2Ò¾¿}Ÿgž™«ÐZó6K¾Õîÿ@õÚüíºîD´Ú‡t"žï¶iì¶ð] ÇV¤\‹|èRÈxâu£Z­žØœ_ú»šíKâ%MÜ„‰c+Ž"a+êÏ÷Iû…ŒÇüb SÉj:åÜ;“D†!²»„X¦—0ñ]‹|èñäÙ.ùÐåË!óK5ÿµ{Rb=0 ù "¥@)‰ë(|×du½@>t¹<–åÑã:õfOHOŽêøïtÔZ£é‚’ò¡Ç?þÊN³C>t \‹g[M²ç“§ó`y­QÍ]p‘RPÛÞÂdÂd»ÑÂOšô‡.Ùó.é”Mʵ¨mdxàÜ /â'0$BÀ£ßëh­¹öq_6hµéK9˜J2Ý!á(VÖLŽç|›‹¥4Q¤iwº™9S’¥ܘäË™®OòÍ­1fÊ%îÍ•ùäR÷  [xÖÙ’ Dw-®l1¿TãÅ^‡ÍÆ>…ŒÇP1`ie‹Í&ß~5cǶ‰ŸÀR†”ú}®Žg™­Œpçö|ñé£ïô1[ữ/!¥À0âo‹xôqØ<\cqe‹¡bÀêzã„“ã¹× ýÆStcjÙÊû|vu §ÊÈã@žE)Zk”’2Þ«‹¯˜õÏ¢ÿ‚ÛT c®žE‘fòó»<]þËî6‰«vë¹w¯ðýݹÓ*å’¨ütÿÿ'óßúªWİa\ÔØIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__accountinfo_8cpp_source.html0000644000175000017500000002437111553133250024557 00000000000000 LibOFX: ofx_request_accountinfo.cpp Source File

ofx_request_accountinfo.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request_accountinfo.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "libofx.h"
00027 #include "ofx_request_accountinfo.hh"
00028 
00029 using namespace std;
00030 
00031 char* libofx_request_accountinfo( const OfxFiLogin* login )
00032 {
00033   OfxAccountInfoRequest strq( *login );
00034   string request = OfxHeader(login->header_version) + strq.Output();
00035 
00036   unsigned size = request.size();
00037   char* result = (char*)malloc(size + 1);
00038   request.copy(result, size);
00039   result[size] = 0;
00040 
00041   return result;
00042 }
00043 
00044 /*
00045 <OFX>
00046 <SIGNONMSGSRQV1>
00047 <SONRQ>
00048 <DTCLIENT>20050417210306
00049 <USERID>GnuCash
00050 <USERPASS>gcash
00051 <LANGUAGE>ENG
00052 <FI>
00053 <ORG>ReferenceFI
00054 <FID>00000
00055 </FI>
00056 <APPID>QWIN
00057 <APPVER>1100
00058 </SONRQ>
00059 </SIGNONMSGSRQV1>
00060 
00061 <SIGNUPMSGSRQV1>
00062 <ACCTINFOTRNRQ>
00063 <TRNUID>FFAAA4AA-A9B1-47F4-98E9-DE635EB41E77
00064 <CLTCOOKIE>4
00065 
00066 <ACCTINFORQ>
00067 <DTACCTUP>19700101000000
00068 </ACCTINFORQ>
00069 
00070 </ACCTINFOTRNRQ>
00071 </SIGNUPMSGSRQV1>
00072 </OFX>
00073 */
00074 
00075 OfxAccountInfoRequest::OfxAccountInfoRequest( const OfxFiLogin& fi ):
00076   OfxRequest(fi)
00077 {
00078   Add( SignOnRequest() );
00079 
00080   OfxAggregate acctinforqTag("ACCTINFORQ");
00081   acctinforqTag.Add( "DTACCTUP", time_t_to_ofxdate( 0 ) );
00082   Add ( RequestMessage("SIGNUP", "ACCTINFO", acctinforqTag) );
00083 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__transaction_8cpp.html0000644000175000017500000001056411553133250023505 00000000000000 LibOFX: ofx_container_transaction.cpp File Reference
libofx-0.9.4/doc/html/ofx__request__accountinfo_8hh_source.html0000644000175000017500000001405511553133250021713 00000000000000 LibOFX: ofx_request_accountinfo.hh Source File

ofx_request_accountinfo.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request_accountinfo.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQ_ACCOUNTINFO_H
00021 #define OFX_REQ_ACCOUNTINFO_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_request.hh"
00026 
00027 using namespace std;
00028 
00037 class OfxAccountInfoRequest: public OfxRequest
00038 {
00039 public:
00046   OfxAccountInfoRequest( const OfxFiLogin& fi );
00047 };
00048 
00049 #endif // OFX_REQ_ACCOUNTINFO_H
libofx-0.9.4/doc/html/classOfxGenericContainer.html0000644000175000017500000007772511553133250017271 00000000000000 LibOFX: OfxGenericContainer Class Reference

OfxGenericContainer Class Reference

A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer. More...

Inheritance diagram for OfxGenericContainer:
OfxAccountContainer OfxAccountContainer OfxBalanceContainer OfxBalanceContainer OfxDummyContainer OfxDummyContainer OfxMainContainer OfxMainContainer OfxPushUpContainer OfxPushUpContainer OfxSecurityContainer OfxSecurityContainer OfxStatementContainer OfxStatementContainer OfxStatusContainer OfxStatusContainer OfxTransactionContainer OfxTransactionContainer

Public Member Functions

 OfxGenericContainer (LibofxContext *p_libofx_context)
 OfxGenericContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer)
 OfxGenericContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
virtual void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.
OfxGenericContainergetparent ()
 Returns the parent container object (the one representing the containing OFX SGML element)
 OfxGenericContainer (LibofxContext *p_libofx_context)
 OfxGenericContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer)
 OfxGenericContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
virtual void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.
OfxGenericContainergetparent ()
 Returns the parent container object (the one representing the containing OFX SGML element)

Data Fields

string type
string tag_identifier
OfxGenericContainerparentcontainer
LibofxContextlibofx_context

Detailed Description

A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer.

A hierarchy of containers is built as the file is parsed. The supported OFX elements all have a matching container. The others are assigned a OfxDummyContainer, so every OFX element creates a container as the file is par Note however that containers are destroyed as soon as the corresponding SGML element is closed.

Definition at line 33 of file ofx_containers.hh.


Member Function Documentation

void OfxGenericContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented in OfxDummyContainer, OfxPushUpContainer, OfxStatusContainer, OfxBalanceContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxBankTransactionContainer, OfxInvestmentTransactionContainer, OfxDummyContainer, OfxPushUpContainer, OfxStatusContainer, OfxBalanceContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxBankTransactionContainer, and OfxInvestmentTransactionContainer.

Definition at line 57 of file ofx_container_generic.cpp.

Referenced by OfxPushUpContainer::add_attribute().

virtual void OfxGenericContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented in OfxDummyContainer, OfxPushUpContainer, OfxStatusContainer, OfxBalanceContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxBankTransactionContainer, OfxInvestmentTransactionContainer, OfxDummyContainer, OfxPushUpContainer, OfxStatusContainer, OfxBalanceContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxBankTransactionContainer, and OfxInvestmentTransactionContainer.

virtual int OfxGenericContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented in OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, and OfxTransactionContainer.

int OfxGenericContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented in OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, and OfxTransactionContainer.

Definition at line 74 of file ofx_container_generic.cpp.

int OfxGenericContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented in OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxMainContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, and OfxMainContainer.

Definition at line 68 of file ofx_container_generic.cpp.

virtual int OfxGenericContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented in OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, OfxMainContainer, OfxStatementContainer, OfxAccountContainer, OfxSecurityContainer, OfxTransactionContainer, and OfxMainContainer.


Field Documentation

The identifer of the creating tag

Definition at line 37 of file ofx_containers.hh.

Referenced by OfxDummyContainer::add_attribute().

The type of the object, often == tag_identifier

Definition at line 36 of file ofx_containers.hh.

Referenced by OfxStatusContainer::add_attribute(), and add_attribute().


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/messages_8cpp_source.html0000644000175000017500000004753411553133250016463 00000000000000 LibOFX: messages.cpp Source File

messages.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_messages.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #include <iostream>
00019 #include <stdlib.h>
00020 #include <string>
00021 #include "ParserEventGeneratorKit.h"
00022 #include "ofx_utilities.hh"
00023 #include "messages.hh"
00024 
00025 SGMLApplication::OpenEntityPtr entity_ptr; 
00026 SGMLApplication::Position position; 
00028 volatile int ofx_PARSER_msg = false; 
00029 volatile int ofx_DEBUG_msg = false;
00030 volatile int ofx_DEBUG1_msg = false;
00031 volatile int ofx_DEBUG2_msg = false;
00032 volatile int ofx_DEBUG3_msg = false;
00033 volatile int ofx_DEBUG4_msg = false;
00034 volatile int ofx_DEBUG5_msg = false;
00035 volatile int ofx_STATUS_msg = false;
00036 volatile int ofx_INFO_msg = false;
00037 volatile int ofx_WARNING_msg = false;
00038 volatile int ofx_ERROR_msg = false;
00039 volatile int ofx_show_position = true;
00041 void show_line_number()
00042 {
00043   extern SGMLApplication::OpenEntityPtr entity_ptr;
00044   extern SGMLApplication::Position position;
00045 
00046 
00047   if ((ofx_show_position == true))
00048   {
00049     SGMLApplication::Location *location = new SGMLApplication::Location(entity_ptr, position);
00050     cerr << "(Above message occured on Line " << location->lineNumber << ", Column " << location->columnNumber << ")" << endl;
00051     delete location;
00052   }
00053 }
00054 
00058 int message_out(OfxMsgType error_type, const string message)
00059 {
00060 
00061 
00062   switch  (error_type)
00063   {
00064   case DEBUG :
00065     if (ofx_DEBUG_msg == true)
00066     {
00067       cerr << "LibOFX DEBUG: " << message << "\n";
00068       show_line_number();
00069     }
00070     break;
00071   case DEBUG1 :
00072     if (ofx_DEBUG1_msg == true)
00073     {
00074       cerr << "LibOFX DEBUG1: " << message << "\n";
00075       show_line_number();
00076     }
00077     break;
00078   case DEBUG2 :
00079     if (ofx_DEBUG2_msg == true)
00080     {
00081       cerr << "LibOFX DEBUG2: " << message << "\n";
00082       show_line_number();
00083     }
00084     break;
00085   case DEBUG3 :
00086     if (ofx_DEBUG3_msg == true)
00087     {
00088       cerr << "LibOFX DEBUG3: " << message << "\n";
00089       show_line_number();
00090     }
00091     break;
00092   case DEBUG4 :
00093     if (ofx_DEBUG4_msg == true)
00094     {
00095       cerr << "LibOFX DEBUG4: " << message << "\n";
00096       show_line_number();
00097     }
00098     break;
00099   case DEBUG5 :
00100     if (ofx_DEBUG5_msg == true)
00101     {
00102       cerr << "LibOFX DEBUG5: " << message << "\n";
00103       show_line_number();
00104     }
00105     break;
00106   case STATUS :
00107     if (ofx_STATUS_msg == true)
00108     {
00109       cerr << "LibOFX STATUS: " << message << "\n";
00110       show_line_number();
00111     }
00112     break;
00113   case INFO :
00114     if (ofx_INFO_msg == true)
00115     {
00116       cerr << "LibOFX INFO: " << message << "\n";
00117       show_line_number();
00118     }
00119     break;
00120   case WARNING :
00121     if (ofx_WARNING_msg == true)
00122     {
00123       cerr << "LibOFX WARNING: " << message << "\n";
00124       show_line_number();
00125     }
00126     break;
00127   case ERROR :
00128     if (ofx_ERROR_msg == true)
00129     {
00130       cerr << "LibOFX ERROR: " << message << "\n";
00131       show_line_number();
00132     }
00133     break;
00134   case PARSER :
00135     if (ofx_PARSER_msg == true)
00136     {
00137       cerr << "LibOFX PARSER: " << message << "\n";
00138       show_line_number();
00139     }
00140     break;
00141   default:
00142     cerr << "LibOFX UNKNOWN ERROR CLASS, This is a bug in LibOFX\n";
00143     show_line_number();
00144   }
00145 
00146   return 0;
00147 }
00148 
libofx-0.9.4/doc/html/classOfxSecurityContainer.png0000644000175000017500000000125011553133250017320 00000000000000‰PNG  IHDRPë媸PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT27IDATxíÝ’ƒ …;Ó÷ä½0¿”n»Ý“i!ÄÃg·g {¨Ñó\ ˜ÇRC° °Ëßb!"âFÛ×3?š:»Xob™ªGe\œ»öXî<4;Ã2WÈ`wZˆH"†¯Äƒö´»È`æLzY( ÐÃ2YO#C¾·tÖl6‡ÍcßÙlb™£'—±z(z÷&%¼¿‘±ÍŒa9]Ï‘ ¦Ôp-–¡³“ïb9IÏqÒÆ7¹ô•‘µâ”·6Ñ)zÒÊ/m·c÷“VYgΩŒ£l™¬Geè1ïdè1²Ô wx´!¥¹òS¬mñô̰ÌÕc2&ZŠeª````©ˆ¥„9,ÅôüÞ^ßòE+¢XR¯Z\Šè–ŽŠR\Šè”\``È``ù?XªY±Ït³¬``` ° ° ° °œeTÂêa``–Óé`çÂáAqE©¿õôcÕÅBrÙ,ãH±ÏýG–\‹ÞˆHÖç³Ænö'çòF‰¸­3×>‹È“êcñ‹”]Õð þyN¬Ï¿à*XL¯Ëç{{X¶Ó´—ÙD âu'ì` E)É.  ‰dòr›HJhã²ÁÂ%¢¥›X屄“È—Ã&ó¹B´Xvü/»‰$Ñcš„#Èn![Üò¢¿¯¼´ž[®Ö†Ó¼0–™Aî‰åã·Äòyˆ›n"```RT¾µšê'9åí€@õIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__transaction_8cpp_source.html0000644000175000017500000015233111553133250025064 00000000000000 LibOFX: ofx_container_transaction.cpp Source File

ofx_container_transaction.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_account.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_containers.hh"
00029 #include "ofx_utilities.hh"
00030 
00031 extern OfxMainContainer * MainContainer;
00032 
00033 /***************************************************************************
00034  *                      OfxTransactionContainer                            *
00035  ***************************************************************************/
00036 
00037 OfxTransactionContainer::OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00038   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00039 {
00040   OfxGenericContainer * tmp_parentcontainer = parentcontainer;
00041 
00042   memset(&data, 0, sizeof(data));
00043   type = "TRANSACTION";
00044   /* Find the parent statement container*/
00045   while (tmp_parentcontainer != NULL && tmp_parentcontainer->type != "STATEMENT")
00046   {
00047     tmp_parentcontainer = tmp_parentcontainer->parentcontainer;
00048   }
00049   if (tmp_parentcontainer != NULL)
00050   {
00051     parent_statement = (OfxStatementContainer*)tmp_parentcontainer;
00052   }
00053   else
00054   {
00055     parent_statement = NULL;
00056     message_out(ERROR, "Unable to find the enclosing statement container this transaction");
00057   }
00058   if (parent_statement != NULL && parent_statement->data.account_id_valid == true)
00059   {
00060     strncpy(data.account_id, parent_statement->data.account_id, OFX_ACCOUNT_ID_LENGTH);
00061     data.account_id_valid = true;
00062   }
00063 }
00064 OfxTransactionContainer::~OfxTransactionContainer()
00065 {
00066 
00067 }
00068 
00069 int OfxTransactionContainer::gen_event()
00070 {
00071   if (data.unique_id_valid == true && MainContainer != NULL)
00072   {
00073     data.security_data_ptr = MainContainer->find_security(data.unique_id);
00074     if (data.security_data_ptr != NULL)
00075     {
00076       data.security_data_valid = true;
00077     }
00078   }
00079   libofx_context->transactionCallback(data);
00080   return true;
00081 }
00082 
00083 int  OfxTransactionContainer::add_to_main_tree()
00084 {
00085 
00086   if (MainContainer != NULL)
00087   {
00088     return MainContainer->add_container(this);
00089   }
00090   else
00091   {
00092     return false;
00093   }
00094 }
00095 
00096 
00097 void OfxTransactionContainer::add_attribute(const string identifier, const string value)
00098 {
00099 
00100   if (identifier == "DTPOSTED")
00101   {
00102     data.date_posted = ofxdate_to_time_t(value);
00103     data.date_posted_valid = true;
00104   }
00105   else if (identifier == "DTUSER")
00106   {
00107     data.date_initiated = ofxdate_to_time_t(value);
00108     data.date_initiated_valid = true;
00109   }
00110   else if (identifier == "DTAVAIL")
00111   {
00112     data.date_funds_available = ofxdate_to_time_t(value);
00113     data.date_funds_available_valid = true;
00114   }
00115   else if (identifier == "FITID")
00116   {
00117     strncpy(data.fi_id, value.c_str(), sizeof(data.fi_id));
00118     data.fi_id_valid = true;
00119   }
00120   else if (identifier == "CORRECTFITID")
00121   {
00122     strncpy(data.fi_id_corrected, value.c_str(), sizeof(data.fi_id));
00123     data.fi_id_corrected_valid = true;
00124   }
00125   else if (identifier == "CORRECTACTION")
00126   {
00127     data.fi_id_correction_action_valid = true;
00128     if (value == "REPLACE")
00129     {
00130       data.fi_id_correction_action = REPLACE;
00131     }
00132     else if (value == "DELETE")
00133     {
00134       data.fi_id_correction_action = DELETE;
00135     }
00136     else
00137     {
00138       data.fi_id_correction_action_valid = false;
00139     }
00140   }
00141   else if ((identifier == "SRVRTID") || (identifier == "SRVRTID2"))
00142   {
00143     strncpy(data.server_transaction_id, value.c_str(), sizeof(data.server_transaction_id));
00144     data.server_transaction_id_valid = true;
00145   }
00146   else if (identifier == "MEMO" || identifier == "MEMO2")
00147   {
00148     strncpy(data.memo, value.c_str(), sizeof(data.memo));
00149     data.memo_valid = true;
00150   }
00151   else
00152   {
00153     /* Redirect unknown identifiers to the base class */
00154     OfxGenericContainer::add_attribute(identifier, value);
00155   }
00156 }// end OfxTransactionContainer::add_attribute()
00157 
00158 void OfxTransactionContainer::add_account(OfxAccountData * account_data)
00159 {
00160   if (account_data->account_id_valid == true)
00161   {
00162     data.account_ptr = account_data;
00163     strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH);
00164     data.account_id_valid = true;
00165   }
00166 }
00167 
00168 /***************************************************************************
00169  *                      OfxBankTransactionContainer                        *
00170  ***************************************************************************/
00171 
00172 OfxBankTransactionContainer::OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00173   OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00174 {
00175   ;
00176 }
00177 void OfxBankTransactionContainer::add_attribute(const string identifier, const string value)
00178 {
00179   if ( identifier == "TRNTYPE")
00180   {
00181     data.transactiontype_valid = true;
00182     if (value == "CREDIT")
00183     {
00184       data.transactiontype = OFX_CREDIT;
00185     }
00186     else if (value == "DEBIT")
00187     {
00188       data.transactiontype = OFX_DEBIT;
00189     }
00190     else if (value == "INT")
00191     {
00192       data.transactiontype = OFX_INT;
00193     }
00194     else if (value == "DIV")
00195     {
00196       data.transactiontype = OFX_DIV;
00197     }
00198     else if (value == "FEE")
00199     {
00200       data.transactiontype = OFX_FEE;
00201     }
00202     else if (value == "SRVCHG")
00203     {
00204       data.transactiontype = OFX_SRVCHG;
00205     }
00206     else if (value == "DEP")
00207     {
00208       data.transactiontype = OFX_DEP;
00209     }
00210     else if (value == "ATM")
00211     {
00212       data.transactiontype = OFX_ATM;
00213     }
00214     else if (value == "POS")
00215     {
00216       data.transactiontype = OFX_POS;
00217     }
00218     else if (value == "XFER")
00219     {
00220       data.transactiontype = OFX_XFER;
00221     }
00222     else if (value == "CHECK")
00223     {
00224       data.transactiontype = OFX_CHECK;
00225     }
00226     else if (value == "PAYMENT")
00227     {
00228       data.transactiontype = OFX_PAYMENT;
00229     }
00230     else if (value == "CASH")
00231     {
00232       data.transactiontype = OFX_CASH;
00233     }
00234     else if (value == "DIRECTDEP")
00235     {
00236       data.transactiontype = OFX_DIRECTDEP;
00237     }
00238     else if (value == "DIRECTDEBIT")
00239     {
00240       data.transactiontype = OFX_DIRECTDEBIT;
00241     }
00242     else if (value == "REPEATPMT")
00243     {
00244       data.transactiontype = OFX_REPEATPMT;
00245     }
00246     else if (value == "OTHER")
00247     {
00248       data.transactiontype = OFX_OTHER;
00249     }
00250     else
00251     {
00252       data.transactiontype_valid = false;
00253     }
00254   }//end TRANSTYPE
00255   else if (identifier == "TRNAMT")
00256   {
00257     data.amount = ofxamount_to_double(value);
00258     data.amount_valid = true;
00259     data.units = -data.amount;
00260     data.units_valid = true;
00261     data.unitprice = 1.00;
00262     data.unitprice_valid = true;
00263   }
00264   else if (identifier == "CHECKNUM")
00265   {
00266     strncpy(data.check_number, value.c_str(), sizeof(data.check_number));
00267     data.check_number_valid = true;
00268   }
00269   else if (identifier == "REFNUM")
00270   {
00271     strncpy(data.reference_number, value.c_str(), sizeof(data.reference_number));
00272     data.reference_number_valid = true;
00273   }
00274   else if (identifier == "SIC")
00275   {
00276     data.standard_industrial_code = atoi(value.c_str());
00277     data.standard_industrial_code_valid = true;
00278   }
00279   else if ((identifier == "PAYEEID") || (identifier == "PAYEEID2"))
00280   {
00281     strncpy(data.payee_id, value.c_str(), sizeof(data.payee_id));
00282     data.payee_id_valid = true;
00283   }
00284   else if (identifier == "NAME")
00285   {
00286     strncpy(data.name, value.c_str(), sizeof(data.name));
00287     data.name_valid = true;
00288   }
00289   else
00290   {
00291     /* Redirect unknown identifiers to base class */
00292     OfxTransactionContainer::add_attribute(identifier, value);
00293   }
00294 }//end OfxBankTransactionContainer::add_attribute
00295 
00296 
00297 /***************************************************************************
00298  *                    OfxInvestmentTransactionContainer                    *
00299  ***************************************************************************/
00300 
00301 OfxInvestmentTransactionContainer::OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00302   OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00303 {
00304   type = "INVESTMENT";
00305   data.transactiontype = OFX_OTHER;
00306   data.transactiontype_valid = true;
00307 
00308   data.invtransactiontype_valid = true;
00309   if (para_tag_identifier == "BUYDEBT")
00310   {
00311     data.invtransactiontype = OFX_BUYDEBT;
00312   }
00313   else if (para_tag_identifier == "BUYMF")
00314   {
00315     data.invtransactiontype = OFX_BUYMF;
00316   }
00317   else if (para_tag_identifier == "BUYOPT")
00318   {
00319     data.invtransactiontype = OFX_BUYOPT;
00320   }
00321   else if (para_tag_identifier == "BUYOTHER")
00322   {
00323     data.invtransactiontype = OFX_BUYOTHER;
00324   }
00325   else if (para_tag_identifier == "BUYSTOCK")
00326   {
00327     data.invtransactiontype = OFX_BUYSTOCK;
00328   }
00329   else if (para_tag_identifier == "CLOSUREOPT")
00330   {
00331     data.invtransactiontype = OFX_CLOSUREOPT;
00332   }
00333   else if (para_tag_identifier == "INCOME")
00334   {
00335     data.invtransactiontype = OFX_INCOME;
00336   }
00337   else if (para_tag_identifier == "INVEXPENSE")
00338   {
00339     data.invtransactiontype = OFX_INVEXPENSE;
00340   }
00341   else if (para_tag_identifier == "JRNLFUND")
00342   {
00343     data.invtransactiontype = OFX_JRNLFUND;
00344   }
00345   else if (para_tag_identifier == "JRNLSEC")
00346   {
00347     data.invtransactiontype = OFX_JRNLSEC;
00348   }
00349   else if (para_tag_identifier == "MARGININTEREST")
00350   {
00351     data.invtransactiontype = OFX_MARGININTEREST;
00352   }
00353   else if (para_tag_identifier == "REINVEST")
00354   {
00355     data.invtransactiontype = OFX_REINVEST;
00356   }
00357   else if (para_tag_identifier == "RETOFCAP")
00358   {
00359     data.invtransactiontype = OFX_RETOFCAP;
00360   }
00361   else if (para_tag_identifier == "SELLDEBT")
00362   {
00363     data.invtransactiontype = OFX_SELLDEBT;
00364   }
00365   else if (para_tag_identifier == "SELLMF")
00366   {
00367     data.invtransactiontype = OFX_SELLMF;
00368   }
00369   else if (para_tag_identifier == "SELLOPT")
00370   {
00371     data.invtransactiontype = OFX_SELLOPT;
00372   }
00373   else if (para_tag_identifier == "SELLOTHER")
00374   {
00375     data.invtransactiontype = OFX_SELLOTHER;
00376   }
00377   else if (para_tag_identifier == "SELLSTOCK")
00378   {
00379     data.invtransactiontype = OFX_SELLSTOCK;
00380   }
00381   else if (para_tag_identifier == "SPLIT")
00382   {
00383     data.invtransactiontype = OFX_SPLIT;
00384   }
00385   else if (para_tag_identifier == "TRANSFER")
00386   {
00387     data.invtransactiontype = OFX_TRANSFER;
00388   }
00389   else
00390   {
00391     message_out(ERROR, "This should not happen, " + para_tag_identifier + " is an unknown investment transaction type");
00392     data.invtransactiontype_valid = false;
00393   }
00394 }
00395 
00396 void OfxInvestmentTransactionContainer::add_attribute(const string identifier, const string value)
00397 {
00398   if (identifier == "UNIQUEID")
00399   {
00400     strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id));
00401     data.unique_id_valid = true;
00402   }
00403   else if (identifier == "UNIQUEIDTYPE")
00404   {
00405     strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type));
00406     data.unique_id_type_valid = true;
00407   }
00408   else if (identifier == "UNITS")
00409   {
00410     data.units = ofxamount_to_double(value);
00411     data.units_valid = true;
00412   }
00413   else if (identifier == "UNITPRICE")
00414   {
00415     data.unitprice = ofxamount_to_double(value);
00416     data.unitprice_valid = true;
00417   }
00418   else if (identifier == "MKTVAL")
00419   {
00420     message_out(DEBUG, "MKTVAL of " + value + " ignored since MKTVAL should always be UNITS*UNITPRICE");
00421   }
00422   else if (identifier == "TOTAL")
00423   {
00424     data.amount = ofxamount_to_double(value);
00425     data.amount_valid = true;
00426   }
00427   else if (identifier == "DTSETTLE")
00428   {
00429     data.date_posted = ofxdate_to_time_t(value);
00430     data.date_posted_valid = true;
00431   }
00432   else if (identifier == "DTTRADE")
00433   {
00434     data.date_initiated = ofxdate_to_time_t(value);
00435     data.date_initiated_valid = true;
00436   }
00437   else if (identifier == "COMMISSION")
00438   {
00439     data.commission = ofxamount_to_double(value);
00440     data.commission_valid = true;
00441   }
00442   else if (identifier == "FEES")
00443   {
00444     data.fees = ofxamount_to_double(value);
00445     data.fees_valid = true;
00446   }
00447   else if (identifier == "OLDUNITS")
00448   {
00449     data.oldunits = ofxamount_to_double(value);
00450     data.oldunits_valid = true;
00451   }
00452   else if (identifier == "NEWUNITS")
00453   {
00454     data.newunits = ofxamount_to_double(value);
00455     data.newunits_valid = true;
00456   }
00457   else
00458   {
00459     /* Redirect unknown identifiers to the base class */
00460     OfxTransactionContainer::add_attribute(identifier, value);
00461   }
00462 }//end OfxInvestmentTransactionContainer::add_attribute
00463 
libofx-0.9.4/doc/html/structOfxStatementData.html0000644000175000017500000004322011553133250017006 00000000000000 LibOFX: OfxStatementData Struct Reference

OfxStatementData Struct Reference

An abstraction of an account statement. More...

Data Fields

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.

char currency [OFX_CURRENCY_LENGTH]
int currency_valid
char account_id [OFX_ACCOUNT_ID_LENGTH]
struct OfxAccountDataaccount_ptr
int account_id_valid
double ledger_balance
int ledger_balance_valid
time_t ledger_balance_date
int ledger_balance_date_valid
OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

double available_balance
int available_balance_valid
time_t available_balance_date
int available_balance_date_valid
time_t date_start
int date_start_valid
time_t date_end
int date_end_valid
char marketing_info [OFX_MARKETING_INFO_LENGTH]
int marketing_info_valid

Detailed Description

An abstraction of an account statement.

The OfxStatementData structure contains information about your account at the time the ofx response was generated, including the balance. A client should check that the total of his recorded transactions matches the total given here, and warn the user if they dont.

Definition at line 623 of file inc/libofx.h.


Field Documentation

Use this for matching this statement with the relevant account in your application

Definition at line 636 of file inc/libofx.h.

Pointer to the full account structure, see OfxAccountData

Definition at line 638 of file inc/libofx.h.

Amount of money available from the account. Could be the credit left for a credit card, or amount that can be withdrawn using INTERAC)

Definition at line 655 of file inc/libofx.h.

Time of the available_balance snapshot

Definition at line 661 of file inc/libofx.h.

The currency is a string in ISO-4217 format

Definition at line 633 of file inc/libofx.h.

Referenced by OfxStatementContainer::add_attribute().

The end time of this statement.

If provided, the user can use this date as the start date of his next statement request. He is then assured not to miss any transactions.

Definition at line 674 of file inc/libofx.h.

Referenced by OfxStatementContainer::add_attribute().

The start time of this statement.

All the transactions between date_start and date_end should have been provided

Definition at line 667 of file inc/libofx.h.

Referenced by OfxStatementContainer::add_attribute().

The actual balance, according to the FI. The user should be warned of any discrepency between this and the balance in the application

Definition at line 644 of file inc/libofx.h.

Time of the ledger_balance snapshot

Definition at line 647 of file inc/libofx.h.

marketing_info could be special offers or messages from the bank, or just about anything else

Definition at line 679 of file inc/libofx.h.

Referenced by OfxStatementContainer::add_attribute().


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/classOfxMainContainer.png0000644000175000017500000000120511553133250016375 00000000000000‰PNG  IHDRPâ ÂPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíͲà …C:Ó÷ä»”4¦“‰Ø{X$þ 9~AÜn¯¶©¥PóÚ§›E’A É­Hˆˆ¸¡Ó:vdv6t6±.!™©FD<Œ³ŽXì<²:@2U ‹`gÚ‰Hâ¹ÿÓµ·»ÈdäLúØ) #™«¦!ÿ†[:I%‡«CÓ=v6û'H¦¨ E”y…n¾cc¸¯w"ÚÙ8À’§Õœˆ`žN W®aº:p É3jNSÕÇ$娈¨å–\98O¨‰j¼´ÍýœªJ9rE|Î’¹jD„^äF„|—›µD»n à™k<ùJæîÈÉT5*bžEHfª   ’YH˜A’JÍ×ö¾!Æ}–B tÞ™˜¤P$†DLR¨”W     YI.Kõƒ~)Ù€H€H€H€H`@$@$@$X6$$@$@òˆ½ô&hß~QxeÄ®‹"!y˜]5ˆbÿïw™ wi#"Ù®ERR‚tØ‚+}"n·®<°qÜõH¦”-ÉNÌ Ì™…n8t-TÍN…Qn»cÄ w®>±VFbR¤œ‰$+ⵑ˜SІ3$‡®«!q7Ž©†G;Vÿ1$+f‰äû¾ˆÌ«¿ž ©¨­k ¼’)H€H€H€HR I`7måWñ8çz§Ø¬IEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request_8hh_source.html0000644000175000017500000001762611553133250021652 00000000000000 LibOFX: ofx_request.hh Source File

ofx_request.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQUEST_H
00021 #define OFX_REQUEST_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_aggregate.hh"
00026 
00027 using namespace std;
00028 
00036 class OfxRequest: public OfxAggregate
00037 {
00038 public:
00045   OfxRequest(const OfxFiLogin& fi): OfxAggregate("OFX"), m_login(fi) {}
00046 
00047 //protected:
00048 public:
00055   OfxAggregate SignOnRequest(void) const;
00056 
00068   OfxAggregate RequestMessage(const string& msgtype, const string& trntype, const OfxAggregate& aggregate ) const;
00069 
00070 protected:
00071   OfxFiLogin m_login;
00072 };
00073 
00078 
00079 string time_t_to_ofxdatetime( time_t time );
00080 string time_t_to_ofxdate( time_t time );
00081 string OfxHeader(const char *hver);
00082 
00084 
00085 #endif // OFX_REQUEST_H
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__aggregate_8hh.html0000644000175000017500000000741111553133250020517 00000000000000 LibOFX: ofx_aggregate.hh File Reference

ofx_aggregate.hh File Reference

Declaration of OfxAggregate which allows you to construct a single OFX aggregate. More...

Go to the source code of this file.

Data Structures

class  OfxAggregate
 A single aggregate as described in the OFX 1.02 specification. More...

Detailed Description

Declaration of OfxAggregate which allows you to construct a single OFX aggregate.

Definition in file fx-0.9.4/lib/ofx_aggregate.hh.

libofx-0.9.4/doc/html/classOfxStatusContainer.html0000644000175000017500000002356611553133250017172 00000000000000 LibOFX: OfxStatusContainer Class Reference

OfxStatusContainer Class Reference

Represents the <STATUS> OFX SGML entity. More...

Inheritance diagram for OfxStatusContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxStatusContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxStatusContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Data Fields

OfxStatusData data

Detailed Description

Represents the <STATUS> OFX SGML entity.

Definition at line 96 of file ofx_containers.hh.


Member Function Documentation

void OfxStatusContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 94 of file ofx_containers_misc.cpp.

void OfxStatusContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/messages_8cpp.html0000644000175000017500000005601511553133250015075 00000000000000 LibOFX: messages.cpp File Reference

messages.cpp File Reference

Message IO functionality. More...

Go to the source code of this file.

Functions

void show_line_number ()
int message_out (OfxMsgType error_type, const string message)
 Message output function.

Variables

SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position
volatile int ofx_PARSER_msg = false
volatile int ofx_DEBUG_msg = false
volatile int ofx_DEBUG1_msg = false
volatile int ofx_DEBUG2_msg = false
volatile int ofx_DEBUG3_msg = false
volatile int ofx_DEBUG4_msg = false
volatile int ofx_DEBUG5_msg = false
volatile int ofx_STATUS_msg = false
volatile int ofx_INFO_msg = false
volatile int ofx_WARNING_msg = false
volatile int ofx_ERROR_msg = false
volatile int ofx_show_position = true

Detailed Description

Message IO functionality.

Definition in file messages.cpp.


Function Documentation


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file messages.cpp.

Referenced by OFXApplication::openEntityChange(), and OFCApplication::openEntityChange().

volatile int ofx_DEBUG1_msg = false

If set to true, debug level 1 messages will be printed to the console

Definition at line 30 of file messages.cpp.

Referenced by message_out().

volatile int ofx_DEBUG2_msg = false

If set to true, debug level 2 messages will be printed to the console

Definition at line 31 of file messages.cpp.

Referenced by message_out().

volatile int ofx_DEBUG3_msg = false

If set to true, debug level 3 messages will be printed to the console

Definition at line 32 of file messages.cpp.

Referenced by message_out().

volatile int ofx_DEBUG4_msg = false

If set to true, debug level 4 messages will be printed to the console

Definition at line 33 of file messages.cpp.

Referenced by message_out().

volatile int ofx_DEBUG5_msg = false

If set to true, debug level 5 messages will be printed to the console

Definition at line 34 of file messages.cpp.

Referenced by message_out().

volatile int ofx_DEBUG_msg = false

If set to true, general debug messages will be printed to the console

Definition at line 29 of file messages.cpp.

Referenced by main(), and message_out().

volatile int ofx_ERROR_msg = false

If set to true, error messages will be printed to the console

Definition at line 38 of file messages.cpp.

Referenced by main(), and message_out().

volatile int ofx_INFO_msg = false

If set to true, information messages will be printed to the console

Definition at line 36 of file messages.cpp.

Referenced by main(), and message_out().

volatile int ofx_PARSER_msg = false

If set to true, parser events will be printed to the console

Definition at line 28 of file messages.cpp.

Referenced by main(), and message_out().

volatile int ofx_show_position = true

If set to true, the line number will be shown after any error

Definition at line 39 of file messages.cpp.

volatile int ofx_STATUS_msg = false

If set to true, status messages will be printed to the console

Definition at line 35 of file messages.cpp.

Referenced by main(), and message_out().

volatile int ofx_WARNING_msg = false

If set to true, warning messages will be printed to the console

Definition at line 37 of file messages.cpp.

Referenced by main(), and message_out().

libofx-0.9.4/doc/html/context_8hh_source.html0000644000175000017500000002561511553133250016151 00000000000000 LibOFX: context.hh Source File

context.hh

00001 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #ifndef CONTEXT_H
00015 #define CONTEXT_H
00016 #include <string.h>
00017 #include <time.h>               // for time_t
00018 #include "libofx.h"
00019 #include "ParserEventGeneratorKit.h"
00020 
00021 #include <string>
00022 
00023 
00024 using namespace std;
00025 class LibofxContext
00026 {
00027 private:
00028   LibofxFileFormat _current_file_type;
00029 
00030   LibofxProcStatusCallback _statusCallback;
00031   LibofxProcAccountCallback _accountCallback;
00032   LibofxProcSecurityCallback _securityCallback;
00033   LibofxProcTransactionCallback _transactionCallback;
00034   LibofxProcStatementCallback _statementCallback;
00035 
00036   void * _statementData;
00037   void * _accountData;
00038   void * _transactionData;
00039   void * _securityData;
00040   void * _statusData;
00041 
00042   std::string _dtdDir;
00043 
00044 public:
00045   LibofxContext();
00046   ~LibofxContext();
00047 
00048   LibofxFileFormat currentFileType() const;
00049   void setCurrentFileType(LibofxFileFormat t);
00050 
00051   const std::string &dtdDir() const
00052   {
00053     return _dtdDir;
00054   };
00055   void setDtdDir(const std::string &s)
00056   {
00057     _dtdDir = s;
00058   };
00059 
00060   int statementCallback(const struct OfxStatementData data);
00061   int accountCallback(const struct OfxAccountData data);
00062   int transactionCallback(const struct OfxTransactionData data);
00063   int securityCallback(const struct OfxSecurityData data);
00064   int statusCallback(const struct OfxStatusData data);
00065 
00066   void setStatusCallback(LibofxProcStatusCallback cb, void *user_data);
00067   void setAccountCallback(LibofxProcAccountCallback cb, void *user_data);
00068   void setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data);
00069   void setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data);
00070   void setStatementCallback(LibofxProcStatementCallback cb, void *user_data);
00071 
00072 
00073 };//End class LibofxContext
00074 
00075 
00076 
00077 
00078 #endif
libofx-0.9.4/doc/html/ofx__containers__misc_8cpp_source.html0000644000175000017500000006206211553133250021177 00000000000000 LibOFX: ofx_containers_misc.cpp Source File

ofx_containers_misc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_proc_rs.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025 
00026 #include <iostream>
00027 #include <stdlib.h>
00028 #include <string>
00029 #include "messages.hh"
00030 #include "libofx.h"
00031 #include "ofx_error_msg.hh"
00032 #include "ofx_utilities.hh"
00033 #include "ofx_containers.hh"
00034 
00035 extern OfxMainContainer * MainContainer;
00036 
00037 /***************************************************************************
00038  *                         OfxDummyContainer                               *
00039  ***************************************************************************/
00040 
00041 OfxDummyContainer::OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00042   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00043 {
00044   type = "DUMMY";
00045   message_out(INFO, "Created OfxDummyContainer to hold unsupported aggregate " + para_tag_identifier);
00046 }
00047 void OfxDummyContainer::add_attribute(const string identifier, const string value)
00048 {
00049   message_out(DEBUG, "OfxDummyContainer for " + tag_identifier + " ignored a " + identifier + " (" + value + ")");
00050 }
00051 
00052 /***************************************************************************
00053  *                         OfxPushUpContainer                              *
00054  ***************************************************************************/
00055 
00056 OfxPushUpContainer::OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00057   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00058 {
00059   type = "PUSHUP";
00060   message_out(DEBUG, "Created OfxPushUpContainer to hold aggregate " + tag_identifier);
00061 }
00062 void OfxPushUpContainer::add_attribute(const string identifier, const string value)
00063 {
00064   //message_out(DEBUG, "OfxPushUpContainer for "+tag_identifier+" will push up a "+identifier+" ("+value+") to a "+ parentcontainer->type + " container");
00065   parentcontainer->add_attribute(identifier, value);
00066 }
00067 
00068 /***************************************************************************
00069  *                         OfxStatusContainer                              *
00070  ***************************************************************************/
00071 
00072 OfxStatusContainer::OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00073   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00074 {
00075   memset(&data, 0, sizeof(data));
00076   type = "STATUS";
00077   if (parentcontainer != NULL)
00078   {
00079     strncpy(data.ofx_element_name, parentcontainer->tag_identifier.c_str(), OFX_ELEMENT_NAME_LENGTH);
00080     data.ofx_element_name_valid = true;
00081   }
00082 
00083 }
00084 OfxStatusContainer::~OfxStatusContainer()
00085 {
00086   message_out(DEBUG, "Entering the status's container's destructor");
00087 
00088   libofx_context->statusCallback(data);
00089 
00090   if ( data.server_message_valid )
00091     delete [] data.server_message;
00092 }
00093 
00094 void OfxStatusContainer::add_attribute(const string identifier, const string value)
00095 {
00096   ErrorMsg error_msg;
00097 
00098   if ( identifier == "CODE")
00099   {
00100     data.code = atoi(value.c_str());
00101     error_msg = find_error_msg(data.code);
00102     data.name = error_msg.name;//memory is already allocated
00103     data.description = error_msg.description;//memory is already allocated
00104     data.code_valid = true;
00105   }
00106   else if (identifier == "SEVERITY")
00107   {
00108     data.severity_valid = true;
00109     if (value == "INFO")
00110     {
00111       data.severity = OfxStatusData::INFO;
00112     }
00113     else if (value == "WARN")
00114     {
00115       data.severity = OfxStatusData::WARN;
00116     }
00117     else if (value == "ERROR")
00118     {
00119       data.severity = OfxStatusData::ERROR;
00120     }
00121     else
00122     {
00123       message_out(ERROR, "WRITEME: Unknown severity " + value + " inside a " + type + " container");
00124       data.severity_valid = false;
00125     }
00126   }
00127   else if ((identifier == "MESSAGE") || (identifier == "MESSAGE2"))
00128   {
00129     data.server_message = new char[value.length()+1];
00130     strcpy(data.server_message, value.c_str());
00131     data.server_message_valid = true;
00132   }
00133   else
00134   {
00135     /* Redirect unknown identifiers to the base class */
00136     OfxGenericContainer::add_attribute(identifier, value);
00137   }
00138 }
00139 
00140 
00141 
00142 /***************************************************************************
00143  * OfxBalanceContainer  (does not directly abstract a object in libofx.h)  *
00144  ***************************************************************************/
00145 
00146 OfxBalanceContainer::OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00147   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00148 {
00149   amount_valid = false;
00150   date_valid = false;
00151   type = "BALANCE";
00152 }
00153 
00154 OfxBalanceContainer::~OfxBalanceContainer()
00155 {
00156   if (parentcontainer->type == "STATEMENT")
00157   {
00158     ((OfxStatementContainer*)parentcontainer)->add_balance(this);
00159   }
00160   else
00161   {
00162     message_out (ERROR, "I completed a " + type + " element, but I havent found a suitable parent to save it");
00163   }
00164 }
00165 void OfxBalanceContainer::add_attribute(const string identifier, const string value)
00166 {
00167   if (identifier == "BALAMT")
00168   {
00169     amount = ofxamount_to_double(value);
00170     amount_valid = true;
00171   }
00172   else if (identifier == "DTASOF")
00173   {
00174     date = ofxdate_to_time_t(value);
00175     date_valid = true;
00176   }
00177   else
00178   {
00179     /* Redirect unknown identifiers to the base class */
00180     OfxGenericContainer::add_attribute(identifier, value);
00181   }
00182 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__statement_8hh_source.html0000644000175000017500000002161211553133250024063 00000000000000 LibOFX: ofx_request_statement.hh Source File

ofx_request_statement.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request_statement.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQ_STATEMENT_H
00021 #define OFX_REQ_STATEMENT_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_request.hh"
00026 
00027 using namespace std;
00028 
00037 class OfxStatementRequest: public OfxRequest
00038 {
00039 public:
00049   OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from );
00050 
00051 protected:
00059   OfxAggregate BankStatementRequest(void) const;
00060 
00068   OfxAggregate CreditCardStatementRequest(void) const;
00069 
00077   OfxAggregate InvestmentStatementRequest(void) const;
00078 
00079 private:
00080   OfxAccountData m_account;
00081   time_t m_date_from;
00082 };
00083 
00084 class OfxPaymentRequest: public OfxRequest
00085 {
00086 public:
00097   OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment );
00098 protected:
00099 
00100 private:
00101   OfxAccountData m_account;
00102   OfxPayee m_payee;
00103   OfxPayment m_payment;
00104 };
00105 
00106 #endif // OFX_REQ_STATEMENT_H
libofx-0.9.4/doc/html/ofc__sgml_8cpp.html0000644000175000017500000002030311553133250015205 00000000000000 LibOFX: ofc_sgml.cpp File Reference

ofc_sgml.cpp File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Data Structures

class  OFCApplication
 This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Functions

int ofc_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Variables

SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position
OfxMainContainerMainContainer

Detailed Description

OFX/SGML parsing functionnality.

Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/

Definition in file ofc_sgml.cpp.


Function Documentation

int ofc_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofc_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 352 of file ofc_sgml.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file messages.cpp.

SGMLApplication::Position position

Global for determining the line number in OpenSP

Definition at line 26 of file messages.cpp.

libofx-0.9.4/doc/html/ofx__error__msg_8hh.html0000644000175000017500000001516311553133250016253 00000000000000 LibOFX: ofx_error_msg.hh File Reference

ofx_error_msg.hh File Reference

OFX error code management functionnality. More...

Go to the source code of this file.

Data Structures

struct  ErrorMsg
 An abstraction of an OFX error code sent by an OFX server. More...

Functions

const ErrorMsg find_error_msg (int param_code)
 Retreive error code descriptions.

Variables

const ErrorMsg error_msgs_list []
 List known error codes.

Detailed Description

OFX error code management functionnality.

Definition in file ofx_error_msg.hh.


Function Documentation

const ErrorMsg find_error_msg ( int  param_code)

Retreive error code descriptions.

The find_error_msg function will take an ofx error number, and return an ErrorMsg structure with detailled information about the error, including the error name and long description

Definition at line 130 of file ofx_error_msg.hh.

Referenced by OfxStatusContainer::add_attribute().


Variable Documentation

List known error codes.

The error_msgs_list table contains all past and present OFX error codes up to the OFX 2.01 specification

Definition at line 34 of file ofx_error_msg.hh.

libofx-0.9.4/doc/html/globals_func.html0000644000175000017500000003436411553133251014776 00000000000000 LibOFX: Globals
 

- a -

- c -

- f -

- l -

- m -

- o -

- s -

libofx-0.9.4/doc/html/functions_0x6c.html0000644000175000017500000001205311553133250015176 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- l -

libofx-0.9.4/doc/html/classNodeParser.html0000644000175000017500000001405511553133250015422 00000000000000 LibOFX: NodeParser Class Reference

Public Member Functions

 NodeParser (const xmlpp::Node::NodeList &)
 NodeParser (const xmlpp::Node *)
 NodeParser (const xmlpp::DomParser &)
NodeParser Path (const std::string &path) const
NodeParser Select (const std::string &key, const std::string &value) const
std::vector< std::string > Text (void) const

Static Protected Member Functions

static NodeParser Path (const xmlpp::Node *node, const std::string &path)

Detailed Description

Definition at line 27 of file nodeparser.h.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/classOfxRequest.png0000644000175000017500000000276611553133250015313 00000000000000‰PNG  IHDR’ˆ¢ $@PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2…IDATxíÝÝr£:á [•÷äs0“ã¯kãÀ¸¦­Û/ç_2þ‚pe’C*Ú$Óš’”$$)IIB’’„$%)Iü­$#"Ê‹fã¡yÞ}ô±$o2nM2êC;½qlò¯Iò.3àÎ$ËÌÆQ¦}Œ`Zž¢ybÊÊ5í©›êŠvZ’·™)’¬ëQ]–êÛqS”ùoŽZ¼Ûµ$½”ä»Í€•Ãǧ²'†·Ÿ˜ä]fÀ½IîY«V×™ƒþ»$o2Ò&Y izØs[’WšyWɈhžVöܶJ^häMòlÎKòB3@’’„$%)IHR’¤$%‰LI&ã/˜€of€Á—$°1÷ßY'?¯ IàsŠL:ùyÍI%3ÀàK$ II’$)I@’€$™’$É ¸kðóâæ6@’$ H€$I$I’ I@’$ H€$IØO$ÃÁ§'IЀ$I’”$ IàC’Œˆñèò4nÙu‚Ýß"IHòБÑ}dÚ$IàÝI–ã+"j‹s¥ãbQ6öÛêKI$Y›+¯[¦$»£¬’ÀµI~EYÇç¶Â‡$_ø@’/%YÿÆ4û$k®õ I×%9>q¶ûúU²¯X’À™ ÔþšÛ$K¤Qûp% œß@DtËâœäWÝSƒì·•Iïoà—ç“$$)I@’’þD’„$é$ I@’’6 w8…o—$€"¿5 HÀV‘š$ `+J—$I’ I@’$ H€$Iâƒ'ølüH3cÆÌ¥bÆL’̘1s©˜1“$3fÌ\*fÌ$ÉŒ3—Š3I2cÆŒ3fÌ\*fÌ$ÉŒ3—Š3I2cÆÌ¥bÆìF³'ñ}Òy˜1ûp³C*ÚKÅŒÙ'š¹T̘IÒMdÆL’̘IÒMdÆìå$#"Ê‹yóò9Ñ;Ÿ"¦Óþ|‚­K•׬=ïÒq÷ù«äAŸ½ã•Ôl妖MóY~üÒ×å2›U¡¨í±{ò»Á_–³ç$ÛƒŸ×låd‹¯:*yÀgg’IÍžhü×ä2›¡²9†ˆ2í£Uý½7µOå/†ú7íQã¡õ³å¤ý¶úråRå5{¸¨ãâü³Týê²¹‘<ä³/ɤf›Zå,‹‡óå2›-¾CëOãËòozÕÕ¨ÈöÛž¬EyÍVîcÿÉu©úñ(yÈç`’¹ÌÖojù•]º^!—Ùluð‹C;øýÓZ«ÑD,~Šë¯Nôî$3™mÝÇѱží^®Jôy%É4f«7µêµû®’Ëlöt𛓾:øóB]~?¯zúæ;ö&™Áì‡ÁŸvÖó÷Bí×¾âó‹$ï7ÛüfYªf­ã‰r™ÍV¿]Pç•õÕÁ_œ¢û©è/ÀÏIf2Ûº­cû•BÌQŸW’Lc¶©µòÑm>K.³Yª'hNÖ þúÒ|hð§m}týRå5[ÜÈ5ǧƒ¿ußwùìK2«Ù–ÖÚàwkÑIr™Í&¡²”® þPw-žÚ/ìÞÌGÍÿÁîCe ¦måaýRå5knä†c9Wû…Õf²˜¿öˆÏÎ$³š=jÕM1¾bzu\f³•›x1¿¥ûÇëO›==ûo>ñ?6»ì¿“ÙL’o2;>÷ïü¼f’”äuf/Ìý›?¯™$3pk’̘%0s©˜1“¤›ÈŒ™$™1“¤›ÈŒÙá$“Ñ\*fÌ>Ðì?ÄÀõˆuíIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__accountinfo_8cpp.html0000644000175000017500000000745011553133250023176 00000000000000 LibOFX: ofx_request_accountinfo.cpp File Reference

ofx_request_accountinfo.cpp File Reference

Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user. More...

Go to the source code of this file.

Functions

char * libofx_request_accountinfo (const OfxFiLogin *login)

Detailed Description

Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user.

Definition in file fx-0.9.4/lib/ofx_request_accountinfo.cpp.

libofx-0.9.4/doc/html/structOfxPayee.html0000644000175000017500000001214611553133250015316 00000000000000 LibOFX: OfxPayee Struct Reference

OfxPayee Struct Reference

Data Fields

char name [OFX_NAME_LENGTH]
char address1 [OFX_NAME_LENGTH]
char city [OFX_NAME_LENGTH]
char state [OFX_STATE_LENGTH]
char postalcode [OFX_POSTALCODE_LENGTH]
char phone [OFX_NAME_LENGTH]

Detailed Description

Definition at line 817 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/globals_0x64.html0000644000175000017500000001513011553133251014532 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- d -

libofx-0.9.4/doc/html/functions_0x68.html0000644000175000017500000001140211553133250015120 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- h -

libofx-0.9.4/doc/html/annotated.html0000644000175000017500000002536411553133250014314 00000000000000 LibOFX: Data Structures

Data Structures

Here are the data structures with brief descriptions:
cmdline_parser_paramsThe additional parameters to pass to parser functions
ErrorMsgAn abstraction of an OFX error code sent by an OFX server
tree< T, tree_node_allocator >::fixed_depth_iteratorIterator which traverses only the nodes at a given depth from the root
gengetopt_args_infoWhere the command line options are stored
tree< T, tree_node_allocator >::iterator_baseBase class for iterators, only pointers stored, no traversal logic
tree< T, tree_node_allocator >::iterator_base_lessComparator class for iterators (compares the actual node content, not pointer values)
LibofxContext
LibofxFileFormatInfo
NodeParser
OFCApplicationThis object is driven by OpenSP as it parses the SGML from the ofx file(s)
OfxAccountContainerRepresents a bank account or a credit card account
OfxAccountDataAn abstraction of an account
OfxAccountInfoRequestAn account information request
OfxAggregateA single aggregate as described in the OFX 1.02 specification
OFXApplicationThis object is driven by OpenSP as it parses the SGML from the ofx file(s)
OfxBalanceContainerRepresents the <BALANCE> OFX SGML entity
OfxBankTransactionContainerRepresents a bank or credid card transaction
OfxCurrencyNOT YET SUPPORTED
OfxDummyContainerA container to holds OFX SGML elements that LibOFX knows nothing about
OfxFiLoginInformation sufficient to log into an financial institution
OfxFiServiceInfoInformation returned by the OFX Partner Server about a financial institution
OfxGenericContainerA generic container for an OFX SGML element. Every container inherits from OfxGenericContainer
OfxInvestmentTransactionContainerRepresents a bank or credid card transaction
OfxMainContainerThe root container. Created by the <OFX> OFX element or by the export functions
OfxPayee
OfxPayment
OfxPaymentRequest
OfxPushUpContainerA container to hold a OFX SGML element for which you want the parent to process it's data elements
OfxRequestA generic request
OfxSecurityContainerRepresents a security, such as a stock or bond
OfxSecurityDataAn abstraction of a security, such as a stock, mutual fund, etc
OfxStatementContainerRepresents a statement for either a bank account or a credit card account
OfxStatementDataAn abstraction of an account statement
OfxStatementRequestA statement request
OfxStatusContainerRepresents the <STATUS> OFX SGML entity
OfxStatusDataAn abstraction of an OFX STATUS element
OfxTransactionContainerRepresents a generic transaction
OfxTransactionDataAn abstraction of a transaction in an account
option
tree< T, tree_node_allocator >::post_order_iteratorDepth-first iterator, first accessing the children, then the node itself
tree< T, tree_node_allocator >::pre_order_iteratorDepth-first iterator, first accessing the node, then its children
tree< T, tree_node_allocator >::sibling_iteratorIterator which traverses only the nodes which are siblings of each other
tree< T, tree_node_allocator >
tree_node_< T >A node in the tree, combining links to other nodes as well as the actual data
libofx-0.9.4/doc/html/classOfxSecurityContainer.html0000644000175000017500000003735011553133250017512 00000000000000 LibOFX: OfxSecurityContainer Class Reference

OfxSecurityContainer Class Reference

Represents a security, such as a stock or bond. More...

Inheritance diagram for OfxSecurityContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxSecurityContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.
 OfxSecurityContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.

Data Fields

OfxSecurityData data

Detailed Description

Represents a security, such as a stock or bond.

Definition at line 181 of file ofx_containers.hh.


Member Function Documentation

void OfxSecurityContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 45 of file ofx_container_security.cpp.

void OfxSecurityContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

virtual int OfxSecurityContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

int OfxSecurityContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 99 of file ofx_container_security.cpp.

int OfxSecurityContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 93 of file ofx_container_security.cpp.

virtual int OfxSecurityContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/functions_0x65.html0000644000175000017500000001501011553133250015114 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- e -

libofx-0.9.4/doc/html/classtree_1_1pre__order__iterator.html0000644000175000017500000003324311553133251021071 00000000000000 LibOFX: tree< T, tree_node_allocator >::pre_order_iterator Class Reference

tree< T, tree_node_allocator >::pre_order_iterator Class Reference

Depth-first iterator, first accessing the node, then its children. More...

Inheritance diagram for tree< T, tree_node_allocator >::pre_order_iterator:
tree< T, tree_node_allocator >::iterator_base tree< T, tree_node_allocator >::iterator_base

Public Member Functions

 pre_order_iterator (tree_node *)
 pre_order_iterator (const iterator_base &)
 pre_order_iterator (const sibling_iterator &)
bool operator== (const pre_order_iterator &) const
bool operator!= (const pre_order_iterator &) const
pre_order_iteratoroperator++ ()
pre_order_iteratoroperator-- ()
pre_order_iterator operator++ (int)
pre_order_iterator operator-- (int)
pre_order_iteratoroperator+= (unsigned int)
pre_order_iteratoroperator-= (unsigned int)
 pre_order_iterator (tree_node *)
 pre_order_iterator (const iterator_base &)
 pre_order_iterator (const sibling_iterator &)
bool operator== (const pre_order_iterator &) const
bool operator!= (const pre_order_iterator &) const
pre_order_iteratoroperator++ ()
pre_order_iteratoroperator-- ()
pre_order_iterator operator++ (int)
pre_order_iterator operator-- (int)
pre_order_iteratoroperator+= (unsigned int)
pre_order_iteratoroperator-= (unsigned int)

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::pre_order_iterator

Depth-first iterator, first accessing the node, then its children.

Definition at line 161 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/getopt1_8c_source.html0000644000175000017500000004417011553133250015670 00000000000000 LibOFX: getopt1.c Source File

getopt1.c

00001 /* getopt_long and getopt_long_only entry points for GNU getopt.
00002    Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
00003      Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include "getopt.h"
00026 
00027 #if !defined __STDC__ || !__STDC__
00028 /* This is a separate conditional since some stdc systems
00029    reject `defined (const)'.  */
00030 #ifndef const
00031 #define const
00032 #endif
00033 #endif
00034 
00035 #include <stdio.h>
00036 
00037 /* Comment out all this code if we are using the GNU C Library, and are not
00038    actually compiling the library itself.  This code is part of the GNU C
00039    Library, but also included in many other GNU distributions.  Compiling
00040    and linking in this code is a waste when using the GNU C library
00041    (especially if it is a shared library).  Rather than having every GNU
00042    program understand `configure --with-gnu-libc' and omit the object files,
00043    it is simpler to just do this in the source for each such file.  */
00044 
00045 #define GETOPT_INTERFACE_VERSION 2
00046 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
00047 #include <gnu-versions.h>
00048 #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
00049 #define ELIDE_CODE
00050 #endif
00051 #endif
00052 
00053 #ifndef ELIDE_CODE
00054 
00055 
00056 /* This needs to come after some library #include
00057    to get __GNU_LIBRARY__ defined.  */
00058 #ifdef __GNU_LIBRARY__
00059 #include <stdlib.h>
00060 #endif
00061 
00062 #ifndef NULL
00063 #define NULL 0
00064 #endif
00065 
00066 int
00067 getopt_long (argc, argv, options, long_options, opt_index)
00068      int argc;
00069      char *const *argv;
00070      const char *options;
00071      const struct option *long_options;
00072      int *opt_index;
00073 {
00074   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
00075 }
00076 
00077 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
00078    If an option that starts with '-' (not '--') doesn't match a long option,
00079    but does match a short option, it is parsed as a short option
00080    instead.  */
00081 
00082 int
00083 getopt_long_only (argc, argv, options, long_options, opt_index)
00084      int argc;
00085      char *const *argv;
00086      const char *options;
00087      const struct option *long_options;
00088      int *opt_index;
00089 {
00090   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
00091 }
00092 
00093 
00094 #endif  /* Not ELIDE_CODE.  */
00095 
00096 #ifdef TEST
00097 
00098 #include <stdio.h>
00099 
00100 int
00101 main (argc, argv)
00102      int argc;
00103      char **argv;
00104 {
00105   int c;
00106   int digit_optind = 0;
00107 
00108   while (1)
00109     {
00110       int this_option_optind = optind ? optind : 1;
00111       int option_index = 0;
00112       static struct option long_options[] =
00113       {
00114         {"add", 1, 0, 0},
00115         {"append", 0, 0, 0},
00116         {"delete", 1, 0, 0},
00117         {"verbose", 0, 0, 0},
00118         {"create", 0, 0, 0},
00119         {"file", 1, 0, 0},
00120         {0, 0, 0, 0}
00121       };
00122 
00123       c = getopt_long (argc, argv, "abc:d:0123456789",
00124                        long_options, &option_index);
00125       if (c == -1)
00126         break;
00127 
00128       switch (c)
00129         {
00130         case 0:
00131           printf ("option %s", long_options[option_index].name);
00132           if (optarg)
00133             printf (" with arg %s", optarg);
00134           printf ("\n");
00135           break;
00136 
00137         case '0':
00138         case '1':
00139         case '2':
00140         case '3':
00141         case '4':
00142         case '5':
00143         case '6':
00144         case '7':
00145         case '8':
00146         case '9':
00147           if (digit_optind != 0 && digit_optind != this_option_optind)
00148             printf ("digits occur in two different argv-elements.\n");
00149           digit_optind = this_option_optind;
00150           printf ("option %c\n", c);
00151           break;
00152 
00153         case 'a':
00154           printf ("option a\n");
00155           break;
00156 
00157         case 'b':
00158           printf ("option b\n");
00159           break;
00160 
00161         case 'c':
00162           printf ("option c with value `%s'\n", optarg);
00163           break;
00164 
00165         case 'd':
00166           printf ("option d with value `%s'\n", optarg);
00167           break;
00168 
00169         case '?':
00170           break;
00171 
00172         default:
00173           printf ("?? getopt returned character code 0%o ??\n", c);
00174         }
00175     }
00176 
00177   if (optind < argc)
00178     {
00179       printf ("non-option ARGV-elements: ");
00180       while (optind < argc)
00181         printf ("%s ", argv[optind++]);
00182       printf ("\n");
00183     }
00184 
00185   exit (0);
00186 }
00187 
00188 #endif /* TEST */
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2win32_8cpp_source.html0000644000175000017500000001673711553133250020276 00000000000000 LibOFX: win32.cpp Source File

win32.cpp

00001 /***************************************************************************
00002  $RCSfile: win32.cpp,v $
00003  -------------------
00004  cvs         : $Id: win32.cpp,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $
00005  begin       : Sat Oct 27 2007
00006  copyright   : (C) 2007 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  * This file is part of the project "LibOfx".                              *
00011  * Please see toplevel file COPYING of that project for license details.   *
00012  ***************************************************************************/
00013 
00014 
00015 #include "win32.hh"
00016 
00017 #include <errno.h>
00018 #include <stdlib.h>
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <unistd.h>
00022 #include <sys/stat.h>
00023 #include <fcntl.h>
00024 #include <assert.h>
00025 
00026 
00027 
00028 #ifdef OS_WIN32
00029 
00030 int mkstemp(char *tmpl)
00031 {
00032   int fd = -1;
00033   int len;
00034   char *nf;
00035   int i;
00036 
00037   len = strlen(tmpl);
00038   if (len < 6)
00039   {
00040     /* bad template */
00041     errno = EINVAL;
00042     return -1;
00043   }
00044   if (strcasecmp(tmpl + (len - 7), "XXXXXX"))
00045   {
00046     /* bad template, last 6 chars must be "X" */
00047     errno = EINVAL;
00048     return -1;
00049   }
00050 
00051   nf = strdup(tmpl);
00052 
00053   for (i = 0; i < 10; i++)
00054   {
00055     int rnd;
00056     char numbuf[16];
00057 
00058     rnd = rand();
00059     snprintf(numbuf, sizeof(numbuf) - 1, "%06x", rnd);
00060     memmove(nf + (len - 7), numbuf, 6);
00061     fd = open(nf, O_RDWR | O_BINARY | O_CREAT, 0444);
00062     if (fd >= 0)
00063     {
00064       memmove(tmpl, nf, len);
00065       free(nf);
00066       return fd;
00067     }
00068   }
00069   free(nf);
00070   errno = EEXIST;
00071   return -1;
00072 }
00073 
00074 
00075 #endif
00076 
00077 
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__containers_8hh_source.html0000644000175000017500000010041711553133250022316 00000000000000 LibOFX: ofx_containers.hh Source File

ofx_containers.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_proc_rs.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 #ifndef OFX_PROC_H
00022 #define OFX_PROC_H
00023 #include "libofx.h"
00024 #include "tree.hh"
00025 #include "context.hh"
00026 
00027 using namespace std;
00028 
00033 class OfxGenericContainer
00034 {
00035 public:
00036   string type;
00037   string tag_identifier; 
00038   OfxGenericContainer *parentcontainer;
00039   LibofxContext *libofx_context;
00040 
00041   OfxGenericContainer(LibofxContext *p_libofx_context);
00042   OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer);
00043   OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00044 
00045   virtual ~OfxGenericContainer() {};
00046 
00053   virtual void add_attribute(const string identifier, const string value);
00059   virtual int gen_event();
00060 
00066   virtual int add_to_main_tree();
00067 
00069   OfxGenericContainer* getparent();
00070 };//End class OfxGenericObject
00071 
00076 class OfxDummyContainer: public OfxGenericContainer
00077 {
00078 public:
00079   OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00080   void add_attribute(const string identifier, const string value);
00081 };
00082 
00087 class OfxPushUpContainer: public OfxGenericContainer
00088 {
00089 public:
00090 
00091   OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00092   void add_attribute(const string identifier, const string value);
00093 };
00094 
00096 class OfxStatusContainer: public OfxGenericContainer
00097 {
00098 public:
00099   OfxStatusData data;
00100 
00101   OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00102   ~OfxStatusContainer();
00103   void add_attribute(const string identifier, const string value);
00104 };
00105 
00110 class OfxBalanceContainer: public OfxGenericContainer
00111 {
00112 public:
00113   /* Not yet complete see spec 1.6 p.63 */
00114   //char name[OFX_BALANCE_NAME_LENGTH];
00115   //char description[OFX_BALANCE_DESCRIPTION_LENGTH];
00116   //enum BalanceType{DOLLAR, PERCENT, NUMBER} balance_type;
00117   double amount; 
00118   int amount_valid;
00119   time_t date; 
00120   int date_valid;
00121 
00122   OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00123   ~OfxBalanceContainer();
00124   void add_attribute(const string identifier, const string value);
00125 };
00126 
00127 /***************************************************************************
00128  *                          OfxStatementContainer                          *
00129  ***************************************************************************/
00134 class OfxStatementContainer: public OfxGenericContainer
00135 {
00136 public:
00137   OfxStatementData data;
00138 
00139   OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00140   ~OfxStatementContainer();
00141   void add_attribute(const string identifier, const string value);
00142   virtual int add_to_main_tree();
00143   virtual int gen_event();
00144   void add_account(OfxAccountData * account_data);
00145   void add_balance(OfxBalanceContainer* ptr_balance_container);
00146 //  void add_transaction(const OfxTransactionData transaction_data);
00147 
00148 };
00149 
00150 /***************************************************************************
00151  *                           OfxAccountContaine r                          *
00152  ***************************************************************************/
00157 class OfxAccountContainer: public OfxGenericContainer
00158 {
00159 public:
00160   OfxAccountData data;
00161 
00162   OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00163   ~OfxAccountContainer();
00164   void add_attribute(const string identifier, const string value);
00165   int add_to_main_tree();
00166   virtual int gen_event();
00167 private:
00168   void gen_account_id(void);
00169   char bankid[OFX_BANKID_LENGTH];
00170   char branchid[OFX_BRANCHID_LENGTH];
00171   char acctid[OFX_ACCTID_LENGTH];
00172   char acctkey[OFX_ACCTKEY_LENGTH];
00173   char brokerid[OFX_BROKERID_LENGTH];
00174 };
00175 
00176 /***************************************************************************
00177  *                           OfxSecurityContainer                          *
00178  ***************************************************************************/
00181 class OfxSecurityContainer: public OfxGenericContainer
00182 {
00183 public:
00184   OfxSecurityData data;
00185 
00186   OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00187   ~OfxSecurityContainer();
00188   void add_attribute(const string identifier, const string value);
00189   virtual int gen_event();
00190   virtual int add_to_main_tree();
00191 private:
00192   OfxStatementContainer * parent_statement;
00193 };
00194 
00195 
00196 /***************************************************************************
00197  *                        OfxTransactionContainer                          *
00198  ***************************************************************************/
00201 class OfxTransactionContainer: public OfxGenericContainer
00202 {
00203 public:
00204   OfxTransactionData data;
00205 
00206   OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00207   ~OfxTransactionContainer();
00208   virtual void add_attribute(const string identifier, const string value);
00209   void add_account(OfxAccountData * account_data);
00210 
00211   virtual int gen_event();
00212   virtual int add_to_main_tree();
00213 private:
00214   OfxStatementContainer * parent_statement;
00215 };
00216 
00221 class OfxBankTransactionContainer: public OfxTransactionContainer
00222 {
00223 public:
00224   OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00225   void add_attribute(const string identifier, const string value);
00226 };
00227 
00232 class OfxInvestmentTransactionContainer: public OfxTransactionContainer
00233 {
00234 public:
00235   OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00236 
00237   void add_attribute(const string identifier, const string value);
00238 };
00239 
00240 /***************************************************************************
00241  *                             OfxMainContainer                            *
00242  ***************************************************************************/
00247 class OfxMainContainer: public OfxGenericContainer
00248 {
00249 public:
00250   OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00251   ~OfxMainContainer();
00252   int add_container(OfxGenericContainer * container);
00253   int add_container(OfxStatementContainer * container);
00254   int add_container(OfxAccountContainer * container);
00255   int add_container(OfxTransactionContainer * container);
00256   int add_container(OfxSecurityContainer * container);
00257   int gen_event();
00258   OfxSecurityData * find_security(string unique_id);
00259 private:
00260   tree<OfxGenericContainer *> security_tree;
00261   tree<OfxGenericContainer *> account_tree;
00262 };
00263 
00264 
00265 #endif
libofx-0.9.4/doc/html/ofx__container__generic_8cpp_source.html0000644000175000017500000003130411553133250021470 00000000000000 LibOFX: ofx_container_generic.cpp Source File

ofx_container_generic.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_generic.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #endif
00022 
00023 #include <string>
00024 #include "ParserEventGeneratorKit.h"
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 
00029 extern OfxMainContainer * MainContainer;
00030 
00031 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context)
00032 {
00033   parentcontainer = NULL;
00034   type = "";
00035   tag_identifier = "";
00036   libofx_context = p_libofx_context;
00037 }
00038 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer)
00039 {
00040   libofx_context = p_libofx_context;
00041   parentcontainer = para_parentcontainer;
00042   if (parentcontainer != NULL && parentcontainer->type == "DUMMY")
00043   {
00044     message_out(DEBUG, "OfxGenericContainer(): The parent is a DummyContainer!");
00045   }
00046 }
00047 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
00048 {
00049   libofx_context = p_libofx_context;
00050   parentcontainer = para_parentcontainer;
00051   tag_identifier = para_tag_identifier;
00052   if (parentcontainer != NULL && parentcontainer->type == "DUMMY")
00053   {
00054     message_out(DEBUG, "OfxGenericContainer(): The parent for this " + tag_identifier + " is a DummyContainer!");
00055   }
00056 }
00057 void OfxGenericContainer::add_attribute(const string identifier, const string value)
00058 {
00059   /*If an attribute has made it all the way up to the Generic Container's add_attribute,
00060     we don't know what to do with it! */
00061   message_out(ERROR, "WRITEME: " + identifier + " (" + value + ") is not supported by the " + type + " container");
00062 }
00063 OfxGenericContainer* OfxGenericContainer::getparent()
00064 {
00065   return parentcontainer;
00066 }
00067 
00068 int  OfxGenericContainer::gen_event()
00069 {
00070   /* No callback is ever generated for pure virtual containers */
00071   return false;
00072 }
00073 
00074 int  OfxGenericContainer::add_to_main_tree()
00075 {
00076   if (MainContainer != NULL)
00077   {
00078     return MainContainer->add_container(this);
00079   }
00080   else
00081   {
00082     return false;
00083   }
00084 }
00085 
libofx-0.9.4/doc/html/classOfxTransactionContainer.html0000644000175000017500000004446511553133250020175 00000000000000 LibOFX: OfxTransactionContainer Class Reference

OfxTransactionContainer Class Reference

Represents a generic transaction. More...

Inheritance diagram for OfxTransactionContainer:
OfxGenericContainer OfxGenericContainer OfxBankTransactionContainer OfxBankTransactionContainer OfxInvestmentTransactionContainer OfxInvestmentTransactionContainer

Public Member Functions

 OfxTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
virtual void add_attribute (const string identifier, const string value)
 Add data to a container object.
void add_account (OfxAccountData *account_data)
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.
 OfxTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
virtual void add_attribute (const string identifier, const string value)
 Add data to a container object.
void add_account (OfxAccountData *account_data)
virtual int gen_event ()
 Generate libofx.h events.
virtual int add_to_main_tree ()
 Add this container to the main tree.

Data Fields

OfxTransactionData data

Detailed Description

Represents a generic transaction.

Definition at line 201 of file ofx_containers.hh.


Member Function Documentation

void OfxTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Reimplemented in OfxBankTransactionContainer, OfxInvestmentTransactionContainer, OfxBankTransactionContainer, and OfxInvestmentTransactionContainer.

Definition at line 97 of file ofx_container_transaction.cpp.

virtual void OfxTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Reimplemented in OfxBankTransactionContainer, OfxInvestmentTransactionContainer, OfxBankTransactionContainer, and OfxInvestmentTransactionContainer.

int OfxTransactionContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 83 of file ofx_container_transaction.cpp.

virtual int OfxTransactionContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

int OfxTransactionContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 69 of file ofx_container_transaction.cpp.

virtual int OfxTransactionContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/gnugetopt_8h_source.html0000644000175000017500000005121611553133250016325 00000000000000 LibOFX: gnugetopt.h Source File

gnugetopt.h

00001 /* Declarations for getopt.
00002    Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _GETOPT_H
00021 
00022 #ifndef __need_getopt
00023 # define _GETOPT_H 1
00024 #endif
00025 
00026 /* If __GNU_LIBRARY__ is not already defined, either we are being used
00027    standalone, or this is the first header included in the source file.
00028    If we are being used with glibc, we need to include <features.h>, but
00029    that does not exist if we are standalone.  So: if __GNU_LIBRARY__ is
00030    not defined, include <ctype.h>, which will pull in <features.h> for us
00031    if it's from glibc.  (Why ctype.h?  It's guaranteed to exist and it
00032    doesn't flood the namespace with stuff the way some other headers do.)  */
00033 #if !defined __GNU_LIBRARY__
00034 # include <ctype.h>
00035 #endif
00036 
00037 #ifdef  __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 /* For communication from `getopt' to the caller.
00042    When `getopt' finds an option that takes an argument,
00043    the argument value is returned here.
00044    Also, when `ordering' is RETURN_IN_ORDER,
00045    each non-option ARGV-element is returned here.  */
00046 
00047 extern char *optarg;
00048 
00049 /* Index in ARGV of the next element to be scanned.
00050    This is used for communication to and from the caller
00051    and for communication between successive calls to `getopt'.
00052 
00053    On entry to `getopt', zero means this is the first call; initialize.
00054 
00055    When `getopt' returns -1, this is the index of the first of the
00056    non-option elements that the caller should itself scan.
00057 
00058    Otherwise, `optind' communicates from one call to the next
00059    how much of ARGV has been scanned so far.  */
00060 
00061 extern int optind;
00062 
00063 /* Callers store zero here to inhibit the error message `getopt' prints
00064    for unrecognized options.  */
00065 
00066 extern int opterr;
00067 
00068 /* Set to an option character which was unrecognized.  */
00069 
00070 extern int optopt;
00071 
00072 #ifndef __need_getopt
00073 /* Describe the long-named options requested by the application.
00074    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
00075    of `struct option' terminated by an element containing a name which is
00076    zero.
00077 
00078    The field `has_arg' is:
00079    no_argument          (or 0) if the option does not take an argument,
00080    required_argument    (or 1) if the option requires an argument,
00081    optional_argument    (or 2) if the option takes an optional argument.
00082 
00083    If the field `flag' is not NULL, it points to a variable that is set
00084    to the value given in the field `val' when the option is found, but
00085    left unchanged if the option is not found.
00086 
00087    To have a long-named option do something other than set an `int' to
00088    a compiled-in constant, such as set a value from `optarg', set the
00089    option's `flag' field to zero and its `val' field to a nonzero
00090    value (the equivalent single-letter option character, if there is
00091    one).  For long options that have a zero `flag' field, `getopt'
00092    returns the contents of the `val' field.  */
00093 
00094 struct option
00095 {
00096 # if (defined __STDC__ && __STDC__) || defined __cplusplus
00097   const char *name;
00098 # else
00099   char *name;
00100 # endif
00101   /* has_arg can't be an enum because some compilers complain about
00102      type mismatches in all the code that assumes it is an int.  */
00103   int has_arg;
00104   int *flag;
00105   int val;
00106 };
00107 
00108 /* Names for the values of the `has_arg' field of `struct option'.  */
00109 
00110 # define no_argument            0
00111 # define required_argument      1
00112 # define optional_argument      2
00113 #endif  /* need getopt */
00114 
00115 
00116 /* Get definitions and prototypes for functions to process the
00117    arguments in ARGV (ARGC of them, minus the program name) for
00118    options given in OPTS.
00119 
00120    Return the option character from OPTS just read.  Return -1 when
00121    there are no more options.  For unrecognized options, or options
00122    missing arguments, `optopt' is set to the option letter, and '?' is
00123    returned.
00124 
00125    The OPTS string is a list of characters which are recognized option
00126    letters, optionally followed by colons, specifying that that letter
00127    takes an argument, to be placed in `optarg'.
00128 
00129    If a letter in OPTS is followed by two colons, its argument is
00130    optional.  This behavior is specific to the GNU `getopt'.
00131 
00132    The argument `--' causes premature termination of argument
00133    scanning, explicitly telling `getopt' that there are no more
00134    options.
00135 
00136    If OPTS begins with `--', then non-option arguments are treated as
00137    arguments to the option '\0'.  This behavior is specific to the GNU
00138    `getopt'.  */
00139 
00140 #if (defined __STDC__ && __STDC__) || defined __cplusplus
00141 # ifdef __GNU_LIBRARY__
00142 /* Many other libraries have conflicting prototypes for getopt, with
00143    differences in the consts, in stdlib.h.  To avoid compilation
00144    errors, only prototype getopt for the GNU C library.  */
00145 extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
00146 # else /* not __GNU_LIBRARY__ */
00147 extern int getopt ();
00148 # endif /* __GNU_LIBRARY__ */
00149 
00150 # ifndef __need_getopt
00151 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
00152                         const struct option *__longopts, int *__longind);
00153 extern int getopt_long_only (int __argc, char *const *__argv,
00154                              const char *__shortopts,
00155                              const struct option *__longopts, int *__longind);
00156 
00157 /* Internal only.  Users should not call this directly.  */
00158 extern int _getopt_internal (int __argc, char *const *__argv,
00159                              const char *__shortopts,
00160                              const struct option *__longopts, int *__longind,
00161                              int __long_only);
00162 # endif
00163 #else /* not __STDC__ */
00164 extern int getopt ();
00165 # ifndef __need_getopt
00166 extern int getopt_long ();
00167 extern int getopt_long_only ();
00168 
00169 extern int _getopt_internal ();
00170 # endif
00171 #endif /* __STDC__ */
00172 
00173 #ifdef  __cplusplus
00174 }
00175 #endif
00176 
00177 /* Make sure we later can get all the definitions and declarations.  */
00178 #undef __need_getopt
00179 
00180 #endif /* getopt.h */
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__sgml_8hh.html0000644000175000017500000001220211553133250017525 00000000000000 LibOFX: ofx_sgml.hh File Reference

ofx_sgml.hh File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Functions

int ofx_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Detailed Description

OFX/SGML parsing functionnality.

Definition in file fx-0.9.4/lib/ofx_sgml.hh.


Function Documentation

int ofx_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofx_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 368 of file ofx_sgml.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().

libofx-0.9.4/doc/html/functions_0x69.html0000644000175000017500000001544211553133250015131 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- i -

libofx-0.9.4/doc/html/ofx__sgml_8cpp_source.html0000644000175000017500000014173511553133250016627 00000000000000 LibOFX: ofx_sgml.cpp Source File

ofx_sgml.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.cpp
00003                           -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <iostream>
00026 #include <stdlib.h>
00027 #include <string>
00028 #include "ParserEventGeneratorKit.h"
00029 #include "libofx.h"
00030 #include "ofx_utilities.hh"
00031 #include "messages.hh"
00032 #include "ofx_containers.hh"
00033 #include "ofx_sgml.hh"
00034 
00035 using namespace std;
00036 
00037 OfxMainContainer * MainContainer = NULL;
00038 extern SGMLApplication::OpenEntityPtr entity_ptr;
00039 extern SGMLApplication::Position position;
00040 
00041 
00044 class OFXApplication : public SGMLApplication
00045 {
00046 private:
00047   OfxGenericContainer *curr_container_element; 
00048   OfxGenericContainer *tmp_container_element;
00049   bool is_data_element; 
00050   string incoming_data; 
00051   LibofxContext * libofx_context;
00052 
00053 public:
00054 
00055   OFXApplication (LibofxContext * p_libofx_context)
00056   {
00057     MainContainer = NULL;
00058     curr_container_element = NULL;
00059     is_data_element = false;
00060     libofx_context = p_libofx_context;
00061   }
00062   ~OFXApplication()
00063   {
00064     message_out(DEBUG, "Entering the OFXApplication's destructor");
00065   }
00066 
00071   void startElement (const StartElementEvent & event)
00072   {
00073     string identifier;
00074     CharStringtostring (event.gi, identifier);
00075     message_out(PARSER, "startElement event received from OpenSP for element " + identifier);
00076 
00077     position = event.pos;
00078 
00079     switch (event.contentType)
00080     {
00081     case StartElementEvent::empty:
00082       message_out(ERROR, "StartElementEvent::empty\n");
00083       break;
00084     case StartElementEvent::cdata:
00085       message_out(ERROR, "StartElementEvent::cdata\n");
00086       break;
00087     case StartElementEvent::rcdata:
00088       message_out(ERROR, "StartElementEvent::rcdata\n");
00089       break;
00090     case StartElementEvent::mixed:
00091       message_out(PARSER, "StartElementEvent::mixed");
00092       is_data_element = true;
00093       break;
00094     case StartElementEvent::element:
00095       message_out(PARSER, "StartElementEvent::element");
00096       is_data_element = false;
00097       break;
00098     default:
00099       message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?");
00100     }
00101 
00102     if (is_data_element == false)
00103     {
00104       /*------- The following are OFX entities ---------------*/
00105 
00106       if (identifier == "OFX")
00107       {
00108         message_out (PARSER, "Element " + identifier + " found");
00109         MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier);
00110         curr_container_element = MainContainer;
00111       }
00112       else if (identifier == "STATUS")
00113       {
00114         message_out (PARSER, "Element " + identifier + " found");
00115         curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier);
00116       }
00117       else if (identifier == "STMTRS" ||
00118                identifier == "CCSTMTRS" ||
00119                identifier == "INVSTMTRS")
00120       {
00121         message_out (PARSER, "Element " + identifier + " found");
00122         curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier);
00123       }
00124       else if (identifier == "BANKTRANLIST")
00125       {
00126         message_out (PARSER, "Element " + identifier + " found");
00127         //BANKTRANLIST ignored, we will process it's attributes directly inside the STATEMENT,
00128         if (curr_container_element->type != "STATEMENT")
00129         {
00130           message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container");
00131         }
00132         else
00133         {
00134           curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00135         }
00136       }
00137       else if (identifier == "STMTTRN")
00138       {
00139         message_out (PARSER, "Element " + identifier + " found");
00140         curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier);
00141       }
00142       else if (identifier == "BUYDEBT" ||
00143                identifier == "BUYMF" ||
00144                identifier == "BUYOPT" ||
00145                identifier == "BUYOTHER" ||
00146                identifier == "BUYSTOCK" ||
00147                identifier == "CLOSUREOPT" ||
00148                identifier == "INCOME" ||
00149                identifier == "INVEXPENSE" ||
00150                identifier == "JRNLFUND" ||
00151                identifier == "JRNLSEC" ||
00152                identifier == "MARGININTEREST" ||
00153                identifier == "REINVEST" ||
00154                identifier == "RETOFCAP" ||
00155                identifier == "SELLDEBT" ||
00156                identifier == "SELLMF" ||
00157                identifier == "SELLOPT" ||
00158                identifier == "SELLOTHER" ||
00159                identifier == "SELLSTOCK" ||
00160                identifier == "SPLIT" ||
00161                identifier == "TRANSFER" )
00162       {
00163         message_out (PARSER, "Element " + identifier + " found");
00164         curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier);
00165       }
00166       /*The following is a list of OFX elements whose attributes will be processed by the parent container*/
00167       else if (identifier == "INVBUY" ||
00168                identifier == "INVSELL" ||
00169                identifier == "INVTRAN" ||
00170                identifier == "SECID")
00171       {
00172         message_out (PARSER, "Element " + identifier + " found");
00173         curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00174       }
00175 
00176       /* The different types of accounts */
00177       else if (identifier == "BANKACCTFROM" || identifier == "CCACCTFROM" || identifier == "INVACCTFROM")
00178       {
00179         message_out (PARSER, "Element " + identifier + " found");
00180         curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier);
00181       }
00182       else if (identifier == "SECINFO")
00183       {
00184         message_out (PARSER, "Element " + identifier + " found");
00185         curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier);
00186       }
00187       /* The different types of balances */
00188       else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL")
00189       {
00190         message_out (PARSER, "Element " + identifier + " found");
00191         curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier);
00192       }
00193       else
00194       {
00195         /* We dont know this OFX element, so we create a dummy container */
00196         curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier);
00197       }
00198     }
00199     else
00200     {
00201       /* The element was a data element.  OpenSP will call one or several data() callback with the data */
00202       message_out (PARSER, "Data element " + identifier + " found");
00203       /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here".  Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */
00204       if (incoming_data != "")
00205       {
00206         message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4.  The folowing data was lost: " + incoming_data );
00207         incoming_data.assign ("");
00208       }
00209     }
00210   }
00211 
00216   void endElement (const EndElementEvent & event)
00217   {
00218     string identifier;
00219     bool end_element_for_data_element;
00220 
00221     CharStringtostring (event.gi, identifier);
00222     end_element_for_data_element = is_data_element;
00223     message_out(PARSER, "endElement event received from OpenSP for element " + identifier);
00224 
00225     position = event.pos;
00226     if (curr_container_element == NULL)
00227     {
00228       message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)");
00229       incoming_data.assign ("");
00230     }
00231     else     //curr_container_element != NULL
00232     {
00233       if (end_element_for_data_element == true)
00234       {
00235         incoming_data = strip_whitespace(incoming_data);
00236 
00237         curr_container_element->add_attribute (identifier, incoming_data);
00238         message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element");
00239         incoming_data.assign ("");
00240         is_data_element = false;
00241       }
00242       else
00243       {
00244         if (identifier == curr_container_element->tag_identifier)
00245         {
00246           if (incoming_data != "")
00247           {
00248             message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!");
00249           }
00250 
00251           if (identifier == "OFX")
00252           {
00253             /* The main container is a special case */
00254             tmp_container_element = curr_container_element;
00255             curr_container_element = curr_container_element->getparent ();
00256             if(curr_container_element==NULL) {
00257               //Defensive coding, this isn't supposed to happen
00258               curr_container_element=tmp_container_element;
00259             }
00260             if(MainContainer!=NULL){
00261             MainContainer->gen_event();
00262             delete MainContainer;
00263             MainContainer = NULL;
00264             message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed");
00265             }
00266             else
00267             {
00268               message_out (DEBUG, "Element " + identifier + " closed, but there was no MainContainer to destroy (probably a malformed file)!");
00269             }
00270           }
00271           else
00272           {
00273             tmp_container_element = curr_container_element;
00274             curr_container_element = curr_container_element->getparent ();
00275             if (MainContainer != NULL)
00276             {
00277               tmp_container_element->add_to_main_tree();
00278               message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer");
00279             }
00280             else
00281             {
00282               message_out (ERROR, "MainContainer is NULL trying to add element " + identifier);
00283             }
00284           }
00285         }
00286         else
00287         {
00288           message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open.");
00289         }
00290       }
00291     }
00292   }
00293 
00298   void data (const DataEvent & event)
00299   {
00300     string tmp;
00301     position = event.pos;
00302     AppendCharStringtostring (event.data, incoming_data);
00303     message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data);
00304   }
00305 
00310   void error (const ErrorEvent & event)
00311   {
00312     string message;
00313     string string_buf;
00314     OfxMsgType error_type = ERROR;
00315 
00316     position = event.pos;
00317     message = message + "OpenSP parser: ";
00318     switch (event.type)
00319     {
00320     case SGMLApplication::ErrorEvent::quantity:
00321       message = message + "quantity (Exceeding a quantity limit):";
00322       error_type = ERROR;
00323       break;
00324     case SGMLApplication::ErrorEvent::idref:
00325       message = message + "idref (An IDREF to a non-existent ID):";
00326       error_type = ERROR;
00327       break;
00328     case SGMLApplication::ErrorEvent::capacity:
00329       message = message + "capacity (Exceeding a capacity limit):";
00330       error_type = ERROR;
00331       break;
00332     case SGMLApplication::ErrorEvent::otherError:
00333       message = message + "otherError (misc parse error):";
00334       error_type = ERROR;
00335       break;
00336     case SGMLApplication::ErrorEvent::warning:
00337       message = message + "warning (Not actually an error.):";
00338       error_type = WARNING;
00339       break;
00340     case SGMLApplication::ErrorEvent::info:
00341       message =  message + "info (An informationnal message.  Not actually an error):";
00342       error_type = INFO;
00343       break;
00344     default:
00345       message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):";
00346     }
00347     message =   message + "\n" + CharStringtostring (event.message, string_buf);
00348     message_out (error_type, message);
00349   }
00350 
00355   void openEntityChange (const OpenEntityPtr & para_entity_ptr)
00356   {
00357     message_out(DEBUG, "openEntityChange()\n");
00358     entity_ptr = para_entity_ptr;
00359 
00360   };
00361 
00362 private:
00363 };
00364 
00368 int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[])
00369 {
00370   message_out(DEBUG, "Begin ofx_proc_sgml()");
00371   message_out(DEBUG, argv[0]);
00372   message_out(DEBUG, argv[1]);
00373   message_out(DEBUG, argv[2]);
00374 
00375   ParserEventGeneratorKit parserKit;
00376   parserKit.setOption (ParserEventGeneratorKit::showOpenEntities);
00377   EventGenerator *egp = parserKit.makeEventGenerator (argc, argv);
00378   egp->inhibitMessages (true);  /* Error output is handled by libofx not OpenSP */
00379   OFXApplication *app = new OFXApplication(libofx_context);
00380   unsigned nErrors = egp->run (*app); /* Begin parsing */
00381   delete egp;  //Note that this is where bug is triggered
00382   return nErrors > 0;
00383 }
libofx-0.9.4/doc/html/file__preproc_8hh.html0000644000175000017500000001166511553133250015715 00000000000000 LibOFX: file_preproc.hh File Reference

file_preproc.hh File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Functions

enum LibofxFileFormat libofx_detect_file_type (const char *p_filename)
 libofx_detect_file_type tries to analyze a file to determine it's format.

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file file_preproc.hh.


Function Documentation

enum LibofxFileFormat libofx_detect_file_type ( const char *  p_filename)

libofx_detect_file_type tries to analyze a file to determine it's format.

Parameters:
p_filenameFile name of the file to process
Returns:
Detected file format, UNKNOWN if unsuccessfull.

Definition at line 102 of file file_preproc.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2file__preproc_8hh_source.html0000644000175000017500000001206611553133250021750 00000000000000 LibOFX: file_preproc.hh Source File

file_preproc.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           file_preproc.hh
00003                              -------------------
00004     copyright            : (C) 2004 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #ifndef FILE_PREPROC_H
00021 #define FILE_PREPROC_H
00022 
00029 enum LibofxFileFormat libofx_detect_file_type(const char * p_filename);
00030 
00031 #endif
libofx-0.9.4/doc/html/ofx__request__statement_8cpp_source.html0000644000175000017500000011022611553133250021567 00000000000000 LibOFX: ofx_request_statement.cpp Source File

ofx_request_statement.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request_statement.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "libofx.h"
00027 #include "ofx_utilities.hh"
00028 #include "ofx_request_statement.hh"
00029 
00030 using namespace std;
00031 
00032 char* libofx_request_statement( const OfxFiLogin* login, const OfxAccountData* account, time_t date_from )
00033 {
00034   OfxStatementRequest strq( *login, *account, date_from );
00035   string request = OfxHeader(login->header_version) + strq.Output();
00036 
00037   unsigned size = request.size();
00038   char* result = (char*)malloc(size + 1);
00039   request.copy(result, size);
00040   result[size] = 0;
00041 
00042   return result;
00043 }
00044 
00045 OfxStatementRequest::OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from ):
00046   OfxRequest(fi),
00047   m_account(account),
00048   m_date_from(from)
00049 {
00050   Add( SignOnRequest() );
00051 
00052   if ( account.account_type == account.OFX_CREDITCARD )
00053     Add(CreditCardStatementRequest());
00054   else if ( account.account_type == account.OFX_INVESTMENT )
00055     Add(InvestmentStatementRequest());
00056   else
00057     Add(BankStatementRequest());
00058 }
00059 
00060 OfxAggregate OfxStatementRequest::BankStatementRequest(void) const
00061 {
00062   OfxAggregate bankacctfromTag("BANKACCTFROM");
00063   bankacctfromTag.Add( "BANKID", m_account.bank_id );
00064   bankacctfromTag.Add( "ACCTID", m_account.account_number );
00065   if ( m_account.account_type ==  m_account.OFX_CHECKING )
00066     bankacctfromTag.Add( "ACCTTYPE", "CHECKING" );
00067   else if  ( m_account.account_type == m_account.OFX_SAVINGS )
00068     bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" );
00069   else if  ( m_account.account_type == m_account.OFX_MONEYMRKT )
00070     bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" );
00071   else if  ( m_account.account_type == m_account.OFX_CREDITLINE )
00072     bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" );
00073   else if  ( m_account.account_type == m_account.OFX_CMA )
00074     bankacctfromTag.Add( "ACCTTYPE", "CMA" );
00075 
00076   OfxAggregate inctranTag("INCTRAN");
00077   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00078   inctranTag.Add( "INCLUDE", "Y" );
00079 
00080   OfxAggregate stmtrqTag("STMTRQ");
00081   stmtrqTag.Add( bankacctfromTag );
00082   stmtrqTag.Add( inctranTag );
00083 
00084   return RequestMessage("BANK", "STMT", stmtrqTag);
00085 }
00086 
00087 OfxAggregate OfxStatementRequest::CreditCardStatementRequest(void) const
00088 {
00089   /*
00090    QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]"));
00091 
00092    return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ")
00093      .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum()))
00094      .subtag(Tag("INCTRAN").element("DTSTART",dtstart_string).element("INCLUDE","Y")));
00095   }
00096   */
00097   OfxAggregate ccacctfromTag("CCACCTFROM");
00098   ccacctfromTag.Add( "ACCTID", m_account.account_number );
00099 
00100   OfxAggregate inctranTag("INCTRAN");
00101   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00102   inctranTag.Add( "INCLUDE", "Y" );
00103 
00104   OfxAggregate ccstmtrqTag("CCSTMTRQ");
00105   ccstmtrqTag.Add( ccacctfromTag );
00106   ccstmtrqTag.Add( inctranTag );
00107 
00108   return RequestMessage("CREDITCARD", "CCSTMT", ccstmtrqTag);
00109 }
00110 
00111 OfxAggregate OfxStatementRequest::InvestmentStatementRequest(void) const
00112 {
00113   OfxAggregate invacctfromTag("INVACCTFROM");
00114 
00115   invacctfromTag.Add( "BROKERID", m_account.broker_id );
00116   invacctfromTag.Add( "ACCTID", m_account.account_number );
00117 
00118   OfxAggregate inctranTag("INCTRAN");
00119   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00120   inctranTag.Add( "INCLUDE", "Y" );
00121 
00122   OfxAggregate incposTag("INCPOS");
00123   incposTag.Add( "DTASOF", time_t_to_ofxdatetime( time(NULL) ) );
00124   incposTag.Add( "INCLUDE", "Y" );
00125 
00126   OfxAggregate invstmtrqTag("INVSTMTRQ");
00127   invstmtrqTag.Add( invacctfromTag );
00128   invstmtrqTag.Add( inctranTag );
00129   invstmtrqTag.Add( "INCOO", "Y" );
00130   invstmtrqTag.Add( incposTag );
00131   invstmtrqTag.Add( "INCBAL", "Y" );
00132 
00133   return RequestMessage("INVSTMT", "INVSTMT", invstmtrqTag);
00134 }
00135 
00136 char* libofx_request_payment( const OfxFiLogin* login, const OfxAccountData* account, const OfxPayee* payee, const OfxPayment* payment )
00137 {
00138   OfxPaymentRequest strq( *login, *account, *payee, *payment );
00139   string request = OfxHeader(login->header_version) + strq.Output();
00140 
00141   unsigned size = request.size();
00142   char* result = (char*)malloc(size + 1);
00143   request.copy(result, size);
00144   result[size] = 0;
00145 
00146   return result;
00147 }
00148 
00149 OfxPaymentRequest::OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment ):
00150   OfxRequest(fi),
00151   m_account(account),
00152   m_payee(payee),
00153   m_payment(payment)
00154 {
00155   Add( SignOnRequest() );
00156 
00157   OfxAggregate bankacctfromTag("BANKACCTFROM");
00158   bankacctfromTag.Add( "BANKID", m_account.bank_id );
00159   bankacctfromTag.Add( "ACCTID", m_account.account_number );
00160   if ( m_account.account_type == m_account.OFX_CHECKING)
00161     bankacctfromTag.Add( "ACCTTYPE", "CHECKING" );
00162   else if  ( m_account.account_type == m_account.OFX_SAVINGS )
00163     bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" );
00164   else if  ( m_account.account_type == m_account.OFX_MONEYMRKT )
00165     bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" );
00166   else if  ( m_account.account_type ==  m_account.OFX_CREDITLINE )
00167     bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" );
00168   else if  ( m_account.account_type == m_account.OFX_CMA )
00169     bankacctfromTag.Add( "ACCTTYPE", "CMA" );
00170 
00171   OfxAggregate payeeTag("PAYEE");
00172   payeeTag.Add( "NAME", m_payee.name );
00173   payeeTag.Add( "ADDR1", m_payee.address1 );
00174   payeeTag.Add( "CITY", m_payee.city );
00175   payeeTag.Add( "STATE", m_payee.state );
00176   payeeTag.Add( "POSTALCODE", m_payee.postalcode );
00177   payeeTag.Add( "PHONE", m_payee.phone );
00178 
00179   OfxAggregate pmtinfoTag("PMTINFO");
00180   pmtinfoTag.Add( bankacctfromTag );
00181   pmtinfoTag.Add( "TRNAMT", m_payment.amount );
00182   pmtinfoTag.Add( payeeTag );
00183   pmtinfoTag.Add( "PAYACCT", m_payment.account );
00184   pmtinfoTag.Add( "DTDUE", m_payment.datedue );
00185   pmtinfoTag.Add( "MEMO", m_payment.memo );
00186 
00187   OfxAggregate pmtrqTag("PMTRQ");
00188   pmtrqTag.Add( pmtinfoTag );
00189 
00190   Add( RequestMessage("BILLPAY", "PMT", pmtrqTag) );
00191 }
00192 
00193 char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid )
00194 {
00195 #if 0
00196   OfxAggregate pmtinqrqTag( "PMTINQRQ" );
00197   pmtinqrqTag.Add( "SRVRTID", transactionid );
00198 
00199   OfxRequest ofx(*login);
00200   ofx.Add( ofx.SignOnRequest() );
00201   ofx.Add( ofx.RequestMessage("BILLPAY", "PMTINQ", pmtinqrqTag) );
00202 
00203   string request = OfxHeader() + ofx.Output();
00204 
00205   unsigned size = request.size();
00206   char* result = (char*)malloc(size + 1);
00207   request.copy(result, size);
00208   result[size] = 0;
00209 #else
00210   OfxAggregate payeesyncrq( "PAYEESYNCRQ" );
00211   payeesyncrq.Add( "TOKEN", "0" );
00212   payeesyncrq.Add( "TOKENONLY", "N" );
00213   payeesyncrq.Add( "REFRESH", "Y" );
00214   payeesyncrq.Add( "REJECTIFMISSING", "N" );
00215 
00216   OfxAggregate message( "BILLPAYMSGSRQV1" );
00217   message.Add( payeesyncrq );
00218 
00219   OfxRequest ofx(*login);
00220   ofx.Add( ofx.SignOnRequest() );
00221   ofx.Add( message );
00222 
00223   string request = OfxHeader(login->header_version) + ofx.Output();
00224 
00225   unsigned size = request.size();
00226   char* result = (char*)malloc(size + 1);
00227   request.copy(result, size);
00228   result[size] = 0;
00229 
00230 #endif
00231   return result;
00232 }
00233 
00234 // vim:cin:si:ai:et:ts=2:sw=2:
00235 
libofx-0.9.4/doc/html/globals.html0000644000175000017500000001155411553133251013757 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- a -

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__error__msg_8hh.html0000644000175000017500000001534411553133250020733 00000000000000 LibOFX: ofx_error_msg.hh File Reference

ofx_error_msg.hh File Reference

OFX error code management functionnality. More...

Go to the source code of this file.

Data Structures

struct  ErrorMsg
 An abstraction of an OFX error code sent by an OFX server. More...

Functions

const ErrorMsg find_error_msg (int param_code)
 Retreive error code descriptions.

Variables

const ErrorMsg error_msgs_list []
 List known error codes.

Detailed Description

OFX error code management functionnality.

Definition in file fx-0.9.4/lib/ofx_error_msg.hh.


Function Documentation

const ErrorMsg find_error_msg ( int  param_code)

Retreive error code descriptions.

The find_error_msg function will take an ofx error number, and return an ErrorMsg structure with detailled information about the error, including the error name and long description

Definition at line 130 of file fx-0.9.4/lib/ofx_error_msg.hh.


Variable Documentation

List known error codes.

The error_msgs_list table contains all past and present OFX error codes up to the OFX 2.01 specification

Definition at line 34 of file fx-0.9.4/lib/ofx_error_msg.hh.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2messages_8cpp.html0000644000175000017500000004666011553133250017561 00000000000000 LibOFX: messages.cpp File Reference

messages.cpp File Reference

Message IO functionality. More...

Go to the source code of this file.

Functions

void show_line_number ()
int message_out (OfxMsgType error_type, const string message)
 Message output function.

Variables

SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position
volatile int ofx_PARSER_msg = false
volatile int ofx_DEBUG_msg = false
volatile int ofx_DEBUG1_msg = false
volatile int ofx_DEBUG2_msg = false
volatile int ofx_DEBUG3_msg = false
volatile int ofx_DEBUG4_msg = false
volatile int ofx_DEBUG5_msg = false
volatile int ofx_STATUS_msg = false
volatile int ofx_INFO_msg = false
volatile int ofx_WARNING_msg = false
volatile int ofx_ERROR_msg = false
volatile int ofx_show_position = true

Detailed Description

Message IO functionality.

Definition in file fx-0.9.4/lib/messages.cpp.


Function Documentation

int message_out ( OfxMsgType  error_type,
const string  message 
)

Message output function.

Prints a message to stdout, if the corresponding message OfxMsgType given in the parameters is enabled

Definition at line 58 of file fx-0.9.4/lib/messages.cpp.


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG1_msg = false

If set to true, debug level 1 messages will be printed to the console

Definition at line 30 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG2_msg = false

If set to true, debug level 2 messages will be printed to the console

Definition at line 31 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG3_msg = false

If set to true, debug level 3 messages will be printed to the console

Definition at line 32 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG4_msg = false

If set to true, debug level 4 messages will be printed to the console

Definition at line 33 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG5_msg = false

If set to true, debug level 5 messages will be printed to the console

Definition at line 34 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_DEBUG_msg = false

If set to true, general debug messages will be printed to the console

Definition at line 29 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_ERROR_msg = false

If set to true, error messages will be printed to the console

Definition at line 38 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_INFO_msg = false

If set to true, information messages will be printed to the console

Definition at line 36 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_PARSER_msg = false

If set to true, parser events will be printed to the console

Definition at line 28 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_show_position = true

If set to true, the line number will be shown after any error

Definition at line 39 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_STATUS_msg = false

If set to true, status messages will be printed to the console

Definition at line 35 of file fx-0.9.4/lib/messages.cpp.

volatile int ofx_WARNING_msg = false

If set to true, warning messages will be printed to the console

Definition at line 37 of file fx-0.9.4/lib/messages.cpp.

SGMLApplication::Position position

Global for determining the line number in OpenSP

Definition at line 26 of file fx-0.9.4/lib/messages.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofc__sgml_8hh_source.html0000644000175000017500000001220511553133250021063 00000000000000 LibOFX: ofc_sgml.hh Source File

ofc_sgml.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.h
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFC_SGML_H
00020 #define OFC_SGML_H
00021 #include "context.hh"
00022 
00024 int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]);
00025 
00026 #endif
libofx-0.9.4/doc/html/ofx__request__accountinfo_8hh.html0000644000175000017500000000715611553133250020337 00000000000000 LibOFX: ofx_request_accountinfo.hh File Reference

ofx_request_accountinfo.hh File Reference

Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user. More...

Go to the source code of this file.

Data Structures

class  OfxAccountInfoRequest
 An account information request. More...

Detailed Description

Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user.

Definition in file ofx_request_accountinfo.hh.

libofx-0.9.4/doc/html/file__preproc_8hh_source.html0000644000175000017500000001200311553133250017260 00000000000000 LibOFX: file_preproc.hh Source File

file_preproc.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           file_preproc.hh
00003                              -------------------
00004     copyright            : (C) 2004 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #ifndef FILE_PREPROC_H
00021 #define FILE_PREPROC_H
00022 
00029 enum LibofxFileFormat libofx_detect_file_type(const char * p_filename);
00030 
00031 #endif
libofx-0.9.4/doc/html/tab_h.png0000644000175000017500000000030011553133250013213 00000000000000‰PNG  IHDR$ÇÇ[‡IDATxíÝÛ ‚`€áÿ¥ºˆFŠ¢‚hšYÒ ÿÌ26@c´HwÍñì!ïÏ—K1ê^‰©HtO’÷ÄyG˜µD׎ k9¦ç?iðâ7zá„vPaŸž˜þãÏðJŒ}ÉÆ)غwV»‚õ®`ai–Ö¥¥™›Z‰ˆšŒP³éøC"àèP=€IEND®B`‚libofx-0.9.4/doc/html/classLibofxContext.html0000644000175000017500000003724111553133250016152 00000000000000 LibOFX: LibofxContext Class Reference

LibofxContext Class Reference

Public Member Functions

LibofxFileFormat currentFileType () const
void setCurrentFileType (LibofxFileFormat t)
const std::string & dtdDir () const
void setDtdDir (const std::string &s)
int statementCallback (const struct OfxStatementData data)
int accountCallback (const struct OfxAccountData data)
int transactionCallback (const struct OfxTransactionData data)
int securityCallback (const struct OfxSecurityData data)
int statusCallback (const struct OfxStatusData data)
void setStatusCallback (LibofxProcStatusCallback cb, void *user_data)
void setAccountCallback (LibofxProcAccountCallback cb, void *user_data)
void setSecurityCallback (LibofxProcSecurityCallback cb, void *user_data)
void setTransactionCallback (LibofxProcTransactionCallback cb, void *user_data)
void setStatementCallback (LibofxProcStatementCallback cb, void *user_data)
LibofxFileFormat currentFileType () const
void setCurrentFileType (LibofxFileFormat t)
const std::string & dtdDir () const
void setDtdDir (const std::string &s)
int statementCallback (const struct OfxStatementData data)
int accountCallback (const struct OfxAccountData data)
int transactionCallback (const struct OfxTransactionData data)
int securityCallback (const struct OfxSecurityData data)
int statusCallback (const struct OfxStatusData data)
void setStatusCallback (LibofxProcStatusCallback cb, void *user_data)
void setAccountCallback (LibofxProcAccountCallback cb, void *user_data)
void setSecurityCallback (LibofxProcSecurityCallback cb, void *user_data)
void setTransactionCallback (LibofxProcTransactionCallback cb, void *user_data)
void setStatementCallback (LibofxProcStatementCallback cb, void *user_data)

Detailed Description

Definition at line 25 of file context.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ftv2plastnode.png0000644000175000017500000000032711553133251014743 00000000000000‰PNG  IHDRɪ|žIDATxí! BQE"¸ ‚u¢Ý"îÀ0M°'˜èfuÚ^µ·azZƒòùï%áß6áî\fz/¥D‰úEîÀàsk`c*ç,À+Ó8°5•º-à­%0w¦rÈ }ð¸Ö¦rÍ-q \‚ÇE.àÌLåØv…ÐØÁ¯0i2Kp/ºSwßø€'RG'TÖáIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__generic_8cpp_source.html0000644000175000017500000003065511553133250024157 00000000000000 LibOFX: ofx_container_generic.cpp Source File

ofx_container_generic.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_generic.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #endif
00022 
00023 #include <string>
00024 #include "ParserEventGeneratorKit.h"
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 
00029 extern OfxMainContainer * MainContainer;
00030 
00031 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context)
00032 {
00033   parentcontainer = NULL;
00034   type = "";
00035   tag_identifier = "";
00036   libofx_context = p_libofx_context;
00037 }
00038 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer)
00039 {
00040   libofx_context = p_libofx_context;
00041   parentcontainer = para_parentcontainer;
00042   if (parentcontainer != NULL && parentcontainer->type == "DUMMY")
00043   {
00044     message_out(DEBUG, "OfxGenericContainer(): The parent is a DummyContainer!");
00045   }
00046 }
00047 OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
00048 {
00049   libofx_context = p_libofx_context;
00050   parentcontainer = para_parentcontainer;
00051   tag_identifier = para_tag_identifier;
00052   if (parentcontainer != NULL && parentcontainer->type == "DUMMY")
00053   {
00054     message_out(DEBUG, "OfxGenericContainer(): The parent for this " + tag_identifier + " is a DummyContainer!");
00055   }
00056 }
00057 void OfxGenericContainer::add_attribute(const string identifier, const string value)
00058 {
00059   /*If an attribute has made it all the way up to the Generic Container's add_attribute,
00060     we don't know what to do with it! */
00061   message_out(ERROR, "WRITEME: " + identifier + " (" + value + ") is not supported by the " + type + " container");
00062 }
00063 OfxGenericContainer* OfxGenericContainer::getparent()
00064 {
00065   return parentcontainer;
00066 }
00067 
00068 int  OfxGenericContainer::gen_event()
00069 {
00070   /* No callback is ever generated for pure virtual containers */
00071   return false;
00072 }
00073 
00074 int  OfxGenericContainer::add_to_main_tree()
00075 {
00076   if (MainContainer != NULL)
00077   {
00078     return MainContainer->add_container(this);
00079   }
00080   else
00081   {
00082     return false;
00083   }
00084 }
00085 
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__utilities_8hh.html0000644000175000017500000004017211553133250020605 00000000000000 LibOFX: ofx_utilities.hh File Reference

ofx_utilities.hh File Reference

Various simple functions for type conversion & al. More...

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, SGMLApplication::CharString s)
 Convert OpenSP CharString to a C++ stream.
wchar_t * CharStringtowchar_t (SGMLApplication::CharString source, wchar_t *dest)
 Convert OpenSP CharString and put it in the C wchar_t string provided.
string CharStringtostring (const SGMLApplication::CharString source, string &dest)
 Convert OpenSP CharString to a C++ STL string.
string AppendCharStringtostring (const SGMLApplication::CharString source, string &dest)
 Append an OpenSP CharString to an existing C++ STL string.
time_t ofxdate_to_time_t (const string ofxdate)
 Convert a C++ string containing a time in OFX format to a C time_t.
double ofxamount_to_double (const string ofxamount)
 Convert OFX amount of money to double float.
string strip_whitespace (const string para_string)
 Sanitize a string coming from OpenSP.
int mkTempFileName (const char *tmpl, char *buffer, unsigned int size)

Detailed Description

Various simple functions for type conversion & al.

Definition in file fx-0.9.4/lib/ofx_utilities.hh.


Function Documentation

string CharStringtostring ( const SGMLApplication::CharString  source,
string &  dest 
)

Convert OpenSP CharString to a C++ STL string.

Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging.

Definition at line 70 of file ofx_utilities.cpp.

Referenced by OFXApplication::endElement(), OFCApplication::endElement(), OFXApplication::error(), OFCApplication::error(), OFXApplication::startElement(), and OFCApplication::startElement().

double ofxamount_to_double ( const string  ofxamount)

Convert OFX amount of money to double float.

Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float.

Note:
The ofx number format is the following: "." or "," as decimal separator, NO thousands separator.

Definition at line 204 of file ofx_utilities.cpp.

Referenced by OfxBalanceContainer::add_attribute(), OfxInvestmentTransactionContainer::add_attribute(), OfxBankTransactionContainer::add_attribute(), and OfxSecurityContainer::add_attribute().

time_t ofxdate_to_time_t ( const string  ofxdate)

Convert a C++ string containing a time in OFX format to a C time_t.

Converts a date from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format (see OFX 2.01 spec p.66) to a C time_t.

Parameters:
ofxdatedate from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format
Returns:
C time_t in the local time zone
Note:
  • The library always returns the time in the systems local time
  • OFX defines the date up to the millisecond. The library ignores those milliseconds, since ANSI C does not handle such precision cleanly. The date provided by LibOFX is precise to the second, assuming that information this precise was provided in the ofx file. So you wont know the millisecond you were ruined...
DEVIATION FROM THE SPECS : The OFX specifications (both version 1.6 and 2.02) state that a client should assume that if the server returns a date without � specific time, we assume it means 0h00 GMT. As such, when we apply the local timezone and for example you are in the EST timezone, we will remove 5h, and the transaction will have occurred on the prior day! This is probably not what the bank intended (and will lead to systematic errors), but the spec is quite explicit in this respect (Ref: OFX 2.01 spec pp. 66-68)

To solve this problem (since usually a time error is relatively unimportant, but date error is), and to avoid problems in Australia caused by the behaviour in libofx up to 0.6.4, it was decided starting with 0.6.5 to use the following behavior:

-No specific time is given in the file (date only): Considering that most banks seem to be sending dates in this format represented as local time (not compliant with the specs), the transaction is assumed to have occurred 11h59 (just before noon) LOCAL TIME. This way, we should never change the date, since you'd have to travel in a timezone at least 11 hours backwards or 13 hours forward from your own to introduce mistakes. However, if you are in timezone +13 or +14, and your bank meant the data to be interpreted by the spec, you will get the wrong date. We hope that banks in those timezone will either represent in local time like most, or specify the timezone properly.

-No timezone is specified, but exact time is, the same behavior is mostly used, as many banks just append zeros instead of using the short notation. However, the time specified is used, even if 0 (midnight).

-When a timezone is specified, it is always used to properly convert in local time, following the spec.

Definition at line 108 of file ofx_utilities.cpp.

Referenced by OfxBalanceContainer::add_attribute(), OfxInvestmentTransactionContainer::add_attribute(), OfxTransactionContainer::add_attribute(), OfxStatementContainer::add_attribute(), and OfxSecurityContainer::add_attribute().

string strip_whitespace ( const string  para_string)

Sanitize a string coming from OpenSP.

Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching.

Definition at line 227 of file ofx_utilities.cpp.

Referenced by OFXApplication::endElement(), and OFCApplication::endElement().

libofx-0.9.4/doc/html/classOfxAggregate.png0000644000175000017500000000602511553133250015541 00000000000000‰PNG  IHDR^ L™@PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2 ¤IDATxíÝÑv«*Ðn;Fÿÿ“Ï  ¶5=Ñ™kÜ“$Þ:³À×û&n–SÉêåÏõõR/Q/Q/y“zEDš•ßþЃóÕëÝê奞A½ÔëÇ ñ‘;•ª6ohQ½}ÄÇGÞëæ3e¨ìê¥^;õ*;XÙÈÊÇ4¹eÕ¬Õ§ã[¥¼k½R6û~H½ÔëñzEzÔíÕ+ª?æ½ìÈÓQ½<óØ·ÏËj[G½ÔkgFÕ–hê5oN›‡cµ‰y8ª×·SòSm§^‘>”·<=?EóÃñ#RÓ<Õëýêuøéù„k«—zµßÞð{ª—zýòà¬ÞvΨ—zùsD½D½ÔKÔKÔKº¯×Íâ‘|!õ’.Ûõ¥_¢^Òg»ôKÔKú,Q/Q/õõõQ/Q/Q/õz·QÚØ#˜¡b†J˜¡b†Š*a†Š*f¨„*f¨˜ *f¨˜¡b&¨˜=Ï'åëI×a6”Ùçt«ôQ/f¨˜¡R/õBÅ ³®©""òA5RŽþê»ÖëÝÍŽSEyYî{R/fÿG•ï6¦ˆ(F‹^Zy°+‡oW/fS‹|´™©šYoº{1û#Õy±¥÷ZgCõ¾GfÿGµì鱡*Œe’z½¡ÙÓ6úY®Y‚íÇw3;L5»TF5UÆ‹üÚ‚¾i½˜§šòνC5•3ªË/oX¯·7{€ê‘çÁ_3Z½ÞÝ 3TÌÔë yËz l†Š*fê¥^ÌP1»êfé¢^Ì®Î×Ü#3TÌF”úbÅ ³>¥X1CŬO,ÌP1CÅLP1CÅ 3AÅ 3T 3TÌP 3TÌP1C%ÌP1CÅ •0CÅ 3AÅ 3TÌ3TÌP ³—R}Þ,Ì^hvÕt«ôQ¯QÍP1S/õR/õb†ŠÙõŠˆÈË_^þœhæ.—ˆù²¿_ ¿zfvU”—úÆâ°UCµ¶>r‘ë5œÙiTù/)"û$¶²8ÓPý–ÿÅ‘†šõ¬4µ|7_´+‡]Õk<³ó©‚Í¿ý·t˜ÿ›êYí—òOÑŽu¹{gvÕ”—H»÷Wo{p»Ì«u[–w;{€z`v1UuŸ¥Zöô¼L+ªrùêÿѽz6ûz~¾ßèç%òŸT«K4+±ý…Ω³—¯Äùžªûk¨vq£š¿ôÝW;Û½Æ3;jÊ»îÕTN­ÞjƒæÃ2kùš/åÕ8•GK_õÎìDªË²ìï;é«^£™¡b¦^ê¥^¯¢ú1êõJ3TÌÔK½ÔK½˜¡bÖu½n–.ê5ªÙó©Æ3TÌP1C%ÌP1CÅ •0CÅ 3T 3TÌ3TÌP1TÌP1CÅ *f¨˜¡f¨˜¡b†J˜¡b†Š*a†Š*f‚Š*f¨˜ÉuTŸ7 ³š@5Ý*}ÔkT3TÌÔK½ÔK½˜¡b6D½""òÁò—W‡?'š¹Ë%b¾ìïè¯^£™G奾±8lÕP­­\¤Çz gvUþKcŠÈ>‰­,Î4T¿å1E¤¡æC=+M-ßÍmÇÊaWõÏì|ª…`óoÿ-æÿæ£zVû¥üS´c]î^ã™]D5å%ÒîýÕÛÜ.sÄjÝ–åÝΠ^#˜]LUÝç_©–==/ÓŠª\¾úô_¯žÍ¾žŸï7úy‰ü'ÕêÍJl¡sêÅìå+q¾§êþª]œÇ¨æ/}÷ÕÎv¯ñÌΣšò®»G5•S«·Ú ù°ÌZ~æKy5ÎcåÑÒW½†3;‘ê²,ûûNúª×hf¨˜©—z©×«¨~Œz½Ò 3õR/õR/f¨˜u]¯›¥‹zjö|ªñà 3TÌP 3TÌP1C%ÌP1CÅ •0CÅ 3AÅ 3TÌ3TÌP1C€Š*f¨„*f¨˜¡f¨˜¡b†J˜¡b†Š™ b†Š*frÕçÍÂì…f'PM·JõÕ 3õR/õR/f¨˜ V¯ˆˆ|P”ã_ÌßLêµ^c˜]Aåe¹yè(ÕÑù£Ôk³ ¨ò_SD”{^ô¢FO§òp¤U¸ž?Eä‹´cå°ûzbv%Õ"2ßú2’¶ódP}þv~ö[_uÝk³Ë©¦´ÆbY3;w»EÈó››Yã<G1{Õ|2–åVQÍí]{b^¯™±¹ð€õêÐìëù9¼Ñ/+«YVËéýÃÎWÚ5}z½˜Ýh%Î÷YÝóª-íjëϯ»È½ï^£˜]A•wó=ª)Ò-×yC¯xóüåÄÕŽå—ê5ˆÙ%T²YAÏúF¯õÃì&TK©Wf÷ úƒÔÛ׫ ³»lô§eà‡cf¨˜©—z©—z1CŬëzÝ,]ÔkT³çSf¨˜¡b†J˜¡b†Š*a†Š*f¨„*f¨˜ *f¨˜¡b&¨˜¡b†ŠTÌP1C%ÌP1CÅ •0CÅ 3T 3TÌ3TÌP1“ë¨>of/4;jºUú¨×¨f¨˜©—z©—z1CÅl°zEDäƒj¤ÿšx`þfR¯õÃì ª(/Ë}ÌCG©ŽÎ¥^ƒ˜]@•ÿú˜"¢Üó¢Å0òx:•‡#­Âõü)"_¤+‡Ý×k³+©‘ùÖ—‘´'ƒêó·ó³ßúªƒì^£˜]N5¥5ËšÙ¹Û-BžßœØÌçá8ŠÙ«¨æ“±,·ŠjníÚóz͌ͅ¬W‡f_ÏÏá~YYͲZNï?v¾Ò®éÓëÅìF+q¾ÏêžPmiW[~ÝEî}÷Åì ª¼›ïQM‘n¹¶ÈzÅ›ç/'¨v,¿ P¯AÌ.¡:Í zÖ7z­×f7¡z\J½z0»Õ¤Þ¾^]˜Ýe£?-?;0CÅL½ÔK½Ô‹*f]×ëfé¢^£š=Ÿjü0CÅ 3T 3TÌP 3TÌP1C%ÌP1CÅLP1CÅ 3AÅ 3TÌ b†Š*a†Š*f¨„*f¨˜¡f¨˜¡b&¨˜¡b†Š™\Gõy³0{¡Ù TÓ­ÒG½F5CÅL½ÔK½Ô‹*f#Õ+""¬†æÏÕÑ7‰ô¥_çm/Öe½†1;*ÊË &¦:4qˆzcv6Uþ»cŠˆr·e,Òúª_ÒÙ4¯|Îçó´ #ò¥Ú±rØq½2»ŒªÜUº±í`9ŠdP}®&¬¾2S5—é~÷ÈìZª‚”Þ›së»Ý"DY›Õ‰Í¬Ž™½ˆªZ”e­-G«Ï­]{b^¯™±ú†«Wf_Ïϯ}µe¯·Ûõî·–Íl'œX/fwY‰óVwû-ÕÏý–<òëæË}ï^™N•·òön—m9"¦˜§yמUê T;V?Lz­×8fçS˜vÍí§Ëz c†Š™z©—z]Nu$êõJ3TÌÔK½ÔK½˜¡bÖu½n–.ê5ªÙó©Æ3TÌP1C%ÌP1CÅ •0CÅ 3T 3TÌ3TÌP1TÌP1CÅ *f¨˜¡f¨˜¡b†J˜¡b†Š*a†Š*f‚Š*f¨˜ÉuTŸ7 ³š@5Ý*}ÔkT3TÌÔK½ÔK½˜¡b6R½""òÁjhþ\}“H_úuÞöb]Ök³Ó©¢¼¬`âaªC‡¨×8fgSå¿;¦ˆ(w[Æ"­¯ú%MóÊç|n1O 2"_ª+‡×k ³Ë¨Ê]¥Û–£HÕçjÂê+3Us™îw¯Ì®¥*Hé½9·¾Û-B”µYØÌáá8Ù‹¨ªEYÖÚr´úÜÚµ'æõš«_`¸zõhöõüüºÑW[öjp»]ï~k9Ñ,Áv‰õböº´+q¾Ãên¿¥úy£ß’G~Ý|¹*fÿM•·òön—m9"¦˜§yמUê T;V?Lz­³ãT'¦]sûé²^ÌP1C¥^êufÔk,3TÌP1S/õb†ŠÙ…T7KõºYþ/ú­¹ÕÇ‚IEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2messages_8hh_source.html0000644000175000017500000002060111553133250020741 00000000000000 LibOFX: messages.hh Source File

messages.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_messages.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #ifndef OFX_MESSAGES_H
00019 #define OFX_MESSAGES_H
00020 
00023 enum OfxMsgType
00024 {
00025   DEBUG,       
00026   DEBUG1,      
00027   DEBUG2,      
00028   DEBUG3,      
00029   DEBUG4,      
00030   DEBUG5,      
00031   STATUS = 10, 
00032   INFO,        
00033   WARNING,     
00034   ERROR,       
00035   PARSER       
00036 };
00037 using namespace std;
00039 int message_out(OfxMsgType type, const string message);
00040 
00041 #endif
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofc__sgml_8hh.html0000644000175000017500000001220211553133250017500 00000000000000 LibOFX: ofc_sgml.hh File Reference

ofc_sgml.hh File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Functions

int ofc_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Detailed Description

OFX/SGML parsing functionnality.

Definition in file fx-0.9.4/lib/ofc_sgml.hh.


Function Documentation

int ofc_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofc_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 352 of file ofc_sgml.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().

libofx-0.9.4/doc/html/functions.html0000644000175000017500000002624611553133250014347 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- a -

libofx-0.9.4/doc/html/win32_8cpp_source.html0000644000175000017500000001671611553133250015614 00000000000000 LibOFX: win32.cpp Source File

win32.cpp

00001 /***************************************************************************
00002  $RCSfile: win32.cpp,v $
00003  -------------------
00004  cvs         : $Id: win32.cpp,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $
00005  begin       : Sat Oct 27 2007
00006  copyright   : (C) 2007 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  * This file is part of the project "LibOfx".                              *
00011  * Please see toplevel file COPYING of that project for license details.   *
00012  ***************************************************************************/
00013 
00014 
00015 #include "win32.hh"
00016 
00017 #include <errno.h>
00018 #include <stdlib.h>
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <unistd.h>
00022 #include <sys/stat.h>
00023 #include <fcntl.h>
00024 #include <assert.h>
00025 
00026 
00027 
00028 #ifdef OS_WIN32
00029 
00030 int mkstemp(char *tmpl)
00031 {
00032   int fd = -1;
00033   int len;
00034   char *nf;
00035   int i;
00036 
00037   len = strlen(tmpl);
00038   if (len < 6)
00039   {
00040     /* bad template */
00041     errno = EINVAL;
00042     return -1;
00043   }
00044   if (strcasecmp(tmpl + (len - 7), "XXXXXX"))
00045   {
00046     /* bad template, last 6 chars must be "X" */
00047     errno = EINVAL;
00048     return -1;
00049   }
00050 
00051   nf = strdup(tmpl);
00052 
00053   for (i = 0; i < 10; i++)
00054   {
00055     int rnd;
00056     char numbuf[16];
00057 
00058     rnd = rand();
00059     snprintf(numbuf, sizeof(numbuf) - 1, "%06x", rnd);
00060     memmove(nf + (len - 7), numbuf, 6);
00061     fd = open(nf, O_RDWR | O_BINARY | O_CREAT, 0444);
00062     if (fd >= 0)
00063     {
00064       memmove(tmpl, nf, len);
00065       free(nf);
00066       return fd;
00067     }
00068   }
00069   free(nf);
00070   errno = EEXIST;
00071   return -1;
00072 }
00073 
00074 
00075 #endif
00076 
00077 
libofx-0.9.4/doc/html/structOfxAccountData.html0000644000175000017500000007006111553133250016441 00000000000000 LibOFX: OfxAccountData Struct Reference

OfxAccountData Struct Reference

An abstraction of an account. More...

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.
enum  AccountType {
  OFX_CHECKING, OFX_SAVINGS, OFX_MONEYMRKT, OFX_CREDITLINE,
  OFX_CMA, OFX_CREDITCARD, OFX_INVESTMENT, OFX_CHECKING,
  OFX_SAVINGS, OFX_MONEYMRKT, OFX_CREDITLINE, OFX_CMA,
  OFX_CREDITCARD, OFX_INVESTMENT
}
enum  AccountType {
  OFX_CHECKING, OFX_SAVINGS, OFX_MONEYMRKT, OFX_CREDITLINE,
  OFX_CMA, OFX_CREDITCARD, OFX_INVESTMENT, OFX_CHECKING,
  OFX_SAVINGS, OFX_MONEYMRKT, OFX_CREDITLINE, OFX_CMA,
  OFX_CREDITCARD, OFX_INVESTMENT
}
char account_id [OFX_ACCOUNT_ID_LENGTH]
char account_name [OFX_ACCOUNT_NAME_LENGTH]
int account_id_valid
enum OfxAccountData::AccountType account_type
int account_type_valid
char currency [OFX_CURRENCY_LENGTH]
int currency_valid
char account_number [OFX_ACCTID_LENGTH]
int account_number_valid
char bank_id [OFX_BANKID_LENGTH]
int bank_id_valid
char broker_id [OFX_BROKERID_LENGTH]
int broker_id_valid
char branch_id [OFX_BRANCHID_LENGTH]
int branch_id_valid

Detailed Description

An abstraction of an account.

The OfxAccountData structure gives information about a specific account, including it's type, currency and unique id.

When an OfxAccountData must be passed to functions which create OFX requests related to a specific account, it must contain all the info needed for an OFX request to identify an account. That is: account_type, account_number, bank_id and branch_id

Definition at line 263 of file inc/libofx.h.


Member Enumeration Documentation

account_type tells you what kind of account this is. See the AccountType enum

Enumerator:
OFX_CHECKING 

A standard checking account

OFX_SAVINGS 

A standard savings account

OFX_MONEYMRKT 

A money market account

OFX_CREDITLINE 

A line of credit

OFX_CMA 

Cash Management Account

OFX_CREDITCARD 

A credit card account

OFX_INVESTMENT 

An investment account

OFX_CHECKING 

A standard checking account

OFX_SAVINGS 

A standard savings account

OFX_MONEYMRKT 

A money market account

OFX_CREDITLINE 

A line of credit

OFX_CMA 

Cash Management Account

OFX_CREDITCARD 

A credit card account

OFX_INVESTMENT 

An investment account

Definition at line 289 of file inc/libofx.h.

account_type tells you what kind of account this is. See the AccountType enum

Enumerator:
OFX_CHECKING 

A standard checking account

OFX_SAVINGS 

A standard savings account

OFX_MONEYMRKT 

A money market account

OFX_CREDITLINE 

A line of credit

OFX_CMA 

Cash Management Account

OFX_CREDITCARD 

A credit card account

OFX_INVESTMENT 

An investment account

OFX_CHECKING 

A standard checking account

OFX_SAVINGS 

A standard savings account

OFX_MONEYMRKT 

A money market account

OFX_CREDITLINE 

A line of credit

OFX_CMA 

Cash Management Account

OFX_CREDITCARD 

A credit card account

OFX_INVESTMENT 

An investment account

Definition at line 289 of file libofx-0.9.4/inc/libofx.h.


Field Documentation

The account_id is actually built from <BANKID><BRANCHID><ACCTID> for a bank account, and <ACCTID><ACCTKEY> for a credit card account. account_id is meant to be computer-readable. It is a worldwide OFX unique identifier wich can be used for account matching, even in system with multiple users.

Definition at line 277 of file inc/libofx.h.

The account_id_name is a string meant to allow the user to identify the account. Currently it is <ACCTID> for a bank account and a credit card account an <BROKERID>:<ACCTID> for investment accounts. account_id_name is not meant to be computer-readable and is not garanteed to be unique.

Definition at line 284 of file inc/libofx.h.

The currency is a string in ISO-4217 format

Definition at line 302 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/globals_0x77.html0000644000175000017500000001054711553133251014545 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- w -

libofx-0.9.4/doc/html/structgengetopt__args__info.html0000644000175000017500000014740311553133250020124 00000000000000 LibOFX: gengetopt_args_info Struct Reference

gengetopt_args_info Struct Reference

Where the command line options are stored. More...

Data Fields

const char * help_help
 Print help and exit help description.
const char * version_help
 Print version and exit help description.
char * fipid_arg
 FI partner identifier (looks up fid, org & url from partner server).
char * fipid_orig
 FI partner identifier (looks up fid, org & url from partner server) original value given at command line.
const char * fipid_help
 FI partner identifier (looks up fid, org & url from partner server) help description.
char * fid_arg
 FI identifier.
char * fid_orig
 FI identifier original value given at command line.
const char * fid_help
 FI identifier help description.
char * org_arg
 FI org tag.
char * org_orig
 FI org tag original value given at command line.
const char * org_help
 FI org tag help description.
char * bank_arg
 IBAN bank identifier.
char * bank_orig
 IBAN bank identifier original value given at command line.
const char * bank_help
 IBAN bank identifier help description.
char * broker_arg
 Broker identifier.
char * broker_orig
 Broker identifier original value given at command line.
const char * broker_help
 Broker identifier help description.
char * user_arg
 User name.
char * user_orig
 User name original value given at command line.
const char * user_help
 User name help description.
char * pass_arg
 Password.
char * pass_orig
 Password original value given at command line.
const char * pass_help
 Password help description.
char * acct_arg
 Account ID.
char * acct_orig
 Account ID original value given at command line.
const char * acct_help
 Account ID help description.
int type_arg
 Account Type 1=checking 2=invest 3=ccard.
char * type_orig
 Account Type 1=checking 2=invest 3=ccard original value given at command line.
const char * type_help
 Account Type 1=checking 2=invest 3=ccard help description.
long past_arg
 How far back to look from today (in days).
char * past_orig
 How far back to look from today (in days) original value given at command line.
const char * past_help
 How far back to look from today (in days) help description.
char * url_arg
 Url to POST the data to (otherwise goes to stdout).
char * url_orig
 Url to POST the data to (otherwise goes to stdout) original value given at command line.
const char * url_help
 Url to POST the data to (otherwise goes to stdout) help description.
int trid_arg
 Transaction id.
char * trid_orig
 Transaction id original value given at command line.
const char * trid_help
 Transaction id help description.
const char * statement_req_help
 Request for a statement help description.
const char * accountinfo_req_help
 Request for a list of accounts help description.
const char * payment_req_help
 Request to make a payment help description.
const char * paymentinquiry_req_help
 Request to inquire about the status of a payment help description.
const char * bank_list_help
 List all known banks help description.
const char * bank_fipid_help
 List all fipids for a given bank help description.
const char * bank_services_help
 List supported services for a given fipid help description.
const char * allsupport_help
 List all banks which support online banking help description.
unsigned int help_given
 Whether help was given.
unsigned int version_given
 Whether version was given.
unsigned int fipid_given
 Whether fipid was given.
unsigned int fid_given
 Whether fid was given.
unsigned int org_given
 Whether org was given.
unsigned int bank_given
 Whether bank was given.
unsigned int broker_given
 Whether broker was given.
unsigned int user_given
 Whether user was given.
unsigned int pass_given
 Whether pass was given.
unsigned int acct_given
 Whether acct was given.
unsigned int type_given
 Whether type was given.
unsigned int past_given
 Whether past was given.
unsigned int url_given
 Whether url was given.
unsigned int trid_given
 Whether trid was given.
unsigned int statement_req_given
 Whether statement-req was given.
unsigned int accountinfo_req_given
 Whether accountinfo-req was given.
unsigned int payment_req_given
 Whether payment-req was given.
unsigned int paymentinquiry_req_given
 Whether paymentinquiry-req was given.
unsigned int bank_list_given
 Whether bank-list was given.
unsigned int bank_fipid_given
 Whether bank-fipid was given.
unsigned int bank_services_given
 Whether bank-services was given.
unsigned int allsupport_given
 Whether allsupport was given.
char ** inputs
 unamed options (options without names)
unsigned inputs_num
 unamed options number
int command_group_counter
 Counter for group command.
char * import_format_arg
 Force the file format of the file(s) specified (default='AUTODETECT').
char * import_format_orig
 Force the file format of the file(s) specified original value given at command line.
const char * import_format_help
 Force the file format of the file(s) specified help description.
const char * list_import_formats_help
 List available import file formats 'import-format' command help description.
int msg_parser_flag
 Output file parsing messages (default=off).
const char * msg_parser_help
 Output file parsing messages help description.
int msg_debug_flag
 Output messages meant for debuging (default=off).
const char * msg_debug_help
 Output messages meant for debuging help description.
int msg_warning_flag
 Output warning messages about abnormal conditions and unknown constructs (default=on).
const char * msg_warning_help
 Output warning messages about abnormal conditions and unknown constructs help description.
int msg_error_flag
 Output error messages (default=on).
const char * msg_error_help
 Output error messages help description.
int msg_info_flag
 Output informational messages about the progress of the library (default=on).
const char * msg_info_help
 Output informational messages about the progress of the library help description.
int msg_status_flag
 Output status messages (default=on).
const char * msg_status_help
 Output status messages help description.
unsigned int import_format_given
 Whether import-format was given.
unsigned int list_import_formats_given
 Whether list-import-formats was given.
unsigned int msg_parser_given
 Whether msg_parser was given.
unsigned int msg_debug_given
 Whether msg_debug was given.
unsigned int msg_warning_given
 Whether msg_warning was given.
unsigned int msg_error_given
 Whether msg_error was given.
unsigned int msg_info_given
 Whether msg_info was given.
unsigned int msg_status_given
 Whether msg_status was given.

Detailed Description

Where the command line options are stored.

Definition at line 42 of file ofxconnect/cmdline.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/ofxdump_2cmdline_8c_source.html0000644000175000017500000021261211553133250017542 00000000000000 LibOFX: cmdline.c Source File

cmdline.c

00001 /*
00002   File autogenerated by gengetopt version 2.22.4
00003   generated with the following command:
00004   gengetopt --unamed-opts 
00005 
00006   The developers of gengetopt consider the fixed text that goes in all
00007   gengetopt output files to be in the public domain:
00008   we make no copyright claims on it.
00009 */
00010 
00011 /* If we use autoconf.  */
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include <string.h>
00019 
00020 #ifndef FIX_UNUSED
00021 #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
00022 #endif
00023 
00024 #include <getopt.h>
00025 
00026 #include "cmdline.h"
00027 
00028 const char *gengetopt_args_info_purpose = "ofxdump prints to stdout, in human readable form, everything the library \n understands about a particular file or response, and sends errors to \n stderr.  To know exactly what the library understands about of a particular\n ofx response file, just call ofxdump on that file.";
00029 
00030 const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]... [FILES]...";
00031 
00032 const char *gengetopt_args_info_description = "";
00033 
00034 const char *gengetopt_args_info_help[] = {
00035   "  -h, --help                  Print help and exit",
00036   "  -V, --version               Print version and exit",
00037   "  -f, --import-format=STRING  Force the file format of the file(s) specified  \n                                (default=`AUTODETECT')",
00038   "      --list-import-formats   List available import file formats \n                                'import-format' command",
00039   "      --msg_parser            Output file parsing messages  (default=off)",
00040   "      --msg_debug             Output messages meant for debuging  (default=off)",
00041   "      --msg_warning           Output warning messages about abnormal conditions \n                                and unknown constructs  (default=on)",
00042   "      --msg_error             Output error messages  (default=on)",
00043   "      --msg_info              Output informational messages about the progress \n                                of the library  (default=on)",
00044   "      --msg_status            Output status messages  (default=on)",
00045     0
00046 };
00047 
00048 typedef enum {ARG_NO
00049   , ARG_FLAG
00050   , ARG_STRING
00051 } cmdline_parser_arg_type;
00052 
00053 static
00054 void clear_given (struct gengetopt_args_info *args_info);
00055 static
00056 void clear_args (struct gengetopt_args_info *args_info);
00057 
00058 static int
00059 cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
00060                         struct cmdline_parser_params *params, const char *additional_error);
00061 
00062 
00063 static char *
00064 gengetopt_strdup (const char *s);
00065 
00066 static
00067 void clear_given (struct gengetopt_args_info *args_info)
00068 {
00069   args_info->help_given = 0 ;
00070   args_info->version_given = 0 ;
00071   args_info->import_format_given = 0 ;
00072   args_info->list_import_formats_given = 0 ;
00073   args_info->msg_parser_given = 0 ;
00074   args_info->msg_debug_given = 0 ;
00075   args_info->msg_warning_given = 0 ;
00076   args_info->msg_error_given = 0 ;
00077   args_info->msg_info_given = 0 ;
00078   args_info->msg_status_given = 0 ;
00079 }
00080 
00081 static
00082 void clear_args (struct gengetopt_args_info *args_info)
00083 {
00084   FIX_UNUSED (args_info);
00085   args_info->import_format_arg = gengetopt_strdup ("AUTODETECT");
00086   args_info->import_format_orig = NULL;
00087   args_info->msg_parser_flag = 0;
00088   args_info->msg_debug_flag = 0;
00089   args_info->msg_warning_flag = 1;
00090   args_info->msg_error_flag = 1;
00091   args_info->msg_info_flag = 1;
00092   args_info->msg_status_flag = 1;
00093   
00094 }
00095 
00096 static
00097 void init_args_info(struct gengetopt_args_info *args_info)
00098 {
00099 
00100 
00101   args_info->help_help = gengetopt_args_info_help[0] ;
00102   args_info->version_help = gengetopt_args_info_help[1] ;
00103   args_info->import_format_help = gengetopt_args_info_help[2] ;
00104   args_info->list_import_formats_help = gengetopt_args_info_help[3] ;
00105   args_info->msg_parser_help = gengetopt_args_info_help[4] ;
00106   args_info->msg_debug_help = gengetopt_args_info_help[5] ;
00107   args_info->msg_warning_help = gengetopt_args_info_help[6] ;
00108   args_info->msg_error_help = gengetopt_args_info_help[7] ;
00109   args_info->msg_info_help = gengetopt_args_info_help[8] ;
00110   args_info->msg_status_help = gengetopt_args_info_help[9] ;
00111   
00112 }
00113 
00114 void
00115 cmdline_parser_print_version (void)
00116 {
00117   printf ("%s %s\n",
00118      (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
00119      CMDLINE_PARSER_VERSION);
00120 }
00121 
00122 static void print_help_common(void) {
00123   cmdline_parser_print_version ();
00124 
00125   if (strlen(gengetopt_args_info_purpose) > 0)
00126     printf("\n%s\n", gengetopt_args_info_purpose);
00127 
00128   if (strlen(gengetopt_args_info_usage) > 0)
00129     printf("\n%s\n", gengetopt_args_info_usage);
00130 
00131   printf("\n");
00132 
00133   if (strlen(gengetopt_args_info_description) > 0)
00134     printf("%s\n\n", gengetopt_args_info_description);
00135 }
00136 
00137 void
00138 cmdline_parser_print_help (void)
00139 {
00140   int i = 0;
00141   print_help_common();
00142   while (gengetopt_args_info_help[i])
00143     printf("%s\n", gengetopt_args_info_help[i++]);
00144 }
00145 
00146 void
00147 cmdline_parser_init (struct gengetopt_args_info *args_info)
00148 {
00149   clear_given (args_info);
00150   clear_args (args_info);
00151   init_args_info (args_info);
00152 
00153   args_info->inputs = 0;
00154   args_info->inputs_num = 0;
00155 }
00156 
00157 void
00158 cmdline_parser_params_init(struct cmdline_parser_params *params)
00159 {
00160   if (params)
00161     { 
00162       params->override = 0;
00163       params->initialize = 1;
00164       params->check_required = 1;
00165       params->check_ambiguity = 0;
00166       params->print_errors = 1;
00167     }
00168 }
00169 
00170 struct cmdline_parser_params *
00171 cmdline_parser_params_create(void)
00172 {
00173   struct cmdline_parser_params *params = 
00174     (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params));
00175   cmdline_parser_params_init(params);  
00176   return params;
00177 }
00178 
00179 static void
00180 free_string_field (char **s)
00181 {
00182   if (*s)
00183     {
00184       free (*s);
00185       *s = 0;
00186     }
00187 }
00188 
00189 
00190 static void
00191 cmdline_parser_release (struct gengetopt_args_info *args_info)
00192 {
00193   unsigned int i;
00194   free_string_field (&(args_info->import_format_arg));
00195   free_string_field (&(args_info->import_format_orig));
00196   
00197   
00198   for (i = 0; i < args_info->inputs_num; ++i)
00199     free (args_info->inputs [i]);
00200 
00201   if (args_info->inputs_num)
00202     free (args_info->inputs);
00203 
00204   clear_given (args_info);
00205 }
00206 
00207 
00208 static void
00209 write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
00210 {
00211   FIX_UNUSED (values);
00212   if (arg) {
00213     fprintf(outfile, "%s=\"%s\"\n", opt, arg);
00214   } else {
00215     fprintf(outfile, "%s\n", opt);
00216   }
00217 }
00218 
00219 
00220 int
00221 cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
00222 {
00223   int i = 0;
00224 
00225   if (!outfile)
00226     {
00227       fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
00228       return EXIT_FAILURE;
00229     }
00230 
00231   if (args_info->help_given)
00232     write_into_file(outfile, "help", 0, 0 );
00233   if (args_info->version_given)
00234     write_into_file(outfile, "version", 0, 0 );
00235   if (args_info->import_format_given)
00236     write_into_file(outfile, "import-format", args_info->import_format_orig, 0);
00237   if (args_info->list_import_formats_given)
00238     write_into_file(outfile, "list-import-formats", 0, 0 );
00239   if (args_info->msg_parser_given)
00240     write_into_file(outfile, "msg_parser", 0, 0 );
00241   if (args_info->msg_debug_given)
00242     write_into_file(outfile, "msg_debug", 0, 0 );
00243   if (args_info->msg_warning_given)
00244     write_into_file(outfile, "msg_warning", 0, 0 );
00245   if (args_info->msg_error_given)
00246     write_into_file(outfile, "msg_error", 0, 0 );
00247   if (args_info->msg_info_given)
00248     write_into_file(outfile, "msg_info", 0, 0 );
00249   if (args_info->msg_status_given)
00250     write_into_file(outfile, "msg_status", 0, 0 );
00251   
00252 
00253   i = EXIT_SUCCESS;
00254   return i;
00255 }
00256 
00257 int
00258 cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
00259 {
00260   FILE *outfile;
00261   int i = 0;
00262 
00263   outfile = fopen(filename, "w");
00264 
00265   if (!outfile)
00266     {
00267       fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename);
00268       return EXIT_FAILURE;
00269     }
00270 
00271   i = cmdline_parser_dump(outfile, args_info);
00272   fclose (outfile);
00273 
00274   return i;
00275 }
00276 
00277 void
00278 cmdline_parser_free (struct gengetopt_args_info *args_info)
00279 {
00280   cmdline_parser_release (args_info);
00281 }
00282 
00284 char *
00285 gengetopt_strdup (const char *s)
00286 {
00287   char *result = 0;
00288   if (!s)
00289     return result;
00290 
00291   result = (char*)malloc(strlen(s) + 1);
00292   if (result == (char*)0)
00293     return (char*)0;
00294   strcpy(result, s);
00295   return result;
00296 }
00297 
00298 int
00299 cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
00300 {
00301   return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
00302 }
00303 
00304 int
00305 cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
00306                    struct cmdline_parser_params *params)
00307 {
00308   int result;
00309   result = cmdline_parser_internal (argc, argv, args_info, params, 0);
00310 
00311   if (result == EXIT_FAILURE)
00312     {
00313       cmdline_parser_free (args_info);
00314       exit (EXIT_FAILURE);
00315     }
00316   
00317   return result;
00318 }
00319 
00320 int
00321 cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
00322 {
00323   int result;
00324   struct cmdline_parser_params params;
00325   
00326   params.override = override;
00327   params.initialize = initialize;
00328   params.check_required = check_required;
00329   params.check_ambiguity = 0;
00330   params.print_errors = 1;
00331 
00332   result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
00333 
00334   if (result == EXIT_FAILURE)
00335     {
00336       cmdline_parser_free (args_info);
00337       exit (EXIT_FAILURE);
00338     }
00339   
00340   return result;
00341 }
00342 
00343 int
00344 cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name)
00345 {
00346   FIX_UNUSED (args_info);
00347   FIX_UNUSED (prog_name);
00348   return EXIT_SUCCESS;
00349 }
00350 
00351 
00352 static char *package_name = 0;
00353 
00372 static
00373 int update_arg(void *field, char **orig_field,
00374                unsigned int *field_given, unsigned int *prev_given, 
00375                char *value, const char *possible_values[],
00376                const char *default_value,
00377                cmdline_parser_arg_type arg_type,
00378                int check_ambiguity, int override,
00379                int no_free, int multiple_option,
00380                const char *long_opt, char short_opt,
00381                const char *additional_error)
00382 {
00383   char *stop_char = 0;
00384   const char *val = value;
00385   int found;
00386   char **string_field;
00387   FIX_UNUSED (field);
00388 
00389   stop_char = 0;
00390   found = 0;
00391 
00392   if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
00393     {
00394       if (short_opt != '-')
00395         fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n", 
00396                package_name, long_opt, short_opt,
00397                (additional_error ? additional_error : ""));
00398       else
00399         fprintf (stderr, "%s: `--%s' option given more than once%s\n", 
00400                package_name, long_opt,
00401                (additional_error ? additional_error : ""));
00402       return 1; /* failure */
00403     }
00404 
00405   FIX_UNUSED (default_value);
00406     
00407   if (field_given && *field_given && ! override)
00408     return 0;
00409   if (prev_given)
00410     (*prev_given)++;
00411   if (field_given)
00412     (*field_given)++;
00413   if (possible_values)
00414     val = possible_values[found];
00415 
00416   switch(arg_type) {
00417   case ARG_FLAG:
00418     *((int *)field) = !*((int *)field);
00419     break;
00420   case ARG_STRING:
00421     if (val) {
00422       string_field = (char **)field;
00423       if (!no_free && *string_field)
00424         free (*string_field); /* free previous string */
00425       *string_field = gengetopt_strdup (val);
00426     }
00427     break;
00428   default:
00429     break;
00430   };
00431 
00432 
00433   /* store the original value */
00434   switch(arg_type) {
00435   case ARG_NO:
00436   case ARG_FLAG:
00437     break;
00438   default:
00439     if (value && orig_field) {
00440       if (no_free) {
00441         *orig_field = value;
00442       } else {
00443         if (*orig_field)
00444           free (*orig_field); /* free previous string */
00445         *orig_field = gengetopt_strdup (value);
00446       }
00447     }
00448   };
00449 
00450   return 0; /* OK */
00451 }
00452 
00453 
00454 int
00455 cmdline_parser_internal (
00456   int argc, char **argv, struct gengetopt_args_info *args_info,
00457                         struct cmdline_parser_params *params, const char *additional_error)
00458 {
00459   int c;        /* Character of the parsed option.  */
00460 
00461   int error = 0;
00462   struct gengetopt_args_info local_args_info;
00463   
00464   int override;
00465   int initialize;
00466   int check_required;
00467   int check_ambiguity;
00468   
00469   package_name = argv[0];
00470   
00471   override = params->override;
00472   initialize = params->initialize;
00473   check_required = params->check_required;
00474   check_ambiguity = params->check_ambiguity;
00475 
00476   if (initialize)
00477     cmdline_parser_init (args_info);
00478 
00479   cmdline_parser_init (&local_args_info);
00480 
00481   optarg = 0;
00482   optind = 0;
00483   opterr = params->print_errors;
00484   optopt = '?';
00485 
00486   while (1)
00487     {
00488       int option_index = 0;
00489 
00490       static struct option long_options[] = {
00491         { "help",       0, NULL, 'h' },
00492         { "version",    0, NULL, 'V' },
00493         { "import-format",      1, NULL, 'f' },
00494         { "list-import-formats",        0, NULL, 0 },
00495         { "msg_parser", 0, NULL, 0 },
00496         { "msg_debug",  0, NULL, 0 },
00497         { "msg_warning",        0, NULL, 0 },
00498         { "msg_error",  0, NULL, 0 },
00499         { "msg_info",   0, NULL, 0 },
00500         { "msg_status", 0, NULL, 0 },
00501         { 0,  0, 0, 0 }
00502       };
00503 
00504       c = getopt_long (argc, argv, "hVf:", long_options, &option_index);
00505 
00506       if (c == -1) break;       /* Exit from `while (1)' loop.  */
00507 
00508       switch (c)
00509         {
00510         case 'h':       /* Print help and exit.  */
00511           cmdline_parser_print_help ();
00512           cmdline_parser_free (&local_args_info);
00513           exit (EXIT_SUCCESS);
00514 
00515         case 'V':       /* Print version and exit.  */
00516           cmdline_parser_print_version ();
00517           cmdline_parser_free (&local_args_info);
00518           exit (EXIT_SUCCESS);
00519 
00520         case 'f':       /* Force the file format of the file(s) specified.  */
00521         
00522         
00523           if (update_arg( (void *)&(args_info->import_format_arg), 
00524                &(args_info->import_format_orig), &(args_info->import_format_given),
00525               &(local_args_info.import_format_given), optarg, 0, "AUTODETECT", ARG_STRING,
00526               check_ambiguity, override, 0, 0,
00527               "import-format", 'f',
00528               additional_error))
00529             goto failure;
00530         
00531           break;
00532 
00533         case 0: /* Long option with no short option */
00534           /* List available import file formats 'import-format' command.  */
00535           if (strcmp (long_options[option_index].name, "list-import-formats") == 0)
00536           {
00537           
00538           
00539             if (update_arg( 0 , 
00540                  0 , &(args_info->list_import_formats_given),
00541                 &(local_args_info.list_import_formats_given), optarg, 0, 0, ARG_NO,
00542                 check_ambiguity, override, 0, 0,
00543                 "list-import-formats", '-',
00544                 additional_error))
00545               goto failure;
00546           
00547           }
00548           /* Output file parsing messages.  */
00549           else if (strcmp (long_options[option_index].name, "msg_parser") == 0)
00550           {
00551           
00552           
00553             if (update_arg((void *)&(args_info->msg_parser_flag), 0, &(args_info->msg_parser_given),
00554                 &(local_args_info.msg_parser_given), optarg, 0, 0, ARG_FLAG,
00555                 check_ambiguity, override, 1, 0, "msg_parser", '-',
00556                 additional_error))
00557               goto failure;
00558           
00559           }
00560           /* Output messages meant for debuging.  */
00561           else if (strcmp (long_options[option_index].name, "msg_debug") == 0)
00562           {
00563           
00564           
00565             if (update_arg((void *)&(args_info->msg_debug_flag), 0, &(args_info->msg_debug_given),
00566                 &(local_args_info.msg_debug_given), optarg, 0, 0, ARG_FLAG,
00567                 check_ambiguity, override, 1, 0, "msg_debug", '-',
00568                 additional_error))
00569               goto failure;
00570           
00571           }
00572           /* Output warning messages about abnormal conditions and unknown constructs.  */
00573           else if (strcmp (long_options[option_index].name, "msg_warning") == 0)
00574           {
00575           
00576           
00577             if (update_arg((void *)&(args_info->msg_warning_flag), 0, &(args_info->msg_warning_given),
00578                 &(local_args_info.msg_warning_given), optarg, 0, 0, ARG_FLAG,
00579                 check_ambiguity, override, 1, 0, "msg_warning", '-',
00580                 additional_error))
00581               goto failure;
00582           
00583           }
00584           /* Output error messages.  */
00585           else if (strcmp (long_options[option_index].name, "msg_error") == 0)
00586           {
00587           
00588           
00589             if (update_arg((void *)&(args_info->msg_error_flag), 0, &(args_info->msg_error_given),
00590                 &(local_args_info.msg_error_given), optarg, 0, 0, ARG_FLAG,
00591                 check_ambiguity, override, 1, 0, "msg_error", '-',
00592                 additional_error))
00593               goto failure;
00594           
00595           }
00596           /* Output informational messages about the progress of the library.  */
00597           else if (strcmp (long_options[option_index].name, "msg_info") == 0)
00598           {
00599           
00600           
00601             if (update_arg((void *)&(args_info->msg_info_flag), 0, &(args_info->msg_info_given),
00602                 &(local_args_info.msg_info_given), optarg, 0, 0, ARG_FLAG,
00603                 check_ambiguity, override, 1, 0, "msg_info", '-',
00604                 additional_error))
00605               goto failure;
00606           
00607           }
00608           /* Output status messages.  */
00609           else if (strcmp (long_options[option_index].name, "msg_status") == 0)
00610           {
00611           
00612           
00613             if (update_arg((void *)&(args_info->msg_status_flag), 0, &(args_info->msg_status_given),
00614                 &(local_args_info.msg_status_given), optarg, 0, 0, ARG_FLAG,
00615                 check_ambiguity, override, 1, 0, "msg_status", '-',
00616                 additional_error))
00617               goto failure;
00618           
00619           }
00620           
00621           break;
00622         case '?':       /* Invalid option.  */
00623           /* `getopt_long' already printed an error message.  */
00624           goto failure;
00625 
00626         default:        /* bug: option not considered.  */
00627           fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : ""));
00628           abort ();
00629         } /* switch */
00630     } /* while */
00631 
00632 
00633 
00634 
00635   cmdline_parser_release (&local_args_info);
00636 
00637   if ( error )
00638     return (EXIT_FAILURE);
00639 
00640   if (optind < argc)
00641     {
00642       int i = 0 ;
00643       int found_prog_name = 0;
00644       /* whether program name, i.e., argv[0], is in the remaining args
00645          (this may happen with some implementations of getopt,
00646           but surely not with the one included by gengetopt) */
00647 
00648       i = optind;
00649       while (i < argc)
00650         if (argv[i++] == argv[0]) {
00651           found_prog_name = 1;
00652           break;
00653         }
00654       i = 0;
00655 
00656       args_info->inputs_num = argc - optind - found_prog_name;
00657       args_info->inputs =
00658         (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
00659       while (optind < argc)
00660         if (argv[optind++] != argv[0])
00661           args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
00662     }
00663 
00664   return 0;
00665 
00666 failure:
00667   
00668   cmdline_parser_release (&local_args_info);
00669   return (EXIT_FAILURE);
00670 }
libofx-0.9.4/doc/html/structcmdline__parser__params.html0000644000175000017500000001456311553133250020433 00000000000000 LibOFX: cmdline_parser_params Struct Reference

cmdline_parser_params Struct Reference

The additional parameters to pass to parser functions. More...

Data Fields

int override
 whether to override possibly already present options (default 0)
int initialize
 whether to initialize the option structure gengetopt_args_info (default 1)
int check_required
 whether to check that all required options were provided (default 1)
int check_ambiguity
 whether to check for options already specified in the option structure gengetopt_args_info (default 0)
int print_errors
 whether getopt_long should print an error message for a bad option (default 1)

Detailed Description

The additional parameters to pass to parser functions.

Definition at line 120 of file ofxconnect/cmdline.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/classOfxStatementRequest.html0000644000175000017500000004350211553133250017351 00000000000000 LibOFX: OfxStatementRequest Class Reference

OfxStatementRequest Class Reference

A statement request. More...

Inheritance diagram for OfxStatementRequest:
OfxRequest OfxRequest OfxAggregate OfxAggregate OfxAggregate OfxAggregate

Public Member Functions

 OfxStatementRequest (const OfxFiLogin &fi, const OfxAccountData &account, time_t from)
 OfxStatementRequest (const OfxFiLogin &fi, const OfxAccountData &account, time_t from)

Protected Member Functions

OfxAggregate BankStatementRequest (void) const
OfxAggregate CreditCardStatementRequest (void) const
OfxAggregate InvestmentStatementRequest (void) const
OfxAggregate BankStatementRequest (void) const
OfxAggregate CreditCardStatementRequest (void) const
OfxAggregate InvestmentStatementRequest (void) const

Detailed Description

A statement request.

This is an entire OFX aggregate, with all subordinate aggregates needed to log onto the OFX server of a single financial institution and download a statement for a single account.

Definition at line 37 of file ofx_request_statement.hh.


Constructor & Destructor Documentation

OfxStatementRequest::OfxStatementRequest ( const OfxFiLogin fi,
const OfxAccountData account,
time_t  from 
)

Creates the request aggregate to obtain a statement from this fi for this account, starting on this start date, ending today.

Parameters:
fiThe information needed to log on user into one financial institution
accountThe account for which a statement is desired
startThe beginning time of the statement period desired

Definition at line 45 of file ofx_request_statement.cpp.

OfxStatementRequest::OfxStatementRequest ( const OfxFiLogin fi,
const OfxAccountData account,
time_t  from 
)

Creates the request aggregate to obtain a statement from this fi for this account, starting on this start date, ending today.

Parameters:
fiThe information needed to log on user into one financial institution
accountThe account for which a statement is desired
startThe beginning time of the statement period desired

Member Function Documentation

OfxAggregate OfxStatementRequest::BankStatementRequest ( void  ) const [protected]

Creates a bank statement request aggregate, <BANKMSGSRQV1>, <STMTTRNRQ> & <STMTRQ> for this account. Should only be used if this account is a BANK account.

Returns:
The request aggregate created

Definition at line 60 of file ofx_request_statement.cpp.

Referenced by OfxStatementRequest().

OfxAggregate OfxStatementRequest::BankStatementRequest ( void  ) const [protected]

Creates a bank statement request aggregate, <BANKMSGSRQV1>, <STMTTRNRQ> & <STMTRQ> for this account. Should only be used if this account is a BANK account.

Returns:
The request aggregate created
OfxAggregate OfxStatementRequest::CreditCardStatementRequest ( void  ) const [protected]

Creates a credit card statement request aggregate, <CREDITCARDMSGSRQV1>, <CCSTMTTRNRQ> & <CCSTMTRQ> for this account. Should only be used if this account is a CREDIT CARD account.

Returns:
The request aggregate created
OfxAggregate OfxStatementRequest::CreditCardStatementRequest ( void  ) const [protected]

Creates a credit card statement request aggregate, <CREDITCARDMSGSRQV1>, <CCSTMTTRNRQ> & <CCSTMTRQ> for this account. Should only be used if this account is a CREDIT CARD account.

Returns:
The request aggregate created

Definition at line 87 of file ofx_request_statement.cpp.

Referenced by OfxStatementRequest().

OfxAggregate OfxStatementRequest::InvestmentStatementRequest ( void  ) const [protected]

Creates an investment statement request aggregate, <INSTMTMSGSRQV1>, <INVSTMTTRNRQ> & <INVSTMTRQ> for this account. Should only be used if this account is an INVESTMENT account.

Returns:
The request aggregate created

Definition at line 111 of file ofx_request_statement.cpp.

Referenced by OfxStatementRequest().

OfxAggregate OfxStatementRequest::InvestmentStatementRequest ( void  ) const [protected]

Creates an investment statement request aggregate, <INSTMTMSGSRQV1>, <INVSTMTTRNRQ> & <INVSTMTRQ> for this account. Should only be used if this account is an INVESTMENT account.

Returns:
The request aggregate created

The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/structOfxFiServiceInfo.html0000644000175000017500000001777011553133250016756 00000000000000 LibOFX: OfxFiServiceInfo Struct Reference

OfxFiServiceInfo Struct Reference

Information returned by the OFX Partner Server about a financial institution. More...

Data Fields

char fid [OFX_FID_LENGTH]
char org [OFX_ORG_LENGTH]
char url [OFX_URL_LENGTH]
int accountlist
int statements
int billpay
int investments

Detailed Description

Information returned by the OFX Partner Server about a financial institution.

Definition at line 772 of file inc/libofx.h.


Field Documentation

Whether the FI makes a list of accounts available

Definition at line 777 of file inc/libofx.h.

Whether the FI supports online bill payment

Definition at line 779 of file inc/libofx.h.

Whether the FI supports investments

Definition at line 780 of file inc/libofx.h.

Whether the FI supports online statement download

Definition at line 778 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/structLibofxFileFormatInfo.html0000644000175000017500000001524111553133250017605 00000000000000 LibOFX: LibofxFileFormatInfo Struct Reference

LibofxFileFormatInfo Struct Reference

Data Fields

enum LibofxFileFormat format
const char * format_name
const char * description

Detailed Description

Definition at line 125 of file inc/libofx.h.


Field Documentation

Description of the file format

Definition at line 129 of file inc/libofx.h.

Referenced by libofx_get_file_format_description(), and main().

Text version of the enum

Definition at line 128 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/globals_0x70.html0000644000175000017500000001200511553133251014525 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- p -

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__generic_8cpp.html0000644000175000017500000000752611553133250022600 00000000000000 LibOFX: ofx_container_generic.cpp File Reference

ofx_container_generic.cpp File Reference

Implementation of OfxGenericContainer. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxGenericContainer.

Definition in file fx-0.9.4/lib/ofx_container_generic.cpp.

libofx-0.9.4/doc/html/tab_s.png0000644000175000017500000000027511553133250013241 00000000000000‰PNG  IHDR$ÇÇ[„IDATxíÝë ‚P@áKg"%(IE|¡%¦I¡7iÚlmÐ" ÓäÛC¼ÞòÛ“\.dåOZ̤ÅBr‰/¿‰(ŸˆÎ#a6⟂ôŽ› 8q÷ØÇëÐaF-û°Et¿Aó4¯fçÖlŠ]±¶äJjJC¢%Š!¿<Å#üÀÄ«IEND®B`‚libofx-0.9.4/doc/html/functions_type.html0000644000175000017500000000612111553133250015376 00000000000000 LibOFX: Data Fields - Typedefs
libofx-0.9.4/doc/html/structOfxCurrency.html0000644000175000017500000001374411553133250016052 00000000000000 LibOFX: OfxCurrency Struct Reference

OfxCurrency Struct Reference

NOT YET SUPPORTED. More...

Data Fields

char currency [OFX_CURRENCY_LENGTH]
double exchange_rate
int must_convert

Detailed Description

NOT YET SUPPORTED.

Definition at line 695 of file inc/libofx.h.


Field Documentation

Currency in ISO-4217 format

Definition at line 697 of file inc/libofx.h.

Exchange rate from the normal currency of the account

Definition at line 698 of file inc/libofx.h.

true or false

Definition at line 699 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/navtree.css0000644000175000017500000000314711553133251013623 00000000000000#nav-tree .children_ul { margin:0; padding:4px; } #nav-tree ul { list-style:none outside none; margin:0px; padding:0px; } #nav-tree li { white-space:nowrap; margin:0px; padding:0px; } #nav-tree .plus { margin:0px; } #nav-tree .selected { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } #nav-tree img { margin:0px; padding:0px; border:0px; vertical-align: middle; } #nav-tree a { text-decoration:none; padding:0px; margin:0px; outline:none; } #nav-tree .label { margin:0px; padding:0px; } #nav-tree .label a { padding:2px; } #nav-tree .selected a { text-decoration:none; padding:2px; margin:0px; color:#fff; } #nav-tree .children_ul { margin:0px; padding:0px; } #nav-tree .item { margin:0px; padding:0px; } #nav-tree { padding: 0px 0px; background-color: #FAFAFF; font-size:14px; overflow:auto; } #doc-content { overflow:auto; display:block; padding:0px; margin:0px; } #side-nav { padding:0 6px 0 0; margin: 0px; display:block; position: absolute; left: 0px; width: 300px; } .ui-resizable .ui-resizable-handle { display:block; } .ui-resizable-e { background:url("ftv2splitbar.png") repeat scroll right center transparent; cursor:e-resize; height:100%; right:0; top:0; width:6px; } .ui-resizable-handle { display:none; font-size:0.1px; position:absolute; z-index:1; } #nav-tree-contents { margin: 6px 0px 0px 0px; } #nav-tree { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; } libofx-0.9.4/doc/html/ofx__container__main_8cpp_source.html0000644000175000017500000007363211553133250021012 00000000000000 LibOFX: ofx_container_main.cpp Source File

ofx_container_main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_main.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #endif
00022 
00023 #include <string>
00024 #include <iostream>
00025 #include "ParserEventGeneratorKit.h"
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_containers.hh"
00029 
00030 OfxMainContainer::OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00031   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00032 {
00033 
00034 //statement_tree_top=statement_tree.insert(statement_tree_top, NULL);
00035 //security_tree_top=security_tree.insert(security_tree_top, NULL);
00036 
00037 }
00038 OfxMainContainer::~OfxMainContainer()
00039 {
00040   message_out(DEBUG, "Entering the main container's destructor");
00041   tree<OfxGenericContainer *>::iterator tmp = security_tree.begin();
00042 
00043   while (tmp != security_tree.end())
00044   {
00045     message_out(DEBUG, "Deleting " + (*tmp)->type);
00046     delete (*tmp);
00047     ++tmp;
00048   }
00049   tmp = account_tree.begin();
00050   while (tmp != account_tree.end())
00051   {
00052     message_out(DEBUG, "Deleting " + (*tmp)->type);
00053     delete (*tmp);
00054     ++tmp;
00055   }
00056 }
00057 int OfxMainContainer::add_container(OfxGenericContainer * container)
00058 {
00059   message_out(DEBUG, "OfxMainContainer::add_container for element " + container->tag_identifier + "; destroying the generic container");
00060   /* Call gen_event anyway, it could be a status container or similar */
00061   container->gen_event();
00062   delete container;
00063   return 0;
00064 }
00065 
00066 int OfxMainContainer::add_container(OfxSecurityContainer * container)
00067 {
00068   message_out(DEBUG, "OfxMainContainer::add_container, adding a security");
00069   security_tree.insert(security_tree.begin(), container);
00070   return true;
00071 
00072 
00073 }
00074 
00075 int OfxMainContainer::add_container(OfxAccountContainer * container)
00076 {
00077   message_out(DEBUG, "OfxMainContainer::add_container, adding an account");
00078   if ( account_tree.size() == 0)
00079   {
00080     message_out(DEBUG, "OfxMainContainer::add_container, account is the first account");
00081     account_tree.insert(account_tree.begin(), container);
00082   }
00083   else
00084   {
00085     message_out(DEBUG, "OfxMainContainer::add_container, account is not the first account");
00086     tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00087     tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00088     account_tree.insert_after(tmp, container);
00089   }
00090   return true;
00091 }
00092 
00093 int OfxMainContainer::add_container(OfxStatementContainer * container)
00094 {
00095   message_out(DEBUG, "OfxMainContainer::add_container, adding a statement");
00096   tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00097   //cerr<< "size="<<account_tree.size()<<"; num_sibblings="<<account_tree.number_of_siblings(tmp)<<endl;
00098   tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00099 
00100   if (account_tree.is_valid(tmp))
00101   {
00102     message_out(DEBUG, "1: tmp is valid, Accounts are present");
00103     tree<OfxGenericContainer *>::iterator child = account_tree.begin(tmp);
00104     if (account_tree.number_of_children(tmp) != 0)
00105     {
00106       message_out(DEBUG, "There are already children for this account");
00107       account_tree.insert(tmp.begin(), container);
00108 
00109     }
00110     else
00111     {
00112       message_out(DEBUG, "There are no children for this account");
00113       account_tree.append_child(tmp, container);
00114     }
00115     container->add_account(&( ((OfxAccountContainer *)(*tmp))->data));
00116     return true;
00117   }
00118   else
00119   {
00120     message_out(ERROR, "OfxMainContainer::add_container, no accounts are present (tmp is invalid)");
00121     return false;
00122   }
00123 }
00124 
00125 int OfxMainContainer::add_container(OfxTransactionContainer * container)
00126 {
00127   message_out(DEBUG, "OfxMainContainer::add_container, adding a transaction");
00128 
00129   if ( account_tree.size() != 0)
00130   {
00131     tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00132     //cerr<< "size="<<account_tree.size()<<"; num_sibblings="<<account_tree.number_of_siblings(tmp)<<endl;
00133     tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00134     if (account_tree.is_valid(tmp))
00135     {
00136       message_out(DEBUG, "OfxMainContainer::add_container: tmp is valid, Accounts are present");
00137       account_tree.append_child(tmp, container);
00138       container->add_account(&(((OfxAccountContainer *)(*tmp))->data));
00139       return true;
00140     }
00141     else
00142     {
00143       message_out(ERROR, "OfxMainContainer::add_container: tmp is invalid!");
00144       return false;
00145     }
00146   }
00147   else
00148   {
00149     message_out(ERROR, "OfxMainContainer::add_container: the tree is empty!");
00150     return false;
00151   }
00152 }
00153 
00154 int  OfxMainContainer::gen_event()
00155 {
00156   message_out(DEBUG, "Begin walking the trees of the main container to generate events");
00157   tree<OfxGenericContainer *>::iterator tmp = security_tree.begin();
00158   //cerr<<"security_tree.size(): "<<security_tree.size()<<endl;
00159   int i = 0;
00160   while (tmp != security_tree.end())
00161   {
00162     message_out(DEBUG, "Looping...");
00163     //cerr <<i<<endl;
00164     i++;
00165     (*tmp)->gen_event();
00166     ++tmp;
00167   }
00168   tmp = account_tree.begin();
00169   //cerr<<account_tree.size()<<endl;
00170   i = 0;
00171   while (tmp != account_tree.end())
00172   {
00173     //cerr<< "i="<<i<<"; depth="<<account_tree.depth(tmp)<<endl;
00174     i++;
00175     (*tmp)->gen_event();
00176     ++tmp;
00177   }
00178   message_out(DEBUG, "End walking the trees of the main container to generate events");
00179 
00180   return true;
00181 }
00182 
00183 OfxSecurityData *  OfxMainContainer::find_security(string unique_id)
00184 {
00185   message_out(DEBUG, "OfxMainContainer::find_security() Begin.");
00186 
00187   tree<OfxGenericContainer *>::sibling_iterator tmp = security_tree.begin();
00188   OfxSecurityData * retval = NULL;
00189   while (tmp != security_tree.end() && retval == NULL)
00190   {
00191     if (((OfxSecurityContainer*)(*tmp))->data.unique_id == unique_id)
00192     {
00193       message_out(DEBUG, (string)"Security " + ((OfxSecurityContainer*)(*tmp))->data.unique_id + " found.");
00194       retval = &((OfxSecurityContainer*)(*tmp))->data;
00195     }
00196     ++tmp;
00197   }
00198   return retval;
00199 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__sgml_8cpp_source.html0000644000175000017500000014204111553133250021275 00000000000000 LibOFX: ofx_sgml.cpp Source File

ofx_sgml.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.cpp
00003                           -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <iostream>
00026 #include <stdlib.h>
00027 #include <string>
00028 #include "ParserEventGeneratorKit.h"
00029 #include "libofx.h"
00030 #include "ofx_utilities.hh"
00031 #include "messages.hh"
00032 #include "ofx_containers.hh"
00033 #include "ofx_sgml.hh"
00034 
00035 using namespace std;
00036 
00037 OfxMainContainer * MainContainer = NULL;
00038 extern SGMLApplication::OpenEntityPtr entity_ptr;
00039 extern SGMLApplication::Position position;
00040 
00041 
00044 class OFXApplication : public SGMLApplication
00045 {
00046 private:
00047   OfxGenericContainer *curr_container_element; 
00048   OfxGenericContainer *tmp_container_element;
00049   bool is_data_element; 
00050   string incoming_data; 
00051   LibofxContext * libofx_context;
00052 
00053 public:
00054 
00055   OFXApplication (LibofxContext * p_libofx_context)
00056   {
00057     MainContainer = NULL;
00058     curr_container_element = NULL;
00059     is_data_element = false;
00060     libofx_context = p_libofx_context;
00061   }
00062   ~OFXApplication()
00063   {
00064     message_out(DEBUG, "Entering the OFXApplication's destructor");
00065   }
00066 
00071   void startElement (const StartElementEvent & event)
00072   {
00073     string identifier;
00074     CharStringtostring (event.gi, identifier);
00075     message_out(PARSER, "startElement event received from OpenSP for element " + identifier);
00076 
00077     position = event.pos;
00078 
00079     switch (event.contentType)
00080     {
00081     case StartElementEvent::empty:
00082       message_out(ERROR, "StartElementEvent::empty\n");
00083       break;
00084     case StartElementEvent::cdata:
00085       message_out(ERROR, "StartElementEvent::cdata\n");
00086       break;
00087     case StartElementEvent::rcdata:
00088       message_out(ERROR, "StartElementEvent::rcdata\n");
00089       break;
00090     case StartElementEvent::mixed:
00091       message_out(PARSER, "StartElementEvent::mixed");
00092       is_data_element = true;
00093       break;
00094     case StartElementEvent::element:
00095       message_out(PARSER, "StartElementEvent::element");
00096       is_data_element = false;
00097       break;
00098     default:
00099       message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?");
00100     }
00101 
00102     if (is_data_element == false)
00103     {
00104       /*------- The following are OFX entities ---------------*/
00105 
00106       if (identifier == "OFX")
00107       {
00108         message_out (PARSER, "Element " + identifier + " found");
00109         MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier);
00110         curr_container_element = MainContainer;
00111       }
00112       else if (identifier == "STATUS")
00113       {
00114         message_out (PARSER, "Element " + identifier + " found");
00115         curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier);
00116       }
00117       else if (identifier == "STMTRS" ||
00118                identifier == "CCSTMTRS" ||
00119                identifier == "INVSTMTRS")
00120       {
00121         message_out (PARSER, "Element " + identifier + " found");
00122         curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier);
00123       }
00124       else if (identifier == "BANKTRANLIST")
00125       {
00126         message_out (PARSER, "Element " + identifier + " found");
00127         //BANKTRANLIST ignored, we will process it's attributes directly inside the STATEMENT,
00128         if (curr_container_element->type != "STATEMENT")
00129         {
00130           message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container");
00131         }
00132         else
00133         {
00134           curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00135         }
00136       }
00137       else if (identifier == "STMTTRN")
00138       {
00139         message_out (PARSER, "Element " + identifier + " found");
00140         curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier);
00141       }
00142       else if (identifier == "BUYDEBT" ||
00143                identifier == "BUYMF" ||
00144                identifier == "BUYOPT" ||
00145                identifier == "BUYOTHER" ||
00146                identifier == "BUYSTOCK" ||
00147                identifier == "CLOSUREOPT" ||
00148                identifier == "INCOME" ||
00149                identifier == "INVEXPENSE" ||
00150                identifier == "JRNLFUND" ||
00151                identifier == "JRNLSEC" ||
00152                identifier == "MARGININTEREST" ||
00153                identifier == "REINVEST" ||
00154                identifier == "RETOFCAP" ||
00155                identifier == "SELLDEBT" ||
00156                identifier == "SELLMF" ||
00157                identifier == "SELLOPT" ||
00158                identifier == "SELLOTHER" ||
00159                identifier == "SELLSTOCK" ||
00160                identifier == "SPLIT" ||
00161                identifier == "TRANSFER" )
00162       {
00163         message_out (PARSER, "Element " + identifier + " found");
00164         curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier);
00165       }
00166       /*The following is a list of OFX elements whose attributes will be processed by the parent container*/
00167       else if (identifier == "INVBUY" ||
00168                identifier == "INVSELL" ||
00169                identifier == "INVTRAN" ||
00170                identifier == "SECID")
00171       {
00172         message_out (PARSER, "Element " + identifier + " found");
00173         curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00174       }
00175 
00176       /* The different types of accounts */
00177       else if (identifier == "BANKACCTFROM" || identifier == "CCACCTFROM" || identifier == "INVACCTFROM")
00178       {
00179         message_out (PARSER, "Element " + identifier + " found");
00180         curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier);
00181       }
00182       else if (identifier == "SECINFO")
00183       {
00184         message_out (PARSER, "Element " + identifier + " found");
00185         curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier);
00186       }
00187       /* The different types of balances */
00188       else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL")
00189       {
00190         message_out (PARSER, "Element " + identifier + " found");
00191         curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier);
00192       }
00193       else
00194       {
00195         /* We dont know this OFX element, so we create a dummy container */
00196         curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier);
00197       }
00198     }
00199     else
00200     {
00201       /* The element was a data element.  OpenSP will call one or several data() callback with the data */
00202       message_out (PARSER, "Data element " + identifier + " found");
00203       /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here".  Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */
00204       if (incoming_data != "")
00205       {
00206         message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4.  The folowing data was lost: " + incoming_data );
00207         incoming_data.assign ("");
00208       }
00209     }
00210   }
00211 
00216   void endElement (const EndElementEvent & event)
00217   {
00218     string identifier;
00219     bool end_element_for_data_element;
00220 
00221     CharStringtostring (event.gi, identifier);
00222     end_element_for_data_element = is_data_element;
00223     message_out(PARSER, "endElement event received from OpenSP for element " + identifier);
00224 
00225     position = event.pos;
00226     if (curr_container_element == NULL)
00227     {
00228       message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)");
00229       incoming_data.assign ("");
00230     }
00231     else     //curr_container_element != NULL
00232     {
00233       if (end_element_for_data_element == true)
00234       {
00235         incoming_data = strip_whitespace(incoming_data);
00236 
00237         curr_container_element->add_attribute (identifier, incoming_data);
00238         message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element");
00239         incoming_data.assign ("");
00240         is_data_element = false;
00241       }
00242       else
00243       {
00244         if (identifier == curr_container_element->tag_identifier)
00245         {
00246           if (incoming_data != "")
00247           {
00248             message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!");
00249           }
00250 
00251           if (identifier == "OFX")
00252           {
00253             /* The main container is a special case */
00254             tmp_container_element = curr_container_element;
00255             curr_container_element = curr_container_element->getparent ();
00256             if(curr_container_element==NULL) {
00257               //Defensive coding, this isn't supposed to happen
00258               curr_container_element=tmp_container_element;
00259             }
00260             if(MainContainer!=NULL){
00261             MainContainer->gen_event();
00262             delete MainContainer;
00263             MainContainer = NULL;
00264             message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed");
00265             }
00266             else
00267             {
00268               message_out (DEBUG, "Element " + identifier + " closed, but there was no MainContainer to destroy (probably a malformed file)!");
00269             }
00270           }
00271           else
00272           {
00273             tmp_container_element = curr_container_element;
00274             curr_container_element = curr_container_element->getparent ();
00275             if (MainContainer != NULL)
00276             {
00277               tmp_container_element->add_to_main_tree();
00278               message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer");
00279             }
00280             else
00281             {
00282               message_out (ERROR, "MainContainer is NULL trying to add element " + identifier);
00283             }
00284           }
00285         }
00286         else
00287         {
00288           message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open.");
00289         }
00290       }
00291     }
00292   }
00293 
00298   void data (const DataEvent & event)
00299   {
00300     string tmp;
00301     position = event.pos;
00302     AppendCharStringtostring (event.data, incoming_data);
00303     message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data);
00304   }
00305 
00310   void error (const ErrorEvent & event)
00311   {
00312     string message;
00313     string string_buf;
00314     OfxMsgType error_type = ERROR;
00315 
00316     position = event.pos;
00317     message = message + "OpenSP parser: ";
00318     switch (event.type)
00319     {
00320     case SGMLApplication::ErrorEvent::quantity:
00321       message = message + "quantity (Exceeding a quantity limit):";
00322       error_type = ERROR;
00323       break;
00324     case SGMLApplication::ErrorEvent::idref:
00325       message = message + "idref (An IDREF to a non-existent ID):";
00326       error_type = ERROR;
00327       break;
00328     case SGMLApplication::ErrorEvent::capacity:
00329       message = message + "capacity (Exceeding a capacity limit):";
00330       error_type = ERROR;
00331       break;
00332     case SGMLApplication::ErrorEvent::otherError:
00333       message = message + "otherError (misc parse error):";
00334       error_type = ERROR;
00335       break;
00336     case SGMLApplication::ErrorEvent::warning:
00337       message = message + "warning (Not actually an error.):";
00338       error_type = WARNING;
00339       break;
00340     case SGMLApplication::ErrorEvent::info:
00341       message =  message + "info (An informationnal message.  Not actually an error):";
00342       error_type = INFO;
00343       break;
00344     default:
00345       message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):";
00346     }
00347     message =   message + "\n" + CharStringtostring (event.message, string_buf);
00348     message_out (error_type, message);
00349   }
00350 
00355   void openEntityChange (const OpenEntityPtr & para_entity_ptr)
00356   {
00357     message_out(DEBUG, "openEntityChange()\n");
00358     entity_ptr = para_entity_ptr;
00359 
00360   };
00361 
00362 private:
00363 };
00364 
00368 int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[])
00369 {
00370   message_out(DEBUG, "Begin ofx_proc_sgml()");
00371   message_out(DEBUG, argv[0]);
00372   message_out(DEBUG, argv[1]);
00373   message_out(DEBUG, argv[2]);
00374 
00375   ParserEventGeneratorKit parserKit;
00376   parserKit.setOption (ParserEventGeneratorKit::showOpenEntities);
00377   EventGenerator *egp = parserKit.makeEventGenerator (argc, argv);
00378   egp->inhibitMessages (true);  /* Error output is handled by libofx not OpenSP */
00379   OFXApplication *app = new OFXApplication(libofx_context);
00380   unsigned nErrors = egp->run (*app); /* Begin parsing */
00381   delete egp;  //Note that this is where bug is triggered
00382   return nErrors > 0;
00383 }
libofx-0.9.4/doc/html/functions_0x66.html0000644000175000017500000001471011553133250015123 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- f -

libofx-0.9.4/doc/html/structOfxFiLogin.html0000644000175000017500000001371711553133250015607 00000000000000 LibOFX: OfxFiLogin Struct Reference

OfxFiLogin Struct Reference

Information sufficient to log into an financial institution. More...

Data Fields

char fid [OFX_FID_LENGTH]
char org [OFX_ORG_LENGTH]
char userid [OFX_USERID_LENGTH]
char userpass [OFX_USERPASS_LENGTH]
char header_version [OFX_HEADERVERSION_LENGTH]
char appid [OFX_APPID_LENGTH]
char appver [OFX_APPVER_LENGTH]

Detailed Description

Information sufficient to log into an financial institution.

Contains all the info needed for a user to log into a financial institution and make requests for statements or post transactions. An OfxFiLogin must be passed to all functions which create OFX requests.

Definition at line 792 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__aggregate_8hh_source.html0000644000175000017500000001733111553133250022101 00000000000000 LibOFX: ofx_aggregate.hh Source File

ofx_aggregate.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_aggregate.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_AGGREGATE_H
00021 #define OFX_AGGREGATE_H
00022 
00023 #include <string>
00024 
00025 using namespace std;
00026 
00042 class OfxAggregate
00043 {
00044 public:
00050   OfxAggregate( const string& tag ): m_tag( tag )
00051   {}
00052 
00059   void Add( const string& tag, const string& data )
00060   {
00061     m_contents += string("<") + tag + string(">") + data + string("\r\n");
00062   }
00063 
00069   void Add( const OfxAggregate& sub )
00070   {
00071     m_contents += sub.Output();
00072   }
00073 
00079   string Output( void ) const
00080   {
00081     return string("<") + m_tag + string(">\r\n") + m_contents + string("</") + m_tag + string(">\r\n");
00082   }
00083 
00084 private:
00085   string m_tag;
00086   string m_contents;
00087 };
00088 
00089 #endif // OFX_AGGREGATE_H
libofx-0.9.4/doc/html/classOfxStatementContainer.png0000644000175000017500000000125011553133250017455 00000000000000‰PNG  IHDR$P‡ãø½PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT27IDATxíM’!…›NUîäYŠÓv&1óXtü%ÏOíñÈd‡Z.Y3YH©d  ¥…DDÄ~ldv6\l|½i¹,«†äcvéØŒÅ‹gw ­—eÔð.:‰H»«ãÉÚ;‰—Èd´˜ôsRèàRY‘¹6né$•€¯ šîx±qØ;˜…´NÖPMY¨÷aþÐ:s2:5ílìà¤%²&Ô0j'ŠŸÂi5º;pð"¤ÊšŠkÿ‡&‚gÕD­þõ¼›n“5*#Ò6)þ{\ëD‹C5“‘”@–UÃÑçÔhMq\«€ëV.까ûÂ<€´^–S³ØF–Ë$@$@$@¤ÿ )“H9eýÉžoòófË% &Äß Ý\Q¼†´S$I.øâlкՔ(É!ÿJWOí ;±/¶ÞÍ   Å Ëdï<Øõ“<þ¼þ^ÎIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__statement_8hh.html0000644000175000017500000000746011553133250022510 00000000000000 LibOFX: ofx_request_statement.hh File Reference

ofx_request_statement.hh File Reference

Declaration of libofx_request_statement to create an OFX file containing a request for a statement. More...

Go to the source code of this file.

Data Structures

class  OfxStatementRequest
 A statement request. More...
class  OfxPaymentRequest

Detailed Description

Declaration of libofx_request_statement to create an OFX file containing a request for a statement.

Definition in file fx-0.9.4/lib/ofx_request_statement.hh.

libofx-0.9.4/doc/html/ofx__containers_8hh.html0000644000175000017500000002010511553133250016252 00000000000000 LibOFX: ofx_containers.hh File Reference

ofx_containers.hh File Reference

LibOFX internal object code. More...

Go to the source code of this file.

Data Structures

class  OfxGenericContainer
 A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer. More...
class  OfxDummyContainer
 A container to holds OFX SGML elements that LibOFX knows nothing about. More...
class  OfxPushUpContainer
 A container to hold a OFX SGML element for which you want the parent to process it's data elements. More...
class  OfxStatusContainer
 Represents the <STATUS> OFX SGML entity. More...
class  OfxBalanceContainer
 Represents the <BALANCE> OFX SGML entity. More...
class  OfxStatementContainer
 Represents a statement for either a bank account or a credit card account. More...
class  OfxAccountContainer
 Represents a bank account or a credit card account. More...
class  OfxSecurityContainer
 Represents a security, such as a stock or bond. More...
class  OfxTransactionContainer
 Represents a generic transaction. More...
class  OfxBankTransactionContainer
 Represents a bank or credid card transaction. More...
class  OfxInvestmentTransactionContainer
 Represents a bank or credid card transaction. More...
class  OfxMainContainer
 The root container. Created by the <OFX> OFX element or by the export functions. More...

Detailed Description

LibOFX internal object code.

These objects will process the elements returned by ofx_sgml.cpp and add them to their data members.

Warning:
Object documentation is not yet complete.

Definition in file ofx_containers.hh.

libofx-0.9.4/doc/html/ofxdump_2cmdline_8h_source.html0000644000175000017500000005377211553133250017561 00000000000000 LibOFX: cmdline.h Source File

cmdline.h

00001 
00008 #ifndef CMDLINE_H
00009 #define CMDLINE_H
00010 
00011 /* If we use autoconf.  */
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include <stdio.h> /* for FILE */
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif /* __cplusplus */
00021 
00022 #ifndef CMDLINE_PARSER_PACKAGE
00023 
00024 #define CMDLINE_PARSER_PACKAGE PACKAGE
00025 #endif
00026 
00027 #ifndef CMDLINE_PARSER_PACKAGE_NAME
00028 
00029 #ifdef PACKAGE_NAME
00030 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME
00031 #else
00032 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE
00033 #endif
00034 #endif
00035 
00036 #ifndef CMDLINE_PARSER_VERSION
00037 
00038 #define CMDLINE_PARSER_VERSION VERSION
00039 #endif
00040 
00042 struct gengetopt_args_info
00043 {
00044   const char *help_help; 
00045   const char *version_help; 
00046   char * import_format_arg;     
00047   char * import_format_orig;    
00048   const char *import_format_help; 
00049   const char *list_import_formats_help; 
00050   int msg_parser_flag;  
00051   const char *msg_parser_help; 
00052   int msg_debug_flag;   
00053   const char *msg_debug_help; 
00054   int msg_warning_flag; 
00055   const char *msg_warning_help; 
00056   int msg_error_flag;   
00057   const char *msg_error_help; 
00058   int msg_info_flag;    
00059   const char *msg_info_help; 
00060   int msg_status_flag;  
00061   const char *msg_status_help; 
00063   unsigned int help_given ;     
00064   unsigned int version_given ;  
00065   unsigned int import_format_given ;    
00066   unsigned int list_import_formats_given ;      
00067   unsigned int msg_parser_given ;       
00068   unsigned int msg_debug_given ;        
00069   unsigned int msg_warning_given ;      
00070   unsigned int msg_error_given ;        
00071   unsigned int msg_info_given ; 
00072   unsigned int msg_status_given ;       
00074   char **inputs ; 
00075   unsigned inputs_num ; 
00076 } ;
00077 
00079 struct cmdline_parser_params
00080 {
00081   int override; 
00082   int initialize; 
00083   int check_required; 
00084   int check_ambiguity; 
00085   int print_errors; 
00086 } ;
00087 
00089 extern const char *gengetopt_args_info_purpose;
00091 extern const char *gengetopt_args_info_usage;
00093 extern const char *gengetopt_args_info_help[];
00094 
00102 int cmdline_parser (int argc, char **argv,
00103   struct gengetopt_args_info *args_info);
00104 
00116 int cmdline_parser2 (int argc, char **argv,
00117   struct gengetopt_args_info *args_info,
00118   int override, int initialize, int check_required);
00119 
00128 int cmdline_parser_ext (int argc, char **argv,
00129   struct gengetopt_args_info *args_info,
00130   struct cmdline_parser_params *params);
00131 
00138 int cmdline_parser_dump(FILE *outfile,
00139   struct gengetopt_args_info *args_info);
00140 
00148 int cmdline_parser_file_save(const char *filename,
00149   struct gengetopt_args_info *args_info);
00150 
00154 void cmdline_parser_print_help(void);
00158 void cmdline_parser_print_version(void);
00159 
00165 void cmdline_parser_params_init(struct cmdline_parser_params *params);
00166 
00172 struct cmdline_parser_params *cmdline_parser_params_create(void);
00173 
00179 void cmdline_parser_init (struct gengetopt_args_info *args_info);
00185 void cmdline_parser_free (struct gengetopt_args_info *args_info);
00186 
00194 int cmdline_parser_required (struct gengetopt_args_info *args_info,
00195   const char *prog_name);
00196 
00197 
00198 #ifdef __cplusplus
00199 }
00200 #endif /* __cplusplus */
00201 #endif /* CMDLINE_H */
libofx-0.9.4/doc/html/classes.html0000644000175000017500000002312511553133250013765 00000000000000 LibOFX: Data Structure Index
libofx-0.9.4/doc/html/ofxpartner_8h.html0000644000175000017500000001103011553133250015107 00000000000000 LibOFX: ofxpartner.h File Reference

ofxpartner.h File Reference

Methods for connecting to the OFX partner server to retrieve OFX server information. More...

Go to the source code of this file.

Functions

void OfxPartner::ValidateIndexCache (void)
OfxFiServiceInfo OfxPartner::ServiceInfo (const std::string &fipid)
vector< string > OfxPartner::BankNames (void)
std::vector< std::string > OfxPartner::FipidForBank (const std::string &bank)

Detailed Description

Methods for connecting to the OFX partner server to retrieve OFX server information.

Definition in file ofxpartner.h.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofc__sgml_8cpp.html0000644000175000017500000002037511553133250017675 00000000000000 LibOFX: ofc_sgml.cpp File Reference

ofc_sgml.cpp File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Data Structures

class  OFCApplication
 This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Functions

int ofc_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Variables

SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position
OfxMainContainerMainContainer

Detailed Description

OFX/SGML parsing functionnality.

Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/

Definition in file fx-0.9.4/lib/ofc_sgml.cpp.


Function Documentation

int ofc_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofc_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 352 of file fx-0.9.4/lib/ofc_sgml.cpp.


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file messages.cpp.

SGMLApplication::Position position

Global for determining the line number in OpenSP

Definition at line 26 of file messages.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2getopt_8c_source.html0000644000175000017500000026676311553133250020304 00000000000000 LibOFX: getopt.c Source File

getopt.c

00001 /* Getopt for GNU.
00002    NOTE: getopt is now part of the C library, so if you don't know what
00003    "Keep this file name-space clean" means, talk to drepper@gnu.org
00004    before changing it!
00005    Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
00006         Free Software Foundation, Inc.
00007    This file is part of the GNU C Library.
00008 
00009    The GNU C Library is free software; you can redistribute it and/or
00010    modify it under the terms of the GNU Lesser General Public
00011    License as published by the Free Software Foundation; either
00012    version 2.1 of the License, or (at your option) any later version.
00013 
00014    The GNU C Library is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017    Lesser General Public License for more details.
00018 
00019    You should have received a copy of the GNU Lesser General Public
00020    License along with the GNU C Library; if not, write to the Free
00021    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00022    02111-1307 USA.  */
00023 
00024 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
00025    Ditto for AIX 3.2 and <stdlib.h>.  */
00026 #ifndef _NO_PROTO
00027 # define _NO_PROTO
00028 #endif
00029 
00030 #ifdef HAVE_CONFIG_H
00031 # include <config.h>
00032 #endif
00033 
00034 #if !defined __STDC__ || !__STDC__
00035 /* This is a separate conditional since some stdc systems
00036    reject `defined (const)'.  */
00037 # ifndef const
00038 #  define const
00039 # endif
00040 #endif
00041 
00042 #include <stdio.h>
00043 
00044 /* Comment out all this code if we are using the GNU C Library, and are not
00045    actually compiling the library itself.  This code is part of the GNU C
00046    Library, but also included in many other GNU distributions.  Compiling
00047    and linking in this code is a waste when using the GNU C library
00048    (especially if it is a shared library).  Rather than having every GNU
00049    program understand `configure --with-gnu-libc' and omit the object files,
00050    it is simpler to just do this in the source for each such file.  */
00051 
00052 #define GETOPT_INTERFACE_VERSION 2
00053 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
00054 # include <gnu-versions.h>
00055 # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
00056 #  define ELIDE_CODE
00057 # endif
00058 #endif
00059 
00060 #ifndef ELIDE_CODE
00061 
00062 
00063 /* This needs to come after some library #include
00064    to get __GNU_LIBRARY__ defined.  */
00065 #ifdef  __GNU_LIBRARY__
00066 /* Don't include stdlib.h for non-GNU C libraries because some of them
00067    contain conflicting prototypes for getopt.  */
00068 # include <stdlib.h>
00069 # include <unistd.h>
00070 #endif  /* GNU C library.  */
00071 
00072 #ifdef VMS
00073 # include <unixlib.h>
00074 # if HAVE_STRING_H - 0
00075 #  include <string.h>
00076 # endif
00077 #endif
00078 
00079 #ifndef _
00080 /* This is for other GNU distributions with internationalized messages.  */
00081 # if defined HAVE_LIBINTL_H || defined _LIBC
00082 #  include <libintl.h>
00083 #  ifndef _
00084 #   define _(msgid)     gettext (msgid)
00085 #  endif
00086 # else
00087 #  define _(msgid)      (msgid)
00088 # endif
00089 #endif
00090 
00091 /* This version of `getopt' appears to the caller like standard Unix `getopt'
00092    but it behaves differently for the user, since it allows the user
00093    to intersperse the options with the other arguments.
00094 
00095    As `getopt' works, it permutes the elements of ARGV so that,
00096    when it is done, all the options precede everything else.  Thus
00097    all application programs are extended to handle flexible argument order.
00098 
00099    Setting the environment variable POSIXLY_CORRECT disables permutation.
00100    Then the behavior is completely standard.
00101 
00102    GNU application programs can use a third alternative mode in which
00103    they can distinguish the relative order of options and other arguments.  */
00104 
00105 #include "getopt.h"
00106 
00107 /* For communication from `getopt' to the caller.
00108    When `getopt' finds an option that takes an argument,
00109    the argument value is returned here.
00110    Also, when `ordering' is RETURN_IN_ORDER,
00111    each non-option ARGV-element is returned here.  */
00112 
00113 char *optarg;
00114 
00115 /* Index in ARGV of the next element to be scanned.
00116    This is used for communication to and from the caller
00117    and for communication between successive calls to `getopt'.
00118 
00119    On entry to `getopt', zero means this is the first call; initialize.
00120 
00121    When `getopt' returns -1, this is the index of the first of the
00122    non-option elements that the caller should itself scan.
00123 
00124    Otherwise, `optind' communicates from one call to the next
00125    how much of ARGV has been scanned so far.  */
00126 
00127 /* 1003.2 says this must be 1 before any call.  */
00128 int optind = 1;
00129 
00130 /* Formerly, initialization of getopt depended on optind==0, which
00131    causes problems with re-calling getopt as programs generally don't
00132    know that. */
00133 
00134 int __getopt_initialized;
00135 
00136 /* The next char to be scanned in the option-element
00137    in which the last option character we returned was found.
00138    This allows us to pick up the scan where we left off.
00139 
00140    If this is zero, or a null string, it means resume the scan
00141    by advancing to the next ARGV-element.  */
00142 
00143 static char *nextchar;
00144 
00145 /* Callers store zero here to inhibit the error message
00146    for unrecognized options.  */
00147 
00148 int opterr = 1;
00149 
00150 /* Set to an option character which was unrecognized.
00151    This must be initialized on some systems to avoid linking in the
00152    system's own getopt implementation.  */
00153 
00154 int optopt = '?';
00155 
00156 /* Describe how to deal with options that follow non-option ARGV-elements.
00157 
00158    If the caller did not specify anything,
00159    the default is REQUIRE_ORDER if the environment variable
00160    POSIXLY_CORRECT is defined, PERMUTE otherwise.
00161 
00162    REQUIRE_ORDER means don't recognize them as options;
00163    stop option processing when the first non-option is seen.
00164    This is what Unix does.
00165    This mode of operation is selected by either setting the environment
00166    variable POSIXLY_CORRECT, or using `+' as the first character
00167    of the list of option characters.
00168 
00169    PERMUTE is the default.  We permute the contents of ARGV as we scan,
00170    so that eventually all the non-options are at the end.  This allows options
00171    to be given in any order, even with programs that were not written to
00172    expect this.
00173 
00174    RETURN_IN_ORDER is an option available to programs that were written
00175    to expect options and other ARGV-elements in any order and that care about
00176    the ordering of the two.  We describe each non-option ARGV-element
00177    as if it were the argument of an option with character code 1.
00178    Using `-' as the first character of the list of option characters
00179    selects this mode of operation.
00180 
00181    The special argument `--' forces an end of option-scanning regardless
00182    of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
00183    `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
00184 
00185 static enum
00186 {
00187   REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
00188 } ordering;
00189 
00190 /* Value of POSIXLY_CORRECT environment variable.  */
00191 static char *posixly_correct;
00192 
00193 #ifdef  __GNU_LIBRARY__
00194 /* We want to avoid inclusion of string.h with non-GNU libraries
00195    because there are many ways it can cause trouble.
00196    On some systems, it contains special magic macros that don't work
00197    in GCC.  */
00198 # include <string.h>
00199 # define my_index       strchr
00200 #else
00201 
00202 # if HAVE_STRING_H
00203 #  include <string.h>
00204 # else
00205 #  include <strings.h>
00206 # endif
00207 
00208 /* Avoid depending on library functions or files
00209    whose names are inconsistent.  */
00210 
00211 #ifndef getenv
00212 extern char *getenv ();
00213 #endif
00214 
00215 static char *
00216 my_index (str, chr)
00217      const char *str;
00218      int chr;
00219 {
00220   while (*str)
00221     {
00222       if (*str == chr)
00223         return (char *) str;
00224       str++;
00225     }
00226   return 0;
00227 }
00228 
00229 /* If using GCC, we can safely declare strlen this way.
00230    If not using GCC, it is ok not to declare it.  */
00231 #ifdef __GNUC__
00232 /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
00233    That was relevant to code that was here before.  */
00234 # if (!defined __STDC__ || !__STDC__) && !defined strlen
00235 /* gcc with -traditional declares the built-in strlen to return int,
00236    and has done so at least since version 2.4.5. -- rms.  */
00237 extern int strlen (const char *);
00238 # endif /* not __STDC__ */
00239 #endif /* __GNUC__ */
00240 
00241 #endif /* not __GNU_LIBRARY__ */
00242 
00243 /* Handle permutation of arguments.  */
00244 
00245 /* Describe the part of ARGV that contains non-options that have
00246    been skipped.  `first_nonopt' is the index in ARGV of the first of them;
00247    `last_nonopt' is the index after the last of them.  */
00248 
00249 static int first_nonopt;
00250 static int last_nonopt;
00251 
00252 #ifdef _LIBC
00253 /* Stored original parameters.
00254    XXX This is no good solution.  We should rather copy the args so
00255    that we can compare them later.  But we must not use malloc(3).  */
00256 extern int __libc_argc;
00257 extern char **__libc_argv;
00258 
00259 /* Bash 2.0 gives us an environment variable containing flags
00260    indicating ARGV elements that should not be considered arguments.  */
00261 
00262 # ifdef USE_NONOPTION_FLAGS
00263 /* Defined in getopt_init.c  */
00264 extern char *__getopt_nonoption_flags;
00265 
00266 static int nonoption_flags_max_len;
00267 static int nonoption_flags_len;
00268 # endif
00269 
00270 # ifdef USE_NONOPTION_FLAGS
00271 #  define SWAP_FLAGS(ch1, ch2) \
00272   if (nonoption_flags_len > 0)                                                \
00273     {                                                                         \
00274       char __tmp = __getopt_nonoption_flags[ch1];                             \
00275       __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];          \
00276       __getopt_nonoption_flags[ch2] = __tmp;                                  \
00277     }
00278 # else
00279 #  define SWAP_FLAGS(ch1, ch2)
00280 # endif
00281 #else   /* !_LIBC */
00282 # define SWAP_FLAGS(ch1, ch2)
00283 #endif  /* _LIBC */
00284 
00285 /* Exchange two adjacent subsequences of ARGV.
00286    One subsequence is elements [first_nonopt,last_nonopt)
00287    which contains all the non-options that have been skipped so far.
00288    The other is elements [last_nonopt,optind), which contains all
00289    the options processed since those non-options were skipped.
00290 
00291    `first_nonopt' and `last_nonopt' are relocated so that they describe
00292    the new indices of the non-options in ARGV after they are moved.  */
00293 
00294 #if defined __STDC__ && __STDC__
00295 static void exchange (char **);
00296 #endif
00297 
00298 static void
00299 exchange (argv)
00300      char **argv;
00301 {
00302   int bottom = first_nonopt;
00303   int middle = last_nonopt;
00304   int top = optind;
00305   char *tem;
00306 
00307   /* Exchange the shorter segment with the far end of the longer segment.
00308      That puts the shorter segment into the right place.
00309      It leaves the longer segment in the right place overall,
00310      but it consists of two parts that need to be swapped next.  */
00311 
00312 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00313   /* First make sure the handling of the `__getopt_nonoption_flags'
00314      string can work normally.  Our top argument must be in the range
00315      of the string.  */
00316   if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
00317     {
00318       /* We must extend the array.  The user plays games with us and
00319          presents new arguments.  */
00320       char *new_str = malloc (top + 1);
00321       if (new_str == NULL)
00322         nonoption_flags_len = nonoption_flags_max_len = 0;
00323       else
00324         {
00325           memset (__mempcpy (new_str, __getopt_nonoption_flags,
00326                              nonoption_flags_max_len),
00327                   '\0', top + 1 - nonoption_flags_max_len);
00328           nonoption_flags_max_len = top + 1;
00329           __getopt_nonoption_flags = new_str;
00330         }
00331     }
00332 #endif
00333 
00334   while (top > middle && middle > bottom)
00335     {
00336       if (top - middle > middle - bottom)
00337         {
00338           /* Bottom segment is the short one.  */
00339           int len = middle - bottom;
00340           register int i;
00341 
00342           /* Swap it with the top part of the top segment.  */
00343           for (i = 0; i < len; i++)
00344             {
00345               tem = argv[bottom + i];
00346               argv[bottom + i] = argv[top - (middle - bottom) + i];
00347               argv[top - (middle - bottom) + i] = tem;
00348               SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
00349             }
00350           /* Exclude the moved bottom segment from further swapping.  */
00351           top -= len;
00352         }
00353       else
00354         {
00355           /* Top segment is the short one.  */
00356           int len = top - middle;
00357           register int i;
00358 
00359           /* Swap it with the bottom part of the bottom segment.  */
00360           for (i = 0; i < len; i++)
00361             {
00362               tem = argv[bottom + i];
00363               argv[bottom + i] = argv[middle + i];
00364               argv[middle + i] = tem;
00365               SWAP_FLAGS (bottom + i, middle + i);
00366             }
00367           /* Exclude the moved top segment from further swapping.  */
00368           bottom += len;
00369         }
00370     }
00371 
00372   /* Update records for the slots the non-options now occupy.  */
00373 
00374   first_nonopt += (optind - last_nonopt);
00375   last_nonopt = optind;
00376 }
00377 
00378 /* Initialize the internal data when the first call is made.  */
00379 
00380 #if defined __STDC__ && __STDC__
00381 static const char *_getopt_initialize (int, char *const *, const char *);
00382 #endif
00383 static const char *
00384 _getopt_initialize (argc, argv, optstring)
00385      int argc;
00386      char *const *argv;
00387      const char *optstring;
00388 {
00389   /* Start processing options with ARGV-element 1 (since ARGV-element 0
00390      is the program name); the sequence of previously skipped
00391      non-option ARGV-elements is empty.  */
00392 
00393   first_nonopt = last_nonopt = optind;
00394 
00395   nextchar = NULL;
00396 
00397   posixly_correct = getenv ("POSIXLY_CORRECT");
00398 
00399   /* Determine how to handle the ordering of options and nonoptions.  */
00400 
00401   if (optstring[0] == '-')
00402     {
00403       ordering = RETURN_IN_ORDER;
00404       ++optstring;
00405     }
00406   else if (optstring[0] == '+')
00407     {
00408       ordering = REQUIRE_ORDER;
00409       ++optstring;
00410     }
00411   else if (posixly_correct != NULL)
00412     ordering = REQUIRE_ORDER;
00413   else
00414     ordering = PERMUTE;
00415 
00416 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00417   if (posixly_correct == NULL
00418       && argc == __libc_argc && argv == __libc_argv)
00419     {
00420       if (nonoption_flags_max_len == 0)
00421         {
00422           if (__getopt_nonoption_flags == NULL
00423               || __getopt_nonoption_flags[0] == '\0')
00424             nonoption_flags_max_len = -1;
00425           else
00426             {
00427               const char *orig_str = __getopt_nonoption_flags;
00428               int len = nonoption_flags_max_len = strlen (orig_str);
00429               if (nonoption_flags_max_len < argc)
00430                 nonoption_flags_max_len = argc;
00431               __getopt_nonoption_flags =
00432                 (char *) malloc (nonoption_flags_max_len);
00433               if (__getopt_nonoption_flags == NULL)
00434                 nonoption_flags_max_len = -1;
00435               else
00436                 memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
00437                         '\0', nonoption_flags_max_len - len);
00438             }
00439         }
00440       nonoption_flags_len = nonoption_flags_max_len;
00441     }
00442   else
00443     nonoption_flags_len = 0;
00444 #endif
00445 
00446   return optstring;
00447 }
00448 
00449 /* Scan elements of ARGV (whose length is ARGC) for option characters
00450    given in OPTSTRING.
00451 
00452    If an element of ARGV starts with '-', and is not exactly "-" or "--",
00453    then it is an option element.  The characters of this element
00454    (aside from the initial '-') are option characters.  If `getopt'
00455    is called repeatedly, it returns successively each of the option characters
00456    from each of the option elements.
00457 
00458    If `getopt' finds another option character, it returns that character,
00459    updating `optind' and `nextchar' so that the next call to `getopt' can
00460    resume the scan with the following option character or ARGV-element.
00461 
00462    If there are no more option characters, `getopt' returns -1.
00463    Then `optind' is the index in ARGV of the first ARGV-element
00464    that is not an option.  (The ARGV-elements have been permuted
00465    so that those that are not options now come last.)
00466 
00467    OPTSTRING is a string containing the legitimate option characters.
00468    If an option character is seen that is not listed in OPTSTRING,
00469    return '?' after printing an error message.  If you set `opterr' to
00470    zero, the error message is suppressed but we still return '?'.
00471 
00472    If a char in OPTSTRING is followed by a colon, that means it wants an arg,
00473    so the following text in the same ARGV-element, or the text of the following
00474    ARGV-element, is returned in `optarg'.  Two colons mean an option that
00475    wants an optional arg; if there is text in the current ARGV-element,
00476    it is returned in `optarg', otherwise `optarg' is set to zero.
00477 
00478    If OPTSTRING starts with `-' or `+', it requests different methods of
00479    handling the non-option ARGV-elements.
00480    See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
00481 
00482    Long-named options begin with `--' instead of `-'.
00483    Their names may be abbreviated as long as the abbreviation is unique
00484    or is an exact match for some defined option.  If they have an
00485    argument, it follows the option name in the same ARGV-element, separated
00486    from the option name by a `=', or else the in next ARGV-element.
00487    When `getopt' finds a long-named option, it returns 0 if that option's
00488    `flag' field is nonzero, the value of the option's `val' field
00489    if the `flag' field is zero.
00490 
00491    The elements of ARGV aren't really const, because we permute them.
00492    But we pretend they're const in the prototype to be compatible
00493    with other systems.
00494 
00495    LONGOPTS is a vector of `struct option' terminated by an
00496    element containing a name which is zero.
00497 
00498    LONGIND returns the index in LONGOPT of the long-named option found.
00499    It is only valid when a long-named option has been found by the most
00500    recent call.
00501 
00502    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
00503    long-named options.  */
00504 
00505 int
00506 _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
00507      int argc;
00508      char *const *argv;
00509      const char *optstring;
00510      const struct option *longopts;
00511      int *longind;
00512      int long_only;
00513 {
00514   int print_errors = opterr;
00515   if (optstring[0] == ':')
00516     print_errors = 0;
00517 
00518   if (argc < 1)
00519     return -1;
00520 
00521   optarg = NULL;
00522 
00523   if (optind == 0 || !__getopt_initialized)
00524     {
00525       if (optind == 0)
00526         optind = 1;     /* Don't scan ARGV[0], the program name.  */
00527       optstring = _getopt_initialize (argc, argv, optstring);
00528       __getopt_initialized = 1;
00529     }
00530 
00531   /* Test whether ARGV[optind] points to a non-option argument.
00532      Either it does not have option syntax, or there is an environment flag
00533      from the shell indicating it is not an option.  The later information
00534      is only used when the used in the GNU libc.  */
00535 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00536 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'       \
00537                       || (optind < nonoption_flags_len                        \
00538                           && __getopt_nonoption_flags[optind] == '1'))
00539 #else
00540 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
00541 #endif
00542 
00543   if (nextchar == NULL || *nextchar == '\0')
00544     {
00545       /* Advance to the next ARGV-element.  */
00546 
00547       /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
00548          moved back by the user (who may also have changed the arguments).  */
00549       if (last_nonopt > optind)
00550         last_nonopt = optind;
00551       if (first_nonopt > optind)
00552         first_nonopt = optind;
00553 
00554       if (ordering == PERMUTE)
00555         {
00556           /* If we have just processed some options following some non-options,
00557              exchange them so that the options come first.  */
00558 
00559           if (first_nonopt != last_nonopt && last_nonopt != optind)
00560             exchange ((char **) argv);
00561           else if (last_nonopt != optind)
00562             first_nonopt = optind;
00563 
00564           /* Skip any additional non-options
00565              and extend the range of non-options previously skipped.  */
00566 
00567           while (optind < argc && NONOPTION_P)
00568             optind++;
00569           last_nonopt = optind;
00570         }
00571 
00572       /* The special ARGV-element `--' means premature end of options.
00573          Skip it like a null option,
00574          then exchange with previous non-options as if it were an option,
00575          then skip everything else like a non-option.  */
00576 
00577       if (optind != argc && !strcmp (argv[optind], "--"))
00578         {
00579           optind++;
00580 
00581           if (first_nonopt != last_nonopt && last_nonopt != optind)
00582             exchange ((char **) argv);
00583           else if (first_nonopt == last_nonopt)
00584             first_nonopt = optind;
00585           last_nonopt = argc;
00586 
00587           optind = argc;
00588         }
00589 
00590       /* If we have done all the ARGV-elements, stop the scan
00591          and back over any non-options that we skipped and permuted.  */
00592 
00593       if (optind == argc)
00594         {
00595           /* Set the next-arg-index to point at the non-options
00596              that we previously skipped, so the caller will digest them.  */
00597           if (first_nonopt != last_nonopt)
00598             optind = first_nonopt;
00599           return -1;
00600         }
00601 
00602       /* If we have come to a non-option and did not permute it,
00603          either stop the scan or describe it to the caller and pass it by.  */
00604 
00605       if (NONOPTION_P)
00606         {
00607           if (ordering == REQUIRE_ORDER)
00608             return -1;
00609           optarg = argv[optind++];
00610           return 1;
00611         }
00612 
00613       /* We have found another option-ARGV-element.
00614          Skip the initial punctuation.  */
00615 
00616       nextchar = (argv[optind] + 1
00617                   + (longopts != NULL && argv[optind][1] == '-'));
00618     }
00619 
00620   /* Decode the current option-ARGV-element.  */
00621 
00622   /* Check whether the ARGV-element is a long option.
00623 
00624      If long_only and the ARGV-element has the form "-f", where f is
00625      a valid short option, don't consider it an abbreviated form of
00626      a long option that starts with f.  Otherwise there would be no
00627      way to give the -f short option.
00628 
00629      On the other hand, if there's a long option "fubar" and
00630      the ARGV-element is "-fu", do consider that an abbreviation of
00631      the long option, just like "--fu", and not "-f" with arg "u".
00632 
00633      This distinction seems to be the most useful approach.  */
00634 
00635   if (longopts != NULL
00636       && (argv[optind][1] == '-'
00637           || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
00638     {
00639       char *nameend;
00640       const struct option *p;
00641       const struct option *pfound = NULL;
00642       int exact = 0;
00643       int ambig = 0;
00644       int indfound = -1;
00645       int option_index;
00646 
00647       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
00648         /* Do nothing.  */ ;
00649 
00650       /* Test all long options for either exact match
00651          or abbreviated matches.  */
00652       for (p = longopts, option_index = 0; p->name; p++, option_index++)
00653         if (!strncmp (p->name, nextchar, nameend - nextchar))
00654           {
00655             if ((unsigned int) (nameend - nextchar)
00656                 == (unsigned int) strlen (p->name))
00657               {
00658                 /* Exact match found.  */
00659                 pfound = p;
00660                 indfound = option_index;
00661                 exact = 1;
00662                 break;
00663               }
00664             else if (pfound == NULL)
00665               {
00666                 /* First nonexact match found.  */
00667                 pfound = p;
00668                 indfound = option_index;
00669               }
00670             else if (long_only
00671                      || pfound->has_arg != p->has_arg
00672                      || pfound->flag != p->flag
00673                      || pfound->val != p->val)
00674               /* Second or later nonexact match found.  */
00675               ambig = 1;
00676           }
00677 
00678       if (ambig && !exact)
00679         {
00680           if (print_errors)
00681             fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
00682                      argv[0], argv[optind]);
00683           nextchar += strlen (nextchar);
00684           optind++;
00685           optopt = 0;
00686           return '?';
00687         }
00688 
00689       if (pfound != NULL)
00690         {
00691           option_index = indfound;
00692           optind++;
00693           if (*nameend)
00694             {
00695               /* Don't test has_arg with >, because some C compilers don't
00696                  allow it to be used on enums.  */
00697               if (pfound->has_arg)
00698                 optarg = nameend + 1;
00699               else
00700                 {
00701                   if (print_errors)
00702                     {
00703                       if (argv[optind - 1][1] == '-')
00704                         /* --option */
00705                         fprintf (stderr,
00706                                  _("%s: option `--%s' doesn't allow an argument\n"),
00707                                  argv[0], pfound->name);
00708                       else
00709                         /* +option or -option */
00710                         fprintf (stderr,
00711                                  _("%s: option `%c%s' doesn't allow an argument\n"),
00712                                  argv[0], argv[optind - 1][0], pfound->name);
00713                     }
00714 
00715                   nextchar += strlen (nextchar);
00716 
00717                   optopt = pfound->val;
00718                   return '?';
00719                 }
00720             }
00721           else if (pfound->has_arg == 1)
00722             {
00723               if (optind < argc)
00724                 optarg = argv[optind++];
00725               else
00726                 {
00727                   if (print_errors)
00728                     fprintf (stderr,
00729                            _("%s: option `%s' requires an argument\n"),
00730                            argv[0], argv[optind - 1]);
00731                   nextchar += strlen (nextchar);
00732                   optopt = pfound->val;
00733                   return optstring[0] == ':' ? ':' : '?';
00734                 }
00735             }
00736           nextchar += strlen (nextchar);
00737           if (longind != NULL)
00738             *longind = option_index;
00739           if (pfound->flag)
00740             {
00741               *(pfound->flag) = pfound->val;
00742               return 0;
00743             }
00744           return pfound->val;
00745         }
00746 
00747       /* Can't find it as a long option.  If this is not getopt_long_only,
00748          or the option starts with '--' or is not a valid short
00749          option, then it's an error.
00750          Otherwise interpret it as a short option.  */
00751       if (!long_only || argv[optind][1] == '-'
00752           || my_index (optstring, *nextchar) == NULL)
00753         {
00754           if (print_errors)
00755             {
00756               if (argv[optind][1] == '-')
00757                 /* --option */
00758                 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
00759                          argv[0], nextchar);
00760               else
00761                 /* +option or -option */
00762                 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
00763                          argv[0], argv[optind][0], nextchar);
00764             }
00765           nextchar = (char *) "";
00766           optind++;
00767           optopt = 0;
00768           return '?';
00769         }
00770     }
00771 
00772   /* Look at and handle the next short option-character.  */
00773 
00774   {
00775     char c = *nextchar++;
00776     char *temp = my_index (optstring, c);
00777 
00778     /* Increment `optind' when we start to process its last character.  */
00779     if (*nextchar == '\0')
00780       ++optind;
00781 
00782     if (temp == NULL || c == ':')
00783       {
00784         if (print_errors)
00785           {
00786             if (posixly_correct)
00787               /* 1003.2 specifies the format of this message.  */
00788               fprintf (stderr, _("%s: illegal option -- %c\n"),
00789                        argv[0], c);
00790             else
00791               fprintf (stderr, _("%s: invalid option -- %c\n"),
00792                        argv[0], c);
00793           }
00794         optopt = c;
00795         return '?';
00796       }
00797     /* Convenience. Treat POSIX -W foo same as long option --foo */
00798     if (temp[0] == 'W' && temp[1] == ';')
00799       {
00800         char *nameend;
00801         const struct option *p;
00802         const struct option *pfound = NULL;
00803         int exact = 0;
00804         int ambig = 0;
00805         int indfound = 0;
00806         int option_index;
00807 
00808         /* This is an option that requires an argument.  */
00809         if (*nextchar != '\0')
00810           {
00811             optarg = nextchar;
00812             /* If we end this ARGV-element by taking the rest as an arg,
00813                we must advance to the next element now.  */
00814             optind++;
00815           }
00816         else if (optind == argc)
00817           {
00818             if (print_errors)
00819               {
00820                 /* 1003.2 specifies the format of this message.  */
00821                 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
00822                          argv[0], c);
00823               }
00824             optopt = c;
00825             if (optstring[0] == ':')
00826               c = ':';
00827             else
00828               c = '?';
00829             return c;
00830           }
00831         else
00832           /* We already incremented `optind' once;
00833              increment it again when taking next ARGV-elt as argument.  */
00834           optarg = argv[optind++];
00835 
00836         /* optarg is now the argument, see if it's in the
00837            table of longopts.  */
00838 
00839         for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
00840           /* Do nothing.  */ ;
00841 
00842         /* Test all long options for either exact match
00843            or abbreviated matches.  */
00844         for (p = longopts, option_index = 0; p->name; p++, option_index++)
00845           if (!strncmp (p->name, nextchar, nameend - nextchar))
00846             {
00847               if ((unsigned int) (nameend - nextchar) == strlen (p->name))
00848                 {
00849                   /* Exact match found.  */
00850                   pfound = p;
00851                   indfound = option_index;
00852                   exact = 1;
00853                   break;
00854                 }
00855               else if (pfound == NULL)
00856                 {
00857                   /* First nonexact match found.  */
00858                   pfound = p;
00859                   indfound = option_index;
00860                 }
00861               else
00862                 /* Second or later nonexact match found.  */
00863                 ambig = 1;
00864             }
00865         if (ambig && !exact)
00866           {
00867             if (print_errors)
00868               fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
00869                        argv[0], argv[optind]);
00870             nextchar += strlen (nextchar);
00871             optind++;
00872             return '?';
00873           }
00874         if (pfound != NULL)
00875           {
00876             option_index = indfound;
00877             if (*nameend)
00878               {
00879                 /* Don't test has_arg with >, because some C compilers don't
00880                    allow it to be used on enums.  */
00881                 if (pfound->has_arg)
00882                   optarg = nameend + 1;
00883                 else
00884                   {
00885                     if (print_errors)
00886                       fprintf (stderr, _("\
00887 %s: option `-W %s' doesn't allow an argument\n"),
00888                                argv[0], pfound->name);
00889 
00890                     nextchar += strlen (nextchar);
00891                     return '?';
00892                   }
00893               }
00894             else if (pfound->has_arg == 1)
00895               {
00896                 if (optind < argc)
00897                   optarg = argv[optind++];
00898                 else
00899                   {
00900                     if (print_errors)
00901                       fprintf (stderr,
00902                                _("%s: option `%s' requires an argument\n"),
00903                                argv[0], argv[optind - 1]);
00904                     nextchar += strlen (nextchar);
00905                     return optstring[0] == ':' ? ':' : '?';
00906                   }
00907               }
00908             nextchar += strlen (nextchar);
00909             if (longind != NULL)
00910               *longind = option_index;
00911             if (pfound->flag)
00912               {
00913                 *(pfound->flag) = pfound->val;
00914                 return 0;
00915               }
00916             return pfound->val;
00917           }
00918           nextchar = NULL;
00919           return 'W';   /* Let the application handle it.   */
00920       }
00921     if (temp[1] == ':')
00922       {
00923         if (temp[2] == ':')
00924           {
00925             /* This is an option that accepts an argument optionally.  */
00926             if (*nextchar != '\0')
00927               {
00928                 optarg = nextchar;
00929                 optind++;
00930               }
00931             else
00932               optarg = NULL;
00933             nextchar = NULL;
00934           }
00935         else
00936           {
00937             /* This is an option that requires an argument.  */
00938             if (*nextchar != '\0')
00939               {
00940                 optarg = nextchar;
00941                 /* If we end this ARGV-element by taking the rest as an arg,
00942                    we must advance to the next element now.  */
00943                 optind++;
00944               }
00945             else if (optind == argc)
00946               {
00947                 if (print_errors)
00948                   {
00949                     /* 1003.2 specifies the format of this message.  */
00950                     fprintf (stderr,
00951                              _("%s: option requires an argument -- %c\n"),
00952                              argv[0], c);
00953                   }
00954                 optopt = c;
00955                 if (optstring[0] == ':')
00956                   c = ':';
00957                 else
00958                   c = '?';
00959               }
00960             else
00961               /* We already incremented `optind' once;
00962                  increment it again when taking next ARGV-elt as argument.  */
00963               optarg = argv[optind++];
00964             nextchar = NULL;
00965           }
00966       }
00967     return c;
00968   }
00969 }
00970 
00971 int
00972 getopt (argc, argv, optstring)
00973      int argc;
00974      char *const *argv;
00975      const char *optstring;
00976 {
00977   return _getopt_internal (argc, argv, optstring,
00978                            (const struct option *) 0,
00979                            (int *) 0,
00980                            0);
00981 }
00982 
00983 #endif  /* Not ELIDE_CODE.  */
00984 
00985 #ifdef TEST
00986 
00987 /* Compile with -DTEST to make an executable for use in testing
00988    the above definition of `getopt'.  */
00989 
00990 int
00991 main (argc, argv)
00992      int argc;
00993      char **argv;
00994 {
00995   int c;
00996   int digit_optind = 0;
00997 
00998   while (1)
00999     {
01000       int this_option_optind = optind ? optind : 1;
01001 
01002       c = getopt (argc, argv, "abc:d:0123456789");
01003       if (c == -1)
01004         break;
01005 
01006       switch (c)
01007         {
01008         case '0':
01009         case '1':
01010         case '2':
01011         case '3':
01012         case '4':
01013         case '5':
01014         case '6':
01015         case '7':
01016         case '8':
01017         case '9':
01018           if (digit_optind != 0 && digit_optind != this_option_optind)
01019             printf ("digits occur in two different argv-elements.\n");
01020           digit_optind = this_option_optind;
01021           printf ("option %c\n", c);
01022           break;
01023 
01024         case 'a':
01025           printf ("option a\n");
01026           break;
01027 
01028         case 'b':
01029           printf ("option b\n");
01030           break;
01031 
01032         case 'c':
01033           printf ("option c with value `%s'\n", optarg);
01034           break;
01035 
01036         case '?':
01037           break;
01038 
01039         default:
01040           printf ("?? getopt returned character code 0%o ??\n", c);
01041         }
01042     }
01043 
01044   if (optind < argc)
01045     {
01046       printf ("non-option ARGV-elements: ");
01047       while (optind < argc)
01048         printf ("%s ", argv[optind++]);
01049       printf ("\n");
01050     }
01051 
01052   exit (0);
01053 }
01054 
01055 #endif /* TEST */
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofc__sgml_8cpp_source.html0000644000175000017500000013607311553133250021260 00000000000000 LibOFX: ofc_sgml.cpp Source File

ofc_sgml.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.cpp
00003                           -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <iostream>
00026 #include <stdlib.h>
00027 #include <string>
00028 #include "ParserEventGeneratorKit.h"
00029 #include "libofx.h"
00030 #include "ofx_utilities.hh"
00031 #include "messages.hh"
00032 #include "ofx_containers.hh"
00033 #include "ofc_sgml.hh"
00034 
00035 using namespace std;
00036 
00037 
00038 extern SGMLApplication::OpenEntityPtr entity_ptr;
00039 extern SGMLApplication::Position position;
00040 extern OfxMainContainer * MainContainer;
00041 
00044 class OFCApplication : public SGMLApplication
00045 {
00046 private:
00047   OfxGenericContainer *curr_container_element; 
00048   OfxGenericContainer *tmp_container_element;
00049   bool is_data_element; 
00050   string incoming_data; 
00051   LibofxContext * libofx_context;
00052 public:
00053   OFCApplication (LibofxContext * p_libofx_context)
00054   {
00055     MainContainer = NULL;
00056     curr_container_element = NULL;
00057     is_data_element = false;
00058     libofx_context = p_libofx_context;
00059   }
00060 
00065   void startElement (const StartElementEvent & event)
00066   {
00067     string identifier;
00068     CharStringtostring (event.gi, identifier);
00069     message_out(PARSER, "startElement event received from OpenSP for element " + identifier);
00070 
00071     position = event.pos;
00072 
00073     switch (event.contentType)
00074     {
00075     case StartElementEvent::empty:
00076       message_out(ERROR, "StartElementEvent::empty\n");
00077       break;
00078     case StartElementEvent::cdata:
00079       message_out(ERROR, "StartElementEvent::cdata\n");
00080       break;
00081     case StartElementEvent::rcdata:
00082       message_out(ERROR, "StartElementEvent::rcdata\n");
00083       break;
00084     case StartElementEvent::mixed:
00085       message_out(PARSER, "StartElementEvent::mixed");
00086       is_data_element = true;
00087       break;
00088     case StartElementEvent::element:
00089       message_out(PARSER, "StartElementEvent::element");
00090       is_data_element = false;
00091       break;
00092     default:
00093       message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?");
00094     }
00095 
00096     if (is_data_element == false)
00097     {
00098       /*------- The following are OFC entities ---------------*/
00099 
00100       if (identifier == "OFC")
00101       {
00102         message_out (PARSER, "Element " + identifier + " found");
00103         MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier);
00104         curr_container_element = MainContainer;
00105       }
00106       else if (identifier == "STATUS")
00107       {
00108         message_out (PARSER, "Element " + identifier + " found");
00109         curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier);
00110       }
00111       else if (identifier == "ACCTSTMT")
00112       {
00113         message_out (PARSER, "Element " + identifier + " found");
00114         curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier);
00115       }
00116       else if (identifier == "STMTRS")
00117       {
00118         message_out (PARSER, "Element " + identifier + " found");
00119         //STMTRS ignored, we will process it's attributes directly inside the STATEMENT,
00120         if (curr_container_element->type != "STATEMENT")
00121         {
00122           message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container");
00123         }
00124         else
00125         {
00126           curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00127         }
00128       }
00129       else if (identifier == "GENTRN" ||
00130                identifier == "STMTTRN")
00131       {
00132         message_out (PARSER, "Element " + identifier + " found");
00133         curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier);
00134       }
00135       else if (identifier == "BUYDEBT" ||
00136                identifier == "BUYMF" ||
00137                identifier == "BUYOPT" ||
00138                identifier == "BUYOTHER" ||
00139                identifier == "BUYSTOCK" ||
00140                identifier == "CLOSUREOPT" ||
00141                identifier == "INCOME" ||
00142                identifier == "INVEXPENSE" ||
00143                identifier == "JRNLFUND" ||
00144                identifier == "JRNLSEC" ||
00145                identifier == "MARGININTEREST" ||
00146                identifier == "REINVEST" ||
00147                identifier == "RETOFCAP" ||
00148                identifier == "SELLDEBT" ||
00149                identifier == "SELLMF" ||
00150                identifier == "SELLOPT" ||
00151                identifier == "SELLOTHER" ||
00152                identifier == "SELLSTOCK" ||
00153                identifier == "SPLIT" ||
00154                identifier == "TRANSFER" )
00155       {
00156         message_out (PARSER, "Element " + identifier + " found");
00157         curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier);
00158       }
00159       /*The following is a list of OFX elements whose attributes will be processed by the parent container*/
00160       else if (identifier == "INVBUY" ||
00161                identifier == "INVSELL" ||
00162                identifier == "INVTRAN" ||
00163                identifier == "SECID")
00164       {
00165         message_out (PARSER, "Element " + identifier + " found");
00166         curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00167       }
00168 
00169       /* The different types of accounts */
00170       else if (identifier == "ACCOUNT" ||
00171                identifier == "ACCTFROM" )
00172       {
00173         message_out (PARSER, "Element " + identifier + " found");
00174         curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier);
00175       }
00176       else if (identifier == "SECINFO")
00177       {
00178         message_out (PARSER, "Element " + identifier + " found");
00179         curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier);
00180       }
00181       /* The different types of balances */
00182       else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL")
00183       {
00184         message_out (PARSER, "Element " + identifier + " found");
00185         curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier);
00186       }
00187       else
00188       {
00189         /* We dont know this OFX element, so we create a dummy container */
00190         curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier);
00191       }
00192     }
00193     else
00194     {
00195       /* The element was a data element.  OpenSP will call one or several data() callback with the data */
00196       message_out (PARSER, "Data element " + identifier + " found");
00197       /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here".  Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */
00198       if (incoming_data != "")
00199       {
00200         message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4.  The folowing data was lost: " + incoming_data );
00201         incoming_data.assign ("");
00202       }
00203     }
00204   }
00205 
00210   void endElement (const EndElementEvent & event)
00211   {
00212     string identifier;
00213     bool end_element_for_data_element;
00214 
00215     CharStringtostring (event.gi, identifier);
00216     end_element_for_data_element = is_data_element;
00217     message_out(PARSER, "endElement event received from OpenSP for element " + identifier);
00218 
00219     position = event.pos;
00220     if (curr_container_element == NULL)
00221     {
00222       message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)");
00223       incoming_data.assign ("");
00224     }
00225     else     //curr_container_element != NULL
00226     {
00227       if (end_element_for_data_element == true)
00228       {
00229         incoming_data = strip_whitespace(incoming_data);
00230 
00231         curr_container_element->add_attribute (identifier, incoming_data);
00232         message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element");
00233         incoming_data.assign ("");
00234         is_data_element = false;
00235       }
00236       else
00237       {
00238         if (identifier == curr_container_element->tag_identifier)
00239         {
00240           if (incoming_data != "")
00241           {
00242             message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!");
00243           }
00244 
00245           if (identifier == "OFX")
00246           {
00247             /* The main container is a special case */
00248             tmp_container_element = curr_container_element;
00249             curr_container_element = curr_container_element->getparent ();
00250             MainContainer->gen_event();
00251             delete MainContainer;
00252             MainContainer = NULL;
00253             message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed");
00254           }
00255           else
00256           {
00257             tmp_container_element = curr_container_element;
00258             curr_container_element = curr_container_element->getparent ();
00259             if (MainContainer != NULL)
00260             {
00261               tmp_container_element->add_to_main_tree();
00262               message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer");
00263             }
00264             else
00265             {
00266               message_out (ERROR, "MainContainer is NULL trying to add element " + identifier);
00267             }
00268           }
00269         }
00270         else
00271         {
00272           message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open.");
00273         }
00274       }
00275     }
00276   }
00277 
00282   void data (const DataEvent & event)
00283   {
00284     string tmp;
00285     position = event.pos;
00286     AppendCharStringtostring (event.data, incoming_data);
00287     message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data);
00288   }
00289 
00294   void error (const ErrorEvent & event)
00295   {
00296     string message;
00297     string string_buf;
00298     OfxMsgType error_type = ERROR;
00299 
00300     position = event.pos;
00301     message = message + "OpenSP parser: ";
00302     switch (event.type)
00303     {
00304     case SGMLApplication::ErrorEvent::quantity:
00305       message = message + "quantity (Exceeding a quantity limit):";
00306       error_type = ERROR;
00307       break;
00308     case SGMLApplication::ErrorEvent::idref:
00309       message = message + "idref (An IDREF to a non-existent ID):";
00310       error_type = ERROR;
00311       break;
00312     case SGMLApplication::ErrorEvent::capacity:
00313       message = message + "capacity (Exceeding a capacity limit):";
00314       error_type = ERROR;
00315       break;
00316     case SGMLApplication::ErrorEvent::otherError:
00317       message = message + "otherError (misc parse error):";
00318       error_type = ERROR;
00319       break;
00320     case SGMLApplication::ErrorEvent::warning:
00321       message = message + "warning (Not actually an error.):";
00322       error_type = WARNING;
00323       break;
00324     case SGMLApplication::ErrorEvent::info:
00325       message =  message + "info (An informationnal message.  Not actually an error):";
00326       error_type = INFO;
00327       break;
00328     default:
00329       message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):";
00330     }
00331     message =   message + "\n" + CharStringtostring (event.message, string_buf);
00332     message_out (error_type, message);
00333   }
00334 
00339   void openEntityChange (const OpenEntityPtr & para_entity_ptr)
00340   {
00341     message_out(DEBUG, "openEntityChange()\n");
00342     entity_ptr = para_entity_ptr;
00343 
00344   };
00345 
00346 private:
00347 };
00348 
00352 int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[])
00353 {
00354   message_out(DEBUG, "Begin ofx_proc_sgml()");
00355   message_out(DEBUG, argv[0]);
00356   message_out(DEBUG, argv[1]);
00357   message_out(DEBUG, argv[2]);
00358 
00359   ParserEventGeneratorKit parserKit;
00360   parserKit.setOption (ParserEventGeneratorKit::showOpenEntities);
00361   EventGenerator *egp = parserKit.makeEventGenerator (argc, argv);
00362   egp->inhibitMessages (true);  /* Error output is handled by libofx not OpenSP */
00363   OFCApplication *app = new OFCApplication(libofx_context);
00364   unsigned nErrors = egp->run (*app); /* Begin parsing */
00365   delete egp;
00366   return nErrors > 0;
00367 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2file__preproc_8cpp_source.html0000644000175000017500000005613311553133250022136 00000000000000 LibOFX: file_preproc.cpp Source File

file_preproc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002           file_preproc.cpp
00003                              -------------------
00004     copyright            : (C) 2004 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #include <iostream>
00021 #include <fstream>
00022 #include <stdlib.h>
00023 #include <stdio.h>
00024 #include <string>
00025 #include "libofx.h"
00026 #include "messages.hh"
00027 #include "ofx_preproc.hh"
00028 #include "context.hh"
00029 #include "file_preproc.hh"
00030 
00031 using namespace std;
00032 const unsigned int READ_BUFFER_SIZE = 1024;
00033 
00034 /* get_file_type_description returns a string description of a LibofxFileType
00035  * suitable for debugging output or user communication.
00036  */
00037 const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
00038 {
00039   const char * retval = "UNKNOWN (File format couldn't be sucessfully identified)";
00040 
00041   for (int i = 0; LibofxImportFormatList[i].format != LAST; i++)
00042   {
00043     if (LibofxImportFormatList[i].format == file_format)
00044     {
00045       retval = LibofxImportFormatList[i].description;
00046     }
00047   }
00048   return retval;
00049 };
00050 
00051 /*
00052 libofx_get_file_type returns a proper enum from a file type string.
00053 */
00054 enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string)
00055 {
00056   enum LibofxFileFormat retval = UNKNOWN;
00057   for (int i = 0; LibofxImportFormatList[i].format != LAST; i++)
00058   {
00059     if (strcmp(LibofxImportFormatList[i].format_name, file_type_string) == 0)
00060     {
00061       retval = LibofxImportFormatList[i].format;
00062     }
00063   }
00064   return retval;
00065 }
00066 
00067 int libofx_proc_file(LibofxContextPtr p_libofx_context, const char * p_filename, LibofxFileFormat p_file_type)
00068 {
00069   LibofxContext * libofx_context = (LibofxContext *) p_libofx_context;
00070 
00071   if (p_file_type == AUTODETECT)
00072   {
00073     message_out(INFO, string("libofx_proc_file(): File format not specified, autodecting..."));
00074     libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename));
00075     message_out(INFO, string("libofx_proc_file(): Detected file format: ") +
00076                 libofx_get_file_format_description(LibofxImportFormatList,
00077                     libofx_context->currentFileType() ));
00078   }
00079   else
00080   {
00081     libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename));
00082     message_out(INFO,
00083                 string("libofx_proc_file(): File format forced to: ") +
00084                 libofx_get_file_format_description(LibofxImportFormatList,
00085                     libofx_context->currentFileType() ));
00086   }
00087 
00088   switch (libofx_context->currentFileType())
00089   {
00090   case OFX:
00091     ofx_proc_file(libofx_context, p_filename);
00092     break;
00093   case OFC:
00094     ofx_proc_file(libofx_context, p_filename);
00095     break;
00096   default:
00097     message_out(ERROR, string("libofx_proc_file(): Detected file format not yet supported ou couldn't detect file format; aborting."));
00098   }
00099   return 0;
00100 }
00101 
00102 enum LibofxFileFormat libofx_detect_file_type(const char * p_filename)
00103 {
00104   enum LibofxFileFormat retval = UNKNOWN;
00105   ifstream input_file;
00106   char buffer[READ_BUFFER_SIZE];
00107   string s_buffer;
00108   bool type_found = false;
00109 
00110   if (p_filename != NULL && strcmp(p_filename, "") != 0)
00111   {
00112     message_out(DEBUG, string("libofx_detect_file_type():Opening file: ") + p_filename);
00113 
00114     input_file.open(p_filename);
00115 
00116     if (!input_file)
00117     {
00118       message_out(ERROR, "libofx_detect_file_type():Unable to open the input file " + string(p_filename));
00119       return retval;
00120     }
00121     else
00122     {
00123       do
00124       {
00125         input_file.getline(buffer, sizeof(buffer), '\n');
00126         //cout<<buffer<<"\n";
00127         s_buffer.assign(buffer);
00128         //cout<<"input_file.gcount(): "<<input_file.gcount()<<" sizeof(buffer): "<<sizeof(buffer)<<endl;
00129         if (input_file.gcount() < (sizeof(buffer) - 1))
00130         {
00131           s_buffer.append("\n");//Just in case...
00132         }
00133         else if ( !input_file.eof() && input_file.fail())
00134         {
00135           input_file.clear();
00136         }
00137 
00138         if (s_buffer.find("<OFX>") != string::npos || s_buffer.find("<ofx>") != string::npos)
00139         {
00140           message_out(DEBUG, "libofx_detect_file_type():<OFX> tag has been found");
00141           retval = OFX;
00142           type_found = true;
00143         }
00144         else if (s_buffer.find("<OFC>") != string::npos || s_buffer.find("<ofc>") != string::npos)
00145         {
00146           message_out(DEBUG, "libofx_detect_file_type():<OFC> tag has been found");
00147           retval = OFC;
00148           type_found = true;
00149         }
00150 
00151       }
00152       while (type_found == false && !input_file.eof() && !input_file.bad());
00153     }
00154     input_file.close();
00155   }
00156   else
00157   {
00158     message_out(ERROR, "libofx_detect_file_type(): No input file specified");
00159   }
00160   if (retval == UNKNOWN)
00161     message_out(ERROR, "libofx_detect_file_type(): Failed to identify input file format");
00162   return retval;
00163 }
00164 
00165 
00166 
00167 
00168 
libofx-0.9.4/doc/html/classOfxBalanceContainer.html0000644000175000017500000003064111553133250017224 00000000000000 LibOFX: OfxBalanceContainer Class Reference

OfxBalanceContainer Class Reference

Represents the <BALANCE> OFX SGML entity. More...

Inheritance diagram for OfxBalanceContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxBalanceContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxBalanceContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Data Fields

double amount
int amount_valid
time_t date
int date_valid

Detailed Description

Represents the <BALANCE> OFX SGML entity.

OfxBalanceContainer is an auxiliary container (there is no matching data object in libofx.h)

Definition at line 110 of file ofx_containers.hh.


Member Function Documentation

void OfxBalanceContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 165 of file ofx_containers_misc.cpp.

void OfxBalanceContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.


Field Documentation

Interpretation depends on balance_type

Definition at line 117 of file ofx_containers.hh.

Referenced by add_attribute().

Effective date of the given balance

Definition at line 119 of file ofx_containers.hh.

Referenced by add_attribute().


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofxconnect_8cpp_source.html0000644000175000017500000014657611553133250017030 00000000000000 LibOFX: ofxconnect.cpp Source File

ofxconnect.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_connect.cpp 
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00023 /***************************************************************************
00024  *                                                                         *
00025  *   This program is free software; you can redistribute it and/or modify  *
00026  *   it under the terms of the GNU General Public License as published by  *
00027  *   the Free Software Foundation; either version 2 of the License, or     *
00028  *   (at your option) any later version.                                   *
00029  *                                                                         *
00030  ***************************************************************************/
00031 #include <iostream>
00032 #include <fstream>
00033 #include <string>
00034 #include "libofx.h"
00035 #include <config.h>             /* Include config constants, e.g., VERSION TF */
00036 #include <stdio.h>
00037 #include <stdlib.h>
00038 #include <unistd.h>
00039 #include <cstring>
00040 #include <cstdlib>
00041 #include <string.h>
00042 #ifdef HAVE_LIBCURL
00043 #include <curl/curl.h>
00044 #endif
00045 
00046 #include "cmdline.h" /* Gengetopt generated parser */
00047 
00048 #include "nodeparser.h"
00049 #include "ofxpartner.h"
00050 
00051 using namespace std;
00052 
00053 #ifdef HAVE_LIBCURL
00054 bool post(const char* request, const char* url, const char* filename)
00055 {
00056   CURL *curl = curl_easy_init();
00057   if(! curl)
00058     return false;
00059 
00060   unlink("tmpout");  
00061   FILE* file = fopen(filename,"wb");
00062   if (! file )
00063   {
00064     curl_easy_cleanup(curl);
00065     return false;
00066   }
00067     
00068   curl_easy_setopt(curl, CURLOPT_URL, url);
00069   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request);
00070 
00071   struct curl_slist *headerlist=NULL;
00072   headerlist=curl_slist_append(headerlist, "Content-type: application/x-ofx");
00073   headerlist=curl_slist_append(headerlist, "Accept: */*, application/x-ofx");    
00074   
00075   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
00076   curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
00077   curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)file);
00078     
00079   CURLcode res = curl_easy_perform(curl);
00080 
00081   curl_easy_cleanup(curl);
00082   curl_slist_free_all (headerlist);
00083   
00084   fclose(file);
00085   
00086   return true;
00087 }
00088 #else
00089 bool post(const char*, const char*, const char*)
00090 {
00091   cerr << "ERROR: libox must be configured with libcurl to post this request directly" << endl;
00092   return false;
00093 }
00094 #endif
00095 
00096 ostream& operator<<(ostream& os,const vector<string>& strvect)
00097 {
00098   for( vector<string>::const_iterator it=strvect.begin(); it!=strvect.end(); ++it)
00099   {
00100     os << (*it) << endl;
00101   }
00102   return os;
00103 }
00104 
00105 int main (int argc, char *argv[])
00106 {
00107   gengetopt_args_info args_info;
00108   
00109   if (cmdline_parser (argc, argv, &args_info) != 0)
00110     exit(1) ;
00111 
00112   if ( argc == 1 )
00113   {
00114     cmdline_parser_print_help();
00115     exit(1);
00116   }
00117 
00118   if ( args_info.statement_req_given || args_info.accountinfo_req_given )
00119   {
00120   if ( (args_info.inputs_num > 0) )
00121   {
00122     cout << "file " << args_info.inputs[0] << endl;
00123   }
00124   else
00125   {
00126     cerr << "ERROR: You must specify an output file" << endl;
00127   }
00128   }
00129   else if ( args_info.bank_fipid_given || args_info.bank_services_given )
00130   {
00131   if ( (args_info.inputs_num > 0) )
00132   {
00133     cout << "bank " << args_info.inputs[0] << endl;
00134   }
00135   else
00136   {
00137     cerr << "ERROR: You must specify an bank" << endl;
00138   }
00139   }
00140  
00141   OfxFiLogin fi;
00142   memset(&fi,0,sizeof(OfxFiLogin));
00143   bool ok = true;
00144   string url;
00145  
00146   if ( args_info.statement_req_given || args_info.accountinfo_req_given || args_info.payment_req_given || args_info.paymentinquiry_req_given )
00147   {
00148   // Get the FI Login information
00149   // 
00150  
00151   if ( args_info.fipid_given )
00152   {
00153     cerr << "fipid " <<  args_info.fipid_arg << endl;  
00154     cerr << "contacting partner server..." << endl;
00155     OfxFiServiceInfo svcinfo = OfxPartner::ServiceInfo(args_info.fipid_arg);
00156     cout << "fid " << svcinfo.fid << endl;
00157     strncpy(fi.fid,svcinfo.fid,OFX_FID_LENGTH-1);
00158     cout << "org " << svcinfo.org << endl;
00159     strncpy(fi.org,svcinfo.org,OFX_ORG_LENGTH-1);
00160     cout << "url " << svcinfo.url << endl;
00161     url = svcinfo.url;
00162   }
00163   if ( args_info.fid_given )
00164   {
00165     cerr << "fid " <<  args_info.fid_arg << endl;  
00166     strncpy(fi.fid,args_info.fid_arg,OFX_FID_LENGTH-1);
00167   }
00168   else if ( ! args_info.fipid_given )
00169   {
00170     cerr << "ERROR: --fid is required" << endl;
00171     ok = false;
00172   }
00173   
00174   if ( args_info.org_given )
00175   {
00176     cerr << "org " << args_info.org_arg << endl;  
00177     strncpy(fi.org,args_info.org_arg,OFX_ORG_LENGTH-1);
00178   }
00179   else if ( ! args_info.fipid_given )
00180   {
00181     cerr << "ERROR: --org is required" << endl;
00182     ok = false;
00183   }
00184 
00185   if ( args_info.user_given )
00186   {
00187     cerr << "user " << args_info.user_arg << endl;  
00188     strncpy(fi.userid,args_info.user_arg,OFX_USERID_LENGTH-1);
00189   }
00190   else
00191   {
00192     cerr << "ERROR: --user is required" << endl;
00193     ok = false;
00194   }
00195   
00196   if ( args_info.pass_given )
00197   {
00198     cerr << "pass " << args_info.pass_arg << endl;  
00199     strncpy(fi.userpass,args_info.pass_arg,OFX_USERPASS_LENGTH-1);
00200   }
00201   else
00202   {
00203     cerr << "ERROR: --pass is required" << endl;
00204     ok = false;
00205   }
00206   
00207   if ( args_info.url_given )
00208     url = args_info.url_arg;
00209   }
00210   
00211   if ( args_info.statement_req_given )
00212   {
00213     cerr << "Statement request" << endl;
00214     
00215     OfxAccountData account;
00216     memset(&account,0,sizeof(OfxAccountData));
00217     
00218     if ( args_info.bank_given )
00219     {
00220       cerr << "bank " << args_info.bank_arg << endl;  
00221       strncpy(account.bank_id,args_info.bank_arg,OFX_BANKID_LENGTH-1);
00222     }
00223     else    
00224     {
00225       if ( args_info.type_given && args_info.type_arg == 1 )
00226       {
00227         cerr << "ERROR: --bank is required for a bank request" << endl;
00228         ok = false;
00229       }
00230     }
00231     
00232     if ( args_info.broker_given )
00233     {
00234       cerr << "broker " << args_info.broker_arg << endl;  
00235       strncpy(account.broker_id,args_info.broker_arg,OFX_BROKERID_LENGTH-1);
00236     }
00237     else
00238     {
00239       if ( args_info.type_given && args_info.type_arg == 2 )
00240       {
00241         cerr << "ERROR: --broker is required for an investment statement request" << endl;
00242         ok = false;
00243       }
00244     }
00245     
00246     if ( args_info.acct_given )
00247     {
00248       cerr << "acct " << args_info.acct_arg << endl;  
00249       strncpy(account.account_number,args_info.acct_arg,OFX_ACCTID_LENGTH-1);
00250     }
00251     else
00252     {
00253       cerr << "ERROR: --acct is required for a statement request" << endl;
00254       ok = false;
00255     }
00256     
00257     if ( args_info.type_given )
00258     {
00259       cerr << "type " << args_info.type_arg << endl;
00260       switch (args_info.type_arg) {
00261       case 1: account.account_type = account.OFX_CHECKING;
00262         break;
00263       case 2: account.account_type = account.OFX_INVESTMENT;
00264         break;
00265       case 3: account.account_type = account.OFX_CREDITCARD ;
00266         break;
00267       default:
00268         cerr << "ERROR: --type is not valid.  Must be between 1 and 3" << endl;
00269         ok = false;
00270       }
00271     }
00272     else
00273     {
00274       cerr << "ERROR: --type is required for a statement request" << endl;
00275       ok = false;
00276     }
00277     
00278     if ( args_info.past_given )
00279     {
00280       cerr << "past " << args_info.past_arg << endl;  
00281     }
00282     else
00283     {
00284       cerr << "ERROR: --past is required for a statement request" << endl;
00285       ok = false;
00286     }
00287     
00288     if ( ok )
00289     {
00290       char* request = libofx_request_statement( &fi, &account, time(NULL) - args_info.past_arg * 86400L );
00291     
00292       if ( url.length() ) 
00293         post(request,url.c_str(),args_info.inputs[0]);
00294       else
00295         cout << request;
00296       
00297       free(request);
00298     }
00299   }
00300 
00301   if ( args_info.paymentinquiry_req_given )
00302   {
00303     char tridstr[33];
00304     memset(tridstr,0,33);
00305 
00306     bool ok = true;
00307 
00308     if ( args_info.trid_given )
00309     {
00310       cerr << "trid " << args_info.trid_arg << endl;  
00311       snprintf(tridstr,32,"%i",args_info.trid_arg);
00312     }
00313     else
00314     {
00315       cerr << "ERROR: --trid is required for a payment inquiry request" << endl;
00316       ok = false;
00317     }
00318  
00319     if ( ok )
00320     {
00321       char* request = libofx_request_payment_status( &fi, tridstr );
00322  
00323       filebuf fb;
00324       fb.open ("query",ios::out);
00325       ostream os(&fb);
00326       os << request;
00327       fb.close();
00328       
00329       if ( url.length() ) 
00330         post(request,url.c_str(),args_info.inputs[0]);
00331       else
00332         cout << request;
00333     
00334       free(request);
00335     }
00336   }
00337   
00338   if ( args_info.payment_req_given )
00339   {
00340     OfxAccountData account;
00341     memset(&account,0,sizeof(OfxAccountData));
00342     OfxPayee payee;
00343     memset(&payee,0,sizeof(OfxPayee));
00344     OfxPayment payment;
00345     memset(&payment,0,sizeof(OfxPayment));
00346 
00347     strcpy(payee.name,"MARTIN PREUSS");
00348     strcpy(payee.address1,"1 LAUREL ST");
00349     strcpy(payee.city,"SAN CARLOS");
00350     strcpy(payee.state,"CA");
00351     strcpy(payee.postalcode,"94070");
00352     strcpy(payee.phone,"866-555-1212");
00353         
00354     strcpy(payment.amount,"200.00");
00355     strcpy(payment.account,"1234");
00356     strcpy(payment.datedue,"20060301");
00357     strcpy(payment.memo,"This is a test");
00358 
00359     bool ok = true;
00360 
00361     if ( args_info.bank_given )
00362     {
00363       cerr << "bank " << args_info.bank_arg << endl;  
00364       strncpy(account.bank_id,args_info.bank_arg,OFX_BANKID_LENGTH-1);
00365     }
00366     else    
00367     {
00368       if ( args_info.type_given && args_info.type_arg == 1 )
00369       {
00370         cerr << "ERROR: --bank is required for a bank request" << endl;
00371         ok = false;
00372       }
00373     }
00374     
00375     if ( args_info.broker_given )
00376     {
00377       cerr << "broker " << args_info.broker_arg << endl;  
00378       strncpy(account.broker_id,args_info.broker_arg,OFX_BROKERID_LENGTH-1);
00379     }
00380     else
00381     {
00382       if ( args_info.type_given && args_info.type_arg == 2 )
00383       {
00384         cerr << "ERROR: --broker is required for an investment statement request" << endl;
00385         ok = false;
00386       }
00387     }
00388     
00389     if ( args_info.acct_given )
00390     {
00391       cerr << "acct " << args_info.acct_arg << endl;  
00392       strncpy(account.account_number,args_info.acct_arg,OFX_ACCTID_LENGTH-1);
00393     }
00394     else
00395     {
00396       cerr << "ERROR: --acct is required for a statement request" << endl;
00397       ok = false;
00398     }
00399     
00400     if ( args_info.type_given )
00401     { 
00402       cerr << "type " << args_info.type_arg << endl;
00403       switch (args_info.type_arg) {
00404       case 1: account.account_type = account.OFX_CHECKING;
00405         break;
00406       case 2: account.account_type = account.OFX_INVESTMENT;
00407         break;
00408       case 3: account.account_type = account.OFX_CREDITCARD ;
00409         break;
00410       default:
00411         cerr << "ERROR: --type is not valid.  Must be between 1 and 3" << endl;
00412         ok = false;
00413       }
00414     }
00415     else
00416     {
00417       cerr << "ERROR: --type is required for a statement request" << endl;
00418       ok = false;
00419     }
00420     
00421     if ( ok )
00422     {
00423       char* request = libofx_request_payment( &fi, &account, &payee, &payment );
00424     
00425       filebuf fb;
00426       fb.open ("query",ios::out);
00427       ostream os(&fb);
00428       os << request;
00429       fb.close();
00430       
00431       if ( url.length() ) 
00432         post(request,url.c_str(),args_info.inputs[0]);
00433       else
00434         cout << request;
00435     
00436       free(request);
00437     }
00438         
00439   }
00440   
00441   if ( args_info.accountinfo_req_given )
00442   {
00443     if ( ok )
00444     {
00445       char* request = libofx_request_accountinfo( &fi );
00446     
00447       if ( url.length() ) 
00448         post(request,url.c_str(),args_info.inputs[0]);
00449       else
00450         cout << request;
00451     
00452       free(request);
00453     }
00454   }
00455         
00456   if ( args_info.bank_list_given )
00457   {
00458     cout << OfxPartner::BankNames();
00459   }
00460   
00461   if ( args_info.bank_fipid_given )
00462   {
00463     cout << OfxPartner::FipidForBank(args_info.inputs[0]);
00464   }
00465   
00466   if ( args_info.bank_services_given )
00467   {
00468     OfxFiServiceInfo svcinfo = OfxPartner::ServiceInfo(args_info.inputs[0]);
00469     cout << "Account List? " << (svcinfo.accountlist?"Yes":"No") << endl;
00470     cout << "Statements? " << (svcinfo.statements?"Yes":"No") << endl;
00471     cout << "Billpay? " << (svcinfo.billpay?"Yes":"No") << endl;
00472     cout << "Investments? " << (svcinfo.investments?"Yes":"No") << endl;
00473   }
00474  
00475   if ( args_info.allsupport_given )
00476   {
00477     vector<string> banks = OfxPartner::BankNames();
00478     vector<string>::const_iterator it_bank = banks.begin();
00479     while ( it_bank != banks.end() )
00480     {
00481       vector<string> fipids = OfxPartner::FipidForBank(*it_bank);
00482       vector<string>::const_iterator it_fipid = fipids.begin();
00483       while ( it_fipid != fipids.end() )
00484       {
00485         if ( OfxPartner::ServiceInfo(*it_fipid).accountlist )
00486           cout << *it_bank << endl;
00487         ++it_fipid;
00488       }
00489       ++it_bank;
00490     }
00491   }
00492   
00493   return 0;
00494 }
00495 
00496 
00497 // vim:cin:si:ai:et:ts=2:sw=2:
00498 
libofx-0.9.4/doc/html/functions_0x6e.html0000644000175000017500000001277411553133250015212 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- n -

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__security_8cpp_source.html0000644000175000017500000003454111553133250024410 00000000000000 LibOFX: ofx_container_security.cpp Source File

ofx_container_security.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_security.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                     OfxSecurityContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxSecurityContainer::OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "SECURITY";
00041 }
00042 OfxSecurityContainer::~OfxSecurityContainer()
00043 {
00044 }
00045 void OfxSecurityContainer::add_attribute(const string identifier, const string value)
00046 {
00047   if (identifier == "UNIQUEID")
00048   {
00049     strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id));
00050     data.unique_id_valid = true;
00051   }
00052   else if (identifier == "UNIQUEIDTYPE")
00053   {
00054     strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type));
00055     data.unique_id_type_valid = true;
00056   }
00057   else if (identifier == "SECNAME")
00058   {
00059     strncpy(data.secname, value.c_str(), sizeof(data.secname));
00060     data.secname_valid = true;
00061   }
00062   else if (identifier == "TICKER")
00063   {
00064     strncpy(data.ticker, value.c_str(), sizeof(data.ticker));
00065     data.ticker_valid = true;
00066   }
00067   else if (identifier == "UNITPRICE")
00068   {
00069     data.unitprice = ofxamount_to_double(value);
00070     data.unitprice_valid = true;
00071   }
00072   else if (identifier == "DTASOF")
00073   {
00074     data.date_unitprice = ofxdate_to_time_t(value);
00075     data.date_unitprice_valid = true;
00076   }
00077   else if (identifier == "CURDEF")
00078   {
00079     strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH);
00080     data.currency_valid = true;
00081   }
00082   else if (identifier == "MEMO" || identifier == "MEMO2")
00083   {
00084     strncpy(data.memo, value.c_str(), sizeof(data.memo));
00085     data.memo_valid = true;
00086   }
00087   else
00088   {
00089     /* Redirect unknown identifiers to the base class */
00090     OfxGenericContainer::add_attribute(identifier, value);
00091   }
00092 }
00093 int  OfxSecurityContainer::gen_event()
00094 {
00095   libofx_context->securityCallback(data);
00096   return true;
00097 }
00098 
00099 int  OfxSecurityContainer::add_to_main_tree()
00100 {
00101   if (MainContainer != NULL)
00102   {
00103     return MainContainer->add_container(this);
00104   }
00105   else
00106   {
00107     return false;
00108   }
00109 }
00110 
libofx-0.9.4/doc/html/classtree_1_1iterator__base__less.html0000644000175000017500000001266411553133250021053 00000000000000 LibOFX: tree< T, tree_node_allocator >::iterator_base_less Class Reference

tree< T, tree_node_allocator >::iterator_base_less Class Reference

Comparator class for iterators (compares the actual node content, not pointer values). More...

Public Member Functions

bool operator() (const typename tree< T, tree_node_allocator >::iterator_base &one, const typename tree< T, tree_node_allocator >::iterator_base &two) const
bool operator() (const typename tree< T, tree_node_allocator >::iterator_base &one, const typename tree< T, tree_node_allocator >::iterator_base &two) const

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::iterator_base_less

Comparator class for iterators (compares the actual node content, not pointer values).

Definition at line 373 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/functions_0x72.html0000644000175000017500000001200111553133250015107 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- r -

libofx-0.9.4/doc/html/ftv2mnode.png0000644000175000017500000000033511553133251014053 00000000000000‰PNG  IHDRɪ|¤IDATxí1A…?âŽàïÎ0¡Ð(F'‘8V§Pk$ À(´¯«QÈŸX›ý5’º÷2ïíîÌÛ¾B J5+©kƒß´ÞÁ|y(€v¤ÿì¦Nì£/ö£OpÓØ}¯Ü´O™Á¸—¸0N¢›.À¬DOÜT$oÁMSàú‚'7-rÖ8@/+nÚ]7³ƒä¦Mý™þÁà žB"cÃAØIEND®B`‚libofx-0.9.4/doc/html/ofc__sgml_8hh.html0000644000175000017500000001152211553133250015025 00000000000000 LibOFX: ofc_sgml.hh File Reference

ofc_sgml.hh File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Functions

int ofc_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Detailed Description

OFX/SGML parsing functionnality.

Definition in file ofc_sgml.hh.


Function Documentation

int ofc_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofc_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 352 of file ofc_sgml.cpp.

libofx-0.9.4/doc/html/ofxconnect_8cpp.html0000644000175000017500000001122511553133250015426 00000000000000 LibOFX: ofxconnect.cpp File Reference

ofxconnect.cpp File Reference

Code for ofxconnect utility. C++ example code. More...

Go to the source code of this file.

Functions

bool post (const char *, const char *, const char *)
ostream & operator<< (ostream &os, const vector< string > &strvect)
int main (int argc, char *argv[])

Detailed Description

Code for ofxconnect utility. C++ example code.

the purpose of the ofxconnect utility is to server as example code for ALL functions of libOFX that have to do with creating OFX files.

ofxconnect prints to stdout the created OFX file based on the options you pass it

currently it will only create the statement request file. you can POST this to an OFX server to request a statement from that financial institution for that account.

In the hopefully-not-to-distant future, ofxconnect will also make the connection to the OFX server, post the data, and call ofxdump itself.

Definition in file ofxconnect.cpp.

libofx-0.9.4/doc/html/functions_0x73.html0000644000175000017500000001550311553133250015122 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- s -

libofx-0.9.4/doc/html/globals_0x69.html0000644000175000017500000001113211553133251014535 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- i -

libofx-0.9.4/doc/html/ofx__sgml_8hh_source.html0000644000175000017500000001206611553133250016436 00000000000000 LibOFX: ofx_sgml.hh Source File

ofx_sgml.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.h
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFX_SGML_H
00020 #define OFX_SGML_H
00021 #include "context.hh"
00023 int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]);
00024 
00025 #endif
libofx-0.9.4/doc/html/globals_0x66.html0000644000175000017500000001203311553133251014533 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- f -

libofx-0.9.4/doc/html/ofx__utilities_8cpp_source.html0000644000175000017500000006401711553133250017675 00000000000000 LibOFX: ofx_utilities.cpp Source File

ofx_utilities.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_util.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #include <config.h>
00019 #include <iostream>
00020 #include <assert.h>
00021 
00022 #include "ParserEventGeneratorKit.h"
00023 #include "SGMLApplication.h"
00024 #include <ctime>
00025 #include <cstdlib>
00026 #include <string>
00027 #include <locale.h>
00028 #include "messages.hh"
00029 #include "ofx_utilities.hh"
00030 
00031 #ifdef OS_WIN32
00032 # define DIRSEP "\\"
00033 #else
00034 # define DIRSEP "/"
00035 #endif
00036 
00037 
00038 using namespace std;
00042 /*ostream &operator<<(ostream &os, SGMLApplication::CharString s)
00043   {
00044   for (size_t i = 0; i < s.len; i++)
00045   {
00046   os << ((char *)(s.ptr))[i*sizeof(SGMLApplication::Char)];
00047   }
00048   return os;
00049   }*/
00050 
00051 /*wostream &operator<<(wostream &os, SGMLApplication::CharString s)
00052   {
00053   for (size_t i = 0; i < s.len; i++)
00054   {//cout<<i;
00055   os << wchar_t(s.ptr[i*MULTIPLY4]);
00056   }
00057   return os;
00058   }            */
00059 
00060 /*wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest)
00061   {
00062   size_t i;
00063   for (i = 0; i < source.len; i++)
00064   {
00065   dest[i]+=wchar_t(source.ptr[i*sizeof(SGMLApplication::Char)*(sizeof(char)/sizeof(wchar_t))]);
00066   }
00067   return dest;
00068   }*/
00069 
00070 string CharStringtostring(const SGMLApplication::CharString source, string &dest)
00071 {
00072   size_t i;
00073   dest.assign("");//Empty the provided string
00074   //  cout<<"Length: "<<source.len<<"sizeof(Char)"<<sizeof(SGMLApplication::Char)<<endl;
00075   for (i = 0; i < source.len; i++)
00076   {
00077     dest += (char)(((source.ptr)[i]));
00078     //    cout<<i<<" "<<(char)(((source.ptr)[i]))<<endl;
00079   }
00080   return dest;
00081 }
00082 
00083 string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest)
00084 {
00085   size_t i;
00086   for (i = 0; i < source.len; i++)
00087   {
00088     dest += (char)(((source.ptr)[i]));
00089   }
00090   return dest;
00091 }
00092 
00108 time_t ofxdate_to_time_t(const string ofxdate)
00109 {
00110   struct tm time;
00111   double local_offset; /* in seconds */
00112   float ofx_gmt_offset; /* in fractional hours */
00113   char timezone[4]; /* Original timezone: the library does not expose this value*/
00114   char exact_time_specified = false;
00115   char time_zone_specified = false;
00116   string ofxdate_whole;
00117   time_t temptime;
00118 
00119   time.tm_isdst = daylight; // initialize dst setting
00120   std::time(&temptime);
00121   local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight);
00122 
00123   if (ofxdate.size() != 0)
00124   {
00125         ofxdate_whole = ofxdate.substr(0,ofxdate.find_first_not_of("0123456789"));
00126     if (ofxdate_whole.size()>=8)
00127     {
00128       time.tm_year = atoi(ofxdate_whole.substr(0, 4).c_str()) - 1900;
00129       time.tm_mon = atoi(ofxdate_whole.substr(4, 2).c_str()) - 1;
00130       time.tm_mday = atoi(ofxdate_whole.substr(6, 2).c_str());
00131 
00132       if (ofxdate_whole.size() > 8)
00133       {
00134         if (ofxdate_whole.size() == 14)
00135         {
00136         /* if exact time is specified */
00137         exact_time_specified = true;
00138         time.tm_hour = atoi(ofxdate_whole.substr(8, 2).c_str());
00139         time.tm_min = atoi(ofxdate_whole.substr(10, 2).c_str());
00140         time.tm_sec = atoi(ofxdate_whole.substr(12, 2).c_str());
00141         }
00142         else
00143         {
00144                 message_out(WARNING, "ofxdate_to_time_t():  Successfully parsed date part, but unable to parse time part of string " + ofxdate_whole + ". It is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!");
00145         }
00146       }
00147 
00148     }
00149     else
00150     {
00151           /* Catch invalid string format */
00152           message_out(ERROR, "ofxdate_to_time_t():  Unable to convert time, string " + ofxdate + " is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!");
00153           return mktime(&time);
00154     }
00155 
00156 
00157     /* Check if the timezone has been specified */
00158     string::size_type startidx = ofxdate.find("[");
00159     string::size_type endidx;
00160     if (startidx != string::npos)
00161     {
00162       /* Time zone was specified */
00163       time_zone_specified = true;
00164       startidx++;
00165       endidx = ofxdate.find(":", startidx) - 1;
00166       ofx_gmt_offset = atof(ofxdate.substr(startidx, (endidx - startidx) + 1).c_str());
00167       startidx = endidx + 2;
00168       strncpy(timezone, ofxdate.substr(startidx, 3).c_str(), 4);
00169     }
00170     else
00171     {
00172       /* Time zone was not specified, assume GMT (provisionnaly) in case exact time is specified */
00173       ofx_gmt_offset = 0;
00174       strcpy(timezone, "GMT");
00175     }
00176 
00177     if (time_zone_specified == true)
00178     {
00179       /* If the timezone is specified always correct the timezone */
00180       /* If the timezone is not specified, but the exact time is, correct the timezone, assuming GMT following the spec */
00181       /* Correct the time for the timezone */
00182       time.tm_sec = time.tm_sec + (int)(local_offset - (ofx_gmt_offset * 60 * 60)); //Convert from fractionnal hours to seconds
00183     }
00184     else if (exact_time_specified == false)
00185     {
00186       /*Time zone data missing and exact time not specified, diverge from the OFX spec ans assume 11h59 local time */
00187       time.tm_hour = 11;
00188       time.tm_min = 59;
00189       time.tm_sec = 0;
00190     }
00191     return mktime(&time);
00192   }
00193   else
00194   {
00195     message_out(ERROR, "ofxdate_to_time_t():  Unable to convert time, string is 0 length!");
00196   }
00197   return mktime(&time);
00198 }
00199 
00204 double ofxamount_to_double(const string ofxamount)
00205 {
00206   //Replace commas and decimal points for atof()
00207   string::size_type idx;
00208   string tmp = ofxamount;
00209 
00210   idx = tmp.find(',');
00211   if (idx == string::npos)
00212   {
00213     idx = tmp.find('.');
00214   }
00215 
00216   if (idx != string::npos)
00217   {
00218     tmp.replace(idx, 1, 1, ((localeconv())->decimal_point)[0]);
00219   }
00220 
00221   return atof(tmp.c_str());
00222 }
00223 
00227 string strip_whitespace(const string para_string)
00228 {
00229   size_t index;
00230   size_t i;
00231   string temp_string = para_string;
00232   const char *whitespace = " \b\f\n\r\t\v";
00233   const char *abnormal_whitespace = "\b\f\n\r\t\v";//backspace,formfeed,newline,cariage return, horizontal and vertical tabs
00234   message_out(DEBUG4, "strip_whitespace() Before: |" + temp_string + "|");
00235   for (i = 0; i <= temp_string.size() && temp_string.find_first_of(whitespace, i) == i && temp_string.find_first_of(whitespace, i) != string::npos; i++);
00236   temp_string.erase(0, i); //Strip leading whitespace
00237   for (i = temp_string.size() - 1; (i >= 0) && (temp_string.find_last_of(whitespace, i) == i) && (temp_string.find_last_of(whitespace, i) != string::npos); i--);
00238   temp_string.erase(i + 1, temp_string.size() - (i + 1)); //Strip trailing whitespace
00239 
00240   while ((index = temp_string.find_first_of(abnormal_whitespace)) != string::npos)
00241   {
00242     temp_string.erase(index, 1); //Strip leading whitespace
00243   };
00244 
00245   message_out(DEBUG4, "strip_whitespace() After:  |" + temp_string + "|");
00246 
00247   return temp_string;
00248 }
00249 
00250 
00251 std::string get_tmp_dir()
00252 {
00253   // Tries to mimic the behaviour of
00254   // http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Utility-Functions.html#g-get-tmp-dir
00255   char *var;
00256   var = getenv("TMPDIR");
00257   if (var) return var;
00258   var = getenv("TMP");
00259   if (var) return var;
00260   var = getenv("TEMP");
00261   if (var) return var;
00262 #ifdef OS_WIN32
00263   return "C:\\";
00264 #else
00265   return "/tmp";
00266 #endif
00267 }
00268 
00269 int mkTempFileName(const char *tmpl, char *buffer, unsigned int size)
00270 {
00271 
00272   std::string tmp_dir = get_tmp_dir();
00273 
00274   strncpy(buffer, tmp_dir.c_str(), size);
00275   assert((strlen(buffer) + strlen(tmpl) + 2) < size);
00276   strcat(buffer, DIRSEP);
00277   strcat(buffer, tmpl);
00278   return 0;
00279 }
00280 
00281 
00282 
libofx-0.9.4/doc/html/classtree.html0000644000175000017500000024661111553133250014324 00000000000000 LibOFX: tree< T, tree_node_allocator > Class Template Reference

tree< T, tree_node_allocator > Class Template Reference

Data Structures

class  compare_nodes
 Comparator class for two nodes of a tree (used for sorting and searching).
class  fixed_depth_iterator
 Iterator which traverses only the nodes at a given depth from the root. More...
class  iterator_base
 Base class for iterators, only pointers stored, no traversal logic. More...
class  iterator_base_less
 Comparator class for iterators (compares the actual node content, not pointer values). More...
class  post_order_iterator
 Depth-first iterator, first accessing the children, then the node itself. More...
class  pre_order_iterator
 Depth-first iterator, first accessing the node, then its children. More...
class  sibling_iterator
 Iterator which traverses only the nodes which are siblings of each other. More...

Public Types

typedef T value_type
 Value of the data stored at a node.
typedef pre_order_iterator iterator
 The default iterator type throughout the tree class.
typedef T value_type
 Value of the data stored at a node.
typedef pre_order_iterator iterator
 The default iterator type throughout the tree class.

Public Member Functions

 tree (const T &)
 tree (const iterator_base &)
 tree (const tree< T, tree_node_allocator > &)
void operator= (const tree< T, tree_node_allocator > &)
pre_order_iterator begin () const
 Return iterator to the beginning of the tree.
pre_order_iterator end () const
 Return iterator to the end of the tree.
post_order_iterator begin_post () const
 Return post-order iterator to the beginning of the tree.
post_order_iterator end_post () const
 Return post-order iterator to the end of the tree.
fixed_depth_iterator begin_fixed (const iterator_base &, unsigned int) const
 Return fixed-depth iterator to the first node at a given depth.
fixed_depth_iterator end_fixed (const iterator_base &, unsigned int) const
 Return fixed-depth iterator to end of the nodes at given depth.
sibling_iterator begin (const iterator_base &) const
 Return sibling iterator to the first child of given node.
sibling_iterator end (const iterator_base &) const
 Return sibling iterator to the end of the children of a given node.
template<typename iter >
iter parent (iter) const
 Return iterator to the parent of a node.
template<typename iter >
iter previous_sibling (iter) const
 Return iterator to the previous sibling of a node.
template<typename iter >
iter next_sibling (iter) const
 Return iterator to the next sibling of a node.
template<typename iter >
iter next_at_same_depth (iter) const
 Return iterator to the next node at a given depth.
void clear ()
 Erase all nodes of the tree.
template<typename iter >
iter erase (iter)
 Erase element at position pointed to by iterator, return incremented iterator.
void erase_children (const iterator_base &)
 Erase all children of the node pointed to by iterator.
template<typename iter >
iter append_child (iter position)
 Insert empty node as last child of node pointed to by position.
template<typename iter >
iter append_child (iter position, const T &x)
 Insert node as last child of node pointed to by position.
template<typename iter >
iter append_child (iter position, iter other_position)
 Append the node (plus its children) at other_position as a child of position.
template<typename iter >
iter append_children (iter position, sibling_iterator from, sibling_iterator to)
 Append the nodes in the from-to range (plus their children) as children of position.
pre_order_iterator set_head (const T &x)
 Short-hand to insert topmost node in otherwise empty tree.
template<typename iter >
iter insert (iter position, const T &x)
 Insert node as previous sibling of node pointed to by position.
sibling_iterator insert (sibling_iterator position, const T &x)
 Specialisation of previous member.
template<typename iter >
iter insert_subtree (iter position, const iterator_base &subtree)
 Insert node (with children) pointed to by subtree as previous sibling of node pointed to by position.
template<typename iter >
iter insert_after (iter position, const T &x)
 Insert node as next sibling of node pointed to by position.
template<typename iter >
iter replace (iter position, const T &x)
 Replace node at 'position' with other node (keeping same children); 'position' becomes invalid.
template<typename iter >
iter replace (iter position, const iterator_base &from)
 Replace node at 'position' with subtree starting at 'from' (do not erase subtree at 'from'); see above.
sibling_iterator replace (sibling_iterator orig_begin, sibling_iterator orig_end, sibling_iterator new_begin, sibling_iterator new_end)
 Replace string of siblings (plus their children) with copy of a new string (with children); see above.
template<typename iter >
iter flatten (iter position)
 Move all children of node at 'position' to be siblings, returns position.
template<typename iter >
iter reparent (iter position, sibling_iterator begin, sibling_iterator end)
 Move nodes in range to be children of 'position'.
template<typename iter >
iter reparent (iter position, iter from)
 Move all child nodes of 'from' to be children of 'position'.
template<typename iter >
iter move_after (iter target, iter source)
 Move 'source' node (plus its children) to become the next sibling of 'target'.
template<typename iter >
iter move_before (iter target, iter source)
 Move 'source' node (plus its children) to become the previous sibling of 'target'.
template<typename iter >
iter move_ontop (iter target, iter source)
 Move 'source' node (plus its children) to become the node at 'target' (erasing the node at 'target').
void merge (sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator, bool duplicate_leaves=false)
 Merge with other tree, creating new branches and leaves only if they are not already present.
void sort (sibling_iterator from, sibling_iterator to, bool deep=false)
 Sort (std::sort only moves values of nodes, this one moves children as well).
template<class StrictWeakOrdering >
void sort (sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep=false)
template<typename iter >
bool equal (const iter &one, const iter &two, const iter &three) const
 Compare two ranges of nodes (compares nodes as well as tree structure).
template<typename iter , class BinaryPredicate >
bool equal (const iter &one, const iter &two, const iter &three, BinaryPredicate) const
template<typename iter >
bool equal_subtree (const iter &one, const iter &two) const
template<typename iter , class BinaryPredicate >
bool equal_subtree (const iter &one, const iter &two, BinaryPredicate) const
tree subtree (sibling_iterator from, sibling_iterator to) const
 Extract a new tree formed by the range of siblings plus all their children.
void subtree (tree &, sibling_iterator from, sibling_iterator to) const
void swap (sibling_iterator it)
 Exchange the node (plus subtree) with its sibling node (do nothing if no sibling present).
int size () const
 Count the total number of nodes.
bool empty () const
 Check if tree is empty.
int depth (const iterator_base &) const
 Compute the depth to the root.
unsigned int number_of_children (const iterator_base &) const
 Count the number of children of node at position.
unsigned int number_of_siblings (const iterator_base &) const
 Count the number of 'next' siblings of node at iterator.
bool is_in_subtree (const iterator_base &position, const iterator_base &begin, const iterator_base &end) const
 Determine whether node at position is in the subtrees with root in the range.
bool is_valid (const iterator_base &) const
 Determine whether the iterator is an 'end' iterator and thus not actually pointing to a node.
unsigned int index (sibling_iterator it) const
 Determine the index of a node in the range of siblings to which it belongs.
sibling_iterator child (const iterator_base &position, unsigned int) const
 Inverse of 'index': return the n-th child of the node at position.
 tree (const T &)
 tree (const iterator_base &)
 tree (const tree< T, tree_node_allocator > &)
void operator= (const tree< T, tree_node_allocator > &)
pre_order_iterator begin () const
 Return iterator to the beginning of the tree.
pre_order_iterator end () const
 Return iterator to the end of the tree.
post_order_iterator begin_post () const
 Return post-order iterator to the beginning of the tree.
post_order_iterator end_post () const
 Return post-order iterator to the end of the tree.
fixed_depth_iterator begin_fixed (const iterator_base &, unsigned int) const
 Return fixed-depth iterator to the first node at a given depth.
fixed_depth_iterator end_fixed (const iterator_base &, unsigned int) const
 Return fixed-depth iterator to end of the nodes at given depth.
sibling_iterator begin (const iterator_base &) const
 Return sibling iterator to the first child of given node.
sibling_iterator end (const iterator_base &) const
 Return sibling iterator to the end of the children of a given node.
template<typename iter >
iter parent (iter) const
 Return iterator to the parent of a node.
template<typename iter >
iter previous_sibling (iter) const
 Return iterator to the previous sibling of a node.
template<typename iter >
iter next_sibling (iter) const
 Return iterator to the next sibling of a node.
template<typename iter >
iter next_at_same_depth (iter) const
 Return iterator to the next node at a given depth.
void clear ()
 Erase all nodes of the tree.
template<typename iter >
iter erase (iter)
 Erase element at position pointed to by iterator, return incremented iterator.
void erase_children (const iterator_base &)
 Erase all children of the node pointed to by iterator.
template<typename iter >
iter append_child (iter position)
 Insert empty node as last child of node pointed to by position.
template<typename iter >
iter append_child (iter position, const T &x)
 Insert node as last child of node pointed to by position.
template<typename iter >
iter append_child (iter position, iter other_position)
 Append the node (plus its children) at other_position as a child of position.
template<typename iter >
iter append_children (iter position, sibling_iterator from, sibling_iterator to)
 Append the nodes in the from-to range (plus their children) as children of position.
pre_order_iterator set_head (const T &x)
 Short-hand to insert topmost node in otherwise empty tree.
template<typename iter >
iter insert (iter position, const T &x)
 Insert node as previous sibling of node pointed to by position.
sibling_iterator insert (sibling_iterator position, const T &x)
 Specialisation of previous member.
template<typename iter >
iter insert_subtree (iter position, const iterator_base &subtree)
 Insert node (with children) pointed to by subtree as previous sibling of node pointed to by position.
template<typename iter >
iter insert_after (iter position, const T &x)
 Insert node as next sibling of node pointed to by position.
template<typename iter >
iter replace (iter position, const T &x)
 Replace node at 'position' with other node (keeping same children); 'position' becomes invalid.
template<typename iter >
iter replace (iter position, const iterator_base &from)
 Replace node at 'position' with subtree starting at 'from' (do not erase subtree at 'from'); see above.
sibling_iterator replace (sibling_iterator orig_begin, sibling_iterator orig_end, sibling_iterator new_begin, sibling_iterator new_end)
 Replace string of siblings (plus their children) with copy of a new string (with children); see above.
template<typename iter >
iter flatten (iter position)
 Move all children of node at 'position' to be siblings, returns position.
template<typename iter >
iter reparent (iter position, sibling_iterator begin, sibling_iterator end)
 Move nodes in range to be children of 'position'.
template<typename iter >
iter reparent (iter position, iter from)
 Move all child nodes of 'from' to be children of 'position'.
template<typename iter >
iter move_after (iter target, iter source)
 Move 'source' node (plus its children) to become the next sibling of 'target'.
template<typename iter >
iter move_before (iter target, iter source)
 Move 'source' node (plus its children) to become the previous sibling of 'target'.
template<typename iter >
iter move_ontop (iter target, iter source)
 Move 'source' node (plus its children) to become the node at 'target' (erasing the node at 'target').
void merge (sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator, bool duplicate_leaves=false)
 Merge with other tree, creating new branches and leaves only if they are not already present.
void sort (sibling_iterator from, sibling_iterator to, bool deep=false)
 Sort (std::sort only moves values of nodes, this one moves children as well).
template<class StrictWeakOrdering >
void sort (sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep=false)
template<typename iter >
bool equal (const iter &one, const iter &two, const iter &three) const
 Compare two ranges of nodes (compares nodes as well as tree structure).
template<typename iter , class BinaryPredicate >
bool equal (const iter &one, const iter &two, const iter &three, BinaryPredicate) const
template<typename iter >
bool equal_subtree (const iter &one, const iter &two) const
template<typename iter , class BinaryPredicate >
bool equal_subtree (const iter &one, const iter &two, BinaryPredicate) const
tree subtree (sibling_iterator from, sibling_iterator to) const
 Extract a new tree formed by the range of siblings plus all their children.
void subtree (tree &, sibling_iterator from, sibling_iterator to) const
void swap (sibling_iterator it)
 Exchange the node (plus subtree) with its sibling node (do nothing if no sibling present).
int size () const
 Count the total number of nodes.
bool empty () const
 Check if tree is empty.
int depth (const iterator_base &) const
 Compute the depth to the root.
unsigned int number_of_children (const iterator_base &) const
 Count the number of children of node at position.
unsigned int number_of_siblings (const iterator_base &) const
 Count the number of 'next' siblings of node at iterator.
bool is_in_subtree (const iterator_base &position, const iterator_base &begin, const iterator_base &end) const
 Determine whether node at position is in the subtrees with root in the range.
bool is_valid (const iterator_base &) const
 Determine whether the iterator is an 'end' iterator and thus not actually pointing to a node.
unsigned int index (sibling_iterator it) const
 Determine the index of a node in the range of siblings to which it belongs.
sibling_iterator child (const iterator_base &position, unsigned int) const
 Inverse of 'index': return the n-th child of the node at position.

Data Fields

tree_nodehead
tree_nodefeet

Protected Types

typedef tree_node_< T > tree_node
typedef tree_node_< T > tree_node

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >

Definition at line 105 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/globals_0x72.html0000644000175000017500000001055411553133251014536 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- r -

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__main_8cpp_source.html0000644000175000017500000007362711553133250023475 00000000000000 LibOFX: ofx_container_main.cpp Source File

ofx_container_main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_main.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #endif
00022 
00023 #include <string>
00024 #include <iostream>
00025 #include "ParserEventGeneratorKit.h"
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_containers.hh"
00029 
00030 OfxMainContainer::OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00031   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00032 {
00033 
00034 //statement_tree_top=statement_tree.insert(statement_tree_top, NULL);
00035 //security_tree_top=security_tree.insert(security_tree_top, NULL);
00036 
00037 }
00038 OfxMainContainer::~OfxMainContainer()
00039 {
00040   message_out(DEBUG, "Entering the main container's destructor");
00041   tree<OfxGenericContainer *>::iterator tmp = security_tree.begin();
00042 
00043   while (tmp != security_tree.end())
00044   {
00045     message_out(DEBUG, "Deleting " + (*tmp)->type);
00046     delete (*tmp);
00047     ++tmp;
00048   }
00049   tmp = account_tree.begin();
00050   while (tmp != account_tree.end())
00051   {
00052     message_out(DEBUG, "Deleting " + (*tmp)->type);
00053     delete (*tmp);
00054     ++tmp;
00055   }
00056 }
00057 int OfxMainContainer::add_container(OfxGenericContainer * container)
00058 {
00059   message_out(DEBUG, "OfxMainContainer::add_container for element " + container->tag_identifier + "; destroying the generic container");
00060   /* Call gen_event anyway, it could be a status container or similar */
00061   container->gen_event();
00062   delete container;
00063   return 0;
00064 }
00065 
00066 int OfxMainContainer::add_container(OfxSecurityContainer * container)
00067 {
00068   message_out(DEBUG, "OfxMainContainer::add_container, adding a security");
00069   security_tree.insert(security_tree.begin(), container);
00070   return true;
00071 
00072 
00073 }
00074 
00075 int OfxMainContainer::add_container(OfxAccountContainer * container)
00076 {
00077   message_out(DEBUG, "OfxMainContainer::add_container, adding an account");
00078   if ( account_tree.size() == 0)
00079   {
00080     message_out(DEBUG, "OfxMainContainer::add_container, account is the first account");
00081     account_tree.insert(account_tree.begin(), container);
00082   }
00083   else
00084   {
00085     message_out(DEBUG, "OfxMainContainer::add_container, account is not the first account");
00086     tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00087     tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00088     account_tree.insert_after(tmp, container);
00089   }
00090   return true;
00091 }
00092 
00093 int OfxMainContainer::add_container(OfxStatementContainer * container)
00094 {
00095   message_out(DEBUG, "OfxMainContainer::add_container, adding a statement");
00096   tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00097   //cerr<< "size="<<account_tree.size()<<"; num_sibblings="<<account_tree.number_of_siblings(tmp)<<endl;
00098   tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00099 
00100   if (account_tree.is_valid(tmp))
00101   {
00102     message_out(DEBUG, "1: tmp is valid, Accounts are present");
00103     tree<OfxGenericContainer *>::iterator child = account_tree.begin(tmp);
00104     if (account_tree.number_of_children(tmp) != 0)
00105     {
00106       message_out(DEBUG, "There are already children for this account");
00107       account_tree.insert(tmp.begin(), container);
00108 
00109     }
00110     else
00111     {
00112       message_out(DEBUG, "There are no children for this account");
00113       account_tree.append_child(tmp, container);
00114     }
00115     container->add_account(&( ((OfxAccountContainer *)(*tmp))->data));
00116     return true;
00117   }
00118   else
00119   {
00120     message_out(ERROR, "OfxMainContainer::add_container, no accounts are present (tmp is invalid)");
00121     return false;
00122   }
00123 }
00124 
00125 int OfxMainContainer::add_container(OfxTransactionContainer * container)
00126 {
00127   message_out(DEBUG, "OfxMainContainer::add_container, adding a transaction");
00128 
00129   if ( account_tree.size() != 0)
00130   {
00131     tree<OfxGenericContainer *>::sibling_iterator tmp =  account_tree.begin();
00132     //cerr<< "size="<<account_tree.size()<<"; num_sibblings="<<account_tree.number_of_siblings(tmp)<<endl;
00133     tmp += (account_tree.number_of_siblings(tmp)); //Find last account
00134     if (account_tree.is_valid(tmp))
00135     {
00136       message_out(DEBUG, "OfxMainContainer::add_container: tmp is valid, Accounts are present");
00137       account_tree.append_child(tmp, container);
00138       container->add_account(&(((OfxAccountContainer *)(*tmp))->data));
00139       return true;
00140     }
00141     else
00142     {
00143       message_out(ERROR, "OfxMainContainer::add_container: tmp is invalid!");
00144       return false;
00145     }
00146   }
00147   else
00148   {
00149     message_out(ERROR, "OfxMainContainer::add_container: the tree is empty!");
00150     return false;
00151   }
00152 }
00153 
00154 int  OfxMainContainer::gen_event()
00155 {
00156   message_out(DEBUG, "Begin walking the trees of the main container to generate events");
00157   tree<OfxGenericContainer *>::iterator tmp = security_tree.begin();
00158   //cerr<<"security_tree.size(): "<<security_tree.size()<<endl;
00159   int i = 0;
00160   while (tmp != security_tree.end())
00161   {
00162     message_out(DEBUG, "Looping...");
00163     //cerr <<i<<endl;
00164     i++;
00165     (*tmp)->gen_event();
00166     ++tmp;
00167   }
00168   tmp = account_tree.begin();
00169   //cerr<<account_tree.size()<<endl;
00170   i = 0;
00171   while (tmp != account_tree.end())
00172   {
00173     //cerr<< "i="<<i<<"; depth="<<account_tree.depth(tmp)<<endl;
00174     i++;
00175     (*tmp)->gen_event();
00176     ++tmp;
00177   }
00178   message_out(DEBUG, "End walking the trees of the main container to generate events");
00179 
00180   return true;
00181 }
00182 
00183 OfxSecurityData *  OfxMainContainer::find_security(string unique_id)
00184 {
00185   message_out(DEBUG, "OfxMainContainer::find_security() Begin.");
00186 
00187   tree<OfxGenericContainer *>::sibling_iterator tmp = security_tree.begin();
00188   OfxSecurityData * retval = NULL;
00189   while (tmp != security_tree.end() && retval == NULL)
00190   {
00191     if (((OfxSecurityContainer*)(*tmp))->data.unique_id == unique_id)
00192     {
00193       message_out(DEBUG, (string)"Security " + ((OfxSecurityContainer*)(*tmp))->data.unique_id + " found.");
00194       retval = &((OfxSecurityContainer*)(*tmp))->data;
00195     }
00196     ++tmp;
00197   }
00198   return retval;
00199 }
libofx-0.9.4/doc/html/ofx__container__generic_8cpp.html0000644000175000017500000000736411553133250020121 00000000000000 LibOFX: ofx_container_generic.cpp File Reference

ofx_container_generic.cpp File Reference

Implementation of OfxGenericContainer. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxGenericContainer.

Definition in file ofx_container_generic.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__accountinfo_8hh_source.html0000644000175000017500000001406611553133250024374 00000000000000 LibOFX: ofx_request_accountinfo.hh Source File

ofx_request_accountinfo.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request_accountinfo.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQ_ACCOUNTINFO_H
00021 #define OFX_REQ_ACCOUNTINFO_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_request.hh"
00026 
00027 using namespace std;
00028 
00037 class OfxAccountInfoRequest: public OfxRequest
00038 {
00039 public:
00046   OfxAccountInfoRequest( const OfxFiLogin& fi );
00047 };
00048 
00049 #endif // OFX_REQ_ACCOUNTINFO_H
libofx-0.9.4/doc/html/ofx2qif_8c_source.html0000644000175000017500000007141111553133250015661 00000000000000 LibOFX: ofx2qif.c Source File

ofx2qif.c

Go to the documentation of this file.
00001 /***************************************************************************
00002                                    ofx2qif.c
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00032 /***************************************************************************
00033  *                                                                         *
00034  *   This program is free software; you can redistribute it and/or modify  *
00035  *   it under the terms of the GNU General Public License as published by  *
00036  *   the Free Software Foundation; either version 2 of the License, or     *
00037  *   (at your option) any later version.                                   *
00038  *                                                                         *
00039  ***************************************************************************/
00040 
00041 #include <stdio.h>
00042 #include <string.h>
00043 #include <time.h>
00044 #include "libofx.h"
00045 
00046 #define QIF_FILE_MAX_SIZE 256000
00047 
00048 int ofx_proc_transaction_cb(const struct OfxTransactionData data, void * transaction_data)
00049 {
00050   char dest_string[255];
00051   char trans_buff[4096];
00052   struct tm temp_tm;
00053   char trans_list_buff[QIF_FILE_MAX_SIZE];
00054 
00055   trans_list_buff[0]='\0';
00056   
00057   if(data.date_posted_valid==true){
00058     temp_tm = *localtime(&(data.date_posted));
00059     sprintf(trans_buff, "D%d%s%d%s%d%s", temp_tm.tm_mday, "/", temp_tm.tm_mon+1, "/", temp_tm.tm_year+1900, "\n");
00060     strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00061   }
00062   if(data.amount_valid==true){
00063     sprintf(trans_buff, "T%.2f%s",data.amount,"\n");
00064     strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00065   }
00066   if(data.check_number_valid==true){
00067     sprintf(trans_buff, "N%s%s",data.check_number,"\n");
00068     strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00069   }
00070   else if(data.reference_number_valid==true){
00071     sprintf(trans_buff, "N%s%s",data.reference_number,"\n");
00072       strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00073 }
00074 if(data.name_valid==true){
00075     sprintf(trans_buff, "P%s%s",data.name,"\n");
00076         strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00077 }
00078 if(data.memo_valid==true){
00079     sprintf(trans_buff, "M%s%s",data.memo,"\n");
00080         strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00081 }
00082 /* Add PAYEE and ADRESS here once supported by the library */
00083 
00084 
00085 if(data.transactiontype_valid==true){
00086     switch(data.transactiontype){
00087         case OFX_CREDIT: strncpy(dest_string, "Generic credit", sizeof(dest_string));
00088         break;
00089         case OFX_DEBIT: strncpy(dest_string, "Generic debit", sizeof(dest_string));
00090         break;
00091         case OFX_INT: strncpy(dest_string, "Interest earned or paid (Note: Depends on signage of amount)", sizeof(dest_string));
00092         break;
00093         case OFX_DIV: strncpy(dest_string, "Dividend", sizeof(dest_string));
00094         break;
00095         case OFX_FEE: strncpy(dest_string, "FI fee", sizeof(dest_string));
00096         break;
00097         case OFX_SRVCHG: strncpy(dest_string, "Service charge", sizeof(dest_string));
00098         break;
00099         case OFX_DEP: strncpy(dest_string, "Deposit", sizeof(dest_string));
00100         break;
00101         case OFX_ATM: strncpy(dest_string, "ATM debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
00102         break;
00103         case OFX_POS: strncpy(dest_string, "Point of sale debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
00104         break;
00105         case OFX_XFER: strncpy(dest_string, "Transfer", sizeof(dest_string));
00106         break;
00107         case OFX_CHECK: strncpy(dest_string, "Check", sizeof(dest_string));
00108         break;
00109         case OFX_PAYMENT: strncpy(dest_string, "Electronic payment", sizeof(dest_string));
00110         break;
00111         case OFX_CASH: strncpy(dest_string, "Cash withdrawal", sizeof(dest_string));
00112         break;
00113         case OFX_DIRECTDEP: strncpy(dest_string, "Direct deposit", sizeof(dest_string));
00114         break;
00115         case OFX_DIRECTDEBIT: strncpy(dest_string, "Merchant initiated debit", sizeof(dest_string));
00116         break;
00117         case OFX_REPEATPMT: strncpy(dest_string, "Repeating payment/standing order", sizeof(dest_string));
00118         break;
00119         case OFX_OTHER: strncpy(dest_string, "Other", sizeof(dest_string));
00120         break;
00121         default : strncpy(dest_string, "Unknown transaction type", sizeof(dest_string));
00122         break;
00123     }
00124     sprintf(trans_buff, "L%s%s",dest_string,"\n");
00125     strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00126 }
00127  strcpy(trans_buff, "^\n");
00128  strncat(trans_list_buff, trans_buff, sizeof(trans_list_buff)-1 - strlen(trans_list_buff));
00129  fputs(trans_list_buff,stdout);
00130  return 0;
00131 }/* end ofx_proc_transaction() */
00132 
00133 int ofx_proc_statement_cb(const struct OfxStatementData data, void * statement_data)
00134 {
00135   struct tm temp_tm;
00136 
00137   printf("!Account\n");
00138   if(data.account_id_valid==true){
00139     /* Use the account id as the qif name of the account */
00140     printf("N%s%s",data.account_id,"\n");
00141   }
00142   if(data.account_ptr->account_type_valid==true)
00143     {
00144       switch(data.account_ptr->account_type){
00145       case OFX_CHECKING : printf("TBank\n");
00146         break;
00147       case OFX_SAVINGS :  printf("TBank\n");
00148         break;
00149       case OFX_MONEYMRKT :  printf("TOth A\n");
00150         break;
00151       case OFX_CREDITLINE :  printf("TOth L\n");
00152         break;
00153       case OFX_CMA :  printf("TOth A\n");
00154         break;
00155       case OFX_CREDITCARD :   printf("TCCard\n");
00156         break;
00157       default: perror("WRITEME: ofx_proc_account() This is an unknown account type!");
00158       }
00159     }
00160   printf("DOFX online account\n");
00161 
00162   if(data.ledger_balance_date_valid==true){
00163     temp_tm = *localtime(&(data.ledger_balance_date));
00164     printf("/%d%s%d%s%d%s", temp_tm.tm_mday, "/", temp_tm.tm_mon+1, "/", temp_tm.tm_year+1900, "\n");
00165   }
00166   if(data.ledger_balance_valid==true){
00167     printf("$%.2f%s",data.ledger_balance,"\n");
00168   }
00169   printf("^\n");
00170   /*The transactions will follow, here is the header */
00171   if(data.account_ptr->account_type_valid==true){
00172     switch(data.account_ptr->account_type){
00173     case OFX_CHECKING : printf("!Type:Bank\n");
00174       break;
00175     case OFX_SAVINGS : printf("!Type:Bank\n");
00176       break;
00177     case OFX_MONEYMRKT : printf("!Type:Oth A\n");
00178       break;
00179     case OFX_CREDITLINE : printf("!Type:Oth L\n");
00180       break;
00181     case OFX_CMA : printf("!Type:Oth A\n");
00182       break;
00183     case OFX_CREDITCARD : printf("!Type:CCard\n");
00184       break;
00185     default: perror("WRITEME: ofx_proc_account() This is an unknown account type!");
00186     }
00187   }
00188 
00189   return 0;
00190 }/* end ofx_proc_statement() */
00191   
00192 int ofx_proc_account_cb(const struct OfxAccountData data, void * account_data)
00193 {
00194   char dest_string[255]="";
00195   
00196   
00197   //    strncat(trans_list_buff, dest_string, QIF_FILE_MAX_SIZE - strlen(trans_list_buff));
00198   fputs(dest_string,stdout);
00199  return 0;
00200 }/* end ofx_proc_account() */
00201 
00202 int main (int argc, char *argv[])
00203 {
00204 extern int ofx_PARSER_msg;
00205 extern int ofx_DEBUG_msg;
00206 extern int ofx_WARNING_msg;
00207 extern int ofx_ERROR_msg;
00208 extern int ofx_INFO_msg;
00209 extern int ofx_STATUS_msg;
00210  ofx_PARSER_msg = false;
00211  ofx_DEBUG_msg = false;
00212  ofx_WARNING_msg = false;
00213  ofx_ERROR_msg = false;
00214  ofx_INFO_msg = false;
00215  ofx_STATUS_msg = false;
00216 
00217  LibofxContextPtr libofx_context = libofx_get_new_context();
00218  ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);
00219  ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0);
00220  ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0);
00221 
00222  if(argc >= 2){
00223    libofx_proc_file(libofx_context, argv[1], OFX);
00224  }
00225  return libofx_free_context(libofx_context);
00226 }
00227 
00228 
00229 
00230 
00231 
libofx-0.9.4/doc/html/ftv2pnode.png0000644000175000017500000000032711553133251014057 00000000000000‰PNG  IHDRɪ|žIDATxí! BQE"¸ ‚u¢Ý"îÀ0M°'˜èfuÚ^µ·azZƒòùï%áß6áî\fz/¥D‰úEîÀàsk`c*ç,À+Ó8°5•º-à­%0w¦rÈ }ð¸Ö¦rÍ-q \‚ÇE.àÌLåØv…ÐØÁ¯0i2Kp/ºSwßø€'RG'TÖáIEND®B`‚libofx-0.9.4/doc/html/ofx__request__accountinfo_8cpp.html0000644000175000017500000000730611553133250020517 00000000000000 LibOFX: ofx_request_accountinfo.cpp File Reference

ofx_request_accountinfo.cpp File Reference

Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user. More...

Go to the source code of this file.

Functions

char * libofx_request_accountinfo (const OfxFiLogin *login)

Detailed Description

Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user.

Definition in file ofx_request_accountinfo.cpp.

libofx-0.9.4/doc/html/globals_0x63.html0000644000175000017500000001150011553133251014526 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- c -

libofx-0.9.4/doc/html/functions_0x6f.html0000644000175000017500000001670511553133250015211 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- o -

libofx-0.9.4/doc/html/globals_0x71.html0000644000175000017500000001055011553133251014531 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- q -

libofx-0.9.4/doc/html/tree_8hh_source.html0000644000175000017500000074676411553133250015443 00000000000000 LibOFX: tree.hh Source File

tree.hh

00001 /*
00002 
00003    $Id: tree.hh,v 1.6 2006-07-20 04:41:16 benoitg Exp $
00004 
00005    STL-like templated tree class.
00006    Copyright (C) 2001-2005  Kasper Peeters <kasper.peeters@aei.mpg.de>.
00007 
00008 */
00009 
00026 /*
00027    This program is free software; you can redistribute it and/or modify
00028    it under the terms of the GNU General Public License as published by
00029    the Free Software Foundation; version 2.
00030 
00031    This program is distributed in the hope that it will be useful,
00032    but WITHOUT ANY WARRANTY; without even the implied warranty of
00033    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00034    GNU General Public License for more details.
00035 
00036    You should have received a copy of the GNU General Public License
00037    along with this program; if not, write to the Free Software
00038    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00039 */
00040 
00058 #ifndef tree_hh_
00059 #define tree_hh_
00060 
00061 #include <cassert>
00062 #include <memory>
00063 #include <stdexcept>
00064 #include <iterator>
00065 #include <set>
00066 
00067 // HP-style construct/destroy have gone from the standard,
00068 // so here is a copy.
00069 
00070 namespace kp
00071 {
00072 
00073 template <class T1, class T2>
00074 void constructor(T1* p, T2& val)
00075 {
00076   new ((void *) p) T1(val);
00077 }
00078 
00079 template <class T1>
00080 void constructor(T1* p)
00081 {
00082   new ((void *) p) T1;
00083 }
00084 
00085 template <class T1>
00086 void destructor(T1* p)
00087 {
00088   p->~T1();
00089 }
00090 
00091 };
00092 
00094 template<class T>
00095 class tree_node_   // size: 5*4=20 bytes (on 32 bit arch), can be reduced by 8.
00096 {
00097 public:
00098   tree_node_<T> *parent;
00099   tree_node_<T> *first_child, *last_child;
00100   tree_node_<T> *prev_sibling, *next_sibling;
00101   T data;
00102 }; // __attribute__((packed));
00103 
00104 template < class T, class tree_node_allocator = std::allocator<tree_node_<T> > >
00105 class tree
00106 {
00107 protected:
00108   typedef tree_node_<T> tree_node;
00109 public:
00111   typedef T value_type;
00112 
00113   class iterator_base;
00114   class pre_order_iterator;
00115   class post_order_iterator;
00116   class sibling_iterator;
00117 
00118   tree();
00119   tree(const T&);
00120   tree(const iterator_base&);
00121   tree(const tree<T, tree_node_allocator>&);
00122   ~tree();
00123   void operator=(const tree<T, tree_node_allocator>&);
00124 
00126 #ifdef __SGI_STL_PORT
00127   class iterator_base : public stlport::bidirectional_iterator<T, ptrdiff_t>
00128   {
00129 #else
00130   class iterator_base
00131   {
00132 #endif
00133   public:
00134     typedef T                               value_type;
00135     typedef T*                              pointer;
00136     typedef T&                              reference;
00137     typedef size_t                          size_type;
00138     typedef ptrdiff_t                       difference_type;
00139     typedef std::bidirectional_iterator_tag iterator_category;
00140 
00141     iterator_base();
00142     iterator_base(tree_node *);
00143 
00144     T&             operator*() const;
00145     T*             operator->() const;
00146 
00148     void         skip_children();
00150     unsigned int number_of_children() const;
00151 
00152     sibling_iterator begin() const;
00153     sibling_iterator end() const;
00154 
00155     tree_node *node;
00156   protected:
00157     bool skip_current_children_;
00158   };
00159 
00161   class pre_order_iterator : public iterator_base
00162   {
00163   public:
00164     pre_order_iterator();
00165     pre_order_iterator(tree_node *);
00166     pre_order_iterator(const iterator_base&);
00167     pre_order_iterator(const sibling_iterator&);
00168 
00169     bool    operator==(const pre_order_iterator&) const;
00170     bool    operator!=(const pre_order_iterator&) const;
00171     pre_order_iterator&  operator++();
00172     pre_order_iterator&  operator--();
00173     pre_order_iterator   operator++(int);
00174     pre_order_iterator   operator--(int);
00175     pre_order_iterator&  operator+=(unsigned int);
00176     pre_order_iterator&  operator-=(unsigned int);
00177   };
00178 
00180   class post_order_iterator : public iterator_base
00181   {
00182   public:
00183     post_order_iterator();
00184     post_order_iterator(tree_node *);
00185     post_order_iterator(const iterator_base&);
00186     post_order_iterator(const sibling_iterator&);
00187 
00188     bool    operator==(const post_order_iterator&) const;
00189     bool    operator!=(const post_order_iterator&) const;
00190     post_order_iterator&  operator++();
00191     post_order_iterator&  operator--();
00192     post_order_iterator   operator++(int);
00193     post_order_iterator   operator--(int);
00194     post_order_iterator&  operator+=(unsigned int);
00195     post_order_iterator&  operator-=(unsigned int);
00196 
00198     void descend_all();
00199   };
00200 
00202   typedef pre_order_iterator iterator;
00203 
00205   class fixed_depth_iterator : public iterator_base
00206   {
00207   public:
00208     fixed_depth_iterator();
00209     fixed_depth_iterator(tree_node *);
00210     fixed_depth_iterator(const iterator_base&);
00211     fixed_depth_iterator(const sibling_iterator&);
00212     fixed_depth_iterator(const fixed_depth_iterator&);
00213 
00214     bool    operator==(const fixed_depth_iterator&) const;
00215     bool    operator!=(const fixed_depth_iterator&) const;
00216     fixed_depth_iterator&  operator++();
00217     fixed_depth_iterator&  operator--();
00218     fixed_depth_iterator   operator++(int);
00219     fixed_depth_iterator   operator--(int);
00220     fixed_depth_iterator&  operator+=(unsigned int);
00221     fixed_depth_iterator&  operator-=(unsigned int);
00222 
00223     tree_node *first_parent_;
00224   private:
00225     void set_first_parent_();
00226     void find_leftmost_parent_();
00227   };
00228 
00230   class sibling_iterator : public iterator_base
00231   {
00232   public:
00233     sibling_iterator();
00234     sibling_iterator(tree_node *);
00235     sibling_iterator(const sibling_iterator&);
00236     sibling_iterator(const iterator_base&);
00237 
00238     bool    operator==(const sibling_iterator&) const;
00239     bool    operator!=(const sibling_iterator&) const;
00240     sibling_iterator&  operator++();
00241     sibling_iterator&  operator--();
00242     sibling_iterator   operator++(int);
00243     sibling_iterator   operator--(int);
00244     sibling_iterator&  operator+=(unsigned int);
00245     sibling_iterator&  operator-=(unsigned int);
00246 
00247     tree_node *range_first() const;
00248     tree_node *range_last() const;
00249     tree_node *parent_;
00250   private:
00251     void set_parent_();
00252   };
00253 
00255   inline pre_order_iterator   begin() const;
00257   inline pre_order_iterator   end() const;
00259   post_order_iterator  begin_post() const;
00261   post_order_iterator  end_post() const;
00263   fixed_depth_iterator begin_fixed(const iterator_base&, unsigned int) const;
00265   fixed_depth_iterator end_fixed(const iterator_base&, unsigned int) const;
00267   sibling_iterator     begin(const iterator_base&) const;
00269   sibling_iterator     end(const iterator_base&) const;
00270 
00272   template<typename iter> iter parent(iter) const;
00274   template<typename iter> iter previous_sibling(iter) const;
00276   template<typename iter> iter next_sibling(iter) const;
00278   template<typename iter> iter next_at_same_depth(iter) const;
00279 
00281   void     clear();
00283   template<typename iter> iter erase(iter);
00285   void     erase_children(const iterator_base&);
00286 
00288   template<typename iter> iter append_child(iter position);
00290   template<typename iter> iter append_child(iter position, const T& x);
00292   template<typename iter> iter append_child(iter position, iter other_position);
00294   template<typename iter> iter append_children(iter position, sibling_iterator from, sibling_iterator to);
00295 
00297   pre_order_iterator set_head(const T& x);
00299   template<typename iter> iter insert(iter position, const T& x);
00301   sibling_iterator insert(sibling_iterator position, const T& x);
00303   template<typename iter> iter insert_subtree(iter position, const iterator_base& subtree);
00305   template<typename iter> iter insert_after(iter position, const T& x);
00306 
00308   template<typename iter> iter replace(iter position, const T& x);
00310   template<typename iter> iter replace(iter position, const iterator_base& from);
00312   sibling_iterator replace(sibling_iterator orig_begin, sibling_iterator orig_end,
00313                            sibling_iterator new_begin,  sibling_iterator new_end);
00314 
00316   template<typename iter> iter flatten(iter position);
00318   template<typename iter> iter reparent(iter position, sibling_iterator begin, sibling_iterator end);
00320   template<typename iter> iter reparent(iter position, iter from);
00321 
00323   template<typename iter> iter move_after(iter target, iter source);
00325   template<typename iter> iter move_before(iter target, iter source);
00327   template<typename iter> iter move_ontop(iter target, iter source);
00328 
00330   void     merge(sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator,
00331                  bool duplicate_leaves = false);
00333   void     sort(sibling_iterator from, sibling_iterator to, bool deep = false);
00334   template<class StrictWeakOrdering>
00335   void     sort(sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep = false);
00337   template<typename iter>
00338   bool     equal(const iter& one, const iter& two, const iter& three) const;
00339   template<typename iter, class BinaryPredicate>
00340   bool     equal(const iter& one, const iter& two, const iter& three, BinaryPredicate) const;
00341   template<typename iter>
00342   bool     equal_subtree(const iter& one, const iter& two) const;
00343   template<typename iter, class BinaryPredicate>
00344   bool     equal_subtree(const iter& one, const iter& two, BinaryPredicate) const;
00346   tree     subtree(sibling_iterator from, sibling_iterator to) const;
00347   void     subtree(tree&, sibling_iterator from, sibling_iterator to) const;
00349   void     swap(sibling_iterator it);
00350 
00352   int      size() const;
00354   bool     empty() const;
00356   int      depth(const iterator_base&) const;
00358   unsigned int number_of_children(const iterator_base&) const;
00360   unsigned int number_of_siblings(const iterator_base&) const;
00362   bool     is_in_subtree(const iterator_base& position, const iterator_base& begin,
00363                          const iterator_base& end) const;
00365   bool     is_valid(const iterator_base&) const;
00366 
00368   unsigned int index(sibling_iterator it) const;
00370   sibling_iterator  child(const iterator_base& position, unsigned int) const;
00371 
00373   class iterator_base_less
00374   {
00375   public:
00376     bool operator()(const typename tree<T, tree_node_allocator>::iterator_base& one,
00377                     const typename tree<T, tree_node_allocator>::iterator_base& two) const
00378     {
00379       return one.node < two.node;
00380     }
00381   };
00382   tree_node *head, *feet;    // head/feet are always dummy; if an iterator points to them it is invalid
00383 private:
00384   tree_node_allocator alloc_;
00385   void head_initialise_();
00386   void copy_(const tree<T, tree_node_allocator>& other);
00387 
00389   template<class StrictWeakOrdering>
00390   class compare_nodes
00391   {
00392   public:
00393     compare_nodes(StrictWeakOrdering comp) : comp_(comp) {};
00394 
00395     bool operator()(const tree_node *a, const tree_node *b)
00396     {
00397       static StrictWeakOrdering comp;
00398       return comp(a->data, b->data);
00399     }
00400   private:
00401     StrictWeakOrdering comp_;
00402   };
00403 };
00404 
00405 //template <class T, class tree_node_allocator>
00406 //class iterator_base_less {
00407 // public:
00408 //    bool operator()(const typename tree<T, tree_node_allocator>::iterator_base& one,
00409 //                  const typename tree<T, tree_node_allocator>::iterator_base& two) const
00410 //       {
00411 //       txtout << "operatorclass<" << one.node < two.node << std::endl;
00412 //       return one.node < two.node;
00413 //       }
00414 //};
00415 
00416 //template <class T, class tree_node_allocator>
00417 //bool operator<(const typename tree<T, tree_node_allocator>::iterator& one,
00418 //             const typename tree<T, tree_node_allocator>::iterator& two)
00419 // {
00420 // txtout << "operator< " << one.node < two.node << std::endl;
00421 // if(one.node < two.node) return true;
00422 // return false;
00423 // }
00424 
00425 template <class T, class tree_node_allocator>
00426 bool operator>(const typename tree<T, tree_node_allocator>::iterator_base& one,
00427                const typename tree<T, tree_node_allocator>::iterator_base& two)
00428 {
00429   if (one.node > two.node) return true;
00430   return false;
00431 }
00432 
00433 
00434 
00435 // Tree
00436 
00437 template <class T, class tree_node_allocator>
00438 tree<T, tree_node_allocator>::tree()
00439 {
00440   head_initialise_();
00441 }
00442 
00443 template <class T, class tree_node_allocator>
00444 tree<T, tree_node_allocator>::tree(const T& x)
00445 {
00446   head_initialise_();
00447   set_head(x);
00448 }
00449 
00450 template <class T, class tree_node_allocator>
00451 tree<T, tree_node_allocator>::tree(const iterator_base& other)
00452 {
00453   head_initialise_();
00454   set_head((*other));
00455   replace(begin(), other);
00456 }
00457 
00458 template <class T, class tree_node_allocator>
00459 tree<T, tree_node_allocator>::~tree()
00460 {
00461   clear();
00462   alloc_.deallocate(head, 1);
00463   alloc_.deallocate(feet, 1);
00464 }
00465 
00466 template <class T, class tree_node_allocator>
00467 void tree<T, tree_node_allocator>::head_initialise_()
00468 {
00469   head = alloc_.allocate(1, 0); // MSVC does not have default second argument
00470   feet = alloc_.allocate(1, 0);
00471 
00472   head->parent = 0;
00473   head->first_child = 0;
00474   head->last_child = 0;
00475   head->prev_sibling = 0; //head;
00476   head->next_sibling = feet; //head;
00477 
00478   feet->parent = 0;
00479   feet->first_child = 0;
00480   feet->last_child = 0;
00481   feet->prev_sibling = head;
00482   feet->next_sibling = 0;
00483 }
00484 
00485 template <class T, class tree_node_allocator>
00486 void tree<T, tree_node_allocator>::operator=(const tree<T, tree_node_allocator>& other)
00487 {
00488   copy_(other);
00489 }
00490 
00491 template <class T, class tree_node_allocator>
00492 tree<T, tree_node_allocator>::tree(const tree<T, tree_node_allocator>& other)
00493 {
00494   head_initialise_();
00495   copy_(other);
00496 }
00497 
00498 template <class T, class tree_node_allocator>
00499 void tree<T, tree_node_allocator>::copy_(const tree<T, tree_node_allocator>& other)
00500 {
00501   clear();
00502   pre_order_iterator it = other.begin(), to = begin();
00503   while (it != other.end())
00504   {
00505     to = insert(to, (*it));
00506     it.skip_children();
00507     ++it;
00508   }
00509   to = begin();
00510   it = other.begin();
00511   while (it != other.end())
00512   {
00513     to = replace(to, it);
00514     to.skip_children();
00515     it.skip_children();
00516     ++to;
00517     ++it;
00518   }
00519 }
00520 
00521 template <class T, class tree_node_allocator>
00522 void tree<T, tree_node_allocator>::clear()
00523 {
00524   if (head)
00525     while (head->next_sibling != feet)
00526       erase(pre_order_iterator(head->next_sibling));
00527 }
00528 
00529 template<class T, class tree_node_allocator>
00530 void tree<T, tree_node_allocator>::erase_children(const iterator_base& it)
00531 {
00532   tree_node *cur = it.node->first_child;
00533   tree_node *prev = 0;
00534 
00535   while (cur != 0)
00536   {
00537     prev = cur;
00538     cur = cur->next_sibling;
00539     erase_children(pre_order_iterator(prev));
00540     kp::destructor(&prev->data);
00541     alloc_.deallocate(prev, 1);
00542   }
00543   it.node->first_child = 0;
00544   it.node->last_child = 0;
00545 }
00546 
00547 template<class T, class tree_node_allocator>
00548 template<class iter>
00549 iter tree<T, tree_node_allocator>::erase(iter it)
00550 {
00551   tree_node *cur = it.node;
00552   assert(cur != head);
00553   iter ret = it;
00554   ret.skip_children();
00555   ++ret;
00556   erase_children(it);
00557   if (cur->prev_sibling == 0)
00558   {
00559     cur->parent->first_child = cur->next_sibling;
00560   }
00561   else
00562   {
00563     cur->prev_sibling->next_sibling = cur->next_sibling;
00564   }
00565   if (cur->next_sibling == 0)
00566   {
00567     cur->parent->last_child = cur->prev_sibling;
00568   }
00569   else
00570   {
00571     cur->next_sibling->prev_sibling = cur->prev_sibling;
00572   }
00573 
00574   kp::destructor(&cur->data);
00575   alloc_.deallocate(cur, 1);
00576   return ret;
00577 }
00578 
00579 template <class T, class tree_node_allocator>
00580 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::begin() const
00581 {
00582   return pre_order_iterator(head->next_sibling);
00583 }
00584 
00585 template <class T, class tree_node_allocator>
00586 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::end() const
00587 {
00588   return pre_order_iterator(feet);
00589 }
00590 
00591 template <class T, class tree_node_allocator>
00592 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::begin_post() const
00593 {
00594   tree_node *tmp = head->next_sibling;
00595   if (tmp != feet)
00596   {
00597     while (tmp->first_child)
00598       tmp = tmp->first_child;
00599   }
00600   return post_order_iterator(tmp);
00601 }
00602 
00603 template <class T, class tree_node_allocator>
00604 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::end_post() const
00605 {
00606   return post_order_iterator(feet);
00607 }
00608 
00609 template <class T, class tree_node_allocator>
00610 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::begin_fixed(const iterator_base& pos, unsigned int dp) const
00611 {
00612   tree_node *tmp = pos.node;
00613   unsigned int curdepth = 0;
00614   while (curdepth < dp)   // go down one level
00615   {
00616     while (tmp->first_child == 0)
00617     {
00618       tmp = tmp->next_sibling;
00619       if (tmp == 0)
00620         throw std::range_error("tree: begin_fixed out of range");
00621     }
00622     tmp = tmp->first_child;
00623     ++curdepth;
00624   }
00625   return tmp;
00626 }
00627 
00628 template <class T, class tree_node_allocator>
00629 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::end_fixed(const iterator_base& pos, unsigned int dp) const
00630 {
00631   assert(1 == 0); // FIXME: not correct yet
00632   tree_node *tmp = pos.node;
00633   unsigned int curdepth = 1;
00634   while (curdepth < dp)   // go down one level
00635   {
00636     while (tmp->first_child == 0)
00637     {
00638       tmp = tmp->next_sibling;
00639       if (tmp == 0)
00640         throw std::range_error("tree: end_fixed out of range");
00641     }
00642     tmp = tmp->first_child;
00643     ++curdepth;
00644   }
00645   return tmp;
00646 }
00647 
00648 template <class T, class tree_node_allocator>
00649 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::begin(const iterator_base& pos) const
00650 {
00651   if (pos.node->first_child == 0)
00652   {
00653     return end(pos);
00654   }
00655   return pos.node->first_child;
00656 }
00657 
00658 template <class T, class tree_node_allocator>
00659 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::end(const iterator_base& pos) const
00660 {
00661   sibling_iterator ret(0);
00662   ret.parent_ = pos.node;
00663   return ret;
00664 }
00665 
00666 template <class T, class tree_node_allocator>
00667 template <typename iter>
00668 iter tree<T, tree_node_allocator>::parent(iter position) const
00669 {
00670   assert(position.node != 0);
00671   return iter(position.node->parent);
00672 }
00673 
00674 template <class T, class tree_node_allocator>
00675 template <typename iter>
00676 iter tree<T, tree_node_allocator>::previous_sibling(iter position) const
00677 {
00678   assert(position.node != 0);
00679   iter ret(position);
00680   ret.node = position.node->prev_sibling;
00681   return ret;
00682 }
00683 
00684 template <class T, class tree_node_allocator>
00685 template <typename iter>
00686 iter tree<T, tree_node_allocator>::next_sibling(iter position) const
00687 {
00688   assert(position.node != 0);
00689   iter ret(position);
00690   ret.node = position.node->next_sibling;
00691   return ret;
00692 }
00693 
00694 template <class T, class tree_node_allocator>
00695 template <typename iter>
00696 iter tree<T, tree_node_allocator>::next_at_same_depth(iter position) const
00697 {
00698   assert(position.node != 0);
00699   iter ret(position);
00700 
00701   if (position.node->next_sibling)
00702   {
00703     ret.node = position.node->next_sibling;
00704   }
00705   else
00706   {
00707     int relative_depth = 0;
00708 upper:
00709     do
00710     {
00711       ret.node = ret.node->parent;
00712       if (ret.node == 0) return ret;
00713       --relative_depth;
00714     }
00715     while (ret.node->next_sibling == 0);
00716 lower:
00717     ret.node = ret.node->next_sibling;
00718     while (ret.node->first_child == 0)
00719     {
00720       if (ret.node->next_sibling == 0)
00721         goto upper;
00722       ret.node = ret.node->next_sibling;
00723       if (ret.node == 0) return ret;
00724     }
00725     while (relative_depth < 0 && ret.node->first_child != 0)
00726     {
00727       ret.node = ret.node->first_child;
00728       ++relative_depth;
00729     }
00730     if (relative_depth < 0)
00731     {
00732       if (ret.node->next_sibling == 0) goto upper;
00733       else                          goto lower;
00734     }
00735   }
00736   return ret;
00737 }
00738 
00739 template <class T, class tree_node_allocator>
00740 template <typename iter>
00741 iter tree<T, tree_node_allocator>::append_child(iter position)
00742 {
00743   assert(position.node != head);
00744 
00745   tree_node* tmp = alloc_.allocate(1, 0);
00746   kp::constructor(&tmp->data);
00747   tmp->first_child = 0;
00748   tmp->last_child = 0;
00749 
00750   tmp->parent = position.node;
00751   if (position.node->last_child != 0)
00752   {
00753     position.node->last_child->next_sibling = tmp;
00754   }
00755   else
00756   {
00757     position.node->first_child = tmp;
00758   }
00759   tmp->prev_sibling = position.node->last_child;
00760   position.node->last_child = tmp;
00761   tmp->next_sibling = 0;
00762   return tmp;
00763 }
00764 
00765 template <class T, class tree_node_allocator>
00766 template <class iter>
00767 iter tree<T, tree_node_allocator>::append_child(iter position, const T& x)
00768 {
00769   // If your program fails here you probably used 'append_child' to add the top
00770   // node to an empty tree. From version 1.45 the top element should be added
00771   // using 'insert'. See the documentation for further information, and sorry about
00772   // the API change.
00773   assert(position.node != head);
00774 
00775   tree_node* tmp = alloc_.allocate(1, 0);
00776   kp::constructor(&tmp->data, x);
00777   tmp->first_child = 0;
00778   tmp->last_child = 0;
00779 
00780   tmp->parent = position.node;
00781   if (position.node->last_child != 0)
00782   {
00783     position.node->last_child->next_sibling = tmp;
00784   }
00785   else
00786   {
00787     position.node->first_child = tmp;
00788   }
00789   tmp->prev_sibling = position.node->last_child;
00790   position.node->last_child = tmp;
00791   tmp->next_sibling = 0;
00792   return tmp;
00793 }
00794 
00795 template <class T, class tree_node_allocator>
00796 template <class iter>
00797 iter tree<T, tree_node_allocator>::append_child(iter position, iter other)
00798 {
00799   assert(position.node != head);
00800 
00801   sibling_iterator aargh = append_child(position, value_type());
00802   return replace(aargh, other);
00803 }
00804 
00805 template <class T, class tree_node_allocator>
00806 template <class iter>
00807 iter tree<T, tree_node_allocator>::append_children(iter position, sibling_iterator from, sibling_iterator to)
00808 {
00809   iter ret = from;
00810 
00811   while (from != to)
00812   {
00813     insert_subtree(position.end(), from);
00814     ++from;
00815   }
00816   return ret;
00817 }
00818 
00819 template <class T, class tree_node_allocator>
00820 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::set_head(const T& x)
00821 {
00822   assert(head->next_sibling == feet);
00823   return insert(iterator(feet), x);
00824 }
00825 
00826 template <class T, class tree_node_allocator>
00827 template <class iter>
00828 iter tree<T, tree_node_allocator>::insert(iter position, const T& x)
00829 {
00830   if (position.node == 0)
00831   {
00832     position.node = feet; // Backward compatibility: when calling insert on a null node,
00833     // insert before the feet.
00834   }
00835   tree_node* tmp = alloc_.allocate(1, 0);
00836   kp::constructor(&tmp->data, x);
00837   tmp->first_child = 0;
00838   tmp->last_child = 0;
00839 
00840   tmp->parent = position.node->parent;
00841   tmp->next_sibling = position.node;
00842   tmp->prev_sibling = position.node->prev_sibling;
00843   position.node->prev_sibling = tmp;
00844 
00845   if (tmp->prev_sibling == 0)
00846   {
00847     if (tmp->parent) // when inserting nodes at the head, there is no parent
00848       tmp->parent->first_child = tmp;
00849   }
00850   else
00851     tmp->prev_sibling->next_sibling = tmp;
00852   return tmp;
00853 }
00854 
00855 template <class T, class tree_node_allocator>
00856 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::insert(sibling_iterator position, const T& x)
00857 {
00858   tree_node* tmp = alloc_.allocate(1, 0);
00859   kp::constructor(&tmp->data, x);
00860   tmp->first_child = 0;
00861   tmp->last_child = 0;
00862 
00863   tmp->next_sibling = position.node;
00864   if (position.node == 0)   // iterator points to end of a subtree
00865   {
00866     tmp->parent = position.parent_;
00867     tmp->prev_sibling = position.range_last();
00868     tmp->parent->last_child = tmp;
00869   }
00870   else
00871   {
00872     tmp->parent = position.node->parent;
00873     tmp->prev_sibling = position.node->prev_sibling;
00874     position.node->prev_sibling = tmp;
00875   }
00876 
00877   if (tmp->prev_sibling == 0)
00878   {
00879     if (tmp->parent) // when inserting nodes at the head, there is no parent
00880       tmp->parent->first_child = tmp;
00881   }
00882   else
00883     tmp->prev_sibling->next_sibling = tmp;
00884   return tmp;
00885 }
00886 
00887 template <class T, class tree_node_allocator>
00888 template <class iter>
00889 iter tree<T, tree_node_allocator>::insert_after(iter position, const T& x)
00890 {
00891   tree_node* tmp = alloc_.allocate(1, 0);
00892   kp::constructor(&tmp->data, x);
00893   tmp->first_child = 0;
00894   tmp->last_child = 0;
00895 
00896   tmp->parent = position.node->parent;
00897   tmp->prev_sibling = position.node;
00898   tmp->next_sibling = position.node->next_sibling;
00899   position.node->next_sibling = tmp;
00900 
00901   if (tmp->next_sibling == 0)
00902   {
00903     if (tmp->parent) // when inserting nodes at the head, there is no parent
00904       tmp->parent->last_child = tmp;
00905   }
00906   else
00907   {
00908     tmp->next_sibling->prev_sibling = tmp;
00909   }
00910   return tmp;
00911 }
00912 
00913 template <class T, class tree_node_allocator>
00914 template <class iter>
00915 iter tree<T, tree_node_allocator>::insert_subtree(iter position, const iterator_base& subtree)
00916 {
00917   // insert dummy
00918   iter it = insert(position, value_type());
00919   // replace dummy with subtree
00920   return replace(it, subtree);
00921 }
00922 
00923 // template <class T, class tree_node_allocator>
00924 // template <class iter>
00925 // iter tree<T, tree_node_allocator>::insert_subtree(sibling_iterator position, iter subtree)
00926 //    {
00927 //    // insert dummy
00928 //    iter it(insert(position, value_type()));
00929 //    // replace dummy with subtree
00930 //    return replace(it, subtree);
00931 //    }
00932 
00933 template <class T, class tree_node_allocator>
00934 template <class iter>
00935 iter tree<T, tree_node_allocator>::replace(iter position, const T& x)
00936 {
00937   kp::destructor(&position.node->data);
00938   kp::constructor(&position.node->data, x);
00939   return position;
00940 }
00941 
00942 template <class T, class tree_node_allocator>
00943 template <class iter>
00944 iter tree<T, tree_node_allocator>::replace(iter position, const iterator_base& from)
00945 {
00946   assert(position.node != head);
00947   tree_node *current_from = from.node;
00948   tree_node *start_from = from.node;
00949   tree_node *current_to  = position.node;
00950 
00951   // replace the node at position with head of the replacement tree at from
00952   erase_children(position);
00953   tree_node* tmp = alloc_.allocate(1, 0);
00954   kp::constructor(&tmp->data, (*from));
00955   tmp->first_child = 0;
00956   tmp->last_child = 0;
00957   if (current_to->prev_sibling == 0)
00958   {
00959     current_to->parent->first_child = tmp;
00960   }
00961   else
00962   {
00963     current_to->prev_sibling->next_sibling = tmp;
00964   }
00965   tmp->prev_sibling = current_to->prev_sibling;
00966   if (current_to->next_sibling == 0)
00967   {
00968     current_to->parent->last_child = tmp;
00969   }
00970   else
00971   {
00972     current_to->next_sibling->prev_sibling = tmp;
00973   }
00974   tmp->next_sibling = current_to->next_sibling;
00975   tmp->parent = current_to->parent;
00976   kp::destructor(&current_to->data);
00977   alloc_.deallocate(current_to, 1);
00978   current_to = tmp;
00979 
00980   // only at this stage can we fix 'last'
00981   tree_node *last = from.node->next_sibling;
00982 
00983   pre_order_iterator toit = tmp;
00984   // copy all children
00985   do
00986   {
00987     assert(current_from != 0);
00988     if (current_from->first_child != 0)
00989     {
00990       current_from = current_from->first_child;
00991       toit = append_child(toit, current_from->data);
00992     }
00993     else
00994     {
00995       while (current_from->next_sibling == 0 && current_from != start_from)
00996       {
00997         current_from = current_from->parent;
00998         toit = parent(toit);
00999         assert(current_from != 0);
01000       }
01001       current_from = current_from->next_sibling;
01002       if (current_from != last)
01003       {
01004         toit = append_child(parent(toit), current_from->data);
01005       }
01006     }
01007   }
01008   while (current_from != last);
01009 
01010   return current_to;
01011 }
01012 
01013 template <class T, class tree_node_allocator>
01014 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::replace(
01015   sibling_iterator orig_begin,
01016   sibling_iterator orig_end,
01017   sibling_iterator new_begin,
01018   sibling_iterator new_end)
01019 {
01020   tree_node *orig_first = orig_begin.node;
01021   tree_node *new_first = new_begin.node;
01022   tree_node *orig_last = orig_first;
01023   while ((++orig_begin) != orig_end)
01024     orig_last = orig_last->next_sibling;
01025   tree_node *new_last = new_first;
01026   while ((++new_begin) != new_end)
01027     new_last = new_last->next_sibling;
01028 
01029   // insert all siblings in new_first..new_last before orig_first
01030   bool first = true;
01031   pre_order_iterator ret;
01032   while (1 == 1)
01033   {
01034     pre_order_iterator tt = insert_subtree(pre_order_iterator(orig_first), pre_order_iterator(new_first));
01035     if (first)
01036     {
01037       ret = tt;
01038       first = false;
01039     }
01040     if (new_first == new_last)
01041       break;
01042     new_first = new_first->next_sibling;
01043   }
01044 
01045   // erase old range of siblings
01046   bool last = false;
01047   tree_node *next = orig_first;
01048   while (1 == 1)
01049   {
01050     if (next == orig_last)
01051       last = true;
01052     next = next->next_sibling;
01053     erase((pre_order_iterator)orig_first);
01054     if (last)
01055       break;
01056     orig_first = next;
01057   }
01058   return ret;
01059 }
01060 
01061 template <class T, class tree_node_allocator>
01062 template <typename iter>
01063 iter tree<T, tree_node_allocator>::flatten(iter position)
01064 {
01065   if (position.node->first_child == 0)
01066     return position;
01067 
01068   tree_node *tmp = position.node->first_child;
01069   while (tmp)
01070   {
01071     tmp->parent = position.node->parent;
01072     tmp = tmp->next_sibling;
01073   }
01074   if (position.node->next_sibling)
01075   {
01076     position.node->last_child->next_sibling = position.node->next_sibling;
01077     position.node->next_sibling->prev_sibling = position.node->last_child;
01078   }
01079   else
01080   {
01081     position.node->parent->last_child = position.node->last_child;
01082   }
01083   position.node->next_sibling = position.node->first_child;
01084   position.node->next_sibling->prev_sibling = position.node;
01085   position.node->first_child = 0;
01086   position.node->last_child = 0;
01087 
01088   return position;
01089 }
01090 
01091 
01092 template <class T, class tree_node_allocator>
01093 template <typename iter>
01094 iter tree<T, tree_node_allocator>::reparent(iter position, sibling_iterator begin, sibling_iterator end)
01095 {
01096   tree_node *first = begin.node;
01097   tree_node *last = first;
01098   if (begin == end) return begin;
01099   // determine last node
01100   while ((++begin) != end)
01101   {
01102     last = last->next_sibling;
01103   }
01104   // move subtree
01105   if (first->prev_sibling == 0)
01106   {
01107     first->parent->first_child = last->next_sibling;
01108   }
01109   else
01110   {
01111     first->prev_sibling->next_sibling = last->next_sibling;
01112   }
01113   if (last->next_sibling == 0)
01114   {
01115     last->parent->last_child = first->prev_sibling;
01116   }
01117   else
01118   {
01119     last->next_sibling->prev_sibling = first->prev_sibling;
01120   }
01121   if (position.node->first_child == 0)
01122   {
01123     position.node->first_child = first;
01124     position.node->last_child = last;
01125     first->prev_sibling = 0;
01126   }
01127   else
01128   {
01129     position.node->last_child->next_sibling = first;
01130     first->prev_sibling = position.node->last_child;
01131     position.node->last_child = last;
01132   }
01133   last->next_sibling = 0;
01134 
01135   tree_node *pos = first;
01136   while (1 == 1)
01137   {
01138     pos->parent = position.node;
01139     if (pos == last) break;
01140     pos = pos->next_sibling;
01141   }
01142 
01143   return first;
01144 }
01145 
01146 template <class T, class tree_node_allocator>
01147 template <typename iter> iter tree<T, tree_node_allocator>::reparent(iter position, iter from)
01148 {
01149   if (from.node->first_child == 0) return position;
01150   return reparent(position, from.node->first_child, end(from));
01151 }
01152 
01153 template <class T, class tree_node_allocator>
01154 template <typename iter> iter tree<T, tree_node_allocator>::move_after(iter target, iter source)
01155 {
01156   tree_node *dst = target.node;
01157   tree_node *src = source.node;
01158   assert(dst);
01159   assert(src);
01160 
01161   if (dst == src) return source;
01162 
01163   // take src out of the tree
01164   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01165   else                     src->parent->first_child = src->next_sibling;
01166   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01167   else                     src->parent->last_child = src->prev_sibling;
01168 
01169   // connect it to the new point
01170   if (dst->next_sibling != 0) dst->next_sibling->prev_sibling = src;
01171   else                     dst->parent->last_child = src;
01172   src->next_sibling = dst->next_sibling;
01173   dst->next_sibling = src;
01174   src->prev_sibling = dst;
01175   src->parent = dst->parent;
01176   return src;
01177 }
01178 
01179 
01180 template <class T, class tree_node_allocator>
01181 template <typename iter> iter tree<T, tree_node_allocator>::move_before(iter target, iter source)
01182 {
01183   tree_node *dst = target.node;
01184   tree_node *src = source.node;
01185   assert(dst);
01186   assert(src);
01187 
01188   if (dst == src) return source;
01189 
01190   // take src out of the tree
01191   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01192   else                     src->parent->first_child = src->next_sibling;
01193   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01194   else                     src->parent->last_child = src->prev_sibling;
01195 
01196   // connect it to the new point
01197   if (dst->prev_sibling != 0) dst->prev_sibling->next_sibling = src;
01198   else                     dst->parent->first_child = src;
01199   src->prev_sibling = dst->prev_sibling;
01200   dst->prev_sibling = src;
01201   src->next_sibling = dst;
01202   src->parent = dst->parent;
01203   return src;
01204 }
01205 
01206 template <class T, class tree_node_allocator>
01207 template <typename iter> iter tree<T, tree_node_allocator>::move_ontop(iter target, iter source)
01208 {
01209   tree_node *dst = target.node;
01210   tree_node *src = source.node;
01211   assert(dst);
01212   assert(src);
01213 
01214   if (dst == src) return source;
01215 
01216   // remember connection points
01217   tree_node *b_prev_sibling = dst->prev_sibling;
01218   tree_node *b_next_sibling = dst->next_sibling;
01219   tree_node *b_parent = dst->parent;
01220 
01221   // remove target
01222   erase(target);
01223 
01224   // take src out of the tree
01225   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01226   else                     src->parent->first_child = src->next_sibling;
01227   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01228   else                     src->parent->last_child = src->prev_sibling;
01229 
01230   // connect it to the new point
01231   if (b_prev_sibling != 0) b_prev_sibling->next_sibling = src;
01232   else                  b_parent->first_child = src;
01233   if (b_next_sibling != 0) b_next_sibling->prev_sibling = src;
01234   else                  b_parent->last_child = src;
01235   src->prev_sibling = b_prev_sibling;
01236   src->next_sibling = b_next_sibling;
01237   src->parent = b_parent;
01238   return src;
01239 }
01240 
01241 template <class T, class tree_node_allocator>
01242 void tree<T, tree_node_allocator>::merge(sibling_iterator to1,   sibling_iterator to2,
01243     sibling_iterator from1, sibling_iterator from2,
01244     bool duplicate_leaves)
01245 {
01246   sibling_iterator fnd;
01247   while (from1 != from2)
01248   {
01249     if ((fnd = std::find(to1, to2, (*from1))) != to2)   // element found
01250     {
01251       if (from1.begin() == from1.end())   // full depth reached
01252       {
01253         if (duplicate_leaves)
01254           append_child(parent(to1), (*from1));
01255       }
01256       else     // descend further
01257       {
01258         merge(fnd.begin(), fnd.end(), from1.begin(), from1.end(), duplicate_leaves);
01259       }
01260     }
01261     else     // element missing
01262     {
01263       insert_subtree(to2, from1);
01264     }
01265     ++from1;
01266   }
01267 }
01268 
01269 
01270 template <class T, class tree_node_allocator>
01271 void tree<T, tree_node_allocator>::sort(sibling_iterator from, sibling_iterator to, bool deep)
01272 {
01273   std::less<T> comp;
01274   sort(from, to, comp, deep);
01275 }
01276 
01277 template <class T, class tree_node_allocator>
01278 template <class StrictWeakOrdering>
01279 void tree<T, tree_node_allocator>::sort(sibling_iterator from, sibling_iterator to,
01280                                         StrictWeakOrdering comp, bool deep)
01281 {
01282   if (from == to) return;
01283   // make list of sorted nodes
01284   // CHECK: if multiset stores equivalent nodes in the order in which they
01285   // are inserted, then this routine should be called 'stable_sort'.
01286   std::multiset<tree_node *, compare_nodes<StrictWeakOrdering> > nodes(comp);
01287   sibling_iterator it = from, it2 = to;
01288   while (it != to)
01289   {
01290     nodes.insert(it.node);
01291     ++it;
01292   }
01293   // reassemble
01294   --it2;
01295 
01296   // prev and next are the nodes before and after the sorted range
01297   tree_node *prev = from.node->prev_sibling;
01298   tree_node *next = it2.node->next_sibling;
01299   typename std::multiset<tree_node *, compare_nodes<StrictWeakOrdering> >::iterator nit = nodes.begin(), eit = nodes.end();
01300   if (prev == 0)
01301   {
01302     if ((*nit)->parent != 0) // to catch "sorting the head" situations, when there is no parent
01303       (*nit)->parent->first_child = (*nit);
01304   }
01305   else prev->next_sibling = (*nit);
01306 
01307   --eit;
01308   while (nit != eit)
01309   {
01310     (*nit)->prev_sibling = prev;
01311     if (prev)
01312       prev->next_sibling = (*nit);
01313     prev = (*nit);
01314     ++nit;
01315   }
01316   // prev now points to the last-but-one node in the sorted range
01317   if (prev)
01318     prev->next_sibling = (*eit);
01319 
01320   // eit points to the last node in the sorted range.
01321   (*eit)->next_sibling = next;
01322   (*eit)->prev_sibling = prev; // missed in the loop above
01323   if (next == 0)
01324   {
01325     if ((*eit)->parent != 0) // to catch "sorting the head" situations, when there is no parent
01326       (*eit)->parent->last_child = (*eit);
01327   }
01328   else next->prev_sibling = (*eit);
01329 
01330   if (deep)   // sort the children of each node too
01331   {
01332     sibling_iterator bcs(*nodes.begin());
01333     sibling_iterator ecs(*eit);
01334     ++ecs;
01335     while (bcs != ecs)
01336     {
01337       sort(begin(bcs), end(bcs), comp, deep);
01338       ++bcs;
01339     }
01340   }
01341 }
01342 
01343 template <class T, class tree_node_allocator>
01344 template <typename iter>
01345 bool tree<T, tree_node_allocator>::equal(const iter& one_, const iter& two, const iter& three_) const
01346 {
01347   std::equal_to<T> comp;
01348   return equal(one_, two, three_, comp);
01349 }
01350 
01351 template <class T, class tree_node_allocator>
01352 template <typename iter>
01353 bool tree<T, tree_node_allocator>::equal_subtree(const iter& one_, const iter& two_) const
01354 {
01355   std::equal_to<T> comp;
01356   return equal_subtree(one_, two_, comp);
01357 }
01358 
01359 template <class T, class tree_node_allocator>
01360 template <typename iter, class BinaryPredicate>
01361 bool tree<T, tree_node_allocator>::equal(const iter& one_, const iter& two, const iter& three_, BinaryPredicate fun) const
01362 {
01363   pre_order_iterator one(one_), three(three_);
01364 
01365 // if(one==two && is_valid(three) && three.number_of_children()!=0)
01366 //    return false;
01367   while (one != two && is_valid(three))
01368   {
01369     if (!fun(*one, *three))
01370       return false;
01371     if (one.number_of_children() != three.number_of_children())
01372       return false;
01373     ++one;
01374     ++three;
01375   }
01376   return true;
01377 }
01378 
01379 template <class T, class tree_node_allocator>
01380 template <typename iter, class BinaryPredicate>
01381 bool tree<T, tree_node_allocator>::equal_subtree(const iter& one_, const iter& two_, BinaryPredicate fun) const
01382 {
01383   pre_order_iterator one(one_), two(two_);
01384 
01385   if (!fun(*one, *two)) return false;
01386   if (number_of_children(one) != number_of_children(two)) return false;
01387   return equal(begin(one), end(one), begin(two), fun);
01388 }
01389 
01390 template <class T, class tree_node_allocator>
01391 tree<T, tree_node_allocator> tree<T, tree_node_allocator>::subtree(sibling_iterator from, sibling_iterator to) const
01392 {
01393   tree tmp;
01394   tmp.set_head(value_type());
01395   tmp.replace(tmp.begin(), tmp.end(), from, to);
01396   return tmp;
01397 }
01398 
01399 template <class T, class tree_node_allocator>
01400 void tree<T, tree_node_allocator>::subtree(tree& tmp, sibling_iterator from, sibling_iterator to) const
01401 {
01402   tmp.set_head(value_type());
01403   tmp.replace(tmp.begin(), tmp.end(), from, to);
01404 }
01405 
01406 template <class T, class tree_node_allocator>
01407 int tree<T, tree_node_allocator>::size() const
01408 {
01409   int i = 0;
01410   pre_order_iterator it = begin(), eit = end();
01411   while (it != eit)
01412   {
01413     ++i;
01414     ++it;
01415   }
01416   return i;
01417 }
01418 
01419 template <class T, class tree_node_allocator>
01420 bool tree<T, tree_node_allocator>::empty() const
01421 {
01422   pre_order_iterator it = begin(), eit = end();
01423   return (it == eit);
01424 }
01425 
01426 template <class T, class tree_node_allocator>
01427 int tree<T, tree_node_allocator>::depth(const iterator_base& it) const
01428 {
01429   tree_node* pos = it.node;
01430   assert(pos != 0);
01431   int ret = 0;
01432   while (pos->parent != 0)
01433   {
01434     pos = pos->parent;
01435     ++ret;
01436   }
01437   return ret;
01438 }
01439 
01440 template <class T, class tree_node_allocator>
01441 unsigned int tree<T, tree_node_allocator>::number_of_children(const iterator_base& it) const
01442 {
01443   tree_node *pos = it.node->first_child;
01444   if (pos == 0) return 0;
01445 
01446   unsigned int ret = 1;
01447 //   while(pos!=it.node->last_child) {
01448 //      ++ret;
01449 //      pos=pos->next_sibling;
01450 //      }
01451   while ((pos = pos->next_sibling))
01452     ++ret;
01453   return ret;
01454 }
01455 
01456 template <class T, class tree_node_allocator>
01457 unsigned int tree<T, tree_node_allocator>::number_of_siblings(const iterator_base& it) const
01458 {
01459   tree_node *pos = it.node;
01460   unsigned int ret = 0;
01461   while (pos->next_sibling &&
01462          pos->next_sibling != head &&
01463          pos->next_sibling != feet)
01464   {
01465     ++ret;
01466     pos = pos->next_sibling;
01467   }
01468   return ret;
01469 }
01470 
01471 template <class T, class tree_node_allocator>
01472 void tree<T, tree_node_allocator>::swap(sibling_iterator it)
01473 {
01474   tree_node *nxt = it.node->next_sibling;
01475   if (nxt)
01476   {
01477     if (it.node->prev_sibling)
01478       it.node->prev_sibling->next_sibling = nxt;
01479     else
01480       it.node->parent->first_child = nxt;
01481     nxt->prev_sibling = it.node->prev_sibling;
01482     tree_node *nxtnxt = nxt->next_sibling;
01483     if (nxtnxt)
01484       nxtnxt->prev_sibling = it.node;
01485     else
01486       it.node->parent->last_child = it.node;
01487     nxt->next_sibling = it.node;
01488     it.node->prev_sibling = nxt;
01489     it.node->next_sibling = nxtnxt;
01490   }
01491 }
01492 
01493 // template <class BinaryPredicate>
01494 // tree<T, tree_node_allocator>::iterator tree<T, tree_node_allocator>::find_subtree(
01495 //    sibling_iterator subfrom, sibling_iterator subto, iterator from, iterator to,
01496 //    BinaryPredicate fun) const
01497 //    {
01498 //    assert(1==0); // this routine is not finished yet.
01499 //    while(from!=to) {
01500 //       if(fun(*subfrom, *from)) {
01501 //
01502 //          }
01503 //       }
01504 //    return to;
01505 //    }
01506 
01507 template <class T, class tree_node_allocator>
01508 bool tree<T, tree_node_allocator>::is_in_subtree(const iterator_base& it, const iterator_base& begin,
01509     const iterator_base& end) const
01510 {
01511   // FIXME: this should be optimised.
01512   pre_order_iterator tmp = begin;
01513   while (tmp != end)
01514   {
01515     if (tmp == it) return true;
01516     ++tmp;
01517   }
01518   return false;
01519 }
01520 
01521 template <class T, class tree_node_allocator>
01522 bool tree<T, tree_node_allocator>::is_valid(const iterator_base& it) const
01523 {
01524   if (it.node == 0 || it.node == feet) return false;
01525   else return true;
01526 }
01527 
01528 template <class T, class tree_node_allocator>
01529 unsigned int tree<T, tree_node_allocator>::index(sibling_iterator it) const
01530 {
01531   unsigned int ind = 0;
01532   if (it.node->parent == 0)
01533   {
01534     while (it.node->prev_sibling != head)
01535     {
01536       it.node = it.node->prev_sibling;
01537       ++ind;
01538     }
01539   }
01540   else
01541   {
01542     while (it.node->prev_sibling != 0)
01543     {
01544       it.node = it.node->prev_sibling;
01545       ++ind;
01546     }
01547   }
01548   return ind;
01549 }
01550 
01551 
01552 template <class T, class tree_node_allocator>
01553 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::child(const iterator_base& it, unsigned int num) const
01554 {
01555   tree_node *tmp = it.node->first_child;
01556   while (num--)
01557   {
01558     assert(tmp != 0);
01559     tmp = tmp->next_sibling;
01560   }
01561   return tmp;
01562 }
01563 
01564 
01565 
01566 
01567 // Iterator base
01568 
01569 template <class T, class tree_node_allocator>
01570 tree<T, tree_node_allocator>::iterator_base::iterator_base()
01571   : node(0), skip_current_children_(false)
01572 {
01573 }
01574 
01575 template <class T, class tree_node_allocator>
01576 tree<T, tree_node_allocator>::iterator_base::iterator_base(tree_node *tn)
01577   : node(tn), skip_current_children_(false)
01578 {
01579 }
01580 
01581 template <class T, class tree_node_allocator>
01582 T& tree<T, tree_node_allocator>::iterator_base::operator*() const
01583 {
01584   return node->data;
01585 }
01586 
01587 template <class T, class tree_node_allocator>
01588 T* tree<T, tree_node_allocator>::iterator_base::operator->() const
01589 {
01590   return &(node->data);
01591 }
01592 
01593 template <class T, class tree_node_allocator>
01594 bool tree<T, tree_node_allocator>::post_order_iterator::operator!=(const post_order_iterator& other) const
01595 {
01596   if (other.node != this->node) return true;
01597   else return false;
01598 }
01599 
01600 template <class T, class tree_node_allocator>
01601 bool tree<T, tree_node_allocator>::post_order_iterator::operator==(const post_order_iterator& other) const
01602 {
01603   if (other.node == this->node) return true;
01604   else return false;
01605 }
01606 
01607 template <class T, class tree_node_allocator>
01608 bool tree<T, tree_node_allocator>::pre_order_iterator::operator!=(const pre_order_iterator& other) const
01609 {
01610   if (other.node != this->node) return true;
01611   else return false;
01612 }
01613 
01614 template <class T, class tree_node_allocator>
01615 bool tree<T, tree_node_allocator>::pre_order_iterator::operator==(const pre_order_iterator& other) const
01616 {
01617   if (other.node == this->node) return true;
01618   else return false;
01619 }
01620 
01621 template <class T, class tree_node_allocator>
01622 bool tree<T, tree_node_allocator>::sibling_iterator::operator!=(const sibling_iterator& other) const
01623 {
01624   if (other.node != this->node) return true;
01625   else return false;
01626 }
01627 
01628 template <class T, class tree_node_allocator>
01629 bool tree<T, tree_node_allocator>::sibling_iterator::operator==(const sibling_iterator& other) const
01630 {
01631   if (other.node == this->node) return true;
01632   else return false;
01633 }
01634 
01635 template <class T, class tree_node_allocator>
01636 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::iterator_base::begin() const
01637 {
01638   sibling_iterator ret(node->first_child);
01639   ret.parent_ = this->node;
01640   return ret;
01641 }
01642 
01643 template <class T, class tree_node_allocator>
01644 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::iterator_base::end() const
01645 {
01646   sibling_iterator ret(0);
01647   ret.parent_ = node;
01648   return ret;
01649 }
01650 
01651 template <class T, class tree_node_allocator>
01652 void tree<T, tree_node_allocator>::iterator_base::skip_children()
01653 {
01654   skip_current_children_ = true;
01655 }
01656 
01657 template <class T, class tree_node_allocator>
01658 unsigned int tree<T, tree_node_allocator>::iterator_base::number_of_children() const
01659 {
01660   tree_node *pos = node->first_child;
01661   if (pos == 0) return 0;
01662 
01663   unsigned int ret = 1;
01664   while (pos != node->last_child)
01665   {
01666     ++ret;
01667     pos = pos->next_sibling;
01668   }
01669   return ret;
01670 }
01671 
01672 
01673 
01674 // Pre-order iterator
01675 
01676 template <class T, class tree_node_allocator>
01677 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator()
01678   : iterator_base(0)
01679 {
01680 }
01681 
01682 template <class T, class tree_node_allocator>
01683 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(tree_node *tn)
01684   : iterator_base(tn)
01685 {
01686 }
01687 
01688 template <class T, class tree_node_allocator>
01689 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(const iterator_base &other)
01690   : iterator_base(other.node)
01691 {
01692 }
01693 
01694 template <class T, class tree_node_allocator>
01695 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(const sibling_iterator& other)
01696   : iterator_base(other.node)
01697 {
01698   if (this->node == 0)
01699   {
01700     if (other.range_last() != 0)
01701       this->node = other.range_last();
01702     else
01703       this->node = other.parent_;
01704     this->skip_children();
01705     ++(*this);
01706   }
01707 }
01708 
01709 template <class T, class tree_node_allocator>
01710 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator++()
01711 {
01712   assert(this->node != 0);
01713   if (!this->skip_current_children_ && this->node->first_child != 0)
01714   {
01715     this->node = this->node->first_child;
01716   }
01717   else
01718   {
01719     this->skip_current_children_ = false;
01720     while (this->node->next_sibling == 0)
01721     {
01722       this->node = this->node->parent;
01723       if (this->node == 0)
01724         return *this;
01725     }
01726     this->node = this->node->next_sibling;
01727   }
01728   return *this;
01729 }
01730 
01731 template <class T, class tree_node_allocator>
01732 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator--()
01733 {
01734   assert(this->node != 0);
01735   if (this->node->prev_sibling)
01736   {
01737     this->node = this->node->prev_sibling;
01738     while (this->node->last_child)
01739       this->node = this->node->last_child;
01740   }
01741   else
01742   {
01743     this->node = this->node->parent;
01744     if (this->node == 0)
01745       return *this;
01746   }
01747   return *this;
01748 }
01749 
01750 template <class T, class tree_node_allocator>
01751 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::pre_order_iterator::operator++(int n)
01752 {
01753   pre_order_iterator copy = *this;
01754   ++(*this);
01755   return copy;
01756 }
01757 
01758 template <class T, class tree_node_allocator>
01759 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::pre_order_iterator::operator--(int n)
01760 {
01761   pre_order_iterator copy = *this;
01762   --(*this);
01763   return copy;
01764 }
01765 
01766 template <class T, class tree_node_allocator>
01767 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator+=(unsigned int num)
01768 {
01769   while (num > 0)
01770   {
01771     ++(*this);
01772     --num;
01773   }
01774   return (*this);
01775 }
01776 
01777 template <class T, class tree_node_allocator>
01778 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator-=(unsigned int num)
01779 {
01780   while (num > 0)
01781   {
01782     --(*this);
01783     --num;
01784   }
01785   return (*this);
01786 }
01787 
01788 
01789 
01790 // Post-order iterator
01791 
01792 template <class T, class tree_node_allocator>
01793 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator()
01794   : iterator_base(0)
01795 {
01796 }
01797 
01798 template <class T, class tree_node_allocator>
01799 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(tree_node *tn)
01800   : iterator_base(tn)
01801 {
01802 }
01803 
01804 template <class T, class tree_node_allocator>
01805 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(const iterator_base &other)
01806   : iterator_base(other.node)
01807 {
01808 }
01809 
01810 template <class T, class tree_node_allocator>
01811 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(const sibling_iterator& other)
01812   : iterator_base(other.node)
01813 {
01814   if (this->node == 0)
01815   {
01816     if (other.range_last() != 0)
01817       this->node = other.range_last();
01818     else
01819       this->node = other.parent_;
01820     this->skip_children();
01821     ++(*this);
01822   }
01823 }
01824 
01825 template <class T, class tree_node_allocator>
01826 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator++()
01827 {
01828   assert(this->node != 0);
01829   if (this->node->next_sibling == 0)
01830   {
01831     this->node = this->node->parent;
01832     this->skip_current_children_ = false;
01833   }
01834   else
01835   {
01836     this->node = this->node->next_sibling;
01837     if (this->skip_current_children_)
01838     {
01839       this->skip_current_children_ = false;
01840     }
01841     else
01842     {
01843       while (this->node->first_child)
01844         this->node = this->node->first_child;
01845     }
01846   }
01847   return *this;
01848 }
01849 
01850 template <class T, class tree_node_allocator>
01851 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator--()
01852 {
01853   assert(this->node != 0);
01854   if (this->skip_current_children_ || this->node->last_child == 0)
01855   {
01856     this->skip_current_children_ = false;
01857     while (this->node->prev_sibling == 0)
01858       this->node = this->node->parent;
01859     this->node = this->node->prev_sibling;
01860   }
01861   else
01862   {
01863     this->node = this->node->last_child;
01864   }
01865   return *this;
01866 }
01867 
01868 template <class T, class tree_node_allocator>
01869 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::post_order_iterator::operator++(int)
01870 {
01871   post_order_iterator copy = *this;
01872   ++(*this);
01873   return copy;
01874 }
01875 
01876 template <class T, class tree_node_allocator>
01877 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::post_order_iterator::operator--(int)
01878 {
01879   post_order_iterator copy = *this;
01880   --(*this);
01881   return copy;
01882 }
01883 
01884 
01885 template <class T, class tree_node_allocator>
01886 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator+=(unsigned int num)
01887 {
01888   while (num > 0)
01889   {
01890     ++(*this);
01891     --num;
01892   }
01893   return (*this);
01894 }
01895 
01896 template <class T, class tree_node_allocator>
01897 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator-=(unsigned int num)
01898 {
01899   while (num > 0)
01900   {
01901     --(*this);
01902     --num;
01903   }
01904   return (*this);
01905 }
01906 
01907 template <class T, class tree_node_allocator>
01908 void tree<T, tree_node_allocator>::post_order_iterator::descend_all()
01909 {
01910   assert(this->node != 0);
01911   while (this->node->first_child)
01912     this->node = this->node->first_child;
01913 }
01914 
01915 
01916 // Fixed depth iterator
01917 
01918 template <class T, class tree_node_allocator>
01919 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator()
01920   : iterator_base()
01921 {
01922   set_first_parent_();
01923 }
01924 
01925 template <class T, class tree_node_allocator>
01926 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(tree_node *tn)
01927   : iterator_base(tn)
01928 {
01929   set_first_parent_();
01930 }
01931 
01932 template <class T, class tree_node_allocator>
01933 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const iterator_base& other)
01934   : iterator_base(other.node)
01935 {
01936   set_first_parent_();
01937 }
01938 
01939 template <class T, class tree_node_allocator>
01940 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const sibling_iterator& other)
01941   : iterator_base(other.node), first_parent_(other.parent_)
01942 {
01943   find_leftmost_parent_();
01944 }
01945 
01946 template <class T, class tree_node_allocator>
01947 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const fixed_depth_iterator& other)
01948   : iterator_base(other.node), first_parent_(other.first_parent_)
01949 {
01950 }
01951 
01952 template <class T, class tree_node_allocator>
01953 void tree<T, tree_node_allocator>::fixed_depth_iterator::set_first_parent_()
01954 {
01955   return; // FIXME: we do not use first_parent_ yet, and it actually needs some serious reworking if
01956   // it is ever to work at the 'head' level.
01957   first_parent_ = 0;
01958   if (this->node == 0) return;
01959   if (this->node->parent != 0)
01960     first_parent_ = this->node->parent;
01961   if (first_parent_)
01962     find_leftmost_parent_();
01963 }
01964 
01965 template <class T, class tree_node_allocator>
01966 void tree<T, tree_node_allocator>::fixed_depth_iterator::find_leftmost_parent_()
01967 {
01968   return; // FIXME: see 'set_first_parent()'
01969   tree_node *tmppar = first_parent_;
01970   while (tmppar->prev_sibling)
01971   {
01972     tmppar = tmppar->prev_sibling;
01973     if (tmppar->first_child)
01974       first_parent_ = tmppar;
01975   }
01976 }
01977 
01978 template <class T, class tree_node_allocator>
01979 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator++()
01980 {
01981   assert(this->node != 0);
01982 
01983   if (this->node->next_sibling)
01984   {
01985     this->node = this->node->next_sibling;
01986   }
01987   else
01988   {
01989     int relative_depth = 0;
01990 upper:
01991     do
01992     {
01993       this->node = this->node->parent;
01994       if (this->node == 0) return *this;
01995       --relative_depth;
01996     }
01997     while (this->node->next_sibling == 0);
01998 lower:
01999     this->node = this->node->next_sibling;
02000     while (this->node->first_child == 0)
02001     {
02002       if (this->node->next_sibling == 0)
02003         goto upper;
02004       this->node = this->node->next_sibling;
02005       if (this->node == 0) return *this;
02006     }
02007     while (relative_depth < 0 && this->node->first_child != 0)
02008     {
02009       this->node = this->node->first_child;
02010       ++relative_depth;
02011     }
02012     if (relative_depth < 0)
02013     {
02014       if (this->node->next_sibling == 0) goto upper;
02015       else                          goto lower;
02016     }
02017   }
02018   return *this;
02019 
02020 // if(this->node->next_sibling!=0) {
02021 //    this->node=this->node->next_sibling;
02022 //    assert(this->node!=0);
02023 //    if(this->node->parent==0 && this->node->next_sibling==0) // feet element
02024 //       this->node=0;
02025 //    }
02026 // else {
02027 //    tree_node *par=this->node->parent;
02028 //    do {
02029 //       par=par->next_sibling;
02030 //       if(par==0) { // FIXME: need to keep track of this!
02031 //          this->node=0;
02032 //          return *this;
02033 //          }
02034 //       } while(par->first_child==0);
02035 //    this->node=par->first_child;
02036 //    }
02037   return *this;
02038 }
02039 
02040 template <class T, class tree_node_allocator>
02041 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator--()
02042 {
02043   assert(this->node != 0);
02044   if (this->node->prev_sibling != 0)
02045   {
02046     this->node = this->node->prev_sibling;
02047     assert(this->node != 0);
02048     if (this->node->parent == 0 && this->node->prev_sibling == 0) // head element
02049       this->node = 0;
02050   }
02051   else
02052   {
02053     tree_node *par = this->node->parent;
02054     do
02055     {
02056       par = par->prev_sibling;
02057       if (par == 0)   // FIXME: need to keep track of this!
02058       {
02059         this->node = 0;
02060         return *this;
02061       }
02062     }
02063     while (par->last_child == 0);
02064     this->node = par->last_child;
02065   }
02066   return *this;
02067 }
02068 
02069 template <class T, class tree_node_allocator>
02070 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::fixed_depth_iterator::operator++(int)
02071 {
02072   fixed_depth_iterator copy = *this;
02073   ++(*this);
02074   return copy;
02075 }
02076 
02077 template <class T, class tree_node_allocator>
02078 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::fixed_depth_iterator::operator--(int)
02079 {
02080   fixed_depth_iterator copy = *this;
02081   --(*this);
02082   return copy;
02083 }
02084 
02085 template <class T, class tree_node_allocator>
02086 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator-=(unsigned int num)
02087 {
02088   while (num > 0)
02089   {
02090     --(*this);
02091     --(num);
02092   }
02093   return (*this);
02094 }
02095 
02096 template <class T, class tree_node_allocator>
02097 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator+=(unsigned int num)
02098 {
02099   while (num > 0)
02100   {
02101     ++(*this);
02102     --(num);
02103   }
02104   return *this;
02105 }
02106 
02107 // FIXME: add the other members of fixed_depth_iterator.
02108 
02109 
02110 // Sibling iterator
02111 
02112 template <class T, class tree_node_allocator>
02113 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator()
02114   : iterator_base()
02115 {
02116   set_parent_();
02117 }
02118 
02119 template <class T, class tree_node_allocator>
02120 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(tree_node *tn)
02121   : iterator_base(tn)
02122 {
02123   set_parent_();
02124 }
02125 
02126 template <class T, class tree_node_allocator>
02127 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(const iterator_base& other)
02128   : iterator_base(other.node)
02129 {
02130   set_parent_();
02131 }
02132 
02133 template <class T, class tree_node_allocator>
02134 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(const sibling_iterator& other)
02135   : iterator_base(other), parent_(other.parent_)
02136 {
02137 }
02138 
02139 template <class T, class tree_node_allocator>
02140 void tree<T, tree_node_allocator>::sibling_iterator::set_parent_()
02141 {
02142   parent_ = 0;
02143   if (this->node == 0) return;
02144   if (this->node->parent != 0)
02145     parent_ = this->node->parent;
02146 }
02147 
02148 template <class T, class tree_node_allocator>
02149 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator++()
02150 {
02151   if (this->node)
02152     this->node = this->node->next_sibling;
02153   return *this;
02154 }
02155 
02156 template <class T, class tree_node_allocator>
02157 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator--()
02158 {
02159   if (this->node) this->node = this->node->prev_sibling;
02160   else
02161   {
02162     assert(parent_);
02163     this->node = parent_->last_child;
02164   }
02165   return *this;
02166 }
02167 
02168 template <class T, class tree_node_allocator>
02169 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::sibling_iterator::operator++(int)
02170 {
02171   sibling_iterator copy = *this;
02172   ++(*this);
02173   return copy;
02174 }
02175 
02176 template <class T, class tree_node_allocator>
02177 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::sibling_iterator::operator--(int)
02178 {
02179   sibling_iterator copy = *this;
02180   --(*this);
02181   return copy;
02182 }
02183 
02184 template <class T, class tree_node_allocator>
02185 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator+=(unsigned int num)
02186 {
02187   while (num > 0)
02188   {
02189     ++(*this);
02190     --num;
02191   }
02192   return (*this);
02193 }
02194 
02195 template <class T, class tree_node_allocator>
02196 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator-=(unsigned int num)
02197 {
02198   while (num > 0)
02199   {
02200     --(*this);
02201     --num;
02202   }
02203   return (*this);
02204 }
02205 
02206 template <class T, class tree_node_allocator>
02207 typename tree<T, tree_node_allocator>::tree_node *tree<T, tree_node_allocator>::sibling_iterator::range_first() const
02208 {
02209   tree_node *tmp = parent_->first_child;
02210   return tmp;
02211 }
02212 
02213 template <class T, class tree_node_allocator>
02214 typename tree<T, tree_node_allocator>::tree_node *tree<T, tree_node_allocator>::sibling_iterator::range_last() const
02215 {
02216   return parent_->last_child;
02217 }
02218 
02219 
02220 #endif
02221 
02222 // Local variables:
02223 // default-tab-width: 3
02224 // End:
libofx-0.9.4/doc/html/ftv2mlastnode.png0000644000175000017500000000033511553133251014737 00000000000000‰PNG  IHDRɪ|¤IDATxí1A…?âŽàïÎ0¡Ð(F'‘8V§Pk$ À(´¯«QÈŸX›ý5’º÷2ïíîÌÛ¾B J5+©kƒß´ÞÁ|y(€v¤ÿì¦Nì£/ö£OpÓØ}¯Ü´O™Á¸—¸0N¢›.À¬DOÜT$oÁMSàú‚'7-rÖ8@/+nÚ]7³ƒä¦Mý™þÁà žB"cÃAØIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__utilities_8hh_source.html0000644000175000017500000001771711553133250022176 00000000000000 LibOFX: ofx_utilities.hh Source File

ofx_utilities.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_util.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #ifndef OFX_UTIL_H
00019 #define OFX_UTIL_H
00020 #include <string.h>
00021 #include <time.h>               // for time_t
00022 #include "ParserEventGeneratorKit.h"
00023 using namespace std;
00024 /* This file contains various simple functions for type conversion & al */
00025 
00026 /*wostream &operator<<(wostream &os, SGMLApplication::CharString s); */
00027 
00029 ostream &operator<<(ostream &os, SGMLApplication::CharString s);
00030 
00032 wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest);
00033 
00035 string CharStringtostring(const SGMLApplication::CharString source, string &dest);
00036 
00038 string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest);
00039 
00041 time_t ofxdate_to_time_t(const string ofxdate);
00042 
00044 double ofxamount_to_double(const string ofxamount);
00045 
00047 string strip_whitespace(const string para_string);
00048 
00049 int mkTempFileName(const char *tmpl, char *buffer, unsigned int size);
00050 
00051 #endif
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__preproc_8hh.html0000644000175000017500000002416311553133250020246 00000000000000 LibOFX: ofx_preproc.hh File Reference

ofx_preproc.hh File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Defines

#define OPENSPDCL_FILENAME   "opensp.dcl"
#define OFX160DTD_FILENAME   "ofx160.dtd"
#define OFCDTD_FILENAME   "ofc.dtd"

Functions

string sanitize_proprietary_tags (string input_string)
 Removes proprietary tags and comments.
string find_dtd (LibofxContextPtr ctx, string dtd_filename)
 Find the appropriate DTD for the file version.
int ofx_proc_file (LibofxContextPtr libofx_context, const char *)
 ofx_proc_file process an ofx or ofc file.

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file fx-0.9.4/lib/ofx_preproc.hh.


Function Documentation

string find_dtd ( LibofxContextPtr  ctx,
string  dtd_filename 
)

Find the appropriate DTD for the file version.

This function will try to find a DTD matching the requested_version and return the full path of the DTD found (or an empty string if unsuccessful)

Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly

It will look, in (order)

1- The environment variable OFX_DTD_PATH (if present) 2- On windows only, a relative path specified by get_dtd_installation_directory() 3- The path specified by the makefile in MAKEFILE_DTD_PATH, thru LIBOFX_DTD_DIR in configure (if present) 4- Any hardcoded paths in DTD_SEARCH_PATH

Definition at line 636 of file ofx_preproc.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().

int ofx_proc_file ( LibofxContextPtr  ctx,
const char *  p_filename 
)

ofx_proc_file process an ofx or ofc file.

libofx_proc_file must be called with a list of 1 or more OFX files to be parsed in command line format.

ofx_proc_file process an ofx or ofc file.

Takes care of comment striping, dtd locating, etc.

Definition at line 81 of file ofx_preproc.cpp.

Referenced by libofx_proc_file().

string sanitize_proprietary_tags ( string  input_string)

Removes proprietary tags and comments.

This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it

Definition at line 487 of file ofx_preproc.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().

libofx-0.9.4/doc/html/ofx__container__account_8cpp_source.html0000644000175000017500000006227711553133250021525 00000000000000 LibOFX: ofx_container_account.cpp Source File

ofx_container_account.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_account.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                      OfxAccountContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxAccountContainer::OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "ACCOUNT";
00041   strcpy(bankid, "");
00042   strcpy(branchid, "");
00043   strcpy(acctid, "");
00044   strcpy(acctkey, "");
00045   strcpy(brokerid, "");
00046   if (para_tag_identifier == "CCACCTFROM")
00047   {
00048     /*Set the type for a creditcard account.  Bank account specific
00049         OFX elements will set this attribute elsewhere */
00050     data.account_type = data.OFX_CREDITCARD;
00051     data.account_type_valid = true;
00052   }
00053   if (para_tag_identifier == "INVACCTFROM")
00054   {
00055     /*Set the type for an investment account.  Bank account specific
00056         OFX elements will set this attribute elsewhere */
00057     data.account_type = data.OFX_INVESTMENT;
00058     data.account_type_valid = true;
00059   }
00060   if (parentcontainer != NULL && ((OfxStatementContainer*)parentcontainer)->data.currency_valid == true)
00061   {
00062     strncpy(data.currency, ((OfxStatementContainer*)parentcontainer)->data.currency, OFX_CURRENCY_LENGTH); /* In ISO-4217 format */
00063     data.currency_valid = true;
00064   }
00065 }
00066 OfxAccountContainer::~OfxAccountContainer()
00067 {
00068   /*  if (parentcontainer->type == "STATEMENT")
00069       {
00070       ((OfxStatementContainer*)parentcontainer)->add_account(data);
00071       }
00072       ofx_proc_account_cb (data);*/
00073 }
00074 
00075 void OfxAccountContainer::add_attribute(const string identifier, const string value)
00076 {
00077   if ( identifier == "BANKID")
00078   {
00079     strncpy(bankid, value.c_str(), OFX_BANKID_LENGTH);
00080     data.bank_id_valid = true;
00081     strncpy(data.bank_id, value.c_str(), OFX_BANKID_LENGTH);
00082   }
00083   else if ( identifier == "BRANCHID")
00084   {
00085     strncpy(branchid, value.c_str(), OFX_BRANCHID_LENGTH);
00086     data.branch_id_valid = true;
00087     strncpy(data.branch_id, value.c_str(), OFX_BRANCHID_LENGTH);
00088   }
00089   else if ( identifier == "ACCTID")
00090   {
00091     strncpy(acctid, value.c_str(), OFX_ACCTID_LENGTH);
00092     data.account_number_valid = true;
00093     strncpy(data.account_number, value.c_str(), OFX_ACCTID_LENGTH);
00094   }
00095   else if ( identifier == "ACCTKEY")
00096   {
00097     strncpy(acctkey, value.c_str(), OFX_ACCTKEY_LENGTH);
00098   }
00099   else if ( identifier == "BROKERID")     /* For investment accounts */
00100   {
00101     strncpy(brokerid, value.c_str(), OFX_BROKERID_LENGTH);
00102     data.broker_id_valid = true;
00103     strncpy(data.broker_id, value.c_str(), OFX_BROKERID_LENGTH);
00104   }
00105   else if ((identifier == "ACCTTYPE") || (identifier == "ACCTTYPE2"))
00106   {
00107     data.account_type_valid = true;
00108     if (value == "CHECKING")
00109     {
00110       data.account_type = data.OFX_CHECKING;
00111     }
00112     else if (value == "SAVINGS")
00113     {
00114       data.account_type = data.OFX_SAVINGS;
00115     }
00116     else if (value == "MONEYMRKT")
00117     {
00118       data.account_type = data.OFX_MONEYMRKT;
00119     }
00120     else if (value == "CREDITLINE")
00121     {
00122       data.account_type = data.OFX_CREDITLINE;
00123     }
00124     else if (value == "CMA")
00125     {
00126       data.account_type = data.OFX_CMA;
00127     }
00128     /* AccountType CREDITCARD is set at object creation, if appropriate */
00129     else
00130     {
00131       data.account_type_valid = false;
00132     }
00133   }
00134   else
00135   {
00136     /* Redirect unknown identifiers to the base class */
00137     OfxGenericContainer::add_attribute(identifier, value);
00138   }
00139 }//end OfxAccountContainer::add_attribute()
00140 
00141 int OfxAccountContainer::gen_event()
00142 {
00143   libofx_context->accountCallback(data);
00144   return true;
00145 }
00146 
00147 int  OfxAccountContainer::add_to_main_tree()
00148 {
00149   gen_account_id ();
00150 
00151   if (MainContainer != NULL)
00152   {
00153     return MainContainer->add_container(this);
00154   }
00155   else
00156   {
00157     return false;
00158   }
00159 }
00160 
00161 void OfxAccountContainer::gen_account_id(void)
00162 {
00163   if (data.account_type == OfxAccountData::OFX_CREDITCARD)
00164   {
00165     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00166     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00167     strncat(data.account_id, acctkey, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00168 
00169     strncat(data.account_name, "Credit card ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00170     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00171   }
00172   else if (data.account_type == OfxAccountData::OFX_INVESTMENT)
00173   {
00174     strncat(data.account_id, brokerid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00175     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00176     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00177 
00178     strncat(data.account_name, "Investment account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00179     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00180     strncat(data.account_name, " at broker ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00181     strncat(data.account_name, brokerid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00182   }
00183   else
00184   {
00185     strncat(data.account_id, bankid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00186     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00187     strncat(data.account_id, branchid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00188     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00189     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00190 
00191     strncat(data.account_name, "Bank account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00192     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00193   }
00194   if (strlen(data.account_id) >= 0)
00195   {
00196     data.account_id_valid = true;
00197   }
00198 }//end OfxAccountContainer::gen_account_id()
libofx-0.9.4/doc/html/nav_f.png0000644000175000017500000000023711553133250013240 00000000000000‰PNG  IHDR8³»fIDATxíÝIB1 Q;uÛ¿@ÑÏh;áÚ ±aË !ŽÐ‹V½CÈíþ âŠÅÆ|c±˜¾™¶¶3èsÑFÐFP»S{PšSšsVãlN®F.F.“ã2’ˆüµ¤ï_U¿Œ¾˜Ïþ«‰ÈH Ým”°•IEND®B`‚libofx-0.9.4/doc/html/ftv2splitbar.png0000644000175000017500000000037111553133251014571 00000000000000‰PNG  IHDRM¸¿ÀIDATxíÝ¡NBq†áßÿ°™ §Ÿä,4ÉnG±0†Í›LÞ‡Wp(d6¼›YÓ¡0@¢‹ÍÆéy㳯}7Ð(çÕ´üŽßû/oOÏ£Nï5‹!„B!„B!„B!„B!„ÐÅhù½‹ˆýáøG)¥‡vqWä×Wƒn+•óªÿx3[ln›ùz»?ÿ*‹ˆº®#âëg“Ï•ÓB!„B!„B!„B!„BL¿Vì=ü 0ðÉIEND®B`‚libofx-0.9.4/doc/html/ofx__containers__misc_8cpp.html0000644000175000017500000000713611553133250017620 00000000000000 LibOFX: ofx_containers_misc.cpp File Reference

ofx_containers_misc.cpp File Reference

LibOFX internal object code. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

LibOFX internal object code.

These objects will process the elements returned by ofx_sgml.cpp and add them to their data members.

Warning:
Object documentation is not yet done.

Definition in file ofx_containers_misc.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__containers_8hh.html0000644000175000017500000002022611553133250020735 00000000000000 LibOFX: ofx_containers.hh File Reference

ofx_containers.hh File Reference

LibOFX internal object code. More...

Go to the source code of this file.

Data Structures

class  OfxGenericContainer
 A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer. More...
class  OfxDummyContainer
 A container to holds OFX SGML elements that LibOFX knows nothing about. More...
class  OfxPushUpContainer
 A container to hold a OFX SGML element for which you want the parent to process it's data elements. More...
class  OfxStatusContainer
 Represents the <STATUS> OFX SGML entity. More...
class  OfxBalanceContainer
 Represents the <BALANCE> OFX SGML entity. More...
class  OfxStatementContainer
 Represents a statement for either a bank account or a credit card account. More...
class  OfxAccountContainer
 Represents a bank account or a credit card account. More...
class  OfxSecurityContainer
 Represents a security, such as a stock or bond. More...
class  OfxTransactionContainer
 Represents a generic transaction. More...
class  OfxBankTransactionContainer
 Represents a bank or credid card transaction. More...
class  OfxInvestmentTransactionContainer
 Represents a bank or credid card transaction. More...
class  OfxMainContainer
 The root container. Created by the <OFX> OFX element or by the export functions. More...

Detailed Description

LibOFX internal object code.

These objects will process the elements returned by ofx_sgml.cpp and add them to their data members.

Warning:
Object documentation is not yet complete.

Definition in file fx-0.9.4/lib/ofx_containers.hh.

libofx-0.9.4/doc/html/win32_8hh_source.html0000644000175000017500000001165111553133250015422 00000000000000 LibOFX: win32.hh Source File

win32.hh

00001 /***************************************************************************
00002  $RCSfile: win32.hh,v $
00003  -------------------
00004  cvs         : $Id: win32.hh,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $
00005  begin       : Sat Oct 27 2007
00006  copyright   : (C) 2007 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  * This file is part of the project "LibOfx".                              *
00011  * Please see toplevel file COPYING of that project for license details.   *
00012  ***************************************************************************/
00013 
00014 #ifndef LIBOFX_WIN32_HH
00015 #define LIBOFX_WIN32_HH
00016 
00017 
00018 
00019 #ifdef HAVE_CONFIG_H
00020 # include <config.h>
00021 #endif
00022 
00023 
00024 #ifdef OS_WIN32
00025 
00026 int mkstemp(char *tmpl);
00027 
00028 
00029 #endif
00030 
00031 
00032 #endif
00033 
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__error__msg_8hh_source.html0000644000175000017500000007210211553133250022306 00000000000000 LibOFX: ofx_error_msg.hh Source File

ofx_error_msg.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_data_struct.h  -  description
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFX_DATA_STRUCT_H
00020 #define OFX_DATA_STRUCT_H
00021 
00023 struct ErrorMsg
00024 {
00025   int code;           
00026   const char * name;        
00027   const char * description; 
00028 };
00029 
00031 
00034 const ErrorMsg error_msgs_list[] =
00035 {
00036   {0, "Success", "The server successfully processed the request."},
00037   {1, "Client is up-to-date", "Based on the client timestamp, the client has the latest information. The response does not supply any additional information."},
00038   {2000, "General error", "Error other than those specified by the remaining error codes. (Note: Servers should provide a more specific error whenever possible. Error code 2000 should be reserved for cases in which a more specific code is not available.)"},
00039   {2001, "Invalid account", ""},
00040   {2002, "General account error", "Account error not specified by the remaining error codes."},
00041   {2003, "Account not found", "The specified account number does not correspond to one of the user's accounts."},
00042   {2004, "Account closed", "The specified account number corresponds to an account that has been closed."},
00043   {2005, "Account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00044   {2006, "Source account not found", "The specified account number does not correspond to one of the user's accounts."},
00045   {2007, "Source account closed", "The specified account number corresponds to an account that has been closed."},
00046   {2008, "Source account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00047   {2009, "Destination account not found", "The specified account number does not correspond to one of the user's accounts."},
00048   {2010, "Destination account closed", "The specified account number corresponds to an account that has been closed."},
00049   {2011, "Destination account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00050   {2012, "Invalid amount", "The specified amount is not valid for this action; for example, the user specified a negative payment amount."},
00051   {2014, "Date too soon", "The server cannot process the requested action by the date specified by the user."},
00052   {2015, "Date too far in future", "The server cannot accept requests for an action that far in the future."},
00053   {2016, "Transaction already committed", "Transaction has entered the processing loop and cannot be modified/cancelled using OFX. The transaction may still be cancelled or modified using other means (for example, a phone call to Customer Service)."},
00054   {2017, "Already canceled", "The transaction cannot be canceled or modified because it has already been canceled."},
00055   {2018, "Unknown server ID", "The specified server ID does not exist or no longer exists."},
00056   {2019, "Duplicate request", "A request with this <TRNUID> has already been received and processed."},
00057   {2020, "Invalid date", "The specified datetime stamp cannot be parsed; for instance, the datetime stamp specifies 25:00 hours."},
00058   {2021, "Unsupported version", "The server does not support the requested version. The version of the message set specified by the client is not supported by this server."},
00059   {2022, "Invalid TAN", "The server was unable to validate the TAN sent in the request."},
00060   {2023, "Unknown FITID", "The specified FITID/BILLID does not exist or no longer exists. [BILLID not found in the billing message sets]"},
00061   {2025, "Branch ID missing", "A <BRANCHID> value must be provided in the <BANKACCTFROM> aggregate for this country system, but this field is missing."},
00062   {2026, "Bank name doesn't match bank ID", "The value of <BANKNAME> in the <EXTBANKACCTTO> aggregate is inconsistent with the value of <BANKID> in the <BANKACCTTO> aggregate."},
00063   {2027, "Invalid date range", "Response for non-overlapping dates, date ranges in the future, et cetera."},
00064   {2028, "Requested element unknown", "One or more elements of the request were not recognized by the server or the server (as noted in the FI Profile) does not support the elements. The server executed the element transactions it understood and supported. For example, the request file included private tags in a <PMTRQ> but the server was able to execute the rest of the request."},
00065   {6500, "<REJECTIFMISSING>Y invalid without <TOKEN>", "This error code may appear <SYNCERROR> element of an <xxxSYNCRS> wrapper (in <PRESDLVMSGSRSV1> and V2 message set responses) or the <CODE> contained in any embedded transaction wrappers within a sync response. The corresponding sync request wrapper included <REJECTIFMISSING>Y with <REFRESH>Y or <TOKENONLY>Y, which is illegal."},
00066   {6501, "Embedded transactions in request failed to process: Out of date", "<REJECTIFMISSING>Y and embedded transactions appeared in the request sync wrapper and the provided <TOKEN> was out of date. This code should be used in the <SYNCERROR> of the response sync wrapper."},
00067   {6502, "Unable to process embedded transaction due to out-of-date <TOKEN>", "Used in response transaction wrapper for embedded transactions when <SYNCERROR>6501 appears in the surrounding sync wrapper."},
00068   {10000, "Stop check in process", "Stop check is already in process."},
00069   {10500, "Too many checks to process", "The stop-payment request <STPCHKRQ> specifies too many checks."},
00070   {10501, "Invalid payee", "Payee error not specified by the remainingerror codes."},
00071   {10502, "Invalid payee address", "Some portion of the payee's address is incorrect or unknown."},
00072   {10503, "Invalid payee account number", "The account number <PAYACCT> of the requested payee is invalid."},
00073   {10504, "Insufficient funds", "The server cannot process the request because the specified account does not have enough funds."},
00074   {10505, "Cannot modify element", "The server does not allow modifications to one or more values in a modification request."},
00075   {10506, "Cannot modify source account", "Reserved for future use."},
00076   {10507, "Cannot modify destination account", "Reserved for future use."},
00077   {10508, "Invalid frequency", "The specified frequency <FREQ> does not match one of the accepted frequencies for recurring transactions."},
00078   {10509, "Model already canceled", "The server has already canceled the specified recurring model."},
00079   {10510, "Invalid payee ID", "The specified payee ID does not exist or no longer exists."},
00080   {10511, "Invalid payee city", "The specified city is incorrect or unknown."},
00081   {10512, "Invalid payee state", "The specified state is incorrect or unknown."},
00082   {10513, "Invalid payee postal code", "The specified postal code is incorrect or unknown."},
00083   {10514, "Transaction already processed", "Transaction has already been sent or date due is past"},
00084   {10515, "Payee not modifiable by client", "The server does not allow clients to change payee information."},
00085   {10516, "Wire beneficiary invalid", "The specified wire beneficiary does not exist or no longer exists."},
00086   {10517, "Invalid payee name", "The server does not recognize the specified payee name."},
00087   {10518, "Unknown model ID", "The specified model ID does not exist or no longer exists."},
00088   {10519, "Invalid payee list ID", "The specified payee list ID does not exist or no longer exists."},
00089   {10600, "Table type not found", "The specified table type is not recognized or does not exist."},
00090   {12250, "Investment transaction download not supported (WARN)", "The server does not support investment transaction download."},
00091   {12251, "Investment position download not supported (WARN)", "The server does not support investment position download."},
00092   {12252, "Investment positions for specified date not available", "The server does not support investment positions for the specified date."},
00093   {12253, "Investment open order download not supported (WARN)", "The server does not support open order download."},
00094   {12254, "Investment balances download not supported (WARN)", "The server does not support investment balances download."},
00095   {12255, "401(k) not available for this account", "401(k) information requested from a non-401(k) account."},
00096   {12500, "One or more securities not found", "The server could not find the requested securities."},
00097   {13000, "User ID & password will be sent out-of-band (INFO)", "The server will send the user ID and password via postal mail, e-mail, or another means. The accompanying message will provide details."},
00098   {13500, "Unable to enroll user", "The server could not enroll the user."},
00099   {13501, "User already enrolled", "The server has already enrolled the user."},
00100   {13502, "Invalid service", "The server does not support the service <SVC> specified in the service-activation request."},
00101   {13503, "Cannot change user information", "The server does not support the <CHGUSERINFORQ> request."},
00102   {13504, "<FI> Missing or Invalid in <SONRQ>", "The FI requires the client to provide the <FI> aggregate in the <SONRQ> request, but either none was provided, or the one provided was invalid."},
00103   {14500, "1099 forms not available", "1099 forms are not yet available for the tax year requested."},
00104   {14501, "1099 forms not available for user ID", "This user does not have any 1099 forms available."},
00105   {14600, "W2 forms not available", "W2 forms are not yet available for the tax year requested."},
00106   {14601, "W2 forms not available for user ID", "The user does not have any W2 forms available."},
00107   {14700, "1098 forms not available", "1098 forms are not yet available for the tax year requested."},
00108   {14701, "1098 forms not available for user ID", "The user does not have any 1098 forms available."},
00109   {15000, "Must change USERPASS", "The user must change his or her <USERPASS> number as part of the next OFX request."},
00110   {15500, "Signon invalid", "The user cannot signon because he or she entered an invalid user ID or password."},
00111   {15501, "Customer account already in use", "The server allows only one connection at a time, and another user is already signed on. Please try again later."},
00112   {15502, "USERPASS lockout", "The server has received too many failed signon attempts for this user. Please call the FI's technical support number."},
00113   {15503, "Could not change USERPASS", "The server does not support the <PINCHRQ> request."},
00114   {15504, "Could not provide random data", "The server could not generate random data as requested by the <CHALLENGERQ>."},
00115   {15505, "Country system not supported", "The server does not support the country specified in the <COUNTRY> field of the <SONRQ> aggregate."},
00116   {15506, "Empty signon not supported", "The server does not support signons not accompanied by some other transaction."},
00117   {15507, "Signon invalid without supporting pin change request", "The OFX block associated with the signon does not contain a pin change request and should."},
00118   {15508, "Transaction not authorized", "Current user is not authorized to perform this action on behalf of the <USERID>."},
00119   {16500, "HTML not allowed", "The server does not accept HTML formatting in the request."},
00120   {16501, "Unknown mail To:", "The server was unable to send mail to the specified Internet address."},
00121   {16502, "Invalid URL", "The server could not parse the URL."},
00122   {16503, "Unable to get URL", "The server was unable to retrieve the information at this URL (e.g., an HTTP 400 or 500 series error)."},
00123   { -1, "Unknown code", "The description of this code is unknown to libOfx"}
00124 };
00125 
00127 
00130 const ErrorMsg find_error_msg(int param_code)
00131 {
00132   ErrorMsg return_val;
00133   int i;
00134   bool code_found = false;
00135 
00136   for (i = 0; i < 2000 && (code_found == false); i++)
00137   {
00138     if ((error_msgs_list[i].code == param_code) || (error_msgs_list[i].code == -1))
00139     {
00140       return_val = error_msgs_list[i];
00141       code_found = true;
00142     }
00143   }
00144   return return_val;
00145 };
00146 
00147 #endif
libofx-0.9.4/doc/html/functions_0x6d.html0000644000175000017500000001770511553133250015210 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- m -

libofx-0.9.4/doc/html/ofx__request__accountinfo_8cpp_source.html0000644000175000017500000002454611553133250022104 00000000000000 LibOFX: ofx_request_accountinfo.cpp Source File

ofx_request_accountinfo.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request_accountinfo.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "libofx.h"
00027 #include "ofx_request_accountinfo.hh"
00028 
00029 using namespace std;
00030 
00031 char* libofx_request_accountinfo( const OfxFiLogin* login )
00032 {
00033   OfxAccountInfoRequest strq( *login );
00034   string request = OfxHeader(login->header_version) + strq.Output();
00035 
00036   unsigned size = request.size();
00037   char* result = (char*)malloc(size + 1);
00038   request.copy(result, size);
00039   result[size] = 0;
00040 
00041   return result;
00042 }
00043 
00044 /*
00045 <OFX>
00046 <SIGNONMSGSRQV1>
00047 <SONRQ>
00048 <DTCLIENT>20050417210306
00049 <USERID>GnuCash
00050 <USERPASS>gcash
00051 <LANGUAGE>ENG
00052 <FI>
00053 <ORG>ReferenceFI
00054 <FID>00000
00055 </FI>
00056 <APPID>QWIN
00057 <APPVER>1100
00058 </SONRQ>
00059 </SIGNONMSGSRQV1>
00060 
00061 <SIGNUPMSGSRQV1>
00062 <ACCTINFOTRNRQ>
00063 <TRNUID>FFAAA4AA-A9B1-47F4-98E9-DE635EB41E77
00064 <CLTCOOKIE>4
00065 
00066 <ACCTINFORQ>
00067 <DTACCTUP>19700101000000
00068 </ACCTINFORQ>
00069 
00070 </ACCTINFOTRNRQ>
00071 </SIGNUPMSGSRQV1>
00072 </OFX>
00073 */
00074 
00075 OfxAccountInfoRequest::OfxAccountInfoRequest( const OfxFiLogin& fi ):
00076   OfxRequest(fi)
00077 {
00078   Add( SignOnRequest() );
00079 
00080   OfxAggregate acctinforqTag("ACCTINFORQ");
00081   acctinforqTag.Add( "DTACCTUP", time_t_to_ofxdate( 0 ) );
00082   Add ( RequestMessage("SIGNUP", "ACCTINFO", acctinforqTag) );
00083 }
libofx-0.9.4/doc/html/functions_0x75.html0000644000175000017500000001454211553133250015126 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- u -

libofx-0.9.4/doc/html/classOfxAggregate.html0000644000175000017500000004164111553133250015724 00000000000000 LibOFX: OfxAggregate Class Reference

OfxAggregate Class Reference

A single aggregate as described in the OFX 1.02 specification. More...

Inheritance diagram for OfxAggregate:
OfxRequest OfxRequest OfxAccountInfoRequest OfxAccountInfoRequest OfxPaymentRequest OfxPaymentRequest OfxStatementRequest OfxStatementRequest OfxAccountInfoRequest OfxAccountInfoRequest OfxPaymentRequest OfxPaymentRequest OfxStatementRequest OfxStatementRequest

Public Member Functions

 OfxAggregate (const string &tag)
void Add (const string &tag, const string &data)
void Add (const OfxAggregate &sub)
string Output (void) const
 OfxAggregate (const string &tag)
void Add (const string &tag, const string &data)
void Add (const OfxAggregate &sub)
string Output (void) const

Detailed Description

A single aggregate as described in the OFX 1.02 specification.

This aggregate has a tag, and optionally a number of subordinate elements and aggregates.

An example is: <CCACCTINFO> <CCACCTFROM> <ACCTID>1234 </CCACCTFROM> <SUPTXDL>Y <SVCSTATUS>ACTIVE </CCACCTINFO>

Definition at line 42 of file ofx_aggregate.hh.


Constructor & Destructor Documentation

OfxAggregate::OfxAggregate ( const string &  tag) [inline]

Creates a new aggregate, using this tag

Parameters:
tagThe tag of this aggregate

Definition at line 50 of file ofx_aggregate.hh.

OfxAggregate::OfxAggregate ( const string &  tag) [inline]

Creates a new aggregate, using this tag

Parameters:
tagThe tag of this aggregate

Definition at line 50 of file fx-0.9.4/lib/ofx_aggregate.hh.


Member Function Documentation

void OfxAggregate::Add ( const string &  tag,
const string &  data 
) [inline]
void OfxAggregate::Add ( const OfxAggregate sub) [inline]

Adds a subordinate aggregate to this aggregate

Parameters:
subThe aggregate to be added

Definition at line 69 of file ofx_aggregate.hh.

void OfxAggregate::Add ( const OfxAggregate sub) [inline]

Adds a subordinate aggregate to this aggregate

Parameters:
subThe aggregate to be added

Definition at line 69 of file fx-0.9.4/lib/ofx_aggregate.hh.

void OfxAggregate::Add ( const string &  tag,
const string &  data 
) [inline]

Adds an element to this aggregate

Parameters:
tagThe tag of the element to be added
dataThe data of the element to be added

Definition at line 59 of file fx-0.9.4/lib/ofx_aggregate.hh.

string OfxAggregate::Output ( void  ) const [inline]

Composes this aggregate into a string

Returns:
string form of this aggregate

Definition at line 79 of file ofx_aggregate.hh.

Referenced by Add().

string OfxAggregate::Output ( void  ) const [inline]

Composes this aggregate into a string

Returns:
string form of this aggregate

Definition at line 79 of file fx-0.9.4/lib/ofx_aggregate.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__request_8hh.html0000644000175000017500000001107711553133250015605 00000000000000 LibOFX: ofx_request.hh File Reference

ofx_request.hh File Reference

Declaration of an OfxRequests to create an OFX file containing a generic request . More...

Go to the source code of this file.

Data Structures

class  OfxRequest
 A generic request. More...

Functions

Some general helper functions
string time_t_to_ofxdatetime (time_t time)
string time_t_to_ofxdate (time_t time)
string OfxHeader (const char *hver)

Detailed Description

Declaration of an OfxRequests to create an OFX file containing a generic request .

Definition in file ofx_request.hh.

libofx-0.9.4/doc/html/libofx-0_89_84_2inc_2libofx_8h.html0000644000175000017500000033534511553133250017554 00000000000000 LibOFX: libofx.h File Reference

libofx.h File Reference

Main header file containing the LibOfx API. More...

Go to the source code of this file.

Data Structures

struct  LibofxFileFormatInfo
struct  OfxStatusData
 An abstraction of an OFX STATUS element. More...
struct  OfxAccountData
 An abstraction of an account. More...
struct  OfxSecurityData
 An abstraction of a security, such as a stock, mutual fund, etc. More...
struct  OfxTransactionData
 An abstraction of a transaction in an account. More...
struct  OfxStatementData
 An abstraction of an account statement. More...
struct  OfxCurrency
 NOT YET SUPPORTED. More...
struct  OfxFiServiceInfo
 Information returned by the OFX Partner Server about a financial institution. More...
struct  OfxFiLogin
 Information sufficient to log into an financial institution. More...
struct  OfxPayment
struct  OfxPayee

Defines

#define LIBOFX_MAJOR_VERSION   0
#define LIBOFX_MINOR_VERSION   9
#define LIBOFX_MICRO_VERSION   4
#define LIBOFX_BUILD_VERSION   0
#define LIBOFX_VERSION_RELEASE_STRING   "0.9.4"
#define true   1
#define false   0
#define OFX_ELEMENT_NAME_LENGTH   100
#define OFX_SVRTID2_LENGTH   (36 + 1)
#define OFX_CHECK_NUMBER_LENGTH   (12 + 1)
#define OFX_REFERENCE_NUMBER_LENGTH   (32 + 1)
#define OFX_FITID_LENGTH   (255 + 1)
#define OFX_TOKEN2_LENGTH   (36 + 1)
#define OFX_MEMO_LENGTH   (255 + 1)
#define OFX_MEMO2_LENGTH   (390 + 1)
#define OFX_BALANCE_NAME_LENGTH   (32 + 1)
#define OFX_BALANCE_DESCRIPTION_LENGTH   (80 + 1)
#define OFX_CURRENCY_LENGTH   (3 + 1)
#define OFX_BANKID_LENGTH   (9 + 1)
#define OFX_BRANCHID_LENGTH   (22 + 1)
#define OFX_ACCTID_LENGTH   (22 + 1)
#define OFX_ACCTKEY_LENGTH   (22 + 1)
#define OFX_BROKERID_LENGTH   (22 + 1)
#define OFX_ACCOUNT_ID_LENGTH   (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1)
#define OFX_ACCOUNT_NAME_LENGTH   255
#define OFX_MARKETING_INFO_LENGTH   (360 + 1)
#define OFX_TRANSACTION_NAME_LENGTH   (32 + 1)
#define OFX_UNIQUE_ID_LENGTH   (32 + 1)
#define OFX_UNIQUE_ID_TYPE_LENGTH   (10 + 1)
#define OFX_SECNAME_LENGTH   (32 + 1)
#define OFX_TICKER_LENGTH   (32 + 1)
#define OFX_ORG_LENGTH   (32 + 1)
#define OFX_FID_LENGTH   (32 + 1)
#define OFX_USERID_LENGTH   (32 + 1)
#define OFX_USERPASS_LENGTH   (32 + 1)
#define OFX_URL_LENGTH   (500 + 1)
#define OFX_APPID_LENGTH   (32)
#define OFX_APPVER_LENGTH   (32)
#define OFX_HEADERVERSION_LENGTH   (32)

Typedefs

typedef void * LibofxContextPtr
typedef int(* LibofxProcStatusCallback )(const struct OfxStatusData data, void *status_data)
 The callback function for the OfxStatusData stucture.
typedef int(* LibofxProcAccountCallback )(const struct OfxAccountData data, void *account_data)
 The callback function for the OfxAccountData stucture.
typedef int(* LibofxProcSecurityCallback )(const struct OfxSecurityData data, void *security_data)
 The callback function for the OfxSecurityData stucture.
typedef int(* LibofxProcTransactionCallback )(const struct OfxTransactionData data, void *transaction_data)
 The callback function for the OfxTransactionData stucture.
typedef int(* LibofxProcStatementCallback )(const struct OfxStatementData data, void *statement_data)
 The callback function for the OfxStatementData stucture.

Enumerations

enum  LibofxFileFormat {
  AUTODETECT, OFX, OFC, QIF,
  UNKNOWN, LAST, AUTODETECT, OFX,
  OFC, QIF, UNKNOWN, LAST
}
enum  TransactionType {
  OFX_CREDIT, OFX_DEBIT, OFX_INT, OFX_DIV,
  OFX_FEE, OFX_SRVCHG, OFX_DEP, OFX_ATM,
  OFX_POS, OFX_XFER, OFX_CHECK, OFX_PAYMENT,
  OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT, OFX_REPEATPMT,
  OFX_OTHER, OFX_CREDIT, OFX_DEBIT, OFX_INT,
  OFX_DIV, OFX_FEE, OFX_SRVCHG, OFX_DEP,
  OFX_ATM, OFX_POS, OFX_XFER, OFX_CHECK,
  OFX_PAYMENT, OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT,
  OFX_REPEATPMT, OFX_OTHER
}
enum  InvTransactionType {
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER,
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER
}
enum  FiIdCorrectionAction { DELETE, REPLACE, DELETE, REPLACE }

Functions

LibofxContextPtr libofx_get_new_context ()
 Initialise the library and return a new context.
int libofx_free_context (LibofxContextPtr)
 Free all ressources used by this context.
void libofx_set_dtd_dir (LibofxContextPtr libofx_context, const char *s)
enum LibofxFileFormat libofx_get_file_format_from_str (const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
 libofx_get_file_type returns a proper enum from a file type string.
const char * libofx_get_file_format_description (const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
 get_file_format_description returns a string description of a LibofxFileType.
int libofx_proc_file (LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
 libofx_proc_file is the entry point of the library.
void ofx_set_status_cb (LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
void ofx_set_account_cb (LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
void ofx_set_security_cb (LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
void ofx_set_transaction_cb (LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
void ofx_set_statement_cb (LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
int libofx_proc_buffer (LibofxContextPtr ctx, const char *s, unsigned int size)

Variables

struct LibofxFileFormatInfo LibofxImportFormatList []
struct LibofxFileFormatInfo LibofxExportFormatList []

Creating OFX Files

This group deals with creating OFX files
#define OFX_AMOUNT_LENGTH   (32 + 1)
#define OFX_PAYACCT_LENGTH   (32 + 1)
#define OFX_STATE_LENGTH   (5 + 1)
#define OFX_POSTALCODE_LENGTH   (11 + 1)
#define OFX_NAME_LENGTH   (32 + 1)
char * libofx_request_statement (const struct OfxFiLogin *fi, const struct OfxAccountData *account, time_t date_from)
 Creates an OFX statement request in string form.
char * libofx_request_accountinfo (const struct OfxFiLogin *login)
 Creates an OFX account info (list) request in string form.
char * libofx_request_payment (const struct OfxFiLogin *login, const struct OfxAccountData *account, const struct OfxPayee *payee, const struct OfxPayment *payment)
char * libofx_request_payment_status (const struct OfxFiLogin *login, const char *transactionid)

Detailed Description

Main header file containing the LibOfx API.

This file should be included for all applications who use this API. This header file will work with both C and C++ programs. The entire API is made of the following structures and functions.

All of the following ofx_proc_* functions are callbacks (Except ofx_proc_file which is the entry point). They must be implemented by your program, but can be left empty if not needed. They are called each time the associated structure is filled by the library.

Important note: The variables associated with every data element have a _valid companion. Always check that data_valid == true before using. Not only will you ensure that the data is meaningfull, but also that pointers are valid and strings point to a null terminated string. Elements listed as mandatory are for information purpose only, do not trust the bank not to send you non-conforming data...

Definition in file libofx-0.9.4/inc/libofx.h.


Typedef Documentation

typedef int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)

The callback function for the OfxAccountData stucture.

The ofx_proc_account_cb event is always generated first, to allow the application to create accounts or ask the user to match an existing account before the ofx_proc_statement and ofx_proc_transaction event are received. An OfxAccountData is passed to this event.

Note however that this OfxAccountData structure will also be available as part of OfxStatementData structure passed to ofx_proc_statement event, as well as a pointer to an arbitrary data structure.

Definition at line 335 of file libofx-0.9.4/inc/libofx.h.

typedef int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)

The callback function for the OfxSecurityData stucture.

An ofx_proc_security_cb event is generated for any securities listed in the ofx file. It is generated after ofx_proc_statement but before ofx_proc_transaction. It is meant to be used to allow the client to create a new commodity or security (such as a new stock type). Please note however that this information is usually also available as part of each OfxtransactionData.

An OfxSecurityData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 400 of file libofx-0.9.4/inc/libofx.h.

typedef int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)

The callback function for the OfxStatementData stucture.

The ofx_proc_statement_cb event is sent after all ofx_proc_transaction events have been sent. An OfxStatementData is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 690 of file libofx-0.9.4/inc/libofx.h.

typedef int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)

The callback function for the OfxStatusData stucture.

An ofx_proc_status_cb event is sent everytime the server has generated a OFX STATUS element. As such, it could be received at any time(but not during other events). An OfxStatusData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 250 of file libofx-0.9.4/inc/libofx.h.

typedef int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)

The callback function for the OfxTransactionData stucture.

An ofx_proc_transaction_cb event is generated for every transaction in the ofx response, after ofx_proc_statement (and possibly ofx_proc_security is generated. An OfxTransactionData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 612 of file libofx-0.9.4/inc/libofx.h.


Enumeration Type Documentation

Enumerator:
DELETE 

The transaction with a fi_id matching fi_id_corrected should be deleted

REPLACE 

The transaction with a fi_id matching fi_id_corrected should be replaced with this one

DELETE 

The transaction with a fi_id matching fi_id_corrected should be deleted

REPLACE 

The transaction with a fi_id matching fi_id_corrected should be replaced with this one

Definition at line 447 of file libofx-0.9.4/inc/libofx.h.

Enumerator:
OFX_BUYDEBT 

Buy debt security

OFX_BUYMF 

Buy mutual fund

OFX_BUYOPT 

Buy option

OFX_BUYOTHER 

Buy other security type

OFX_BUYSTOCK 

Buy stock

OFX_CLOSUREOPT 

Close a position for an option

OFX_INCOME 

Investment income is realized as cash into the investment account

OFX_INVEXPENSE 

Misc investment expense that is associated with a specific security

OFX_JRNLFUND 

Journaling cash holdings between subaccounts within the same investment account

OFX_JRNLSEC 

Journaling security holdings between subaccounts within the same investment account

OFX_MARGININTEREST 

Margin interest expense

OFX_REINVEST 

Reinvestment of income

OFX_RETOFCAP 

Return of capital

OFX_SELLDEBT 

Sell debt security. Used when debt is sold, called, or reached maturity

OFX_SELLMF 

Sell mutual fund

OFX_SELLOPT 

Sell option

OFX_SELLOTHER 

Sell other type of security

OFX_SELLSTOCK 

Sell stock

OFX_SPLIT 

Stock or mutial fund split

OFX_TRANSFER 

Transfer holdings in and out of the investment account

OFX_BUYDEBT 

Buy debt security

OFX_BUYMF 

Buy mutual fund

OFX_BUYOPT 

Buy option

OFX_BUYOTHER 

Buy other security type

OFX_BUYSTOCK 

Buy stock

OFX_CLOSUREOPT 

Close a position for an option

OFX_INCOME 

Investment income is realized as cash into the investment account

OFX_INVEXPENSE 

Misc investment expense that is associated with a specific security

OFX_JRNLFUND 

Journaling cash holdings between subaccounts within the same investment account

OFX_JRNLSEC 

Journaling security holdings between subaccounts within the same investment account

OFX_MARGININTEREST 

Margin interest expense

OFX_REINVEST 

Reinvestment of income

OFX_RETOFCAP 

Return of capital

OFX_SELLDEBT 

Sell debt security. Used when debt is sold, called, or reached maturity

OFX_SELLMF 

Sell mutual fund

OFX_SELLOPT 

Sell option

OFX_SELLOTHER 

Sell other type of security

OFX_SELLSTOCK 

Sell stock

OFX_SPLIT 

Stock or mutial fund split

OFX_TRANSFER 

Transfer holdings in and out of the investment account

Definition at line 423 of file libofx-0.9.4/inc/libofx.h.

List of possible file formats

Enumerator:
AUTODETECT 

Not really a file format, used to tell the library to try to autodetect the format

OFX 

Open Financial eXchange (OFX/QFX) file

OFC 

Microsoft Open Financial Connectivity (OFC)

QIF 

Intuit Quicken Interchange Format (QIF)

UNKNOWN 

Unknown file format

LAST 

Not a file format, meant as a loop breaking condition

AUTODETECT 

Not really a file format, used to tell the library to try to autodetect the format

OFX 

Open Financial eXchange (OFX/QFX) file

OFC 

Microsoft Open Financial Connectivity (OFC)

QIF 

Intuit Quicken Interchange Format (QIF)

UNKNOWN 

Unknown file format

LAST 

Not a file format, meant as a loop breaking condition

Definition at line 115 of file libofx-0.9.4/inc/libofx.h.

Enumerator:
OFX_CREDIT 

Generic credit

OFX_DEBIT 

Generic debit

OFX_INT 

Interest earned or paid (Note: Depends on signage of amount)

OFX_DIV 

Dividend

OFX_FEE 

FI fee

OFX_SRVCHG 

Service charge

OFX_DEP 

Deposit

OFX_ATM 

ATM debit or credit (Note: Depends on signage of amount)

OFX_POS 

Point of sale debit or credit (Note: Depends on signage of amount)

OFX_XFER 

Transfer

OFX_CHECK 

Check

OFX_PAYMENT 

Electronic payment

OFX_CASH 

Cash withdrawal

OFX_DIRECTDEP 

Direct deposit

OFX_DIRECTDEBIT 

Merchant initiated debit

OFX_REPEATPMT 

Repeating payment/standing order

OFX_OTHER 

Somer other type of transaction

OFX_CREDIT 

Generic credit

OFX_DEBIT 

Generic debit

OFX_INT 

Interest earned or paid (Note: Depends on signage of amount)

OFX_DIV 

Dividend

OFX_FEE 

FI fee

OFX_SRVCHG 

Service charge

OFX_DEP 

Deposit

OFX_ATM 

ATM debit or credit (Note: Depends on signage of amount)

OFX_POS 

Point of sale debit or credit (Note: Depends on signage of amount)

OFX_XFER 

Transfer

OFX_CHECK 

Check

OFX_PAYMENT 

Electronic payment

OFX_CASH 

Cash withdrawal

OFX_DIRECTDEP 

Direct deposit

OFX_DIRECTDEBIT 

Merchant initiated debit

OFX_REPEATPMT 

Repeating payment/standing order

OFX_OTHER 

Somer other type of transaction

Definition at line 402 of file libofx-0.9.4/inc/libofx.h.


Function Documentation

int libofx_free_context ( LibofxContextPtr  )

Free all ressources used by this context.

Returns:
0 if successfull.

Definition at line 158 of file context.cpp.

const char* libofx_get_file_format_description ( const struct LibofxFileFormatInfo  format_list[],
enum LibofxFileFormat  file_format 
)

get_file_format_description returns a string description of a LibofxFileType.

The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList

The file format which should match one of the formats in the list.

Returns:
null terminated string suitable for debugging output or user communication.

Definition at line 37 of file file_preproc.cpp.

enum LibofxFileFormat libofx_get_file_format_from_str ( const struct LibofxFileFormatInfo  format_list[],
const char *  file_type_string 
)

libofx_get_file_type returns a proper enum from a file type string.

The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList

The string which contain the file format matching one of the format_name of the list.

Returns:
the file format, or UNKNOWN if the format wasn't recognised.

Definition at line 54 of file file_preproc.cpp.

LibofxContextPtr libofx_get_new_context ( )

Initialise the library and return a new context.

Returns:
the new context, to be used by the other functions.
Note:
: Actual object returned is LibofxContext *

Definition at line 153 of file context.cpp.

int libofx_proc_buffer ( LibofxContextPtr  ctx,
const char *  s,
unsigned int  size 
)

Parses the content of the given buffer.

Definition at line 326 of file ofx_preproc.cpp.

int libofx_proc_file ( LibofxContextPtr  libofx_context,
const char *  p_filename,
enum LibofxFileFormat  ftype 
)

libofx_proc_file is the entry point of the library.

libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.

Definition at line 67 of file file_preproc.cpp.

char* libofx_request_accountinfo ( const struct OfxFiLogin login)

Creates an OFX account info (list) request in string form.

Creates a string which should be passed to an OFX server. This string is an OFX request suitable to retrieve a list of accounts from the fi

Parameters:
fiIdentifies the financial institution and the user logging in.
Returns:
string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free.
char* libofx_request_statement ( const struct OfxFiLogin fi,
const struct OfxAccountData account,
time_t  date_from 
)

Creates an OFX statement request in string form.

Creates a string which should be passed to an OFX server. This string is an OFX request suitable to retrieve a statement for the account from the fi

Parameters:
fiIdentifies the financial institution and the user logging in.
accountIdenfities the account for which a statement is desired
Returns:
string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free.
void ofx_set_account_cb ( LibofxContextPtr  ctx,
LibofxProcAccountCallback  cb,
void *  user_data 
)

Set the account callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 186 of file context.cpp.

void ofx_set_security_cb ( LibofxContextPtr  ctx,
LibofxProcSecurityCallback  cb,
void *  user_data 
)

Set the security callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 195 of file context.cpp.

void ofx_set_statement_cb ( LibofxContextPtr  ctx,
LibofxProcStatementCallback  cb,
void *  user_data 
)

Set the statement callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 213 of file context.cpp.

void ofx_set_status_cb ( LibofxContextPtr  ctx,
LibofxProcStatusCallback  cb,
void *  user_data 
)

Set the status callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 178 of file context.cpp.

void ofx_set_transaction_cb ( LibofxContextPtr  ctx,
LibofxProcTransactionCallback  cb,
void *  user_data 
)

Set the transaction callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 204 of file context.cpp.


Variable Documentation

struct LibofxFileFormatInfo LibofxExportFormatList[]
Initial value:
  {
    {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
    {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
  }

Definition at line 144 of file libofx-0.9.4/inc/libofx.h.

struct LibofxFileFormatInfo LibofxImportFormatList[]
Initial value:
  {
    {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"},
    {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"},
    {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"},
    {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
    {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
  }

Definition at line 135 of file libofx-0.9.4/inc/libofx.h.

libofx-0.9.4/doc/html/classtree_1_1iterator__base.png0000644000175000017500000001036111553133250017476 00000000000000‰PNG  IHDRlØÇøDéPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2€IDATxíÝr³: +3çýù\øO²dšîN',Ù.ÞH·?Çø—áåñ¾xy¼/^ï xy¼/^ï v¼¼Í×*™—b.Ë¡Í9ã˜#O‘íy²¹˜ÈvP+d{†l"òó#?R¾µË<{!?æ¡È¸Ió]‘ÍN’'oe¡`C.f•é75ùG‘íý•-ëÓÏ¿(±¨laFÍ2c*Rç«¿ðRSÚ.ʨc™Ñ¦Æ=!Û}²Æ£ eó£Iþâz¨‡Æ4k3Ïì·m-dû¤lR{Ô®³%›ÎXËfB~J^$›ò>ô2g¦­]qS¶¯vlŸªlºJì«l³A‰B\DÐ 7*Û°¡¥lý©Û²}²Žgûr-õ& ™õÛH™Ñþ!fSÓqvÚè'd«¿òÒU¢æÒÊÁv†êX%VÝõ^ù#íÀÍ$e(÷Èhã]–!f•™Ÿ×uƒl÷Êvïé}!Û»¦ÌÉ«ÿë—WD6~©¼/^ï xy¼/^ï‹—¼/^ïëw½<8Ê|ÿñ Ùàë\ûÛÙàû\Ã6@6ø>Ýx€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l¯ñŽl'dKpdC6dC6dC6dC6dC¶¿ ›l½dɨÇi.Ë¡ÍM…Aö™‹pKN÷ÃûeÛ—¸-Ût*d{‡l"’’$)ßÚeþê×’ÌÃRì¤ù®œ¼$OÞ>ÊBA±m#z:Ö¬œw%"m}·ÃZÓ Û5•-Ÿ]?ÿzZó‚fÔ,3¦"u¾ú /5¥í¢|qÓk©"¦Æz°©n~­ùí"ÙŒö'²ùŒÑ$q ÍFĘZå¶px.*X+~ŠlÊ&µwˆm5sÙtÆúMH*y‘lzÈ;ÚËœ‘­%²™±™le{µ‘ÿ:ÙžOPÙô¯{_e› úKâ"‚&¶ªl=ÔEoÍ;ְᣲÝÙFÝÙ¾ÚFçEgÞo#ÙœýR*Ѱ–ÒH—Ö½mÙÞ*[ýi—Ngž‘M½i†ê±%VÝõ^™1í’»x}à·ÒD¨v­¾Ë>}ž²=sJªµ¦;@¶ó²íÇKøk¸bëÈv£lë“ÌÉ ´ q÷/lÙî¬l¿*²ý* Ù Ù Ù Ù Ù¾[68²   ²²   ²²   ²²   ²²   ²²   ²²  ÛYþÁ1í„l Ž€lȆlȆlȆlȆlÈöd“­—,õàØ!ÍÂe9´¹©0È>snÉé‚§ÈvƒlÛgx¿lû·e›N…lïMDR’$å[»Ì_ý:C’yX*4ß•“·“äÉÛGY((¶mDïCÇš•ó®D¤í¯ïvXkºd»¦²å³ëç_Ok^0ÂŒšeÆT¤ÎWᥦ´]”/núq-UÄÔX6Õͯ5ß²]$›QÀòD6Ÿ1šä/®¡ÙˆXS«ÜïÃEkÅO‘íBÙ¤ö±­f.›ÎX² I%/’MyG{™3²µ¤@636“­l¯6ò_'Ûó *›þuï«l³A‰B\DÐÄV•­‡ºè­yÇ6ücT¶;Û¨;ÛWÛè¼èÌûm$›³_J%ÖRéÒº·"Û[e«?íÒéLÃ3²é¢7ÍP=¶Äª»Þ+³#&°]r¯üVš5À®ÕwÙ§ÏS¶gNIµÖtÈv^¶ýx  WlÙn”m}`’9rVá"îþ…­ Û•íCeC¶_²!²!²!²!²!ÛwËÇ@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6dd;Ë?8²-Á Ù Ù Ù Ù Ùþ†l²õš%£;¦Y¸,‡Ž3OŠG¦ë‡O‘íÙ\̗ȶ²ÙÞ"›ˆ¤$IÊ·v™¿þu†$óP$‰›4ßÙì$yòöQ 64®b–йvj:ñë,VG¶«*[Ö§Ÿ9±Ee 3Ú¹ë1©óÕ_x©)må‹™ÔÍdhQÑtÑ:‹Õ‘í:ٌ㩄²ùŒÑ$q=ÔFÄ肸X%”-ø·¶Ö™­Žl—Ê&µHmR[²éŒµl&$•¼H6=äíe.øe¬e+;ð²éÅê–íù„•MÿÂ÷U¶Ù`Tz¶Úè8´»²‹L*Û°YÛ|m,•íÖ6êÎöÕ6ZjE2ë·Ñq[ûÇä•lzË6Šlo—­žSét¦áÙtÑ›f¨[bÕ]ï•IÚ™šIÊPîoÞó.Ã5ü8T®ÝÁ Û°Îbud»B¶ýx ?Æý[A¶[e[°dN†œÛ˾^Û²Ý[Ù• Ù¾dC6dC6dC6dC6dC¶ï– ŽlÈÈÈ€l€lÈÈÈ€l€lÈÈÈ€l€lÈÈÈ€l€lÈÈÈ€l€lÈÈÈ€l€lÈÈv–p d;![‚# ²!²!²!²!²ý Ùdë5KF=8vL³pYgžLן"Û-²¹˜/‘me!²½E6II’”oí2ýë Iæ¡H7i¾+²ÙIòäí£,lh\Å,¡síÔtâ×Y¬ŽlWU¶¬O?ÿrb‹Êf´s×c*Rç«¿ðRSÚ.Ê3©›É,Т¢é¢u«#Ûu²ÆS eó£Iþâz¨ˆ%Ðq±J([ðom­3[Ù.•MjÿÚ¤¶dÓkÙLH*y‘lzÈ;ÚË\ðËXËVvàeÓ‹Õ,Ûó +›þ…ï«l³Á¨ôlµÑqhwe™T¶a³¶ùÚX*Û­mÔí«m´ÔŠ0dÖo£ã¶öÉ+Ùô–mÙÞ.[=§ÒéLÃ3²é¢7ÍP=¶Äª»Þ+“´35“”¡Üß¼ç]†!køq¨\»ƒA¶aÅêÈv…lûñ~Œû·‚l·Ê¶>`Éœ 9·—} ¼¶ d»·²=*²}1ȆlȆlȆlȆlȆlß-Ù ÙÙ ÙÙ ÙÙ ÙÙ ÙÙ ÙÙ í,ÿàÈvB¶G@6dC6dC6dC6dC6dû+²ÉÖ‹–ÌŒ!þ|1tñTÓµ'+#ÛM²¹˜/me!²½M6II’”oí2?‚u†$óP$‰›4ßÙì$yòöQ 6¤F£ÉëˆY¢O%~åÊÈv]eËúôó/§¶¨laFÍ2c*Rç«¿ðRSÚ.Ê—aÒÙämÑTÑ‹•‘íZÙŒîUG²ùŒÑ$q=ÔFÄ"èš5ÛB$[ð/m­1]Ù®–Mj‘Ú¤¶dÓkÙLH*y‘lzÈ;ÚËœßÆB¶àeÓË•,Ûó™T6ý+ßWÙfƒþ…¸ˆ ™íªlÓ²kDŽ*ÛCeûDugûj-õ" ™õÛèÈ­ýCÄTÃ1pÚ0‘íÙêO¼4#ÓðŒlºèM3Ts+±ê®÷Ê$í\Í$e(÷8ïyBúÉûˆYÂÎ2¬±\Ù®‘m?^Âq÷VífÙÖ,™“!¯ïeßä¯nÙî®l‚ʆl_ ²!²!²!²!²!ÛwËÇ@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6ddd@6@6dd;Ë?8²-Á Ù Ù Ù Ù ÙþŠl²õ¢%s cÈŸ?_ ]E<ÕtíÉÊÈv“l.æ d[Yˆlo“MDR’$å[»Ì`!É<Iâ&ÍwE6;Iž¼}”…‚ ©Ñhò:b–èS‰_c¹2²]WÙ²>ýüË©-*[˜Q³Ì˜ŠÔùê/¼Ô”¶‹òe˜t6yÛG4U´Æbed»V6£€{Õ‘l>c4É_\µ±ºfͶÉüK[kLWF¶«e“ÚC¤6©-ÙtÆZ6’J^$›òŽö2ç·±­xÙôÀråËö|&•MÿÊ÷U¶Ù ¿D!."hf»*Û´ì‘£Ê6äPÙ>ÑFÝÙ¾ÚFK½Cfý6:rkÿ1Õp œ6Ld»E¶ú/ÍÈ4<#›.zÓ ÕÜJ¬ºë½2I;W3IÊ=Î{Þ…P£~ò>b–°³ k,WF¶kdÛ—ðcܽd»Y¶õKædÈë{Ù7ù«[@¶»+Ûƒ ²!ÛׂlȆlȆlȆlȆlÈöݲÁ1 ÙÙÙ ÙÙÙ ÙÙÙ ÙÙÙ ÙÙÙ ÙÙÙ ÙÙÎòŽl'dKpdC6dC6dC6dC6dC¶¿'›l½rÉÈØ·€,‡vÎ\"×sÅCÛ‹ Ûí²¹˜ÇÈÖ#× ÈöÙD$%IR¾µËü\Ö’ÌC‘$nÒ|Wd³“äÉÛGY(ÚvAÍÕ×VIâ§Û»²½£²e}úù÷óœU¶0£f™1©óÕ_x©)må‹Nì³»³Ú0Ýbd»A6£€ÿl>c4É_\µ±C5ÓÅ™m(˜nº²Ý"›ÔÆ"µmɦ3Ö²™Tò"Ùô÷ ObñÙÊj¯þí²=ŸÍʦúû*ÛlÐ_¢t¸°²a»*Û°w*ÛcÚhе^k£¥ˆ„!³~y0Úofwæ­Ú(²}N¶ú»/Î4<#›.zÓ ÕcK¬ºë½2I;l3IÊÏ{Þiƨ†Ú×*Û0Ýæ"Èö&Ùö39’GrÉ^‘íc²­ÏO2'C.M®X Ù>WÙ~OY»ÈhdC¶Û@6dC6dC6dC6dC6dûnÙàÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€l€lÈÈ€l€lgùÇ@¶²%8²!²!²!²!²!Ûß“M¶^¹ddì[@–C;g.‘ë¹â¡íEívÙ\Ìcdë‘ëd{ˆl"’’$)ßÚe~.ë Iæ¡H7i¾+²ÙIòäí£,m»Î æêk«$ñÓí]ÙÞQÙ²>ýüûyÎ*[˜Q³Ì˜ŠÔùê/¼Ô”¶‹òE'öÙÝYm˜n±²Ý ›QÀ¿ÿ@6Ÿ1šä/®‡ÚˆØŽ¡šé âÌ6L7]Ùn‘Mjc‘ÚŽ¶dÓkÙLH*y‘lzÈ{Ð'1xleµWÿvÙžÏfeÓ?ý}•m6è/Qˆ‹:\XÙÆ°]•mØûo–íp¤]ëµ6ZŠH2ë·‘£ýfvgÞª"Ûçd«¿ûÒéLÃ3²é¢7ÍP=¶Äª»Þ+“´Ã6“”¡Üø¼ç]‘fŒj¨}í¡² Óm.‚lo’m?“#y$—ìÙ>&Ûúü$s2ä2ÑäŠÕís•í÷”µ‹ŒF6d» dC6dC6ddC6dC¶ï– Žñ? Rø½hnŽIEND®B`‚libofx-0.9.4/doc/html/ofx__request_8cpp.html0000644000175000017500000001012111553133250015755 00000000000000 LibOFX: ofx_request.cpp File Reference

ofx_request.cpp File Reference

Implementation of an OfxRequests to create an OFX file containing a generic request . More...

Go to the source code of this file.

Functions

string time_t_to_ofxdatetime (time_t time)
string time_t_to_ofxdate (time_t time)
string OfxHeader (const char *hver)

Detailed Description

Implementation of an OfxRequests to create an OFX file containing a generic request .

Definition in file ofx_request.cpp.

libofx-0.9.4/doc/html/globals_0x6f.html0000644000175000017500000005502711553133251014625 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- o -

libofx-0.9.4/doc/html/classOfxMainContainer.html0000644000175000017500000003345211553133250016566 00000000000000 LibOFX: OfxMainContainer Class Reference

OfxMainContainer Class Reference

The root container. Created by the <OFX> OFX element or by the export functions. More...

Inheritance diagram for OfxMainContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxMainContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
int add_container (OfxGenericContainer *container)
int add_container (OfxStatementContainer *container)
int add_container (OfxAccountContainer *container)
int add_container (OfxTransactionContainer *container)
int add_container (OfxSecurityContainer *container)
int gen_event ()
 Generate libofx.h events.
OfxSecurityDatafind_security (string unique_id)
 OfxMainContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
int add_container (OfxGenericContainer *container)
int add_container (OfxStatementContainer *container)
int add_container (OfxAccountContainer *container)
int add_container (OfxTransactionContainer *container)
int add_container (OfxSecurityContainer *container)
int gen_event ()
 Generate libofx.h events.
OfxSecurityDatafind_security (string unique_id)

Detailed Description

The root container. Created by the <OFX> OFX element or by the export functions.

The OfxMainContainer maintains trees of processed ofx data structures which can be used to generate events in the right order, and eventually export in OFX and QIF formats and even generate matching OFX querys.

Definition at line 247 of file ofx_containers.hh.


Member Function Documentation

int OfxMainContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 154 of file ofx_container_main.cpp.

Referenced by OFXApplication::endElement(), and OFCApplication::endElement().

int OfxMainContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/globals_0x65.html0000644000175000017500000001241411553133251014535 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- e -

libofx-0.9.4/doc/html/messages_8hh.html0000644000175000017500000003612611553133250014713 00000000000000 LibOFX: messages.hh File Reference

messages.hh File Reference

Message IO functionality. More...

Go to the source code of this file.

Enumerations

enum  OfxMsgType {
  DEBUG, DEBUG1, DEBUG2, DEBUG3,
  DEBUG4, DEBUG5, STATUS = 10, INFO,
  WARNING, ERROR, PARSER, DEBUG,
  DEBUG1, DEBUG2, DEBUG3, DEBUG4,
  DEBUG5, STATUS = 10, INFO, WARNING,
  ERROR, PARSER
}

Functions

int message_out (OfxMsgType type, const string message)
 Message output function.

Detailed Description

Message IO functionality.

Definition in file messages.hh.


Enumeration Type Documentation

enum OfxMsgType

The OfxMsgType enum describe's the type of message being sent, so the application/user/library can decide if it will be printed to stdout

Enumerator:
DEBUG 

General debug messages

DEBUG1 

Debug level 1

DEBUG2 

Debug level 2

DEBUG3 

Debug level 3

DEBUG4 

Debug level 4

DEBUG5 

Debug level 5

STATUS 

For major processing event (End of parsing, etc.)

INFO 

For minor processing event

WARNING 

Warning message

ERROR 

Error message

PARSER 

Parser events

DEBUG 

General debug messages

DEBUG1 

Debug level 1

DEBUG2 

Debug level 2

DEBUG3 

Debug level 3

DEBUG4 

Debug level 4

DEBUG5 

Debug level 5

STATUS 

For major processing event (End of parsing, etc.)

INFO 

For minor processing event

WARNING 

Warning message

ERROR 

Error message

PARSER 

Parser events

Definition at line 23 of file messages.hh.


Function Documentation

int message_out ( OfxMsgType  error_type,
const string  message 
)

Message output function.

Prints a message to stdout, if the corresponding message OfxMsgType given in the parameters is enabled

Definition at line 58 of file messages.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2win32_8hh_source.html0000644000175000017500000001167211553133250020104 00000000000000 LibOFX: win32.hh Source File

win32.hh

00001 /***************************************************************************
00002  $RCSfile: win32.hh,v $
00003  -------------------
00004  cvs         : $Id: win32.hh,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $
00005  begin       : Sat Oct 27 2007
00006  copyright   : (C) 2007 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  * This file is part of the project "LibOfx".                              *
00011  * Please see toplevel file COPYING of that project for license details.   *
00012  ***************************************************************************/
00013 
00014 #ifndef LIBOFX_WIN32_HH
00015 #define LIBOFX_WIN32_HH
00016 
00017 
00018 
00019 #ifdef HAVE_CONFIG_H
00020 # include <config.h>
00021 #endif
00022 
00023 
00024 #ifdef OS_WIN32
00025 
00026 int mkstemp(char *tmpl);
00027 
00028 
00029 #endif
00030 
00031 
00032 #endif
00033 
libofx-0.9.4/doc/html/classtree_1_1fixed__depth__iterator.png0000644000175000017500000000207511553133250021211 00000000000000‰PNG  IHDRlP“lÙèPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÌIDATxíÛ’´, ESõ½ÿ#ÿœPl»ÿ>¬]Sc+ ÄÅ6ÜnhM[,VÑýíhEÚlÐXD1̆Ù0fƒfÃl˜í“Í&GÉ’´qn™ÎǬ<}Øl »Ýl.æ ˆ-²ù¿Ìö£è†ÄDdße—ü«^Æ+Î3d7Evq“¦»LÌN’&¯ÿòBAA.f–鋼è’Ù@w©³%í%ò{M>Ï0£d™1©óÕ_x))µŠüC'ê˜IfTT_Óåκe³™÷è× ‰ùŒ‡¿¸ƒÀFôC}šÝ fœÙnëZw™ tWÌ&¥‘JiGÄtÆœ˜ Ùs^DLù—jߪ™¶´öCb%^U‹Ù@w¡³i«ŸûÏ_ÒÍí·ÐA ³a6̆٠†Ù0fÃl˜ 5³¡5)³¡«èÞLÿÞ¶²·è º·öd ƒè¾È@1Ð}3€b ƒÄ@1Ð!ˆb ƒÄ@1Ð!O ]î¡w „ÙfC³!̆0B˜ a6„0Âl³!„ÙfC³!̆n– 5a™Ìx^Àƒ¼€/ÔÁ;d(I—©Âe:tXTdŸ¹·ä°†à)f{ÙŽ÷ðõf;—xl¶áT˜íf‘m“Mò¯zsžgÈfæd'Mwyçí$iòú//4Û:¢ëбfåT•ˆÔúZµÝZà 0Û=-í]Ûÿ²[ã†f”,3¦"u¾ú /%¥V‘¸éûµTSc-Øt7¿Ö¸Ìv“ÙŒì&Ìæ3z'ù‹;ÐlDlÓ«\ Ëu¸¨`­áSt—Ù¤œbš±ÙtÆ|“MÈ–ó"³é!ïÑÖæŒÙjR`6362[.¯ä˜íM£=×ÙFƒþ…¸ˆà›u¶ê¢æí{X÷b˜í•ǨÛÛ«Çè¸éŒÏÛÈlÎý’;Q·–²‘n­gQÌöT³•O;ŸtæÀ3¡ºé 3Ô›cÕ];+“GL`½¤S¼<ð¥T#”»V«²MŸ¦¬Ïœ%ÕZà 0Ûãf{b¿ëw½þçmÀ<^’ ¹á­ÂEÜý…R0_* ³Á ^Àƒð¼€¯Ï‚‡ÖôÞÛùu»hAþ¯iIEND®B`‚libofx-0.9.4/doc/html/classOfxStatusContainer.png0000644000175000017500000000122611553133250016777 00000000000000‰PNG  IHDRPâ ÂPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2%IDATxíA“ƒ0…ûìLÿÿOÞƒ€ ÕŽÛÝÇÁÁ„àË'!×dz€=ÌJ¨y.ÃÍ#© †Hˆ„HˆäV$ ŽMÛØžùÙ4Øåº„d¤}¸`;cyð™Õ ’¡jD„c ùÂÿ‘Éím„èd {,HäHƪiEè¿Ï&±Öðм}‚7H†¨IE¬óÝ}Çç_ïD´³y‚3H¾­æá´Hç:-ÂV' ®!ùŽš·¥¿ãŠò¬ˆÌ K®œo¨Éz¼úªQ΂SÇU2Vа‹Ü‰°†jskÑáuK Yz+¡†H: ¯JLJ¨!’DC!&%Ô Û+‘ ‘ ‘ ‘ ‘̤–•úA©Øˆ„Hˆ„Hˆ„Hˆ„HhDB$DB$DB$ ¬J "!"ù}=Öÿ·k@†¶¸~é­q´`"$ÐG³îÐV}¸ÑÊHÄÇ€nTÇ÷PjmýÈ{ˆ kI9YÚyèžmÛÍ`ð¶#&£aF¼0àŽå\HL¸¯…v¯>ƒç¸¿ Ö¤H\ÁdûI»]¯žñà¸öÚœ¦ñvH2/»æf¹q|Ì:H§;{H檭ôXRëvÙ¬^h½ºÊN…2[ø“–ÜØµ‘üW DB$DB$DB$DRI»i+?+Ý8÷~q ÈIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__preproc_8cpp.html0000644000175000017500000003407311553133250020432 00000000000000 LibOFX: ofx_preproc.cpp File Reference

ofx_preproc.cpp File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Defines

#define DIRSEP   "/"
#define LIBOFX_DEFAULT_INPUT_ENCODING   "CP1252"
#define LIBOFX_DEFAULT_OUTPUT_ENCODING   "UTF-8"

Functions

int ofx_proc_file (LibofxContextPtr ctx, const char *p_filename)
 File pre-processing of OFX AND for OFC files.
int libofx_proc_buffer (LibofxContextPtr ctx, const char *s, unsigned int size)
string sanitize_proprietary_tags (string input_string)
 Removes proprietary tags and comments.
string find_dtd (LibofxContextPtr ctx, string dtd_filename)
 Find the appropriate DTD for the file version.

Variables

const int DTD_SEARCH_PATH_NUM = 3
 The number of different paths to search for DTDs.
const char * DTD_SEARCH_PATH [DTD_SEARCH_PATH_NUM]
 The list of paths to search for the DTDs.
const unsigned int READ_BUFFER_SIZE = 1024

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file fx-0.9.4/lib/ofx_preproc.cpp.


Function Documentation

string find_dtd ( LibofxContextPtr  ctx,
string  dtd_filename 
)

Find the appropriate DTD for the file version.

This function will try to find a DTD matching the requested_version and return the full path of the DTD found (or an empty string if unsuccessful)

Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly

It will look, in (order)

1- The environment variable OFX_DTD_PATH (if present) 2- On windows only, a relative path specified by get_dtd_installation_directory() 3- The path specified by the makefile in MAKEFILE_DTD_PATH, thru LIBOFX_DTD_DIR in configure (if present) 4- Any hardcoded paths in DTD_SEARCH_PATH

Definition at line 636 of file fx-0.9.4/lib/ofx_preproc.cpp.

int libofx_proc_buffer ( LibofxContextPtr  ctx,
const char *  s,
unsigned int  size 
)

Parses the content of the given buffer.

Definition at line 326 of file fx-0.9.4/lib/ofx_preproc.cpp.

int ofx_proc_file ( LibofxContextPtr  ctx,
const char *  p_filename 
)

File pre-processing of OFX AND for OFC files.

ofx_proc_file process an ofx or ofc file.

Takes care of comment striping, dtd locating, etc.

Definition at line 81 of file fx-0.9.4/lib/ofx_preproc.cpp.

string sanitize_proprietary_tags ( string  input_string)

Removes proprietary tags and comments.

This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it

Definition at line 487 of file fx-0.9.4/lib/ofx_preproc.cpp.


Variable Documentation

Initial value:
{



  "/usr/local/share/libofx/dtd",
  "/usr/share/libofx/dtd",
  "~"
}

The list of paths to search for the DTDs.

Definition at line 66 of file fx-0.9.4/lib/ofx_preproc.cpp.

libofx-0.9.4/doc/html/ofx__container__security_8cpp_source.html0000644000175000017500000003501711553133250021730 00000000000000 LibOFX: ofx_container_security.cpp Source File

ofx_container_security.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_security.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                     OfxSecurityContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxSecurityContainer::OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "SECURITY";
00041 }
00042 OfxSecurityContainer::~OfxSecurityContainer()
00043 {
00044 }
00045 void OfxSecurityContainer::add_attribute(const string identifier, const string value)
00046 {
00047   if (identifier == "UNIQUEID")
00048   {
00049     strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id));
00050     data.unique_id_valid = true;
00051   }
00052   else if (identifier == "UNIQUEIDTYPE")
00053   {
00054     strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type));
00055     data.unique_id_type_valid = true;
00056   }
00057   else if (identifier == "SECNAME")
00058   {
00059     strncpy(data.secname, value.c_str(), sizeof(data.secname));
00060     data.secname_valid = true;
00061   }
00062   else if (identifier == "TICKER")
00063   {
00064     strncpy(data.ticker, value.c_str(), sizeof(data.ticker));
00065     data.ticker_valid = true;
00066   }
00067   else if (identifier == "UNITPRICE")
00068   {
00069     data.unitprice = ofxamount_to_double(value);
00070     data.unitprice_valid = true;
00071   }
00072   else if (identifier == "DTASOF")
00073   {
00074     data.date_unitprice = ofxdate_to_time_t(value);
00075     data.date_unitprice_valid = true;
00076   }
00077   else if (identifier == "CURDEF")
00078   {
00079     strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH);
00080     data.currency_valid = true;
00081   }
00082   else if (identifier == "MEMO" || identifier == "MEMO2")
00083   {
00084     strncpy(data.memo, value.c_str(), sizeof(data.memo));
00085     data.memo_valid = true;
00086   }
00087   else
00088   {
00089     /* Redirect unknown identifiers to the base class */
00090     OfxGenericContainer::add_attribute(identifier, value);
00091   }
00092 }
00093 int  OfxSecurityContainer::gen_event()
00094 {
00095   libofx_context->securityCallback(data);
00096   return true;
00097 }
00098 
00099 int  OfxSecurityContainer::add_to_main_tree()
00100 {
00101   if (MainContainer != NULL)
00102   {
00103     return MainContainer->add_container(this);
00104   }
00105   else
00106   {
00107     return false;
00108   }
00109 }
00110 
libofx-0.9.4/doc/html/ofxpartner_8h_source.html0000644000175000017500000001316611553133250016503 00000000000000 LibOFX: ofxpartner.h Source File

ofxpartner.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                              ofx_partner.h 
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFXPARTNER_H
00021 #define OFXPARTNER_H
00022 
00023 #include <libofx.h>
00024 #include <string>
00025 #include <vector>
00026 
00027 namespace OfxPartner
00028 {
00029   void ValidateIndexCache(void);
00030   OfxFiServiceInfo ServiceInfo(const std::string& fipid);
00031   std::vector<std::string> BankNames(void);
00032   std::vector<std::string> FipidForBank(const std::string& bank);
00033 }
00034 
00035 #endif // OFXPARTNER_H
libofx-0.9.4/doc/html/globals_0x74.html0000644000175000017500000001046211553133251014536 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- t -

libofx-0.9.4/doc/html/ofx__request_8cpp_source.html0000644000175000017500000003766711553133250017365 00000000000000 LibOFX: ofx_request.cpp Source File

ofx_request.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstring>
00025 #include <string>
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_request.hh"
00029 
00030 using namespace std;
00031 
00032 string time_t_to_ofxdatetime( time_t time )
00033 {
00034   static char buffer[51];
00035 
00036   strftime( buffer, 50, "%Y%m%d%H%M%S.000", localtime(&time) );
00037   buffer[50] = 0;
00038 
00039   return string(buffer);
00040 }
00041 
00042 string time_t_to_ofxdate( time_t time )
00043 {
00044   static char buffer[51];
00045 
00046   strftime( buffer, 50, "%Y%m%d", localtime(&time) );
00047   buffer[50] = 0;
00048 
00049   return string(buffer);
00050 }
00051 
00052 string OfxHeader(const char *hver)
00053 {
00054   if (hver == NULL || hver[0] == 0)
00055     hver = "102";
00056 
00057   if (strcmp(hver, "103") == 0)
00058     /* TODO: check for differences in version 102 and 103 */
00059     return string("OFXHEADER:100\r\n"
00060                   "DATA:OFXSGML\r\n"
00061                   "VERSION:103\r\n"
00062                   "SECURITY:NONE\r\n"
00063                   "ENCODING:USASCII\r\n"
00064                   "CHARSET:1252\r\n"
00065                   "COMPRESSION:NONE\r\n"
00066                   "OLDFILEUID:NONE\r\n"
00067                   "NEWFILEUID:")
00068            + time_t_to_ofxdatetime( time(NULL) )
00069            + string("\r\n\r\n");
00070   else
00071     return string("OFXHEADER:100\r\n"
00072                   "DATA:OFXSGML\r\n"
00073                   "VERSION:102\r\n"
00074                   "SECURITY:NONE\r\n"
00075                   "ENCODING:USASCII\r\n"
00076                   "CHARSET:1252\r\n"
00077                   "COMPRESSION:NONE\r\n"
00078                   "OLDFILEUID:NONE\r\n"
00079                   "NEWFILEUID:")
00080            + time_t_to_ofxdatetime( time(NULL) )
00081            + string("\r\n\r\n");
00082 }
00083 
00084 OfxAggregate OfxRequest::SignOnRequest(void) const
00085 {
00086   OfxAggregate fiTag("FI");
00087   fiTag.Add( "ORG", m_login.org );
00088   if ( strlen(m_login.fid) > 0 )
00089     fiTag.Add( "FID", m_login.fid );
00090 
00091   OfxAggregate sonrqTag("SONRQ");
00092   sonrqTag.Add( "DTCLIENT", time_t_to_ofxdatetime( time(NULL) ) );
00093   sonrqTag.Add( "USERID", m_login.userid);
00094   sonrqTag.Add( "USERPASS", m_login.userpass);
00095   sonrqTag.Add( "LANGUAGE", "ENG");
00096   sonrqTag.Add( fiTag );
00097   if ( strlen(m_login.appid) > 0 )
00098     sonrqTag.Add( "APPID", m_login.appid);
00099   else
00100     sonrqTag.Add( "APPID", "QWIN");
00101   if ( strlen(m_login.appver) > 0 )
00102     sonrqTag.Add( "APPVER", m_login.appver);
00103   else
00104     sonrqTag.Add( "APPVER", "1400");
00105 
00106   OfxAggregate signonmsgTag("SIGNONMSGSRQV1");
00107   signonmsgTag.Add( sonrqTag );
00108 
00109   return signonmsgTag;
00110 }
00111 
00112 OfxAggregate OfxRequest::RequestMessage(const string& _msgType, const string& _trnType, const OfxAggregate& _request) const
00113 {
00114   OfxAggregate trnrqTag( _trnType + "TRNRQ" );
00115   trnrqTag.Add( "TRNUID", time_t_to_ofxdatetime( time(NULL) ) );
00116   trnrqTag.Add( "CLTCOOKIE", "1" );
00117   trnrqTag.Add( _request );
00118 
00119   OfxAggregate result( _msgType + "MSGSRQV1" );
00120   result.Add( trnrqTag );
00121 
00122   return result;
00123 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__main_8cpp.html0000644000175000017500000000637511553133250022111 00000000000000 LibOFX: ofx_container_main.cpp File Reference

ofx_container_main.cpp File Reference

Implementation of OfxMainContainer. More...

Go to the source code of this file.


Detailed Description

Implementation of OfxMainContainer.

Definition in file fx-0.9.4/lib/ofx_container_main.cpp.

libofx-0.9.4/doc/html/libofx-0_89_84_2inc_2libofx_8h_source.html0000644000175000017500000020517111553133250021125 00000000000000 LibOFX: libofx.h Source File

libofx.h

Go to the documentation of this file.
00001 /*-*-c-*-*******************************************************************
00002               libofx.h  -  Main header file for the libofx API
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : bock@step.polymtl.ca
00006 ***************************************************************************/
00026 /***************************************************************************
00027  *                                                                         *
00028  *   This program is free software; you can redistribute it and/or modify  *
00029  *   it under the terms of the GNU General Public License as published by  *
00030  *   the Free Software Foundation; either version 2 of the License, or     *
00031  *   (at your option) any later version.                                   *
00032  *                                                                         *
00033  ***************************************************************************/
00034 
00035 #ifndef LIBOFX_H
00036 #define LIBOFX_H
00037 #include <time.h>
00038 
00039 #define LIBOFX_MAJOR_VERSION 0
00040 #define LIBOFX_MINOR_VERSION 9
00041 #define LIBOFX_MICRO_VERSION 4
00042 #define LIBOFX_BUILD_VERSION 0
00043 #define LIBOFX_VERSION_RELEASE_STRING "0.9.4"
00044 
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #else
00049 #define true 1
00050 #define false 0
00051 #endif
00052 
00053 #define OFX_ELEMENT_NAME_LENGTH         100
00054 #define OFX_SVRTID2_LENGTH             (36 + 1)
00055 #define OFX_CHECK_NUMBER_LENGTH        (12 + 1)
00056 #define OFX_REFERENCE_NUMBER_LENGTH    (32 + 1)
00057 #define OFX_FITID_LENGTH               (255 + 1)
00058 #define OFX_TOKEN2_LENGTH              (36 + 1)
00059 #define OFX_MEMO_LENGTH                (255 + 1)
00060 #define OFX_MEMO2_LENGTH               (390 + 1)
00061 #define OFX_BALANCE_NAME_LENGTH        (32 + 1)
00062 #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1)
00063 #define OFX_CURRENCY_LENGTH            (3 + 1) /* In ISO-4217 format */
00064 #define OFX_BANKID_LENGTH              (9 + 1)
00065 #define OFX_BRANCHID_LENGTH            (22 + 1)
00066 #define OFX_ACCTID_LENGTH              (22 + 1)
00067 #define OFX_ACCTKEY_LENGTH             (22 + 1)
00068 #define OFX_BROKERID_LENGTH            (22 + 1)
00069   /* Must be MAX of <BANKID>+<BRANCHID>+<ACCTID>, <ACCTID>+<ACCTKEY> and <ACCTID>+<BROKERID> */
00070 #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1)
00071 #define OFX_ACCOUNT_NAME_LENGTH        255
00072 #define OFX_MARKETING_INFO_LENGTH      (360 + 1)
00073 #define OFX_TRANSACTION_NAME_LENGTH    (32 + 1)
00074 #define OFX_UNIQUE_ID_LENGTH           (32 + 1)
00075 #define OFX_UNIQUE_ID_TYPE_LENGTH      (10 + 1)
00076 #define OFX_SECNAME_LENGTH             (32 + 1)
00077 #define OFX_TICKER_LENGTH              (32 + 1)
00078 #define OFX_ORG_LENGTH                 (32 + 1)
00079 #define OFX_FID_LENGTH                 (32 + 1)
00080 #define OFX_USERID_LENGTH              (32 + 1)
00081 #define OFX_USERPASS_LENGTH            (32 + 1)
00082 #define OFX_URL_LENGTH                 (500 + 1)
00083 #define OFX_APPID_LENGTH               (32)
00084 #define OFX_APPVER_LENGTH              (32)
00085 #define OFX_HEADERVERSION_LENGTH       (32)
00086 
00087   /*
00088   #define OFX_STATEMENT_CB               0;
00089   #define OFX_ACCOUNT_CB                 1;
00090   #define OFX_TRACSACTION_CB             2;
00091   #define OFX_SECURITY_CB                3;
00092   #define OFX_STATUS_CB                  4;
00093   */
00094 
00095   typedef void * LibofxContextPtr;
00096 
00102   LibofxContextPtr libofx_get_new_context();
00103 
00109   int libofx_free_context( LibofxContextPtr );
00110 
00111   void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
00112                           const char *s);
00113 
00115   enum LibofxFileFormat
00116   {
00117     AUTODETECT, 
00118     OFX, 
00119     OFC, 
00120     QIF, 
00121     UNKNOWN, 
00122     LAST 
00123   };
00124 
00125   struct LibofxFileFormatInfo
00126   {
00127     enum LibofxFileFormat format;
00128     const char * format_name;  
00129     const char * description; 
00130   };
00131 
00132 
00133 #ifndef OFX_AQUAMANIAC_UGLY_HACK1
00134 
00135   const struct LibofxFileFormatInfo LibofxImportFormatList[] =
00136   {
00137     {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"},
00138     {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"},
00139     {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"},
00140     {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
00141     {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
00142   };
00143 
00144   const struct LibofxFileFormatInfo LibofxExportFormatList[] =
00145   {
00146     {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
00147     {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
00148   };
00149 
00161   enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string);
00162 
00174   const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format);
00175 
00176 #endif
00177 
00184   int libofx_proc_file(LibofxContextPtr libofx_context,
00185                        const char * p_filename,
00186                        enum LibofxFileFormat ftype);
00187 
00188 
00201   struct OfxStatusData
00202   {
00207     char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];
00209     int ofx_element_name_valid;
00210 
00215     int code;            
00216     const char* name;          
00217     const char* description;   
00218     int code_valid;      
00221     enum Severity
00222     {
00223       INFO, 
00224       WARN, 
00225       ERROR 
00226     } severity;
00227     int severity_valid;
00228 
00234     char* server_message; 
00236     int server_message_valid;
00238   };
00239 
00240 
00250   typedef int (*LibofxProcStatusCallback)(const struct OfxStatusData data, void * status_data);
00251 
00263   struct OfxAccountData
00264   {
00265 
00277     char account_id[OFX_ACCOUNT_ID_LENGTH];
00278 
00284     char account_name[OFX_ACCOUNT_NAME_LENGTH];
00285     int account_id_valid;/* Use for both account_id and account_name */
00286 
00289     enum AccountType
00290     {
00291       OFX_CHECKING,  
00292       OFX_SAVINGS,   
00293       OFX_MONEYMRKT, 
00294       OFX_CREDITLINE,
00295       OFX_CMA,       
00296       OFX_CREDITCARD,
00297       OFX_INVESTMENT 
00298     } account_type;
00299     int account_type_valid;
00300 
00302     char currency[OFX_CURRENCY_LENGTH];
00303     int currency_valid;
00304 
00306     char account_number[OFX_ACCTID_LENGTH];
00307     int account_number_valid;
00308 
00310     char bank_id[OFX_BANKID_LENGTH];
00311     int bank_id_valid;
00312 
00313     char broker_id[OFX_BROKERID_LENGTH];
00314     int broker_id_valid;
00315 
00316     char branch_id[OFX_BRANCHID_LENGTH];
00317     int branch_id_valid;
00318 
00319   };
00320 
00335   typedef int (*LibofxProcAccountCallback)(const struct OfxAccountData data, void * account_data);
00336 
00344   struct OfxSecurityData
00345   {
00353     char unique_id[OFX_UNIQUE_ID_LENGTH];   
00354     int unique_id_valid;
00355 
00356     char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
00358     int unique_id_type_valid;
00359 
00360     char secname[OFX_SECNAME_LENGTH];
00361     int secname_valid;
00362 
00368     char ticker[OFX_TICKER_LENGTH];
00369     int ticker_valid;
00370 
00371     double unitprice;
00373     int unitprice_valid;
00374 
00375     time_t date_unitprice;
00376     int date_unitprice_valid;
00377 
00380     char currency[OFX_CURRENCY_LENGTH];
00381     int currency_valid;
00382 
00383     char memo[OFX_MEMO2_LENGTH];
00384     int memo_valid;
00385   };/* end struct OfxSecurityData */
00386 
00400   typedef int (*LibofxProcSecurityCallback)(const struct OfxSecurityData data, void * security_data);
00401 
00402   typedef enum
00403   {
00404     OFX_CREDIT,     
00405     OFX_DEBIT,      
00406     OFX_INT,        
00407     OFX_DIV,        
00408     OFX_FEE,        
00409     OFX_SRVCHG,     
00410     OFX_DEP,        
00411     OFX_ATM,        
00412     OFX_POS,        
00413     OFX_XFER,       
00414     OFX_CHECK,      
00415     OFX_PAYMENT,    
00416     OFX_CASH,       
00417     OFX_DIRECTDEP,  
00418     OFX_DIRECTDEBIT,
00419     OFX_REPEATPMT,  
00420     OFX_OTHER       
00421   } TransactionType;
00422 
00423   typedef enum
00424   {
00425     OFX_BUYDEBT,        
00426     OFX_BUYMF,          
00427     OFX_BUYOPT,         
00428     OFX_BUYOTHER,       
00429     OFX_BUYSTOCK,       
00430     OFX_CLOSUREOPT,     
00431     OFX_INCOME,         
00432     OFX_INVEXPENSE,     
00433     OFX_JRNLFUND,       
00434     OFX_JRNLSEC,        
00435     OFX_MARGININTEREST, 
00436     OFX_REINVEST,       
00437     OFX_RETOFCAP,       
00438     OFX_SELLDEBT,       
00439     OFX_SELLMF,         
00440     OFX_SELLOPT,        
00441     OFX_SELLOTHER,      
00442     OFX_SELLSTOCK,      
00443     OFX_SPLIT,          
00444     OFX_TRANSFER        
00445   } InvTransactionType;
00446 
00447   typedef enum
00448   {
00449     DELETE, 
00451     REPLACE 
00453   } FiIdCorrectionAction;
00454 
00461   struct OfxTransactionData
00462   {
00463 
00469     char account_id[OFX_ACCOUNT_ID_LENGTH];
00472     struct OfxAccountData * account_ptr; 
00474     int account_id_valid;
00475 
00476     TransactionType transactiontype;
00477     int transactiontype_valid;
00478 
00482     InvTransactionType invtransactiontype;
00483     int  invtransactiontype_valid;
00484 
00492     double units;
00493     int units_valid;
00494 
00495     double unitprice; 
00497     int unitprice_valid;
00498 
00499     double amount;    
00503     int amount_valid;
00504 
00505     char fi_id[256];  
00508     int fi_id_valid;
00509 
00517     char unique_id[OFX_UNIQUE_ID_LENGTH];
00518     int unique_id_valid;
00519     char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
00521     int unique_id_type_valid;
00522 
00523     struct OfxSecurityData *security_data_ptr;  
00524     int security_data_valid;
00525 
00526     time_t date_posted;
00531     int date_posted_valid;
00532 
00533     time_t date_initiated;
00539     int date_initiated_valid;
00540 
00541     time_t date_funds_available;
00544     int date_funds_available_valid;
00545 
00549     char fi_id_corrected[256];
00550     int fi_id_corrected_valid;
00551 
00554     FiIdCorrectionAction fi_id_correction_action;
00555     int fi_id_correction_action_valid;
00556 
00559     char server_transaction_id[OFX_SVRTID2_LENGTH];
00560     int server_transaction_id_valid;
00561 
00565     char check_number[OFX_CHECK_NUMBER_LENGTH];
00566     int check_number_valid;
00567 
00570     char reference_number[OFX_REFERENCE_NUMBER_LENGTH];
00571     int reference_number_valid;
00572 
00573     long int standard_industrial_code;
00575     int standard_industrial_code_valid;
00576 
00577     char payee_id[OFX_SVRTID2_LENGTH];
00578     int payee_id_valid;
00579 
00580     char name[OFX_TRANSACTION_NAME_LENGTH];
00582     int name_valid;
00583 
00584     char memo[OFX_MEMO2_LENGTH];
00585     int memo_valid;
00586 
00587     double commission;
00588     int commission_valid;
00589 
00590     double fees;
00591     int fees_valid;
00592 
00593     double oldunits;     /*number of units held before stock split */
00594     int oldunits_valid;
00595 
00596     double newunits;     /*number of units held after stock split */
00597     int newunits_valid;
00598 
00599 
00600     /*********** NOT YET COMPLETE!!! *********************/
00601   };
00602 
00612   typedef int (*LibofxProcTransactionCallback)(const struct OfxTransactionData data, void * transaction_data);
00613 
00623   struct OfxStatementData
00624   {
00625 
00633     char currency[OFX_CURRENCY_LENGTH]; 
00634     int currency_valid;
00635 
00636     char account_id[OFX_ACCOUNT_ID_LENGTH];
00638     struct OfxAccountData * account_ptr; 
00640     int account_id_valid;
00641 
00644     double ledger_balance;
00645     int ledger_balance_valid;
00646 
00647     time_t ledger_balance_date;
00648     int ledger_balance_date_valid;
00649 
00655     double available_balance; 
00658     int available_balance_valid;
00659 
00660     time_t available_balance_date;
00661     int available_balance_date_valid;
00662 
00667     time_t date_start;
00668     int date_start_valid;
00669 
00674     time_t date_end;
00675     int date_end_valid;
00676 
00679     char marketing_info[OFX_MARKETING_INFO_LENGTH];
00680     int marketing_info_valid;
00681   };
00682 
00690   typedef int (*LibofxProcStatementCallback)(const struct OfxStatementData data, void * statement_data);
00691 
00695   struct OfxCurrency
00696   {
00697     char currency[OFX_CURRENCY_LENGTH]; 
00698     double exchange_rate;  
00699     int must_convert;   
00700   };
00701 
00702 
00709   void ofx_set_status_cb(LibofxContextPtr ctx,
00710                          LibofxProcStatusCallback cb,
00711                          void *user_data);
00712 
00719   void ofx_set_account_cb(LibofxContextPtr ctx,
00720                           LibofxProcAccountCallback cb,
00721                           void *user_data);
00722 
00729   void ofx_set_security_cb(LibofxContextPtr ctx,
00730                            LibofxProcSecurityCallback cb,
00731                            void *user_data);
00732 
00739   void ofx_set_transaction_cb(LibofxContextPtr ctx,
00740                               LibofxProcTransactionCallback cb,
00741                               void *user_data);
00742 
00749   void ofx_set_statement_cb(LibofxContextPtr ctx,
00750                             LibofxProcStatementCallback cb,
00751                             void *user_data);
00752 
00753 
00757   int libofx_proc_buffer(LibofxContextPtr ctx,
00758                          const char *s, unsigned int size);
00759 
00760 
00761   /* **************************************** */
00762 
00768 
00772   struct OfxFiServiceInfo
00773   {
00774     char fid[OFX_FID_LENGTH];
00775     char org[OFX_ORG_LENGTH];
00776     char url[OFX_URL_LENGTH];
00777     int accountlist; 
00778     int statements; 
00779     int billpay; 
00780     int investments; 
00781   };
00782 
00792   struct OfxFiLogin
00793   {
00794     char fid[OFX_FID_LENGTH];
00795     char org[OFX_ORG_LENGTH];
00796     char userid[OFX_USERID_LENGTH];
00797     char userpass[OFX_USERPASS_LENGTH];
00798     char header_version[OFX_HEADERVERSION_LENGTH];
00799     char appid[OFX_APPID_LENGTH];
00800     char appver[OFX_APPVER_LENGTH];
00801   };
00802 
00803 #define OFX_AMOUNT_LENGTH (32 + 1)
00804 #define OFX_PAYACCT_LENGTH (32 + 1)
00805 #define OFX_STATE_LENGTH (5 + 1)
00806 #define OFX_POSTALCODE_LENGTH (11 + 1)
00807 #define OFX_NAME_LENGTH (32 + 1)
00808 
00809   struct OfxPayment
00810   {
00811     char amount[OFX_AMOUNT_LENGTH];
00812     char account[OFX_PAYACCT_LENGTH];
00813     char datedue[9];
00814     char memo[OFX_MEMO_LENGTH];
00815   };
00816 
00817   struct OfxPayee
00818   {
00819     char name[OFX_NAME_LENGTH];
00820     char address1[OFX_NAME_LENGTH];
00821     char city[OFX_NAME_LENGTH];
00822     char state[OFX_STATE_LENGTH];
00823     char postalcode[OFX_POSTALCODE_LENGTH];
00824     char phone[OFX_NAME_LENGTH];
00825   };
00826 
00838   char* libofx_request_statement( const struct OfxFiLogin* fi, const struct OfxAccountData* account, time_t date_from );
00839 
00850   char* libofx_request_accountinfo( const struct OfxFiLogin* login );
00851 
00852   char* libofx_request_payment( const struct OfxFiLogin* login, const struct OfxAccountData* account, const struct OfxPayee* payee, const struct OfxPayment* payment );
00853 
00854   char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid );
00855 
00857 
00858 #ifdef __cplusplus
00859 } // end of extern "C"
00860 #endif
00861 #endif // end of LIBOFX_H
libofx-0.9.4/doc/html/classOfxBalanceContainer.png0000644000175000017500000000123411553133250017040 00000000000000‰PNG  IHDRPïz…PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2+IDATxíÍ–ƒ …=§ïÿȳ0¿*Îq$un–B/Ÿl—W[ÔjÈy­óÍC)!PPåO ñ@—u®g~5uv¹ÎA™*GT<œ·ÎXî<@™+‡U°7­D$ Ã'âEû·»ÈbæLúX)MÐ2YN«B>t‘¶B6‡æoßÙ%Ü'8‚2GNªbsPîîE>IxýNE»š'‚r»œŒ4ˆá+lX…F' NB¹IÎa½Æ¹ÊU‘bÈ™ãs‹œìº—±;ªŸëUAgÎ©ŠƒJ™,GTh_w*ôîj·uøk B5óuOñJ‹ 32WŽª˜h”©rPPP¥” æ Ô’ók{_ãB«!PïRTjÈ”TD%*5ä .Z@@@@@y"”bVë=ªàPPP(€(€(€(WU°rP PPå&AÚ´4áPzÚGl¦_ É£ÙÅȦR÷® EˆH¶gœHhÉh+ ® [ÖŠQ'ÒÇBû@*Eª…GûÚX˜WoWnæäâÄÔÉõwŠíz‡¡%‰ŠKñè~ w|d+6²›ì@Q-¢xâžq|v•ÚX?ª)ªêPB÷i.ÚOPÚíöâëCáPtŠˆ¹QÛ}\kV|·JTXÊ?×(€(€(€A¡T°«6óÎÀ9€Üc¦IEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__preproc_8cpp_source.html0000644000175000017500000021766111553133250022020 00000000000000 LibOFX: ofx_preproc.cpp Source File

ofx_preproc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002           ofx_preproc.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�oir
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #include "../config.h"
00021 #include <iostream>
00022 #include <fstream>
00023 #include <stdlib.h>
00024 #include <stdio.h>
00025 #include <string>
00026 #include "ParserEventGeneratorKit.h"
00027 #include "libofx.h"
00028 #include "messages.hh"
00029 #include "ofx_sgml.hh"
00030 #include "ofc_sgml.hh"
00031 #include "ofx_preproc.hh"
00032 #include "ofx_utilities.hh"
00033 #ifdef HAVE_ICONV
00034 #include <iconv.h>
00035 #endif
00036 
00037 #ifdef OS_WIN32
00038 # define DIRSEP "\\"
00039 #else
00040 # define DIRSEP "/"
00041 #endif
00042 
00043 #ifdef OS_WIN32
00044 # include "win32.hh"
00045 # include <windows.h> // for GetModuleFileName()
00046 # undef ERROR
00047 # undef DELETE
00048 #endif
00049 
00050 #define LIBOFX_DEFAULT_INPUT_ENCODING "CP1252"
00051 #define LIBOFX_DEFAULT_OUTPUT_ENCODING "UTF-8"
00052 
00053 using namespace std;
00057 #ifdef MAKEFILE_DTD_PATH
00058 const int DTD_SEARCH_PATH_NUM = 4;
00059 #else
00060 const int DTD_SEARCH_PATH_NUM = 3;
00061 #endif
00062 
00066 const char *DTD_SEARCH_PATH[DTD_SEARCH_PATH_NUM] =
00067 {
00068 #ifdef MAKEFILE_DTD_PATH
00069   MAKEFILE_DTD_PATH ,
00070 #endif
00071   "/usr/local/share/libofx/dtd",
00072   "/usr/share/libofx/dtd",
00073   "~"
00074 };
00075 const unsigned int READ_BUFFER_SIZE = 1024;
00076 
00081 int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename)
00082 {
00083   LibofxContext *libofx_context;
00084   bool ofx_start = false;
00085   bool ofx_end = false;
00086 
00087   ifstream input_file;
00088   ofstream tmp_file;
00089   char buffer[READ_BUFFER_SIZE];
00090   char iconv_buffer[READ_BUFFER_SIZE * 2];
00091   string s_buffer;
00092   char *filenames[3];
00093   char tmp_filename[256];
00094   int tmp_file_fd;
00095 #ifdef HAVE_ICONV
00096   iconv_t conversion_descriptor;
00097 #endif
00098   libofx_context = (LibofxContext*)ctx;
00099 
00100   if (p_filename != NULL && strcmp(p_filename, "") != 0)
00101   {
00102     message_out(DEBUG, string("ofx_proc_file():Opening file: ") + p_filename);
00103 
00104     input_file.open(p_filename);
00105     if (!input_file)
00106     {
00107       message_out(ERROR, "ofx_proc_file():Unable to open the input file " + string(p_filename));
00108     }
00109 
00110     mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
00111 
00112     message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename));
00113     tmp_file_fd = mkstemp(tmp_filename);
00114     if(tmp_file_fd)
00115     {
00116     tmp_file.open(tmp_filename);
00117     if (!tmp_file)
00118       {
00119         message_out(ERROR, "ofx_proc_file():Unable to open the created temp file " + string(tmp_filename));
00120         return -1;
00121       }
00122     }
00123     else
00124     {
00125         message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename));
00126         return -1;
00127     }
00128 
00129     if (input_file && tmp_file)
00130     {
00131       int header_separator_idx;
00132       string header_name;
00133       string header_value;
00134       string ofx_encoding;
00135       string ofx_charset;
00136       do
00137       {
00138         input_file.getline(buffer, sizeof(buffer), '\n');
00139         //cout<<buffer<<"\n";
00140         s_buffer.assign(buffer);
00141         //cout<<"input_file.gcount(): "<<input_file.gcount()<<" sizeof(buffer): "<<sizeof(buffer)<<endl;
00142         if (input_file.gcount() < (sizeof(buffer) - 1))
00143         {
00144           s_buffer.append("\n");
00145         }
00146         else if ( !input_file.eof() && input_file.fail())
00147         {
00148           input_file.clear();
00149         }
00150         int ofx_start_idx;
00151         if (ofx_start == false &&
00152             (
00153               (libofx_context->currentFileType() == OFX &&
00154                ((ofx_start_idx = s_buffer.find("<OFX>")) !=
00155                 string::npos || (ofx_start_idx = s_buffer.find("<ofx>")) != string::npos))
00156               || (libofx_context->currentFileType() == OFC &&
00157                   ((ofx_start_idx = s_buffer.find("<OFC>")) != string::npos ||
00158                    (ofx_start_idx = s_buffer.find("<ofc>")) != string::npos))
00159             )
00160            )
00161         {
00162           ofx_start = true;
00163           s_buffer.erase(0, ofx_start_idx); //Fix for really broken files that don't have a newline after the header.
00164           message_out(DEBUG, "ofx_proc_file():<OFX> or <OFC> has been found");
00165 #ifdef HAVE_ICONV
00166           string fromcode;
00167           string tocode;
00168           if (ofx_encoding.compare("USASCII") == 0)
00169           {
00170             if (ofx_charset.compare("ISO-8859-1") == 0 || ofx_charset.compare("8859-1") == 0)
00171             {
00172               fromcode = "ISO-8859-1";
00173             }
00174             else if (ofx_charset.compare("1252") == 0)
00175             {
00176               fromcode = "CP1252";
00177             }
00178             else if (ofx_charset.compare("NONE") == 0)
00179             {
00180               fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00181             }
00182             else
00183             {
00184               fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00185             }
00186           }
00187           else if (ofx_encoding.compare("UTF-8") == 0)
00188           {
00189             fromcode = "UTF-8";
00190           }
00191           else
00192           {
00193             fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
00194           }
00195           tocode = LIBOFX_DEFAULT_OUTPUT_ENCODING;
00196           message_out(DEBUG, "ofx_proc_file(): Setting up iconv for fromcode: " + fromcode + ", tocode: " + tocode);
00197           conversion_descriptor = iconv_open (tocode.c_str(), fromcode.c_str());
00198 #endif
00199         }
00200         else
00201         {
00202           //We are still in the headers
00203           if ((header_separator_idx = s_buffer.find(':')) != string::npos)
00204           {
00205             //Header processing
00206             header_name.assign(s_buffer.substr(0, header_separator_idx));
00207             header_value.assign(s_buffer.substr(header_separator_idx + 1));
00208             while ( header_value[header_value.length() -1 ] == '\n' ||
00209                     header_value[header_value.length() -1 ] == '\r' )
00210               header_value.erase(header_value.length() - 1);
00211             message_out(DEBUG, "ofx_proc_file():Header: " + header_name + " with value: " + header_value + " has been found");
00212             if (header_name.compare("ENCODING") == 0)
00213             {
00214               ofx_encoding.assign(header_value);
00215             }
00216             if (header_name.compare("CHARSET") == 0)
00217             {
00218               ofx_charset.assign(header_value);
00219             }
00220           }
00221         }
00222 
00223         if (ofx_start == true && ofx_end == false)
00224         {
00225           s_buffer = sanitize_proprietary_tags(s_buffer);
00226           //cout<< s_buffer<<"\n";
00227 #ifdef HAVE_ICONV
00228           memset(iconv_buffer, 0, READ_BUFFER_SIZE * 2);
00229           size_t inbytesleft = strlen(s_buffer.c_str());
00230           size_t outbytesleft = READ_BUFFER_SIZE * 2 - 1;
00231 #ifdef OS_WIN32
00232           const char * inchar = (const char *)s_buffer.c_str();
00233 #else
00234           char * inchar = (char *)s_buffer.c_str();
00235 #endif
00236           char * outchar = iconv_buffer;
00237           int iconv_retval = iconv (conversion_descriptor,
00238                                     &inchar, &inbytesleft,
00239                                     &outchar, &outbytesleft);
00240           if (iconv_retval == -1)
00241           {
00242             message_out(ERROR, "ofx_proc_file(): Conversion error");
00243           }
00244           s_buffer = iconv_buffer;
00245 #endif
00246           tmp_file.write(s_buffer.c_str(), s_buffer.length());
00247         }
00248 
00249         if (ofx_start == true &&
00250             (
00251               (libofx_context->currentFileType() == OFX &&
00252                ((ofx_start_idx = s_buffer.find("</OFX>")) != string::npos ||
00253                 (ofx_start_idx = s_buffer.find("</ofx>")) != string::npos))
00254               || (libofx_context->currentFileType() == OFC &&
00255                   ((ofx_start_idx = s_buffer.find("</OFC>")) != string::npos ||
00256                    (ofx_start_idx = s_buffer.find("</ofc>")) != string::npos))
00257             )
00258            )
00259         {
00260           ofx_end = true;
00261           message_out(DEBUG, "ofx_proc_file():</OFX> or </OFC>  has been found");
00262         }
00263 
00264       }
00265       while (!input_file.eof() && !input_file.bad());
00266     }
00267     input_file.close();
00268     tmp_file.close();
00269 #ifdef HAVE_ICONV
00270     iconv_close(conversion_descriptor);
00271 #endif
00272     char filename_openspdtd[255];
00273     char filename_dtd[255];
00274     char filename_ofx[255];
00275     strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file
00276     if (libofx_context->currentFileType() == OFX)
00277     {
00278       strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file
00279     }
00280     else if (libofx_context->currentFileType() == OFC)
00281     {
00282       strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file
00283     }
00284     else
00285     {
00286       message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00287     }
00288 
00289     if ((string)filename_dtd != "" && (string)filename_openspdtd != "")
00290     {
00291       strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file
00292       filenames[0] = filename_openspdtd;
00293       filenames[1] = filename_dtd;
00294       filenames[2] = filename_ofx;
00295       if (libofx_context->currentFileType() == OFX)
00296       {
00297         ofx_proc_sgml(libofx_context, 3, filenames);
00298       }
00299       else if (libofx_context->currentFileType() == OFC)
00300       {
00301         ofc_proc_sgml(libofx_context, 3, filenames);
00302       }
00303       else
00304       {
00305         message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00306       }
00307       if (remove(tmp_filename) != 0)
00308       {
00309         message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename));
00310       }
00311     }
00312     else
00313     {
00314       message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting");
00315     }
00316   }
00317   else
00318   {
00319     message_out(ERROR, "ofx_proc_file():No input file specified");
00320   }
00321   return 0;
00322 }
00323 
00324 
00325 
00326 int libofx_proc_buffer(LibofxContextPtr ctx,
00327                        const char *s, unsigned int size)
00328 {
00329   ofstream tmp_file;
00330   string s_buffer;
00331   char *filenames[3];
00332   char tmp_filename[256];
00333   int tmp_file_fd;
00334   ssize_t pos;
00335   LibofxContext *libofx_context;
00336 
00337   libofx_context = (LibofxContext*)ctx;
00338 
00339   if (size == 0)
00340   {
00341     message_out(ERROR,
00342                 "ofx_proc_file(): bad size");
00343     return -1;
00344   }
00345   s_buffer = string(s, size);
00346 
00347   mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
00348   message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename));
00349   tmp_file_fd = mkstemp(tmp_filename);
00350   if(tmp_file_fd)
00351   {
00352   tmp_file.open(tmp_filename);
00353   if (!tmp_file)
00354     {
00355       message_out(ERROR, "ofx_proc_file():Unable to open the created output file " + string(tmp_filename));
00356       return -1;
00357     }
00358   }
00359   else
00360   {
00361       message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename));
00362       return -1;
00363   }
00364 
00365   if (libofx_context->currentFileType() == OFX)
00366   {
00367     pos = s_buffer.find("<OFX>");
00368     if (pos == string::npos)
00369       pos = s_buffer.find("<ofx>");
00370   }
00371   else if (libofx_context->currentFileType() == OFC)
00372   {
00373     pos = s_buffer.find("<OFC>");
00374     if (pos == string::npos)
00375       pos = s_buffer.find("<ofc>");
00376   }
00377   else
00378   {
00379     message_out(ERROR, "ofx_proc(): unknown file type");
00380     return -1;
00381   }
00382   if (pos == string::npos || pos > s_buffer.size())
00383   {
00384     message_out(ERROR, "ofx_proc():<OFX> has not been found");
00385     return -1;
00386   }
00387   else
00388   {
00389     // erase everything before the OFX tag
00390     s_buffer.erase(0, pos);
00391     message_out(DEBUG, "ofx_proc_file():<OF?> has been found");
00392   }
00393 
00394   if (libofx_context->currentFileType() == OFX)
00395   {
00396     pos = s_buffer.find("</OFX>");
00397     if (pos == string::npos)
00398       pos = s_buffer.find("</ofx>");
00399   }
00400   else if (libofx_context->currentFileType() == OFC)
00401   {
00402     pos = s_buffer.find("</OFC>");
00403     if (pos == string::npos)
00404       pos = s_buffer.find("</ofc>");
00405   }
00406   else
00407   {
00408     message_out(ERROR, "ofx_proc(): unknown file type");
00409     return -1;
00410   }
00411 
00412   if (pos == string::npos || pos > s_buffer.size())
00413   {
00414     message_out(ERROR, "ofx_proc():</OF?> has not been found");
00415     return -1;
00416   }
00417   else
00418   {
00419     // erase everything after the /OFX tag
00420     if (s_buffer.size() > pos + 6)
00421       s_buffer.erase(pos + 6);
00422     message_out(DEBUG, "ofx_proc_file():<OFX> has been found");
00423   }
00424 
00425   s_buffer = sanitize_proprietary_tags(s_buffer);
00426   tmp_file.write(s_buffer.c_str(), s_buffer.length());
00427 
00428   tmp_file.close();
00429 
00430   char filename_openspdtd[255];
00431   char filename_dtd[255];
00432   char filename_ofx[255];
00433   strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file
00434   if (libofx_context->currentFileType() == OFX)
00435   {
00436     strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file
00437   }
00438   else if (libofx_context->currentFileType() == OFC)
00439   {
00440     strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file
00441   }
00442   else
00443   {
00444     message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00445   }
00446 
00447   if ((string)filename_dtd != "" && (string)filename_openspdtd != "")
00448   {
00449     strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file
00450     filenames[0] = filename_openspdtd;
00451     filenames[1] = filename_dtd;
00452     filenames[2] = filename_ofx;
00453     if (libofx_context->currentFileType() == OFX)
00454     {
00455       ofx_proc_sgml(libofx_context, 3, filenames);
00456     }
00457     else if (libofx_context->currentFileType() == OFC)
00458     {
00459       ofc_proc_sgml(libofx_context, 3, filenames);
00460     }
00461     else
00462     {
00463       message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser"));
00464     }
00465     if (remove(tmp_filename) != 0)
00466     {
00467       message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename));
00468     }
00469   }
00470   else
00471   {
00472     message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting");
00473   }
00474 
00475   return 0;
00476 }
00477 
00478 
00479 
00480 
00481 
00482 
00487 string sanitize_proprietary_tags(string input_string)
00488 {
00489   unsigned int i;
00490   size_t input_string_size;
00491   bool strip = false;
00492   bool tag_open = false;
00493   int tag_open_idx = 0; //Are we within < > ?
00494   bool closing_tag_open = false; //Are we within </ > ?
00495   int orig_tag_open_idx = 0;
00496   bool proprietary_tag = false; //Are we within a proprietary element?
00497   bool proprietary_closing_tag = false;
00498   int crop_end_idx = 0;
00499   char buffer[READ_BUFFER_SIZE] = "";
00500   char tagname[READ_BUFFER_SIZE] = "";
00501   int tagname_idx = 0;
00502   char close_tagname[READ_BUFFER_SIZE] = "";
00503 
00504   for (i = 0; i < READ_BUFFER_SIZE; i++)
00505   {
00506     buffer[i] = 0;
00507     tagname[i] = 0;
00508     close_tagname[i] = 0;
00509   }
00510 
00511   input_string_size = input_string.size();
00512 
00513   for (i = 0; i <= input_string_size; i++)
00514   {
00515     if (input_string.c_str()[i] == '<')
00516     {
00517       tag_open = true;
00518       tag_open_idx = i;
00519       if (proprietary_tag == true && input_string.c_str()[i+1] == '/')
00520       {
00521         //We are now in a closing tag
00522         closing_tag_open = true;
00523         //cout<<"Comparaison: "<<tagname<<"|"<<&(input_string.c_str()[i+2])<<"|"<<strlen(tagname)<<endl;
00524         if (strncmp(tagname, &(input_string.c_str()[i+2]), strlen(tagname)) != 0)
00525         {
00526           //If it is the begining of an other tag
00527           //cout<<"DIFFERENT!"<<endl;
00528           crop_end_idx = i - 1;
00529           strip = true;
00530         }
00531         else
00532         {
00533           //Otherwise, it is the start of the closing tag of the proprietary tag
00534           proprietary_closing_tag = true;
00535         }
00536       }
00537       else if (proprietary_tag == true)
00538       {
00539         //It is the start of a new tag, following a proprietary tag
00540         crop_end_idx = i - 1;
00541         strip = true;
00542       }
00543     }
00544     else if (input_string.c_str()[i] == '>')
00545     {
00546       tag_open = false;
00547       closing_tag_open = false;
00548       tagname[tagname_idx] = 0;
00549       tagname_idx = 0;
00550       if (proprietary_closing_tag == true)
00551       {
00552         crop_end_idx = i;
00553         strip = true;
00554       }
00555     }
00556     else if (tag_open == true && closing_tag_open == false)
00557     {
00558       if (input_string.c_str()[i] == '.')
00559       {
00560         if (proprietary_tag != true)
00561         {
00562           orig_tag_open_idx = tag_open_idx;
00563           proprietary_tag = true;
00564         }
00565       }
00566       tagname[tagname_idx] = input_string.c_str()[i];
00567       tagname_idx++;
00568     }
00569     //cerr <<i<<endl;
00570     if (strip == true && orig_tag_open_idx < input_string.size())
00571     {
00572       input_string.copy(buffer, (crop_end_idx - orig_tag_open_idx) + 1, orig_tag_open_idx);
00573       message_out(INFO, "sanitize_proprietary_tags() (end tag or new tag) removed: " + string(buffer));
00574       input_string.erase(orig_tag_open_idx, (crop_end_idx - orig_tag_open_idx) + 1);
00575       i = orig_tag_open_idx - 1;
00576       proprietary_tag = false;
00577       proprietary_closing_tag = false;
00578       closing_tag_open = false;
00579       tag_open = false;
00580       strip = false;
00581     }
00582 
00583   }//end for
00584   if (proprietary_tag == true && orig_tag_open_idx < input_string.size())
00585   {
00586     if (crop_end_idx == 0)   //no closing tag
00587     {
00588       crop_end_idx = input_string.size() - 1;
00589     }
00590     input_string.copy(buffer, (crop_end_idx - orig_tag_open_idx) + 1, orig_tag_open_idx);
00591     message_out(INFO, "sanitize_proprietary_tags() (end of line) removed: " + string(buffer));
00592     input_string.erase(orig_tag_open_idx, (crop_end_idx - orig_tag_open_idx) + 1);
00593   }
00594   return input_string;
00595 }
00596 
00597 
00598 #ifdef OS_WIN32
00599 static std::string get_dtd_installation_directory()
00600 {
00601   // Partial implementation of
00602   // http://developer.gnome.org/doc/API/2.0/glib/glib-Windows-Compatibility-Functions.html#g-win32-get-package-installation-directory
00603   char ch_fn[MAX_PATH], *p;
00604   std::string str_fn;
00605 
00606   if (!GetModuleFileName(NULL, ch_fn, MAX_PATH)) return "";
00607 
00608   if ((p = strrchr(ch_fn, '\\')) != NULL)
00609     * p = '\0';
00610 
00611   p = strrchr(ch_fn, '\\');
00612   if (p && (_stricmp(p + 1, "bin") == 0 ||
00613             _stricmp(p + 1, "lib") == 0))
00614     *p = '\0';
00615 
00616   str_fn = ch_fn;
00617   str_fn += "\\share\\libofx\\dtd";
00618 
00619   return str_fn;
00620 }
00621 #endif
00622 
00623 
00636 string find_dtd(LibofxContextPtr ctx, string dtd_filename)
00637 {
00638   string dtd_path_filename;
00639   char *env_dtd_path;
00640 
00641   dtd_path_filename = reinterpret_cast<const LibofxContext*>(ctx)->dtdDir();
00642   if (!dtd_path_filename.empty())
00643   {
00644     dtd_path_filename.append(dtd_filename);
00645     ifstream dtd_file(dtd_path_filename.c_str());
00646     if (dtd_file)
00647     {
00648       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00649       return dtd_path_filename;
00650     }
00651   }
00652 
00653 #ifdef OS_WIN32
00654   dtd_path_filename = get_dtd_installation_directory();
00655   if (!dtd_path_filename.empty())
00656   {
00657         dtd_path_filename.append(DIRSEP);
00658     dtd_path_filename.append(dtd_filename);
00659     ifstream dtd_file(dtd_path_filename.c_str());
00660     if (dtd_file)
00661     {
00662       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00663       return dtd_path_filename;
00664     }
00665   }
00666 #endif
00667   /* Search in environement variable OFX_DTD_PATH */
00668   env_dtd_path = getenv("OFX_DTD_PATH");
00669   if (env_dtd_path)
00670   {
00671     dtd_path_filename.append(env_dtd_path);
00672     dtd_path_filename.append(DIRSEP);
00673     dtd_path_filename.append(dtd_filename);
00674     ifstream dtd_file(dtd_path_filename.c_str());
00675     if (!dtd_file)
00676     {
00677       message_out(STATUS, "find_dtd():OFX_DTD_PATH env variable was was present, but unable to open the file " + dtd_path_filename);
00678     }
00679     else
00680     {
00681       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00682       return dtd_path_filename;
00683     }
00684   }
00685 
00686   for (int i = 0; i < DTD_SEARCH_PATH_NUM; i++)
00687   {
00688     dtd_path_filename = DTD_SEARCH_PATH[i];
00689     dtd_path_filename.append(DIRSEP);
00690     dtd_path_filename.append(dtd_filename);
00691     ifstream dtd_file(dtd_path_filename.c_str());
00692     if (!dtd_file)
00693     {
00694       message_out(DEBUG, "find_dtd():Unable to open the file " + dtd_path_filename);
00695     }
00696     else
00697     {
00698       message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
00699       return dtd_path_filename;
00700     }
00701   }
00702 
00703   message_out(ERROR, "find_dtd():Unable to find the DTD named " + dtd_filename);
00704   return "";
00705 }
00706 
00707 
libofx-0.9.4/doc/html/classOfxGenericContainer.png0000644000175000017500000001166611553133250017101 00000000000000‰PNG  IHDR<§—(PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2EIDATxíÝÑrã* €áŠÌœ÷äsàÄiê,à_³u¶|•àöGfŸbÖ_<ðø½Àoþ_²ÜuîÊ{yÿù·ÃÁn­ñÄîUé;½d7øM5ñ´C~DÄBêËúíGtˆ½ –òø‘á{áYöi«¼”\Ïu@óõx°[°_`C¼¼¯’VÎÇï=¨uxíÛñ[ãiÆC½Nã•Ùƒ6/Ûèã ô,Þ¨uxå¯ÛZÛlÏ˶äÑhðo«Ì³â xåê uZ/Ëðµ.ŠZo[‰7EY`<~/ðÀ<~/ðÀã—ÜoÖXï/ã¿»m¼IìþC¼c‡x\àG€xààxààxxàxàÞÚxYc ¼4g€xà7=žˆˆ6\çÙMKX¢{sz±5ñòî›-Êi½2³›pÚ]<Ý¢$Ë–Œ–YõC$‰ä.—b:ÀÞÔ¹¯®ÔÑ®WQºŸñGnj‡ÏÂøF[¡#œÛàY~ÄJv#ÊÏ­×3vGÄvxz|Œ—×ñé¾ïš8S¶zÞ}Ž7j\&ëß¶á0?<ìÊ æ ñuç²µÒâ oÛ”/Xw;Ô%Âu\.ãpS”?ÖxsxàxàxâÍ+àÝ#À<ðÀ#À<ððÀ<ððÀ<<ðÀ<ðÀ<ðÀ#¾‹÷˜5–ÀKsxàxÓ㉈hÃužÝ´„%º7§[/ï¾Ù¢œÖ+3» §ý×ÅÓ-JQ±ÌaÉh™U?ôG’Hîr)¦ìM‘ûêJíÚx¥ûä¦vø,Œo´: ± žåG¬d÷1¢ìðÜz=cwDl‡§7ÀÇxyŸ®aáëð®‰3e«çÝçx£ÖÁe²þmóÃîœ`¾Yw.[+­!Þð¶Mù‚u·C]"\Çå27Eùcm7G€xàxà÷!Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà7?žˆˆ6\µSJ®9Ž8¼›õrþºxbf·ç7ß ƒlu<Ý£$1†ê)¦j­œbšiõuÉÀ2HÊ#I?±£]ϲO[}äÂýe´Kß:ÈÍõ€Ø /oËŸyU§ã:ÂÌŠ¯%½ž+[ÛrmÕ9µó¯ (IÙVúEx×ćeÛež—è ç/“ nÛæÂx†×áèíÑü}ð´¶^éQK×jo[·B½œõްYíÄmð¦ðÀ<ðÀ<ð>Ä›5VÀ»G€xàG€xààxààxxàxàxàG|ï1k,—æ ðÀ<ðæÇцë±vJÉ5LJw³^Î_OìÑìöüæ›áo­Ž§{”$"ÆP=ÅT­•SL3­¾.XIy$é'v´‹ãYöi«ï‘\Ø¡¿Œvé[¹ù¡£[áåmù3¯êt\GxƒYñÕ ¤7Âsek[®­:§và•%)ÛJ¿ïšø°l»ÌóÝ áüñe²ÁmÛ\ÏðÚ"½=š¿žÖVÀ+]"jéZímëV¨—³Þ6«¸ ÞxàxàÞ‡x³Æ x÷ðÀ<ððÀ<<ðÀ<<ðÀ<ðÀ#À<ðÀ#À<ðˆïâ=f%ðÒœxàÞ x""Úp=Ö~ѵçä*Ëâ‰=š-ŸÚ÷xäI²õñt£’DÄ,4‹©Ôví´fÉ@]EÛÖ¡}ÖQVß Ïtx’²lm4xu [B[¡£ž ûáå½õ™7ø7Ä ÝÝÐx8Ü/Hôxù&ñÙ[ ùr¼kâ·e;b{Ž7j_&[ܶþHc-^yœÃÛ®l­ÀžuÕë¡Å+k“KM¸Hs9—ÿe'¼ßÅá·q3¼?µ»ÞßÚÝ®lÁ<ðÀÛoÖXïxàxàG€xàG€xààxxàxxàñ]¼Ç¬±^š3À<ðÀ[ODD®ÇÚ/b8²öœ\eY<±G³åSûžnT’ˆ˜…&b1•Ú®Ö,¨«hÛ:´Ï:Êê{á9OR–­¯tKh+tÔ³a?¼¼·>óÿ†x¡»‡;ã‰/ß$>{K!_ŽwMü¶lGlÏñF­ãËd‹ÛÖé£c¬Å+sxÛ•­XÀ³®z=´x%cmr©Ii.çò¿ì„÷»"ü6n†÷§v7Ãû[»Û•-xàx[ãÍ+àÝ#À<ðÀ#À<ððÀ<ððÀ<<ðÀ<ðÀ<ðÀ#¾‹÷˜5–ÀKsxàx ቈhÃzšOßrãÃ"áÛã‰=ÜþÌñø¼;ežîZ’ˆŒÇËi&¥Ûçï"Ún‡jGÒuwƳìË›·=»N{ç&†îáÐì¿}æiÚ¶š0­MÄ ÝÝИ¬÷Àsi—+ò ^7T¯–ïá]ï–mÁ Ïñ‡î›yá¶uçû‘Moï²µj;ÀÓKØQÔñ¥&íŽh‡Ö…·Åû—xàxàÞ‡x³Æ x÷ðÀ<ððÀ<<ðÀ<<ðÀ<ðÀ#À<ðÀ#À<ðˆïâ=f%ðÒœxàÞBx""Ú°žæÓ·Üø°Èpèöxb·ÿs<þïN™§»–$"ãñršIéöÄù»ˆ¶Û¡Ú‘tÝñ,ûòæmÏ®ÓÞ¹‰¡{84ûoŸyšv…­&LkñBw74&ë=ð\ÚåŠ<ƒ× Õ«å{x×Ä»e[ðBçs¼Ã¡ûf^¸mÝù~dSÆŸÃÛ»l­Úðôvu|©I»#Ú¡uámñþe€xàxà÷!Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà·žˆˆ6\µë0÷á_ŽÆºý»ðŠF³áv×xñ'É–Ç+&"bb¤’úaïêWËÀ2JÊà Õ[+<£ÒV×#Í;÷Õånív“CG=vÃÓtÒs¬î¿ùl"^èn›ãaO¼R;ßÂË×çþ$ã]o”mÈ“Fë Þ¨ux™ìpÛ6úÁæ_Œ0ŸàmV¶V^#¼¤°/[nWhŠ[o[‰7EùCmƒ÷»ü>À¼/àým€xà7Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà·žˆˆ6\µë0÷á_ŽÆºý»ðŠF³áv×xñ'É–Ç+&"bb¤’úaïêWËÀ2JÊà Õ[+<£ÒV×#Í;÷Õånív“CG=vÃÓtÒs¬î¿ùl"^èn›ãaO¼R;ßÂË×çþ$ã]o”mÈ“Fë Þ¨ux™ìpÛ6úÁæ_Œ0ŸàmV¶V^#¼¤°/[nWhŠ[o[‰7EùCmƒ÷»ü>À¼/àým€xà7Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà7=žˆˆ6º®£”ü€áøÚó|­•ñÄÍf_íØ½?C¶8žnQ’ˆ˜‚ÏÀúQÄ 9hE´]f澺bG»6ž§°:î_èËò/àÙ÷Á€Úçÿƒ½ðÊ®|®Õ!þç ^;mðجl#ž¦K®½'xAb©¶@IÊz\ŠwMœ)[»œÚO®c¼Ã$Ý$óÂmëó®ÖôäêñžŒß¼l­´bÊ…k¶~„Ìsq¼¿7$ßÍÜ;à}=Âoã~xgw?¼?´»cÙ‚xà·/Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà7=žˆˆ6º®£”ü€áøÚó|­•ñÄÍf_íØ½?C¶8žnQ’ˆ˜‚ÏÀúQÄ 9hE´]f澺bG»6ž§°:î_èËò/àÙ÷Á€Úçÿƒ½ðÊ®|®Õ!þç ^;mðجl#ž¦K®½'xAb©¶@IÊz\ŠwMœ)[»œÚO®c¼Ã$Ý$óÂmëó®ÖôäêñžŒß¼l­´bÊ…k¶~„Ìsq¼¿7$ßÍÜ;à}=Âoã~xgw?¼?´»cÙ‚xà·/Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà77žˆˆ6š®òݵBÂJÝ›S‹,ˆ—·ÝïRÞÆ++àí—yº7I"bÛ·>‘î‘ßZžéÄÜvÔ͛ҡ}ÖQÿ«Õñ,y¤pè´–¤ U¿»> ãm…wPì€W¶ãϼN ³ã…ÚMjJz<—„–-µÕ|秺¹×â]/ËÖ]M[¥gðF­Áe²ømëOñã}”m¸¤_ãíP¶VS1å´ªÊ=Ú\™V‹ñv¨+µotS”¿ÙÚxÓxàxàxâÍ+àÝ#À<ðÀ#À<ððÀ<ððÀ<<ðÀ<ðÀ<ðÀ#¾‹÷˜5–ÀKsxàxs㉈h£é*ß]ë $¬Ô½9µÈ‚xyÛý.åm¼²ÒÞ~™§{“$"¶}ëéù­å™NÌmGݼ)Úgõ¿ZÏ’Gj‡NkIÊPõ»à³0¾ÑVèpÅxe;þÌë:ë1^¨ýѤ¦¤·ÁsIhÙR[Í÷×x~ª›{-Þ5ñ²lÝ…ÑÙ´UzoÔ\&‹ß¶þ?Þ÷AÙ†Kú5Þek5SN«ªÜ£Í•iµo‡ºRûFñ7Eù›­7M€xàxà÷!Þ¬±Þ=<ðÀ<<ðÀ<ðÀ<ðÀ#À<ððÀ<ððÀ<â»xYc ¼4g€xà· žˆˆ6š®òݵºY¡óÉ„-ñÄÍÎå©E™u€wÌÓýJ#±>÷0ß6'õ{«ô975E˲;â™Nj:C«¸ö†7Ú îPدlÑçW«â3Ï‹OˆÉº=žKÂQ=Ák'Hwû\ŠwM¼Q¶îÂèʶ¹J:¼Qëée²ÍmëOöÑI×0vµy„·kÙZÅ”ÓJ+mn…ËÄf•š4Ý<Á×yùûì‡÷<ðÀ<ðÀ¼ñfðîàxààxxàxxàxàG€xàG€xàßÅ{ÌKà¥9<ðÀ¼UðDD´Ñt•ï®ÕÍ O&l‰'öhv.O-ʬ¼{džîW’ˆ‰õ‰¸‡ù¶9©ßÃX¥Ï¹©)Z–ÝÏt PÓZµÀµ7¼ÑVèp‡Â®xe‹>¿ZŸy^üxBLÖíñ\Ž2è ^;AºÛçR¼kâ²uFW¶ÍUÒáZO/“mn[²Nº†±«Í#¼]ËÖê,¦œVZ¹hs+\&6«Ô¤éæ ¾ÎËßg?¼àxàxà}ˆ7k¬€w<ðÀ<ðÀ#À<ðÀ#À<ððÀ<<ðÀ<<ðÀø.ÞcÖX/ÍàxàÍŠ'"¢Úa}'BRŒ®P{ŽW_ Oìá÷sZîhlYõõÐ…ñ,Û’ˆ´’$¥œA¢yiÏúaóÂ8—b®»Œ×t‹é¤%ñ Í匸ÞÜ,ÿâÇh\]¾n­ÐQuñl þÙÉ6'ÝhÄ{9£LÙ /Ÿü1?jßûxenIÊRÈWà]gʶÛýÙ<:ƵBš/{ÛvÆóóí¸¯¬toÕ²µ::ÂÓÛ´+[wÇÛ6T{Ó]oçp¸d_ o²<ðVÃ{€÷xØ÷xØ­7k¬€w<ðÀ<ðÀ#À<ðÀ#À<ððÀ<<ðÀ<<ðÀø.ÞcÖX/ÍàxàÍŠ'"¢Úa}'BRŒ®P{ŽW_ Oìá÷sZîhlYõõÐ…ñ,Û’ˆ´’$¥œA¢yiÏúaóÂ8—b®»Œ×t‹é¤%ñ Í匸ÞÜ,ÿâÇh\]¾n­ÐQuñl þÙÉ6'ÝhÄ{9£LÙ /Ÿü1?jßûxenIÊRÈWà]gʶÛýÙ<:ƵBšÿ-ÞE1ºm» ãùùvÜWV:‡w]æ]Œ§ut„§·iW¶î"Ž·m¨ö¦»ÞÎá$pɾÞdxà­†÷ï;ð>°ï;ð>°[oÖø„G4¡š@®IEND®B`‚libofx-0.9.4/doc/html/globals_type.html0000644000175000017500000000767611553133251015032 00000000000000 LibOFX: Globals
 
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2getopt1_8c_source.html0000644000175000017500000004421111553133250020343 00000000000000 LibOFX: getopt1.c Source File

getopt1.c

00001 /* getopt_long and getopt_long_only entry points for GNU getopt.
00002    Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
00003      Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include "getopt.h"
00026 
00027 #if !defined __STDC__ || !__STDC__
00028 /* This is a separate conditional since some stdc systems
00029    reject `defined (const)'.  */
00030 #ifndef const
00031 #define const
00032 #endif
00033 #endif
00034 
00035 #include <stdio.h>
00036 
00037 /* Comment out all this code if we are using the GNU C Library, and are not
00038    actually compiling the library itself.  This code is part of the GNU C
00039    Library, but also included in many other GNU distributions.  Compiling
00040    and linking in this code is a waste when using the GNU C library
00041    (especially if it is a shared library).  Rather than having every GNU
00042    program understand `configure --with-gnu-libc' and omit the object files,
00043    it is simpler to just do this in the source for each such file.  */
00044 
00045 #define GETOPT_INTERFACE_VERSION 2
00046 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
00047 #include <gnu-versions.h>
00048 #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
00049 #define ELIDE_CODE
00050 #endif
00051 #endif
00052 
00053 #ifndef ELIDE_CODE
00054 
00055 
00056 /* This needs to come after some library #include
00057    to get __GNU_LIBRARY__ defined.  */
00058 #ifdef __GNU_LIBRARY__
00059 #include <stdlib.h>
00060 #endif
00061 
00062 #ifndef NULL
00063 #define NULL 0
00064 #endif
00065 
00066 int
00067 getopt_long (argc, argv, options, long_options, opt_index)
00068      int argc;
00069      char *const *argv;
00070      const char *options;
00071      const struct option *long_options;
00072      int *opt_index;
00073 {
00074   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
00075 }
00076 
00077 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
00078    If an option that starts with '-' (not '--') doesn't match a long option,
00079    but does match a short option, it is parsed as a short option
00080    instead.  */
00081 
00082 int
00083 getopt_long_only (argc, argv, options, long_options, opt_index)
00084      int argc;
00085      char *const *argv;
00086      const char *options;
00087      const struct option *long_options;
00088      int *opt_index;
00089 {
00090   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
00091 }
00092 
00093 
00094 #endif  /* Not ELIDE_CODE.  */
00095 
00096 #ifdef TEST
00097 
00098 #include <stdio.h>
00099 
00100 int
00101 main (argc, argv)
00102      int argc;
00103      char **argv;
00104 {
00105   int c;
00106   int digit_optind = 0;
00107 
00108   while (1)
00109     {
00110       int this_option_optind = optind ? optind : 1;
00111       int option_index = 0;
00112       static struct option long_options[] =
00113       {
00114         {"add", 1, 0, 0},
00115         {"append", 0, 0, 0},
00116         {"delete", 1, 0, 0},
00117         {"verbose", 0, 0, 0},
00118         {"create", 0, 0, 0},
00119         {"file", 1, 0, 0},
00120         {0, 0, 0, 0}
00121       };
00122 
00123       c = getopt_long (argc, argv, "abc:d:0123456789",
00124                        long_options, &option_index);
00125       if (c == -1)
00126         break;
00127 
00128       switch (c)
00129         {
00130         case 0:
00131           printf ("option %s", long_options[option_index].name);
00132           if (optarg)
00133             printf (" with arg %s", optarg);
00134           printf ("\n");
00135           break;
00136 
00137         case '0':
00138         case '1':
00139         case '2':
00140         case '3':
00141         case '4':
00142         case '5':
00143         case '6':
00144         case '7':
00145         case '8':
00146         case '9':
00147           if (digit_optind != 0 && digit_optind != this_option_optind)
00148             printf ("digits occur in two different argv-elements.\n");
00149           digit_optind = this_option_optind;
00150           printf ("option %c\n", c);
00151           break;
00152 
00153         case 'a':
00154           printf ("option a\n");
00155           break;
00156 
00157         case 'b':
00158           printf ("option b\n");
00159           break;
00160 
00161         case 'c':
00162           printf ("option c with value `%s'\n", optarg);
00163           break;
00164 
00165         case 'd':
00166           printf ("option d with value `%s'\n", optarg);
00167           break;
00168 
00169         case '?':
00170           break;
00171 
00172         default:
00173           printf ("?? getopt returned character code 0%o ??\n", c);
00174         }
00175     }
00176 
00177   if (optind < argc)
00178     {
00179       printf ("non-option ARGV-elements: ");
00180       while (optind < argc)
00181         printf ("%s ", argv[optind++]);
00182       printf ("\n");
00183     }
00184 
00185   exit (0);
00186 }
00187 
00188 #endif /* TEST */
libofx-0.9.4/doc/html/ofx__error__msg_8hh_source.html0000644000175000017500000007241711553133250017640 00000000000000 LibOFX: ofx_error_msg.hh Source File

ofx_error_msg.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_data_struct.h  -  description
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFX_DATA_STRUCT_H
00020 #define OFX_DATA_STRUCT_H
00021 
00023 struct ErrorMsg
00024 {
00025   int code;           
00026   const char * name;        
00027   const char * description; 
00028 };
00029 
00031 
00034 const ErrorMsg error_msgs_list[] =
00035 {
00036   {0, "Success", "The server successfully processed the request."},
00037   {1, "Client is up-to-date", "Based on the client timestamp, the client has the latest information. The response does not supply any additional information."},
00038   {2000, "General error", "Error other than those specified by the remaining error codes. (Note: Servers should provide a more specific error whenever possible. Error code 2000 should be reserved for cases in which a more specific code is not available.)"},
00039   {2001, "Invalid account", ""},
00040   {2002, "General account error", "Account error not specified by the remaining error codes."},
00041   {2003, "Account not found", "The specified account number does not correspond to one of the user's accounts."},
00042   {2004, "Account closed", "The specified account number corresponds to an account that has been closed."},
00043   {2005, "Account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00044   {2006, "Source account not found", "The specified account number does not correspond to one of the user's accounts."},
00045   {2007, "Source account closed", "The specified account number corresponds to an account that has been closed."},
00046   {2008, "Source account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00047   {2009, "Destination account not found", "The specified account number does not correspond to one of the user's accounts."},
00048   {2010, "Destination account closed", "The specified account number corresponds to an account that has been closed."},
00049   {2011, "Destination account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
00050   {2012, "Invalid amount", "The specified amount is not valid for this action; for example, the user specified a negative payment amount."},
00051   {2014, "Date too soon", "The server cannot process the requested action by the date specified by the user."},
00052   {2015, "Date too far in future", "The server cannot accept requests for an action that far in the future."},
00053   {2016, "Transaction already committed", "Transaction has entered the processing loop and cannot be modified/cancelled using OFX. The transaction may still be cancelled or modified using other means (for example, a phone call to Customer Service)."},
00054   {2017, "Already canceled", "The transaction cannot be canceled or modified because it has already been canceled."},
00055   {2018, "Unknown server ID", "The specified server ID does not exist or no longer exists."},
00056   {2019, "Duplicate request", "A request with this <TRNUID> has already been received and processed."},
00057   {2020, "Invalid date", "The specified datetime stamp cannot be parsed; for instance, the datetime stamp specifies 25:00 hours."},
00058   {2021, "Unsupported version", "The server does not support the requested version. The version of the message set specified by the client is not supported by this server."},
00059   {2022, "Invalid TAN", "The server was unable to validate the TAN sent in the request."},
00060   {2023, "Unknown FITID", "The specified FITID/BILLID does not exist or no longer exists. [BILLID not found in the billing message sets]"},
00061   {2025, "Branch ID missing", "A <BRANCHID> value must be provided in the <BANKACCTFROM> aggregate for this country system, but this field is missing."},
00062   {2026, "Bank name doesn't match bank ID", "The value of <BANKNAME> in the <EXTBANKACCTTO> aggregate is inconsistent with the value of <BANKID> in the <BANKACCTTO> aggregate."},
00063   {2027, "Invalid date range", "Response for non-overlapping dates, date ranges in the future, et cetera."},
00064   {2028, "Requested element unknown", "One or more elements of the request were not recognized by the server or the server (as noted in the FI Profile) does not support the elements. The server executed the element transactions it understood and supported. For example, the request file included private tags in a <PMTRQ> but the server was able to execute the rest of the request."},
00065   {6500, "<REJECTIFMISSING>Y invalid without <TOKEN>", "This error code may appear <SYNCERROR> element of an <xxxSYNCRS> wrapper (in <PRESDLVMSGSRSV1> and V2 message set responses) or the <CODE> contained in any embedded transaction wrappers within a sync response. The corresponding sync request wrapper included <REJECTIFMISSING>Y with <REFRESH>Y or <TOKENONLY>Y, which is illegal."},
00066   {6501, "Embedded transactions in request failed to process: Out of date", "<REJECTIFMISSING>Y and embedded transactions appeared in the request sync wrapper and the provided <TOKEN> was out of date. This code should be used in the <SYNCERROR> of the response sync wrapper."},
00067   {6502, "Unable to process embedded transaction due to out-of-date <TOKEN>", "Used in response transaction wrapper for embedded transactions when <SYNCERROR>6501 appears in the surrounding sync wrapper."},
00068   {10000, "Stop check in process", "Stop check is already in process."},
00069   {10500, "Too many checks to process", "The stop-payment request <STPCHKRQ> specifies too many checks."},
00070   {10501, "Invalid payee", "Payee error not specified by the remainingerror codes."},
00071   {10502, "Invalid payee address", "Some portion of the payee's address is incorrect or unknown."},
00072   {10503, "Invalid payee account number", "The account number <PAYACCT> of the requested payee is invalid."},
00073   {10504, "Insufficient funds", "The server cannot process the request because the specified account does not have enough funds."},
00074   {10505, "Cannot modify element", "The server does not allow modifications to one or more values in a modification request."},
00075   {10506, "Cannot modify source account", "Reserved for future use."},
00076   {10507, "Cannot modify destination account", "Reserved for future use."},
00077   {10508, "Invalid frequency", "The specified frequency <FREQ> does not match one of the accepted frequencies for recurring transactions."},
00078   {10509, "Model already canceled", "The server has already canceled the specified recurring model."},
00079   {10510, "Invalid payee ID", "The specified payee ID does not exist or no longer exists."},
00080   {10511, "Invalid payee city", "The specified city is incorrect or unknown."},
00081   {10512, "Invalid payee state", "The specified state is incorrect or unknown."},
00082   {10513, "Invalid payee postal code", "The specified postal code is incorrect or unknown."},
00083   {10514, "Transaction already processed", "Transaction has already been sent or date due is past"},
00084   {10515, "Payee not modifiable by client", "The server does not allow clients to change payee information."},
00085   {10516, "Wire beneficiary invalid", "The specified wire beneficiary does not exist or no longer exists."},
00086   {10517, "Invalid payee name", "The server does not recognize the specified payee name."},
00087   {10518, "Unknown model ID", "The specified model ID does not exist or no longer exists."},
00088   {10519, "Invalid payee list ID", "The specified payee list ID does not exist or no longer exists."},
00089   {10600, "Table type not found", "The specified table type is not recognized or does not exist."},
00090   {12250, "Investment transaction download not supported (WARN)", "The server does not support investment transaction download."},
00091   {12251, "Investment position download not supported (WARN)", "The server does not support investment position download."},
00092   {12252, "Investment positions for specified date not available", "The server does not support investment positions for the specified date."},
00093   {12253, "Investment open order download not supported (WARN)", "The server does not support open order download."},
00094   {12254, "Investment balances download not supported (WARN)", "The server does not support investment balances download."},
00095   {12255, "401(k) not available for this account", "401(k) information requested from a non-401(k) account."},
00096   {12500, "One or more securities not found", "The server could not find the requested securities."},
00097   {13000, "User ID & password will be sent out-of-band (INFO)", "The server will send the user ID and password via postal mail, e-mail, or another means. The accompanying message will provide details."},
00098   {13500, "Unable to enroll user", "The server could not enroll the user."},
00099   {13501, "User already enrolled", "The server has already enrolled the user."},
00100   {13502, "Invalid service", "The server does not support the service <SVC> specified in the service-activation request."},
00101   {13503, "Cannot change user information", "The server does not support the <CHGUSERINFORQ> request."},
00102   {13504, "<FI> Missing or Invalid in <SONRQ>", "The FI requires the client to provide the <FI> aggregate in the <SONRQ> request, but either none was provided, or the one provided was invalid."},
00103   {14500, "1099 forms not available", "1099 forms are not yet available for the tax year requested."},
00104   {14501, "1099 forms not available for user ID", "This user does not have any 1099 forms available."},
00105   {14600, "W2 forms not available", "W2 forms are not yet available for the tax year requested."},
00106   {14601, "W2 forms not available for user ID", "The user does not have any W2 forms available."},
00107   {14700, "1098 forms not available", "1098 forms are not yet available for the tax year requested."},
00108   {14701, "1098 forms not available for user ID", "The user does not have any 1098 forms available."},
00109   {15000, "Must change USERPASS", "The user must change his or her <USERPASS> number as part of the next OFX request."},
00110   {15500, "Signon invalid", "The user cannot signon because he or she entered an invalid user ID or password."},
00111   {15501, "Customer account already in use", "The server allows only one connection at a time, and another user is already signed on. Please try again later."},
00112   {15502, "USERPASS lockout", "The server has received too many failed signon attempts for this user. Please call the FI's technical support number."},
00113   {15503, "Could not change USERPASS", "The server does not support the <PINCHRQ> request."},
00114   {15504, "Could not provide random data", "The server could not generate random data as requested by the <CHALLENGERQ>."},
00115   {15505, "Country system not supported", "The server does not support the country specified in the <COUNTRY> field of the <SONRQ> aggregate."},
00116   {15506, "Empty signon not supported", "The server does not support signons not accompanied by some other transaction."},
00117   {15507, "Signon invalid without supporting pin change request", "The OFX block associated with the signon does not contain a pin change request and should."},
00118   {15508, "Transaction not authorized", "Current user is not authorized to perform this action on behalf of the <USERID>."},
00119   {16500, "HTML not allowed", "The server does not accept HTML formatting in the request."},
00120   {16501, "Unknown mail To:", "The server was unable to send mail to the specified Internet address."},
00121   {16502, "Invalid URL", "The server could not parse the URL."},
00122   {16503, "Unable to get URL", "The server was unable to retrieve the information at this URL (e.g., an HTTP 400 or 500 series error)."},
00123   { -1, "Unknown code", "The description of this code is unknown to libOfx"}
00124 };
00125 
00127 
00130 const ErrorMsg find_error_msg(int param_code)
00131 {
00132   ErrorMsg return_val;
00133   int i;
00134   bool code_found = false;
00135 
00136   for (i = 0; i < 2000 && (code_found == false); i++)
00137   {
00138     if ((error_msgs_list[i].code == param_code) || (error_msgs_list[i].code == -1))
00139     {
00140       return_val = error_msgs_list[i];
00141       code_found = true;
00142     }
00143   }
00144   return return_val;
00145 };
00146 
00147 #endif
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2context_8cpp_source.html0000644000175000017500000004460411553133250021012 00000000000000 LibOFX: context.cpp Source File

context.cpp

00001 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 #include <config.h>
00014 #include "context.hh"
00015 
00016 using namespace std;
00017 
00018 
00019 
00020 LibofxContext::LibofxContext()
00021   : _current_file_type(OFX)
00022   , _statusCallback(0)
00023   , _accountCallback(0)
00024   , _securityCallback(0)
00025   , _transactionCallback(0)
00026   , _statementCallback(0)
00027   , _statementData(0)
00028   , _accountData(0)
00029   , _transactionData(0)
00030   , _securityData(0)
00031   , _statusData(0)
00032 {
00033 
00034 }
00035 
00036 
00037 
00038 LibofxContext::~LibofxContext()
00039 {
00040 }
00041 
00042 
00043 
00044 LibofxFileFormat LibofxContext::currentFileType() const
00045 {
00046   return _current_file_type;
00047 }
00048 
00049 
00050 
00051 void LibofxContext::setCurrentFileType(LibofxFileFormat t)
00052 {
00053   _current_file_type = t;
00054 }
00055 
00056 
00057 
00058 int LibofxContext::statementCallback(const struct OfxStatementData data)
00059 {
00060   if (_statementCallback)
00061     return _statementCallback(data, _statementData);
00062   return 0;
00063 }
00064 
00065 
00066 
00067 int LibofxContext::accountCallback(const struct OfxAccountData data)
00068 {
00069   if (_accountCallback)
00070     return _accountCallback(data, _accountData);
00071   return 0;
00072 }
00073 
00074 
00075 
00076 int LibofxContext::transactionCallback(const struct OfxTransactionData data)
00077 {
00078   if (_transactionCallback)
00079     return _transactionCallback(data, _transactionData);
00080   return 0;
00081 }
00082 
00083 
00084 
00085 int LibofxContext::securityCallback(const struct OfxSecurityData data)
00086 {
00087   if (_securityCallback)
00088     return _securityCallback(data, _securityData);
00089   return 0;
00090 }
00091 
00092 
00093 
00094 int LibofxContext::statusCallback(const struct OfxStatusData data)
00095 {
00096   if (_statusCallback)
00097     return _statusCallback(data, _statusData);
00098   return 0;
00099 }
00100 
00101 
00102 void LibofxContext::setStatusCallback(LibofxProcStatusCallback cb,
00103                                       void *user_data)
00104 {
00105   _statusCallback = cb;
00106   _statusData = user_data;
00107 }
00108 
00109 
00110 
00111 void LibofxContext::setAccountCallback(LibofxProcAccountCallback cb,
00112                                        void *user_data)
00113 {
00114   _accountCallback = cb;
00115   _accountData = user_data;
00116 }
00117 
00118 
00119 
00120 void LibofxContext::setSecurityCallback(LibofxProcSecurityCallback cb,
00121                                         void *user_data)
00122 {
00123   _securityCallback = cb;
00124   _securityData = user_data;
00125 }
00126 
00127 
00128 
00129 void LibofxContext::setTransactionCallback(LibofxProcTransactionCallback cb,
00130     void *user_data)
00131 {
00132   _transactionCallback = cb;
00133   _transactionData = user_data;
00134 }
00135 
00136 
00137 
00138 void LibofxContext::setStatementCallback(LibofxProcStatementCallback cb,
00139     void *user_data)
00140 {
00141   _statementCallback = cb;
00142   _statementData = user_data;
00143 }
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00153 LibofxContextPtr libofx_get_new_context()
00154 {
00155   return new LibofxContext();
00156 }
00157 
00158 int libofx_free_context( LibofxContextPtr libofx_context_param)
00159 {
00160   delete (LibofxContext *)libofx_context_param;
00161   return 0;
00162 }
00163 
00164 
00165 
00166 void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
00167                         const char *s)
00168 {
00169   ((LibofxContext*)libofx_context)->setDtdDir(s);
00170 }
00171 
00172 
00173 
00174 
00175 
00176 
00177 extern "C" {
00178   void ofx_set_status_cb(LibofxContextPtr ctx,
00179                          LibofxProcStatusCallback cb,
00180                          void *user_data)
00181   {
00182     ((LibofxContext*)ctx)->setStatusCallback(cb, user_data);
00183   }
00184 
00185 
00186   void ofx_set_account_cb(LibofxContextPtr ctx,
00187                           LibofxProcAccountCallback cb,
00188                           void *user_data)
00189   {
00190     ((LibofxContext*)ctx)->setAccountCallback(cb, user_data);
00191   }
00192 
00193 
00194 
00195   void ofx_set_security_cb(LibofxContextPtr ctx,
00196                            LibofxProcSecurityCallback cb,
00197                            void *user_data)
00198   {
00199     ((LibofxContext*)ctx)->setSecurityCallback(cb, user_data);
00200   }
00201 
00202 
00203 
00204   void ofx_set_transaction_cb(LibofxContextPtr ctx,
00205                               LibofxProcTransactionCallback cb,
00206                               void *user_data)
00207   {
00208     ((LibofxContext*)ctx)->setTransactionCallback(cb, user_data);
00209   }
00210 
00211 
00212 
00213   void ofx_set_statement_cb(LibofxContextPtr ctx,
00214                             LibofxProcStatementCallback cb,
00215                             void *user_data)
00216   {
00217     ((LibofxContext*)ctx)->setStatementCallback(cb, user_data);
00218   }
00219 
00220 
00221 
00222 
00223 }
00224 
00225 
00226 
00227 
00228 
00229 
00230 
00231 
00232 
00233 
libofx-0.9.4/doc/html/functions_0x63.html0000644000175000017500000001447311553133250015126 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- c -

libofx-0.9.4/doc/html/classOfxStatementContainer.html0000644000175000017500000004320611553133250017644 00000000000000 LibOFX: OfxStatementContainer Class Reference

OfxStatementContainer Class Reference

Represents a statement for either a bank account or a credit card account. More...

Inheritance diagram for OfxStatementContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxStatementContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int add_to_main_tree ()
 Add this container to the main tree.
virtual int gen_event ()
 Generate libofx.h events.
void add_account (OfxAccountData *account_data)
void add_balance (OfxBalanceContainer *ptr_balance_container)
 OfxStatementContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
virtual int add_to_main_tree ()
 Add this container to the main tree.
virtual int gen_event ()
 Generate libofx.h events.
void add_account (OfxAccountData *account_data)
void add_balance (OfxBalanceContainer *ptr_balance_container)

Data Fields

OfxStatementData data

Detailed Description

Represents a statement for either a bank account or a credit card account.

Can be built from either a <STMTRS> or a <CCSTMTRS> OFX SGML entity

Definition at line 134 of file ofx_containers.hh.


Member Function Documentation

void OfxStatementContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 50 of file ofx_container_statement.cpp.

void OfxStatementContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

int OfxStatementContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 97 of file ofx_container_statement.cpp.

virtual int OfxStatementContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

int OfxStatementContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 109 of file ofx_container_statement.cpp.

virtual int OfxStatementContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__utilities_8cpp.html0000644000175000017500000003651311553133250016315 00000000000000 LibOFX: ofx_utilities.cpp File Reference

ofx_utilities.cpp File Reference

Various simple functions for type conversion & al. More...

Go to the source code of this file.

Defines

#define DIRSEP   "/"

Functions

string CharStringtostring (const SGMLApplication::CharString source, string &dest)
 Convert OpenSP CharString to a C++ STL string.
string AppendCharStringtostring (const SGMLApplication::CharString source, string &dest)
 Append an OpenSP CharString to an existing C++ STL string.
time_t ofxdate_to_time_t (const string ofxdate)
 Convert a C++ string containing a time in OFX format to a C time_t.
double ofxamount_to_double (const string ofxamount)
 Convert OFX amount of money to double float.
string strip_whitespace (const string para_string)
 Sanitize a string coming from OpenSP.
std::string get_tmp_dir ()
int mkTempFileName (const char *tmpl, char *buffer, unsigned int size)

Detailed Description

Various simple functions for type conversion & al.

Definition in file ofx_utilities.cpp.


Function Documentation

string CharStringtostring ( const SGMLApplication::CharString  source,
string &  dest 
)

Convert OpenSP CharString to a C++ STL string.

Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging.

Definition at line 70 of file ofx_utilities.cpp.

Referenced by OFXApplication::endElement(), OFCApplication::endElement(), OFXApplication::error(), OFCApplication::error(), OFXApplication::startElement(), and OFCApplication::startElement().

double ofxamount_to_double ( const string  ofxamount)

Convert OFX amount of money to double float.

Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float.

Note:
The ofx number format is the following: "." or "," as decimal separator, NO thousands separator.

Definition at line 204 of file ofx_utilities.cpp.

Referenced by OfxBalanceContainer::add_attribute(), OfxInvestmentTransactionContainer::add_attribute(), OfxBankTransactionContainer::add_attribute(), and OfxSecurityContainer::add_attribute().

time_t ofxdate_to_time_t ( const string  ofxdate)

Convert a C++ string containing a time in OFX format to a C time_t.

Converts a date from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format (see OFX 2.01 spec p.66) to a C time_t.

Parameters:
ofxdatedate from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format
Returns:
C time_t in the local time zone
Note:
  • The library always returns the time in the systems local time
  • OFX defines the date up to the millisecond. The library ignores those milliseconds, since ANSI C does not handle such precision cleanly. The date provided by LibOFX is precise to the second, assuming that information this precise was provided in the ofx file. So you wont know the millisecond you were ruined...
DEVIATION FROM THE SPECS : The OFX specifications (both version 1.6 and 2.02) state that a client should assume that if the server returns a date without � specific time, we assume it means 0h00 GMT. As such, when we apply the local timezone and for example you are in the EST timezone, we will remove 5h, and the transaction will have occurred on the prior day! This is probably not what the bank intended (and will lead to systematic errors), but the spec is quite explicit in this respect (Ref: OFX 2.01 spec pp. 66-68)

To solve this problem (since usually a time error is relatively unimportant, but date error is), and to avoid problems in Australia caused by the behaviour in libofx up to 0.6.4, it was decided starting with 0.6.5 to use the following behavior:

-No specific time is given in the file (date only): Considering that most banks seem to be sending dates in this format represented as local time (not compliant with the specs), the transaction is assumed to have occurred 11h59 (just before noon) LOCAL TIME. This way, we should never change the date, since you'd have to travel in a timezone at least 11 hours backwards or 13 hours forward from your own to introduce mistakes. However, if you are in timezone +13 or +14, and your bank meant the data to be interpreted by the spec, you will get the wrong date. We hope that banks in those timezone will either represent in local time like most, or specify the timezone properly.

-No timezone is specified, but exact time is, the same behavior is mostly used, as many banks just append zeros instead of using the short notation. However, the time specified is used, even if 0 (midnight).

-When a timezone is specified, it is always used to properly convert in local time, following the spec.

Definition at line 108 of file ofx_utilities.cpp.

Referenced by OfxBalanceContainer::add_attribute(), OfxInvestmentTransactionContainer::add_attribute(), OfxTransactionContainer::add_attribute(), OfxStatementContainer::add_attribute(), and OfxSecurityContainer::add_attribute().

string strip_whitespace ( const string  para_string)

Sanitize a string coming from OpenSP.

Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching.

Definition at line 227 of file ofx_utilities.cpp.

Referenced by OFXApplication::endElement(), and OFCApplication::endElement().

libofx-0.9.4/doc/html/classOfxAccountContainer.html0000644000175000017500000003740511553133250017300 00000000000000 LibOFX: OfxAccountContainer Class Reference

OfxAccountContainer Class Reference

Represents a bank account or a credit card account. More...

Inheritance diagram for OfxAccountContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxAccountContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
int add_to_main_tree ()
 Add this container to the main tree.
virtual int gen_event ()
 Generate libofx.h events.
 OfxAccountContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
int add_to_main_tree ()
 Add this container to the main tree.
virtual int gen_event ()
 Generate libofx.h events.

Data Fields

OfxAccountData data

Detailed Description

Represents a bank account or a credit card account.

Can be built from either a <BANKACCTFROM> or <CCACCTFROM> OFX SGML entity

Definition at line 157 of file ofx_containers.hh.


Member Function Documentation

void OfxAccountContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 75 of file ofx_container_account.cpp.

void OfxAccountContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

int OfxAccountContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

int OfxAccountContainer::add_to_main_tree ( ) [virtual]

Add this container to the main tree.

add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer.

Returns:
true if successfull, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 147 of file ofx_container_account.cpp.

int OfxAccountContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.

Definition at line 141 of file ofx_container_account.cpp.

virtual int OfxAccountContainer::gen_event ( ) [virtual]

Generate libofx.h events.

gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available.

Returns:
true if a callback function vas called, false otherwise.

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/classtree__node__.html0000644000175000017500000001304411553133251015757 00000000000000 LibOFX: tree_node_< T > Class Template Reference

tree_node_< T > Class Template Reference

A node in the tree, combining links to other nodes as well as the actual data. More...

Data Fields

tree_node_< T > * parent
tree_node_< T > * first_child
tree_node_< T > * last_child
tree_node_< T > * prev_sibling
tree_node_< T > * next_sibling
data

Detailed Description

template<class T>
class tree_node_< T >

A node in the tree, combining links to other nodes as well as the actual data.

Definition at line 95 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/bc_s.png0000644000175000017500000000124511553133250013055 00000000000000‰PNG  IHDR /ð9ÐlIDATxíÝKHTmðÿóžwfÎgæÌ¯å8ŽÓ˜—Š6ñ-BÚ´‘]d–VZMa…D}ßg¸háB¤¶*Ñýbå¥U9Š—3ƒŽFy<£‹ šaæè²í³yøÿÎóžÅóî©ýÁÇåþtðªÚ %”8Vj•LÜlø·ÅCF@mÃÿˆÞ[”ïü À7ªj¿RÀ•ûC0TâU‹Y¸øYÕú’ÿsv~Æî,Ûi)€.w €™ˆæwø\cT i Ðúÿ`¼owgÛö»âH0¤5%À¥ÿ>Äû\.°ÉÒ×*O0¬-c}BàÞûä+msË…VÑÔ5Ö:€Îß}— *l’©Çç–cÁV¸€OÅ^ÅaâìÔXxñ)µÜ0‚ãé²xrKfÚÜxx±Ššo½5Ièk±WaŒÑjºùÆà¶;ÛVá´[¨ñÆ«Í@¥ÃfnöäØ¿°ÍRÕ.‡¨¬®B¥×_C™ˆæK|.¬ý²Ÿ®½0‚3ŠTŸ¥H¡‰½†Ž¶=7‚ ßã´™8k˜œÑ_Ó‘«Ï’Ã2«Èz·:V&fôBv—Ní9iVÎY— Õµ>‰‡.Qx{¾E“³ú»Ê‡˜'‰|dj6ÚØ‡ÚÀãx?åÏsJ‚@uÓ‘hbI„Ò½‡Ö2ì“,¼F¶[bÓ‘h e'«Ïõ@;Û^d•x·‰þ›¶ôg2Fa¿G^ÿ @,é) êlß… §Të’-ãêÜRý†—UÙÜ*È•EΩ64·4lÜÄÙ #èjDßþú Ųo{”N IEND®B`‚libofx-0.9.4/doc/html/ftv2vertline.png0000644000175000017500000000012211553133251014573 00000000000000‰PNG  IHDRɪ|IDATxíÝÁ¡ó§žÆEG–ë›ÂºIEND®B`‚libofx-0.9.4/doc/html/ftv2lastnode.png0000644000175000017500000000012211553133251014554 00000000000000‰PNG  IHDRɪ|IDATxíÝÁ¡ó§žÆEG–ë›ÂºIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__containers__misc_8cpp.html0000644000175000017500000000730011553133250022270 00000000000000 LibOFX: ofx_containers_misc.cpp File Reference

ofx_containers_misc.cpp File Reference

LibOFX internal object code. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

LibOFX internal object code.

These objects will process the elements returned by ofx_sgml.cpp and add them to their data members.

Warning:
Object documentation is not yet done.

Definition in file fx-0.9.4/lib/ofx_containers_misc.cpp.

libofx-0.9.4/doc/html/ofxconnect_2cmdline_8h_source.html0000644000175000017500000011105011553133250020225 00000000000000 LibOFX: cmdline.h Source File

cmdline.h

00001 
00008 #ifndef CMDLINE_H
00009 #define CMDLINE_H
00010 
00011 /* If we use autoconf.  */
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include <stdio.h> /* for FILE */
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif /* __cplusplus */
00021 
00022 #ifndef CMDLINE_PARSER_PACKAGE
00023 
00024 #define CMDLINE_PARSER_PACKAGE PACKAGE
00025 #endif
00026 
00027 #ifndef CMDLINE_PARSER_PACKAGE_NAME
00028 
00029 #ifdef PACKAGE_NAME
00030 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME
00031 #else
00032 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE
00033 #endif
00034 #endif
00035 
00036 #ifndef CMDLINE_PARSER_VERSION
00037 
00038 #define CMDLINE_PARSER_VERSION VERSION
00039 #endif
00040 
00042 struct gengetopt_args_info
00043 {
00044   const char *help_help; 
00045   const char *version_help; 
00046   char * fipid_arg;     
00047   char * fipid_orig;    
00048   const char *fipid_help; 
00049   char * fid_arg;       
00050   char * fid_orig;      
00051   const char *fid_help; 
00052   char * org_arg;       
00053   char * org_orig;      
00054   const char *org_help; 
00055   char * bank_arg;      
00056   char * bank_orig;     
00057   const char *bank_help; 
00058   char * broker_arg;    
00059   char * broker_orig;   
00060   const char *broker_help; 
00061   char * user_arg;      
00062   char * user_orig;     
00063   const char *user_help; 
00064   char * pass_arg;      
00065   char * pass_orig;     
00066   const char *pass_help; 
00067   char * acct_arg;      
00068   char * acct_orig;     
00069   const char *acct_help; 
00070   int type_arg; 
00071   char * type_orig;     
00072   const char *type_help; 
00073   long past_arg;        
00074   char * past_orig;     
00075   const char *past_help; 
00076   char * url_arg;       
00077   char * url_orig;      
00078   const char *url_help; 
00079   int trid_arg; 
00080   char * trid_orig;     
00081   const char *trid_help; 
00082   const char *statement_req_help; 
00083   const char *accountinfo_req_help; 
00084   const char *payment_req_help; 
00085   const char *paymentinquiry_req_help; 
00086   const char *bank_list_help; 
00087   const char *bank_fipid_help; 
00088   const char *bank_services_help; 
00089   const char *allsupport_help; 
00091   unsigned int help_given ;     
00092   unsigned int version_given ;  
00093   unsigned int fipid_given ;    
00094   unsigned int fid_given ;      
00095   unsigned int org_given ;      
00096   unsigned int bank_given ;     
00097   unsigned int broker_given ;   
00098   unsigned int user_given ;     
00099   unsigned int pass_given ;     
00100   unsigned int acct_given ;     
00101   unsigned int type_given ;     
00102   unsigned int past_given ;     
00103   unsigned int url_given ;      
00104   unsigned int trid_given ;     
00105   unsigned int statement_req_given ;    
00106   unsigned int accountinfo_req_given ;  
00107   unsigned int payment_req_given ;      
00108   unsigned int paymentinquiry_req_given ;       
00109   unsigned int bank_list_given ;        
00110   unsigned int bank_fipid_given ;       
00111   unsigned int bank_services_given ;    
00112   unsigned int allsupport_given ;       
00114   char **inputs ; 
00115   unsigned inputs_num ; 
00116   int command_group_counter; 
00117 } ;
00118 
00120 struct cmdline_parser_params
00121 {
00122   int override; 
00123   int initialize; 
00124   int check_required; 
00125   int check_ambiguity; 
00126   int print_errors; 
00127 } ;
00128 
00130 extern const char *gengetopt_args_info_purpose;
00132 extern const char *gengetopt_args_info_usage;
00134 extern const char *gengetopt_args_info_help[];
00135 
00143 int cmdline_parser (int argc, char **argv,
00144   struct gengetopt_args_info *args_info);
00145 
00157 int cmdline_parser2 (int argc, char **argv,
00158   struct gengetopt_args_info *args_info,
00159   int override, int initialize, int check_required);
00160 
00169 int cmdline_parser_ext (int argc, char **argv,
00170   struct gengetopt_args_info *args_info,
00171   struct cmdline_parser_params *params);
00172 
00179 int cmdline_parser_dump(FILE *outfile,
00180   struct gengetopt_args_info *args_info);
00181 
00189 int cmdline_parser_file_save(const char *filename,
00190   struct gengetopt_args_info *args_info);
00191 
00195 void cmdline_parser_print_help(void);
00199 void cmdline_parser_print_version(void);
00200 
00206 void cmdline_parser_params_init(struct cmdline_parser_params *params);
00207 
00213 struct cmdline_parser_params *cmdline_parser_params_create(void);
00214 
00220 void cmdline_parser_init (struct gengetopt_args_info *args_info);
00226 void cmdline_parser_free (struct gengetopt_args_info *args_info);
00227 
00235 int cmdline_parser_required (struct gengetopt_args_info *args_info,
00236   const char *prog_name);
00237 
00238 
00239 #ifdef __cplusplus
00240 }
00241 #endif /* __cplusplus */
00242 #endif /* CMDLINE_H */
libofx-0.9.4/doc/html/classOfxPushUpContainer.png0000644000175000017500000000123511553133250016740 00000000000000‰PNG  IHDRPâ ÂPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2,IDATxíÍ–Ã …CzNßÿ‘g@0$1s2;—EêÒë'âvy°E­„š×šnI5@$@$"!"â†NëØ‘ÙÙÐÙĺ…$Sˆ ùg±Øydu€$U ‹`gZ‰Hâ¹óáÉÖ[‰]d2r&ý¬ˆ‘äªéEÈÙpK'iËáæÐuMÀ}€ $)jBÛ¼B7ÿcc¸߉ègã#H>­æBótZ¸r ‹ÐÕA€{H>£æ2Uýÿ˜¤µÜ’;çj¢/msGÏSU)GΡˆó,ÉU#"ô!7"´à»Ül%Úu[—È\ãÉW2÷FHRÕ¨ˆ<‹dª   ’,$Ì )¥æ×ö~ ÆsVB ì4¼+1)¡H …˜”P$(¯@$@$@$@$@27’ZVꀾ)Ù€H€H€H€H`@$@$@$7 X5$$@$@ò·z´öë><@ýf§ÃDŸ‰î±ÛF/øIè;¶ÛªHt§D$û“m (Úü#s­+Ù¢^¤ãÊ$€[»êæL×äY6‹Ý€¹ŸS á£çúÐvÕuÜŽ=7ÜÃñt*$~›mð’«3 ç¼8îL;#H¢VPØ«¿8¾üÕ;!:A2E–H‚GH~„ìÅwyFÚrw½øÅ!_Wý‹]IÎz ’‰ä;$ <¯§€=´•ï9§ÇZ IEND®B`‚libofx-0.9.4/doc/html/nodeparser_8cpp.html0000644000175000017500000000576411553133250015435 00000000000000 LibOFX: nodeparser.cpp File Reference

nodeparser.cpp File Reference

Implementation of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath. More...

Go to the source code of this file.


Detailed Description

Implementation of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath.

Definition in file nodeparser.cpp.

libofx-0.9.4/doc/html/ofx__utilities_8hh_source.html0000644000175000017500000001763411553133250017515 00000000000000 LibOFX: ofx_utilities.hh Source File

ofx_utilities.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_util.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #ifndef OFX_UTIL_H
00019 #define OFX_UTIL_H
00020 #include <string.h>
00021 #include <time.h>               // for time_t
00022 #include "ParserEventGeneratorKit.h"
00023 using namespace std;
00024 /* This file contains various simple functions for type conversion & al */
00025 
00026 /*wostream &operator<<(wostream &os, SGMLApplication::CharString s); */
00027 
00029 ostream &operator<<(ostream &os, SGMLApplication::CharString s);
00030 
00032 wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest);
00033 
00035 string CharStringtostring(const SGMLApplication::CharString source, string &dest);
00036 
00038 string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest);
00039 
00041 time_t ofxdate_to_time_t(const string ofxdate);
00042 
00044 double ofxamount_to_double(const string ofxamount);
00045 
00047 string strip_whitespace(const string para_string);
00048 
00049 int mkTempFileName(const char *tmpl, char *buffer, unsigned int size);
00050 
00051 #endif
libofx-0.9.4/doc/html/functions_eval.html0000644000175000017500000001053111553133250015344 00000000000000 LibOFX: Data Fields - Enumerator
 
libofx-0.9.4/doc/html/namespaces.html0000644000175000017500000000471011553133251014447 00000000000000 LibOFX: Namespace List

Namespace List

Here is a list of all documented namespaces with brief descriptions:
kp
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__sgml_8cpp.html0000644000175000017500000002273711553133250017726 00000000000000 LibOFX: ofx_sgml.cpp File Reference

ofx_sgml.cpp File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Data Structures

class  OFXApplication
 This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Functions

int ofx_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Variables

OfxMainContainerMainContainer = NULL
SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position

Detailed Description

OFX/SGML parsing functionnality.

Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/

Definition in file fx-0.9.4/lib/ofx_sgml.cpp.


Function Documentation

int ofx_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofx_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 368 of file fx-0.9.4/lib/ofx_sgml.cpp.


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file messages.cpp.

Referenced by OFXApplication::openEntityChange(), and OFCApplication::openEntityChange().

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__statement_8cpp_source.html0000644000175000017500000003773211553133250024552 00000000000000 LibOFX: ofx_container_statement.cpp Source File

ofx_container_statement.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_statement.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                    OfxStatementContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxStatementContainer::OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "STATEMENT";
00041 }
00042 OfxStatementContainer::~OfxStatementContainer()
00043 {
00044   /*  while(transaction_queue.empty()!=true)
00045       {
00046         ofx_proc_transaction_cb(transaction_queue.front());
00047         transaction_queue.pop();
00048       }*/
00049 }
00050 void OfxStatementContainer::add_attribute(const string identifier, const string value)
00051 {
00052   if (identifier == "CURDEF")
00053   {
00054     strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH);
00055     data.currency_valid = true;
00056   }
00057   else if (identifier == "MKTGINFO")
00058   {
00059     strncpy(data.marketing_info, value.c_str(), OFX_MARKETING_INFO_LENGTH);
00060     data.marketing_info_valid = true;
00061   }
00062   else if (identifier == "DTSTART")
00063   {
00064     data.date_start = ofxdate_to_time_t(value);
00065     data.date_start_valid = true;
00066   }
00067   else if (identifier == "DTEND")
00068   {
00069     data.date_end = ofxdate_to_time_t(value);
00070     data.date_end_valid = true;
00071   }
00072   else
00073   {
00074     OfxGenericContainer::add_attribute(identifier, value);
00075   }
00076 }//end OfxStatementContainer::add_attribute()
00077 
00078 void OfxStatementContainer::add_balance(OfxBalanceContainer* ptr_balance_container)
00079 {
00080   if (ptr_balance_container->tag_identifier == "LEDGERBAL")
00081   {
00082     data.ledger_balance = ptr_balance_container->amount;
00083     data.ledger_balance_valid = ptr_balance_container->amount_valid;
00084   }
00085   else if (ptr_balance_container->tag_identifier == "AVAILBAL")
00086   {
00087     data.available_balance = ptr_balance_container->amount;
00088     data.available_balance_valid = ptr_balance_container->amount_valid;
00089   }
00090   else
00091   {
00092     message_out(ERROR, "OfxStatementContainer::add_balance(): the balance has unknown tag_identifier: " + ptr_balance_container->tag_identifier);
00093   }
00094 }
00095 
00096 
00097 int  OfxStatementContainer::add_to_main_tree()
00098 {
00099   if (MainContainer != NULL)
00100   {
00101     return MainContainer->add_container(this);
00102   }
00103   else
00104   {
00105     return false;
00106   }
00107 }
00108 
00109 int  OfxStatementContainer::gen_event()
00110 {
00111   libofx_context->statementCallback(data);
00112   return true;
00113 }
00114 
00115 
00116 void OfxStatementContainer::add_account(OfxAccountData * account_data)
00117 {
00118   if (account_data->account_id_valid == true)
00119   {
00120     data.account_ptr = account_data;
00121     strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH);
00122     data.account_id_valid = true;
00123   }
00124 }
00125 /*void OfxStatementContainer::add_transaction(const OfxTransactionData transaction_data)
00126 {
00127   transaction_queue.push(transaction_data);
00128 }*/
libofx-0.9.4/doc/html/classOfxAccountContainer.png0000644000175000017500000000122311553133250017105 00000000000000‰PNG  IHDRPë媸PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2"IDATxíÑ’Ã EC:Óÿÿä}"nì¶ov/3mŒ"¹9Axݶ™èyìæ±`è!b!bù],"":èçFæWSgëE,Kõ˜ ©ÎÝæf,wžÚaY«§ÊPwÙE¤F _IÛÝ.êR3g±¿]Ò#,‹õt2êÒ‘-JÉææp¸;»€}€S,kôä2Ї¡wOòQÂó;ÇÕ<À–ËõœÉPªAÖ²i¶; ð*–‹ôœ'm|’KÏYÙ(nyé]¢'­üuìNì÷Ik¬3çTÆY¶,Öc2¬Í;ÖB–¶Ân[€ÒZù%Ö¶Ø=3,kõ4 -ŲT± ± ± ± b0‡LÏÏíù‰ 4=Ä’ªxbqÑC,P\@ô K.± ± e ± ±ü,hö™þXÖ ± ± ±Ðˆ…Xˆ…Xˆ…Xˆ…X®20<,A,ÄB,Är¹"k¾/Lë•"åq0\,å½eZ°íì6ÌD€ÅbeQ^´&P͆vÑŸl"eÊ¥…:Ô•¶£ÌµH5><–öºÝ/¿”¡NøÌ‰+: v^o‚¥~Óx®Ü%ƒÔaqñz@áÀÞ ‹Öз±”8>ÅBà{";÷ïbÉF}½‡ïDÇr8Ñ‹!°{¢šè)–´m¥ù¸úÚB„Ve*ÔÚÐͱü{ÄB,ÄB,ÄB,ÄÂ>õ6_—z9ß°ï²IEND®B`‚libofx-0.9.4/doc/html/resize.js0000644000175000017500000000450211553133251013300 00000000000000var cookie_namespace = 'doxygen'; var sidenav,navtree,content,header; function readCookie(cookie) { var myCookie = cookie_namespace+"_"+cookie+"="; if (document.cookie) { var index = document.cookie.indexOf(myCookie); if (index != -1) { var valStart = index + myCookie.length; var valEnd = document.cookie.indexOf(";", valStart); if (valEnd == -1) { valEnd = document.cookie.length; } var val = document.cookie.substring(valStart, valEnd); return val; } } return 0; } function writeCookie(cookie, val, expiration) { if (val==undefined) return; if (expiration == null) { var date = new Date(); date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week expiration = date.toGMTString(); } document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; } function resizeWidth() { var windowWidth = $(window).width() + "px"; var sidenavWidth = $(sidenav).width(); content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar writeCookie('width',sidenavWidth, null); } function restoreWidth(navWidth) { var windowWidth = $(window).width() + "px"; content.css({marginLeft:parseInt(navWidth)+6+"px"}); sidenav.css({width:navWidth + "px"}); } function resizeHeight() { var headerHeight = header.height(); var footerHeight = footer.height(); var windowHeight = $(window).height() - headerHeight - footerHeight; content.css({height:windowHeight + "px"}); navtree.css({height:windowHeight + "px"}); sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); } function initResizable() { header = $("#top"); sidenav = $("#side-nav"); content = $("#doc-content"); navtree = $("#nav-tree"); footer = $("#nav-path"); $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); $(window).resize(function() { resizeHeight(); }); var width = readCookie('width'); if (width) { restoreWidth(width); } else { resizeWidth(); } resizeHeight(); var url = location.href; var i=url.indexOf("#"); if (i>=0) window.location.hash=url.substr(i); var _preventDefault = function(evt) { evt.preventDefault(); }; $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); } libofx-0.9.4/doc/html/ofxpartner_8cpp_source.html0000644000175000017500000005673211553133250017044 00000000000000 LibOFX: ofxpartner.cpp Source File

ofxpartner.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                              ofx_partner.cpp 
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <libofx.h>
00025 
00026 //#ifdef HAVE_LIBCURL
00027 #include <curl/curl.h>
00028 //#endif
00029 
00030 #include "ofxpartner.h"
00031 #include "nodeparser.h"
00032 
00033 #include <sys/stat.h>
00034 
00035 #include <iostream>
00036 #include <string>
00037 #include <vector>
00038 #include <algorithm>
00039 #include <string.h>
00040 
00041 using std::string;
00042 using std::vector;
00043 using std::cout;
00044 using std::endl;
00045 
00046 namespace OfxPartner
00047 {
00048 bool post(const string& request, const string& url, const string& filename);
00049 
00050 const string kBankFilename = "ofx-bank-index.xml";
00051 const string kCcFilename = "ofx-cc-index.xml";
00052 const string kInvFilename = "ofx-inv-index.xml";
00053 
00054 void ValidateIndexCache(void)
00055 {
00056   // TODO Check whether these files exist and are recent enough before getting them again
00057 
00058   struct stat filestats;
00059   if ( stat( kBankFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 )
00060     post("T=1&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kBankFilename);
00061   if ( stat( kCcFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 )
00062     post("T=2&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kCcFilename);
00063   if ( stat( kInvFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 )
00064     post("T=3&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kInvFilename);
00065 }
00066 
00067 vector<string> BankNames(void)
00068 {
00069   vector<string> result;
00070 
00071   // Make sure the index files are up to date
00072   ValidateIndexCache();
00073   
00074   xmlpp::DomParser parser;
00075   parser.set_substitute_entities();
00076   parser.parse_file(kBankFilename);
00077   if ( parser ) 
00078   {
00079     vector<string> names = NodeParser(parser).Path("fi/prov/name").Text();
00080     result.insert(result.end(),names.begin(),names.end());
00081   }
00082   parser.parse_file(kCcFilename);
00083   if ( parser ) 
00084   {
00085     vector<string> names = NodeParser(parser).Path("fi/prov/name").Text();
00086     result.insert(result.end(),names.begin(),names.end());
00087   }
00088   parser.parse_file(kInvFilename);
00089   if ( parser ) 
00090   {
00091     vector<string> names = NodeParser(parser).Path("fi/prov/name").Text();
00092     result.insert(result.end(),names.begin(),names.end());
00093   }
00094 
00095   // Add Innovision
00096   result.push_back("Innovision");
00097           
00098   // sort the list and remove duplicates, to return one unified list of all supported banks 
00099   sort(result.begin(),result.end());
00100   result.erase(unique(result.begin(),result.end()),result.end());
00101   return result;
00102 }
00103 
00104 vector<string> FipidForBank(const string& bank)
00105 {
00106   vector<string> result;
00107 
00108   xmlpp::DomParser parser;
00109   parser.set_substitute_entities();
00110   parser.parse_file(kBankFilename);
00111   if ( parser ) 
00112   {
00113     vector<string> fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text();
00114     if ( ! fipids.back().empty() )
00115       result.insert(result.end(),fipids.begin(),fipids.end());
00116   }
00117   parser.parse_file(kCcFilename);
00118   if ( parser ) 
00119   {
00120     vector<string> fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text();
00121     if ( ! fipids.back().empty() )
00122       result.insert(result.end(),fipids.begin(),fipids.end());
00123   }
00124   parser.parse_file(kInvFilename);
00125   if ( parser ) 
00126   {
00127     vector<string> fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text();
00128     if ( ! fipids.back().empty() )
00129       result.insert(result.end(),fipids.begin(),fipids.end());
00130   }
00131 
00132   // the fipid for Innovision is 1.
00133   if ( bank == "Innovision" )
00134     result.push_back("1");
00135           
00136   sort(result.begin(),result.end());
00137   result.erase(unique(result.begin(),result.end()),result.end());
00138   
00139   return result;
00140 }
00141 
00142 OfxFiServiceInfo ServiceInfo(const std::string& fipid)
00143 {
00144   OfxFiServiceInfo result;
00145   memset(&result,0,sizeof(OfxFiServiceInfo));
00146 
00147   // Hard-coded values for Innovision test server
00148   if ( fipid == "1" )
00149   {
00150     strncpy(result.fid,"00000",OFX_FID_LENGTH-1);
00151     strncpy(result.org,"ReferenceFI",OFX_ORG_LENGTH-1);
00152     strncpy(result.url,"http://ofx.innovision.com",OFX_URL_LENGTH-1);
00153     result.accountlist = 1;
00154     result.statements = 1;
00155     result.billpay = 1;
00156     result.investments = 1;
00157 
00158     return result;
00159   }
00160   
00161   string url = "http://moneycentral.msn.com/money/2005/mnynet/service/olsvcupd/OnlSvcBrandInfo.aspx?MSNGUID=&GUID=%1&SKU=3&VER=6";
00162   url.replace(url.find("%1"),2,fipid);
00163           
00164   // TODO: Check whether this file exists and is recent enough before getting it again
00165   string guidfile = "fipid-%1.xml";
00166   guidfile.replace(guidfile.find("%1"),2,fipid);
00167 
00168   struct stat filestats;
00169   if ( stat( guidfile.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 )
00170     post("",url.c_str(),guidfile.c_str());
00171 
00172           // Print the FI details
00173     xmlpp::DomParser parser;
00174           parser.set_substitute_entities(); 
00175           parser.parse_file(guidfile);
00176           if ( parser )
00177           {
00178             NodeParser nodes(parser);
00179             
00180             strncpy(result.fid,nodes.Path("ProviderSettings/FID").Text().back().c_str(),OFX_FID_LENGTH-1);
00181             strncpy(result.org,nodes.Path("ProviderSettings/Org").Text().back().c_str(),OFX_ORG_LENGTH-1);
00182             strncpy(result.url,nodes.Path("ProviderSettings/ProviderURL").Text().back().c_str(),OFX_URL_LENGTH-1);
00183             result.accountlist = (nodes.Path("ProviderSettings/AcctListAvail").Text().back() == "1");
00184             result.statements = (nodes.Path("BankingCapabilities/Bank").Text().back() == "1");
00185             result.billpay = (nodes.Path("BillPayCapabilities/Pay").Text().back() == "1");
00186             result.investments = (nodes.Path("InvestmentCapabilities/BrkStmt").Text().back() == "1");
00187           }
00188   return result;
00189 }
00190 
00191 bool post(const string& request, const string& url, const string& filename)
00192 {
00193 #if 1 //#ifdef HAVE_LIBCURL
00194   CURL *curl = curl_easy_init();
00195   if(! curl)
00196     return false;
00197 
00198   unlink(filename.c_str());  
00199   FILE* file = fopen(filename.c_str(),"wb");
00200   if (! file )
00201   {
00202     curl_easy_cleanup(curl);
00203     return false;
00204   }
00205     
00206   curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
00207   if ( request.length() )
00208     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request.c_str());
00209   curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
00210   curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)file);
00211     
00212   /*CURLcode res =*/ curl_easy_perform(curl);
00213 
00214   curl_easy_cleanup(curl);
00215   
00216   fclose(file);
00217   
00218   return true;
00219 #else
00220   request; url; filename;
00221   cerr << "ERROR: libox must be configured with libcurl to post this request" << endl;
00222   return false;
00223 #endif
00224 }
00225 
00226 } // namespace OfxPartner
00227 
00228 
00229 // vim:cin:si:ai:et:ts=2:sw=2:
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request_8cpp.html0000644000175000017500000001032511553133250020442 00000000000000 LibOFX: ofx_request.cpp File Reference

ofx_request.cpp File Reference

Implementation of an OfxRequests to create an OFX file containing a generic request . More...

Go to the source code of this file.

Functions

string time_t_to_ofxdatetime (time_t time)
string time_t_to_ofxdate (time_t time)
string OfxHeader (const char *hver)

Detailed Description

Implementation of an OfxRequests to create an OFX file containing a generic request .

Definition in file fx-0.9.4/lib/ofx_request.cpp.

libofx-0.9.4/doc/html/classOfxInvestmentTransactionContainer.html0000644000175000017500000002446011553133250022243 00000000000000 LibOFX: OfxInvestmentTransactionContainer Class Reference

OfxInvestmentTransactionContainer Class Reference

Represents a bank or credid card transaction. More...

Inheritance diagram for OfxInvestmentTransactionContainer:
OfxTransactionContainer OfxTransactionContainer OfxGenericContainer OfxGenericContainer OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxInvestmentTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxInvestmentTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Detailed Description

Represents a bank or credid card transaction.

Built from the diferent investment transaction OFX entity

Definition at line 232 of file ofx_containers.hh.


Member Function Documentation

void OfxInvestmentTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxTransactionContainer.

Definition at line 396 of file ofx_container_transaction.cpp.

void OfxInvestmentTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxTransactionContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/classtree_1_1post__order__iterator.html0000644000175000017500000003553111553133250021271 00000000000000 LibOFX: tree< T, tree_node_allocator >::post_order_iterator Class Reference

tree< T, tree_node_allocator >::post_order_iterator Class Reference

Depth-first iterator, first accessing the children, then the node itself. More...

Inheritance diagram for tree< T, tree_node_allocator >::post_order_iterator:
tree< T, tree_node_allocator >::iterator_base tree< T, tree_node_allocator >::iterator_base

Public Member Functions

 post_order_iterator (tree_node *)
 post_order_iterator (const iterator_base &)
 post_order_iterator (const sibling_iterator &)
bool operator== (const post_order_iterator &) const
bool operator!= (const post_order_iterator &) const
post_order_iteratoroperator++ ()
post_order_iteratoroperator-- ()
post_order_iterator operator++ (int)
post_order_iterator operator-- (int)
post_order_iteratoroperator+= (unsigned int)
post_order_iteratoroperator-= (unsigned int)
void descend_all ()
 Set iterator to the first child as deep as possible down the tree.
 post_order_iterator (tree_node *)
 post_order_iterator (const iterator_base &)
 post_order_iterator (const sibling_iterator &)
bool operator== (const post_order_iterator &) const
bool operator!= (const post_order_iterator &) const
post_order_iteratoroperator++ ()
post_order_iteratoroperator-- ()
post_order_iterator operator++ (int)
post_order_iterator operator-- (int)
post_order_iteratoroperator+= (unsigned int)
post_order_iteratoroperator-= (unsigned int)
void descend_all ()
 Set iterator to the first child as deep as possible down the tree.

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::post_order_iterator

Depth-first iterator, first accessing the children, then the node itself.

Definition at line 180 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__request__statement_8hh.html0000644000175000017500000000733711553133250020034 00000000000000 LibOFX: ofx_request_statement.hh File Reference

ofx_request_statement.hh File Reference

Declaration of libofx_request_statement to create an OFX file containing a request for a statement. More...

Go to the source code of this file.

Data Structures

class  OfxStatementRequest
 A statement request. More...
class  OfxPaymentRequest

Detailed Description

Declaration of libofx_request_statement to create an OFX file containing a request for a statement.

Definition in file ofx_request_statement.hh.

libofx-0.9.4/doc/html/globals_vars.html0000644000175000017500000002015511553133251015007 00000000000000 LibOFX: Globals
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2messages_8hh.html0000644000175000017500000004301211553133250017362 00000000000000 LibOFX: messages.hh File Reference

messages.hh File Reference

Message IO functionality. More...

Go to the source code of this file.

Enumerations

enum  OfxMsgType {
  DEBUG, DEBUG1, DEBUG2, DEBUG3,
  DEBUG4, DEBUG5, STATUS = 10, INFO,
  WARNING, ERROR, PARSER, DEBUG,
  DEBUG1, DEBUG2, DEBUG3, DEBUG4,
  DEBUG5, STATUS = 10, INFO, WARNING,
  ERROR, PARSER
}

Functions

int message_out (OfxMsgType type, const string message)
 Message output function.

Detailed Description

Message IO functionality.

Definition in file fx-0.9.4/lib/messages.hh.


Enumeration Type Documentation

enum OfxMsgType

The OfxMsgType enum describe's the type of message being sent, so the application/user/library can decide if it will be printed to stdout

Enumerator:
DEBUG 

General debug messages

DEBUG1 

Debug level 1

DEBUG2 

Debug level 2

DEBUG3 

Debug level 3

DEBUG4 

Debug level 4

DEBUG5 

Debug level 5

STATUS 

For major processing event (End of parsing, etc.)

INFO 

For minor processing event

WARNING 

Warning message

ERROR 

Error message

PARSER 

Parser events

DEBUG 

General debug messages

DEBUG1 

Debug level 1

DEBUG2 

Debug level 2

DEBUG3 

Debug level 3

DEBUG4 

Debug level 4

DEBUG5 

Debug level 5

STATUS 

For major processing event (End of parsing, etc.)

INFO 

For minor processing event

WARNING 

Warning message

ERROR 

Error message

PARSER 

Parser events

Definition at line 23 of file fx-0.9.4/lib/messages.hh.


Function Documentation

libofx-0.9.4/doc/html/classOfxPaymentRequest.html0000644000175000017500000002412211553133250017017 00000000000000 LibOFX: OfxPaymentRequest Class Reference

OfxPaymentRequest Class Reference

Inheritance diagram for OfxPaymentRequest:
OfxRequest OfxRequest OfxAggregate OfxAggregate OfxAggregate OfxAggregate

Public Member Functions

 OfxPaymentRequest (const OfxFiLogin &fi, const OfxAccountData &account, const OfxPayee &payee, const OfxPayment &payment)
 OfxPaymentRequest (const OfxFiLogin &fi, const OfxAccountData &account, const OfxPayee &payee, const OfxPayment &payment)

Detailed Description

Definition at line 84 of file ofx_request_statement.hh.


Constructor & Destructor Documentation

OfxPaymentRequest::OfxPaymentRequest ( const OfxFiLogin fi,
const OfxAccountData account,
const OfxPayee payee,
const OfxPayment payment 
)

Creates the request aggregate to submit a payment to this fi on this account, to this payee as described by this .

Parameters:
fiThe information needed to log on user into one financial institution
accountThe account from which the payment should be made
payeeThe payee who should receive the payment
paymentThe details of the payment

Definition at line 149 of file ofx_request_statement.cpp.

OfxPaymentRequest::OfxPaymentRequest ( const OfxFiLogin fi,
const OfxAccountData account,
const OfxPayee payee,
const OfxPayment payment 
)

Creates the request aggregate to submit a payment to this fi on this account, to this payee as described by this .

Parameters:
fiThe information needed to log on user into one financial institution
accountThe account from which the payment should be made
payeeThe payee who should receive the payment
paymentThe details of the payment

The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__container__security_8cpp.html0000644000175000017500000000735311553133250020352 00000000000000 LibOFX: ofx_container_security.cpp File Reference

ofx_container_security.cpp File Reference

Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc.

Definition in file ofx_container_security.cpp.

libofx-0.9.4/doc/html/globals_eval.html0000644000175000017500000005117411553133251014770 00000000000000 LibOFX: Globals
 

- a -

- d -

- e -

- i -

- l -

- o -

- p -

- q -

- r -

- s -

- u -

- w -

libofx-0.9.4/doc/html/file__preproc_8cpp.html0000644000175000017500000003013411553133250016070 00000000000000 LibOFX: file_preproc.cpp File Reference

file_preproc.cpp File Reference

File type detection, etc. More...

Go to the source code of this file.

Functions

const char * libofx_get_file_format_description (const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
 get_file_format_description returns a string description of a LibofxFileType.
enum LibofxFileFormat libofx_get_file_format_from_str (const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
 libofx_get_file_type returns a proper enum from a file type string.
int libofx_proc_file (LibofxContextPtr p_libofx_context, const char *p_filename, LibofxFileFormat p_file_type)
 libofx_proc_file is the entry point of the library.
enum LibofxFileFormat libofx_detect_file_type (const char *p_filename)
 libofx_detect_file_type tries to analyze a file to determine it's format.

Variables

const unsigned int READ_BUFFER_SIZE = 1024

Detailed Description

File type detection, etc.

Implements AutoDetection of file type, and handoff to specific parsers.

Definition in file file_preproc.cpp.


Function Documentation

enum LibofxFileFormat libofx_detect_file_type ( const char *  p_filename)

libofx_detect_file_type tries to analyze a file to determine it's format.

Parameters:
p_filenameFile name of the file to process
Returns:
Detected file format, UNKNOWN if unsuccessfull.

Definition at line 102 of file file_preproc.cpp.

Referenced by libofx_proc_file().

const char* libofx_get_file_format_description ( const struct LibofxFileFormatInfo  format_list[],
enum LibofxFileFormat  file_format 
)

get_file_format_description returns a string description of a LibofxFileType.

The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList

The file format which should match one of the formats in the list.

Returns:
null terminated string suitable for debugging output or user communication.

Definition at line 37 of file file_preproc.cpp.

enum LibofxFileFormat libofx_get_file_format_from_str ( const struct LibofxFileFormatInfo  format_list[],
const char *  file_type_string 
)

libofx_get_file_type returns a proper enum from a file type string.

The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList

The string which contain the file format matching one of the format_name of the list.

Returns:
the file format, or UNKNOWN if the format wasn't recognised.

Definition at line 54 of file file_preproc.cpp.

int libofx_proc_file ( LibofxContextPtr  libofx_context,
const char *  p_filename,
enum LibofxFileFormat  ftype 
)

libofx_proc_file is the entry point of the library.

libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.

Definition at line 67 of file file_preproc.cpp.

libofx-0.9.4/doc/html/ofx__container__statement_8cpp_source.html0000644000175000017500000004021311553133250022057 00000000000000 LibOFX: ofx_container_statement.cpp Source File

ofx_container_statement.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_statement.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                    OfxStatementContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxStatementContainer::OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "STATEMENT";
00041 }
00042 OfxStatementContainer::~OfxStatementContainer()
00043 {
00044   /*  while(transaction_queue.empty()!=true)
00045       {
00046         ofx_proc_transaction_cb(transaction_queue.front());
00047         transaction_queue.pop();
00048       }*/
00049 }
00050 void OfxStatementContainer::add_attribute(const string identifier, const string value)
00051 {
00052   if (identifier == "CURDEF")
00053   {
00054     strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH);
00055     data.currency_valid = true;
00056   }
00057   else if (identifier == "MKTGINFO")
00058   {
00059     strncpy(data.marketing_info, value.c_str(), OFX_MARKETING_INFO_LENGTH);
00060     data.marketing_info_valid = true;
00061   }
00062   else if (identifier == "DTSTART")
00063   {
00064     data.date_start = ofxdate_to_time_t(value);
00065     data.date_start_valid = true;
00066   }
00067   else if (identifier == "DTEND")
00068   {
00069     data.date_end = ofxdate_to_time_t(value);
00070     data.date_end_valid = true;
00071   }
00072   else
00073   {
00074     OfxGenericContainer::add_attribute(identifier, value);
00075   }
00076 }//end OfxStatementContainer::add_attribute()
00077 
00078 void OfxStatementContainer::add_balance(OfxBalanceContainer* ptr_balance_container)
00079 {
00080   if (ptr_balance_container->tag_identifier == "LEDGERBAL")
00081   {
00082     data.ledger_balance = ptr_balance_container->amount;
00083     data.ledger_balance_valid = ptr_balance_container->amount_valid;
00084   }
00085   else if (ptr_balance_container->tag_identifier == "AVAILBAL")
00086   {
00087     data.available_balance = ptr_balance_container->amount;
00088     data.available_balance_valid = ptr_balance_container->amount_valid;
00089   }
00090   else
00091   {
00092     message_out(ERROR, "OfxStatementContainer::add_balance(): the balance has unknown tag_identifier: " + ptr_balance_container->tag_identifier);
00093   }
00094 }
00095 
00096 
00097 int  OfxStatementContainer::add_to_main_tree()
00098 {
00099   if (MainContainer != NULL)
00100   {
00101     return MainContainer->add_container(this);
00102   }
00103   else
00104   {
00105     return false;
00106   }
00107 }
00108 
00109 int  OfxStatementContainer::gen_event()
00110 {
00111   libofx_context->statementCallback(data);
00112   return true;
00113 }
00114 
00115 
00116 void OfxStatementContainer::add_account(OfxAccountData * account_data)
00117 {
00118   if (account_data->account_id_valid == true)
00119   {
00120     data.account_ptr = account_data;
00121     strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH);
00122     data.account_id_valid = true;
00123   }
00124 }
00125 /*void OfxStatementContainer::add_transaction(const OfxTransactionData transaction_data)
00126 {
00127   transaction_queue.push(transaction_data);
00128 }*/
libofx-0.9.4/doc/html/classOfxBankTransactionContainer.png0000644000175000017500000000245611553133250020603 00000000000000‰PNG  IHDRòˆ²cÿðPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2½IDATxíÝÑ’ª0„a‡Såû?ò¹ EÅUðëÚ ÉÐûÛ™Ü^þQ—"öÙÔþ¿áxª¡³ÏþƒöAg_äAg_äAg_äAgÿ¤‘ˆH7˱ÕE½ý · ½ }öŒ|äªzÛ¢þä'¼>}öŒ|ªCDd͆M§oC¤)ùaor”!ºv‚Î>ûOG>oÖtWÆxhMf_×'W—ö†Î>ûOE~,Xvae¬~icwázþ´_à-ÐÙgÿùȧ Ö˜¿mw]Vw ¼:û?lÿ鳩5VB[]÷îÚ%ïŽ>Ž>Ž>Ž>Ž>Ž>è„þWéß…>ú/@ާE}ÐE}ÐE}ÐE}ÐÑGÿ%èéfÈcÃЙۭ0l­~úÈ£ÿ÷Ð#Ô6_›[ªÞŸúÓ‘Gÿï¡çÞ2DÄüˆ!†a쑺Pþœ.y]3¯j(Õp™ŸšS[¬û“œ<òèz†]uˆ¨FÇÛò×^zó¦òóåù®(ûoFýOAÏÿzý¹øEš«?D ýc÷§"þw@ñ@lºÁ4ö8ô²¶´ rØŠ<úŸ>ZÔ¶vuè½»¦©ýpäÑÿèäøôÀ+åÊÔŸ:ZÑÿ>èé¬[ƒ>DÄË£5ŠãP:2à¹j=iѸº”¬ZÛ¯EýO@ÿj>òèƒ.òèƒ.ò胎>ú £>èè‹<èè‹<èèŸ7òGÔy"þ™t…}Ð ý3¿¢Ž>è„þ™™£Ž>è„þ™±C€>è„>è„>è„>è„>è„>è„>èèèèèèÓÐé“@Ò&‰DžHäIä‰DžHä‰DžHä‰DžHä‰DžHä‰DžHä‰DžŽ¬8¢ülôBäy&‘ç™DžgyžIäy¦Å'"ÆûtG–éŠò¨ópý%¹ëåï[äi‡ÈI^fn¯fÁ+mùvy]žÞùr‰ˆÆiĸÒ¥k\bö¼|N—\s^gêöe¸ÌO/j‹•—íùÜé«dç‘<“øˆ<‰È“øˆ<½?>G”Ÿí¦þ¨YèI10— IEND®B`‚libofx-0.9.4/doc/html/functions_0x64.html0000644000175000017500000001451011553133250015117 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- d -

libofx-0.9.4/doc/html/messages_8hh_source.html0000644000175000017500000002020211553133250016257 00000000000000 LibOFX: messages.hh Source File

messages.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_messages.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #ifndef OFX_MESSAGES_H
00019 #define OFX_MESSAGES_H
00020 
00023 enum OfxMsgType
00024 {
00025   DEBUG,       
00026   DEBUG1,      
00027   DEBUG2,      
00028   DEBUG3,      
00029   DEBUG4,      
00030   DEBUG5,      
00031   STATUS = 10, 
00032   INFO,        
00033   WARNING,     
00034   ERROR,       
00035   PARSER       
00036 };
00037 using namespace std;
00039 int message_out(OfxMsgType type, const string message);
00040 
00041 #endif
libofx-0.9.4/doc/html/inc_2libofx_8h_source.html0000644000175000017500000022155711553133250016516 00000000000000 LibOFX: libofx.h Source File

libofx.h

Go to the documentation of this file.
00001 /*-*-c-*-*******************************************************************
00002               libofx.h  -  Main header file for the libofx API
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : bock@step.polymtl.ca
00006 ***************************************************************************/
00026 /***************************************************************************
00027  *                                                                         *
00028  *   This program is free software; you can redistribute it and/or modify  *
00029  *   it under the terms of the GNU General Public License as published by  *
00030  *   the Free Software Foundation; either version 2 of the License, or     *
00031  *   (at your option) any later version.                                   *
00032  *                                                                         *
00033  ***************************************************************************/
00034 
00035 #ifndef LIBOFX_H
00036 #define LIBOFX_H
00037 #include <time.h>
00038 
00039 #define LIBOFX_MAJOR_VERSION 0
00040 #define LIBOFX_MINOR_VERSION 9
00041 #define LIBOFX_MICRO_VERSION 4
00042 #define LIBOFX_BUILD_VERSION 0
00043 #define LIBOFX_VERSION_RELEASE_STRING "0.9.4"
00044 
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #else
00049 #define true 1
00050 #define false 0
00051 #endif
00052 
00053 #define OFX_ELEMENT_NAME_LENGTH         100
00054 #define OFX_SVRTID2_LENGTH             (36 + 1)
00055 #define OFX_CHECK_NUMBER_LENGTH        (12 + 1)
00056 #define OFX_REFERENCE_NUMBER_LENGTH    (32 + 1)
00057 #define OFX_FITID_LENGTH               (255 + 1)
00058 #define OFX_TOKEN2_LENGTH              (36 + 1)
00059 #define OFX_MEMO_LENGTH                (255 + 1)
00060 #define OFX_MEMO2_LENGTH               (390 + 1)
00061 #define OFX_BALANCE_NAME_LENGTH        (32 + 1)
00062 #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1)
00063 #define OFX_CURRENCY_LENGTH            (3 + 1) /* In ISO-4217 format */
00064 #define OFX_BANKID_LENGTH              (9 + 1)
00065 #define OFX_BRANCHID_LENGTH            (22 + 1)
00066 #define OFX_ACCTID_LENGTH              (22 + 1)
00067 #define OFX_ACCTKEY_LENGTH             (22 + 1)
00068 #define OFX_BROKERID_LENGTH            (22 + 1)
00069   /* Must be MAX of <BANKID>+<BRANCHID>+<ACCTID>, <ACCTID>+<ACCTKEY> and <ACCTID>+<BROKERID> */
00070 #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1)
00071 #define OFX_ACCOUNT_NAME_LENGTH        255
00072 #define OFX_MARKETING_INFO_LENGTH      (360 + 1)
00073 #define OFX_TRANSACTION_NAME_LENGTH    (32 + 1)
00074 #define OFX_UNIQUE_ID_LENGTH           (32 + 1)
00075 #define OFX_UNIQUE_ID_TYPE_LENGTH      (10 + 1)
00076 #define OFX_SECNAME_LENGTH             (32 + 1)
00077 #define OFX_TICKER_LENGTH              (32 + 1)
00078 #define OFX_ORG_LENGTH                 (32 + 1)
00079 #define OFX_FID_LENGTH                 (32 + 1)
00080 #define OFX_USERID_LENGTH              (32 + 1)
00081 #define OFX_USERPASS_LENGTH            (32 + 1)
00082 #define OFX_URL_LENGTH                 (500 + 1)
00083 #define OFX_APPID_LENGTH               (32)
00084 #define OFX_APPVER_LENGTH              (32)
00085 #define OFX_HEADERVERSION_LENGTH       (32)
00086 
00087   /*
00088   #define OFX_STATEMENT_CB               0;
00089   #define OFX_ACCOUNT_CB                 1;
00090   #define OFX_TRACSACTION_CB             2;
00091   #define OFX_SECURITY_CB                3;
00092   #define OFX_STATUS_CB                  4;
00093   */
00094 
00095   typedef void * LibofxContextPtr;
00096 
00102   LibofxContextPtr libofx_get_new_context();
00103 
00109   int libofx_free_context( LibofxContextPtr );
00110 
00111   void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
00112                           const char *s);
00113 
00115   enum LibofxFileFormat
00116   {
00117     AUTODETECT, 
00118     OFX, 
00119     OFC, 
00120     QIF, 
00121     UNKNOWN, 
00122     LAST 
00123   };
00124 
00125   struct LibofxFileFormatInfo
00126   {
00127     enum LibofxFileFormat format;
00128     const char * format_name;  
00129     const char * description; 
00130   };
00131 
00132 
00133 #ifndef OFX_AQUAMANIAC_UGLY_HACK1
00134 
00135   const struct LibofxFileFormatInfo LibofxImportFormatList[] =
00136   {
00137     {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"},
00138     {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"},
00139     {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"},
00140     {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
00141     {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
00142   };
00143 
00144   const struct LibofxFileFormatInfo LibofxExportFormatList[] =
00145   {
00146     {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
00147     {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
00148   };
00149 
00161   enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string);
00162 
00174   const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format);
00175 
00176 #endif
00177 
00184   int libofx_proc_file(LibofxContextPtr libofx_context,
00185                        const char * p_filename,
00186                        enum LibofxFileFormat ftype);
00187 
00188 
00201   struct OfxStatusData
00202   {
00207     char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];
00209     int ofx_element_name_valid;
00210 
00215     int code;            
00216     const char* name;          
00217     const char* description;   
00218     int code_valid;      
00221     enum Severity
00222     {
00223       INFO, 
00224       WARN, 
00225       ERROR 
00226     } severity;
00227     int severity_valid;
00228 
00234     char* server_message; 
00236     int server_message_valid;
00238   };
00239 
00240 
00250   typedef int (*LibofxProcStatusCallback)(const struct OfxStatusData data, void * status_data);
00251 
00263   struct OfxAccountData
00264   {
00265 
00277     char account_id[OFX_ACCOUNT_ID_LENGTH];
00278 
00284     char account_name[OFX_ACCOUNT_NAME_LENGTH];
00285     int account_id_valid;/* Use for both account_id and account_name */
00286 
00289     enum AccountType
00290     {
00291       OFX_CHECKING,  
00292       OFX_SAVINGS,   
00293       OFX_MONEYMRKT, 
00294       OFX_CREDITLINE,
00295       OFX_CMA,       
00296       OFX_CREDITCARD,
00297       OFX_INVESTMENT 
00298     } account_type;
00299     int account_type_valid;
00300 
00302     char currency[OFX_CURRENCY_LENGTH];
00303     int currency_valid;
00304 
00306     char account_number[OFX_ACCTID_LENGTH];
00307     int account_number_valid;
00308 
00310     char bank_id[OFX_BANKID_LENGTH];
00311     int bank_id_valid;
00312 
00313     char broker_id[OFX_BROKERID_LENGTH];
00314     int broker_id_valid;
00315 
00316     char branch_id[OFX_BRANCHID_LENGTH];
00317     int branch_id_valid;
00318 
00319   };
00320 
00335   typedef int (*LibofxProcAccountCallback)(const struct OfxAccountData data, void * account_data);
00336 
00344   struct OfxSecurityData
00345   {
00353     char unique_id[OFX_UNIQUE_ID_LENGTH];   
00354     int unique_id_valid;
00355 
00356     char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
00358     int unique_id_type_valid;
00359 
00360     char secname[OFX_SECNAME_LENGTH];
00361     int secname_valid;
00362 
00368     char ticker[OFX_TICKER_LENGTH];
00369     int ticker_valid;
00370 
00371     double unitprice;
00373     int unitprice_valid;
00374 
00375     time_t date_unitprice;
00376     int date_unitprice_valid;
00377 
00380     char currency[OFX_CURRENCY_LENGTH];
00381     int currency_valid;
00382 
00383     char memo[OFX_MEMO2_LENGTH];
00384     int memo_valid;
00385   };/* end struct OfxSecurityData */
00386 
00400   typedef int (*LibofxProcSecurityCallback)(const struct OfxSecurityData data, void * security_data);
00401 
00402   typedef enum
00403   {
00404     OFX_CREDIT,     
00405     OFX_DEBIT,      
00406     OFX_INT,        
00407     OFX_DIV,        
00408     OFX_FEE,        
00409     OFX_SRVCHG,     
00410     OFX_DEP,        
00411     OFX_ATM,        
00412     OFX_POS,        
00413     OFX_XFER,       
00414     OFX_CHECK,      
00415     OFX_PAYMENT,    
00416     OFX_CASH,       
00417     OFX_DIRECTDEP,  
00418     OFX_DIRECTDEBIT,
00419     OFX_REPEATPMT,  
00420     OFX_OTHER       
00421   } TransactionType;
00422 
00423   typedef enum
00424   {
00425     OFX_BUYDEBT,        
00426     OFX_BUYMF,          
00427     OFX_BUYOPT,         
00428     OFX_BUYOTHER,       
00429     OFX_BUYSTOCK,       
00430     OFX_CLOSUREOPT,     
00431     OFX_INCOME,         
00432     OFX_INVEXPENSE,     
00433     OFX_JRNLFUND,       
00434     OFX_JRNLSEC,        
00435     OFX_MARGININTEREST, 
00436     OFX_REINVEST,       
00437     OFX_RETOFCAP,       
00438     OFX_SELLDEBT,       
00439     OFX_SELLMF,         
00440     OFX_SELLOPT,        
00441     OFX_SELLOTHER,      
00442     OFX_SELLSTOCK,      
00443     OFX_SPLIT,          
00444     OFX_TRANSFER        
00445   } InvTransactionType;
00446 
00447   typedef enum
00448   {
00449     DELETE, 
00451     REPLACE 
00453   } FiIdCorrectionAction;
00454 
00461   struct OfxTransactionData
00462   {
00463 
00469     char account_id[OFX_ACCOUNT_ID_LENGTH];
00472     struct OfxAccountData * account_ptr; 
00474     int account_id_valid;
00475 
00476     TransactionType transactiontype;
00477     int transactiontype_valid;
00478 
00482     InvTransactionType invtransactiontype;
00483     int  invtransactiontype_valid;
00484 
00492     double units;
00493     int units_valid;
00494 
00495     double unitprice; 
00497     int unitprice_valid;
00498 
00499     double amount;    
00503     int amount_valid;
00504 
00505     char fi_id[256];  
00508     int fi_id_valid;
00509 
00517     char unique_id[OFX_UNIQUE_ID_LENGTH];
00518     int unique_id_valid;
00519     char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
00521     int unique_id_type_valid;
00522 
00523     struct OfxSecurityData *security_data_ptr;  
00524     int security_data_valid;
00525 
00526     time_t date_posted;
00531     int date_posted_valid;
00532 
00533     time_t date_initiated;
00539     int date_initiated_valid;
00540 
00541     time_t date_funds_available;
00544     int date_funds_available_valid;
00545 
00549     char fi_id_corrected[256];
00550     int fi_id_corrected_valid;
00551 
00554     FiIdCorrectionAction fi_id_correction_action;
00555     int fi_id_correction_action_valid;
00556 
00559     char server_transaction_id[OFX_SVRTID2_LENGTH];
00560     int server_transaction_id_valid;
00561 
00565     char check_number[OFX_CHECK_NUMBER_LENGTH];
00566     int check_number_valid;
00567 
00570     char reference_number[OFX_REFERENCE_NUMBER_LENGTH];
00571     int reference_number_valid;
00572 
00573     long int standard_industrial_code;
00575     int standard_industrial_code_valid;
00576 
00577     char payee_id[OFX_SVRTID2_LENGTH];
00578     int payee_id_valid;
00579 
00580     char name[OFX_TRANSACTION_NAME_LENGTH];
00582     int name_valid;
00583 
00584     char memo[OFX_MEMO2_LENGTH];
00585     int memo_valid;
00586 
00587     double commission;
00588     int commission_valid;
00589 
00590     double fees;
00591     int fees_valid;
00592 
00593     double oldunits;     /*number of units held before stock split */
00594     int oldunits_valid;
00595 
00596     double newunits;     /*number of units held after stock split */
00597     int newunits_valid;
00598 
00599 
00600     /*********** NOT YET COMPLETE!!! *********************/
00601   };
00602 
00612   typedef int (*LibofxProcTransactionCallback)(const struct OfxTransactionData data, void * transaction_data);
00613 
00623   struct OfxStatementData
00624   {
00625 
00633     char currency[OFX_CURRENCY_LENGTH]; 
00634     int currency_valid;
00635 
00636     char account_id[OFX_ACCOUNT_ID_LENGTH];
00638     struct OfxAccountData * account_ptr; 
00640     int account_id_valid;
00641 
00644     double ledger_balance;
00645     int ledger_balance_valid;
00646 
00647     time_t ledger_balance_date;
00648     int ledger_balance_date_valid;
00649 
00655     double available_balance; 
00658     int available_balance_valid;
00659 
00660     time_t available_balance_date;
00661     int available_balance_date_valid;
00662 
00667     time_t date_start;
00668     int date_start_valid;
00669 
00674     time_t date_end;
00675     int date_end_valid;
00676 
00679     char marketing_info[OFX_MARKETING_INFO_LENGTH];
00680     int marketing_info_valid;
00681   };
00682 
00690   typedef int (*LibofxProcStatementCallback)(const struct OfxStatementData data, void * statement_data);
00691 
00695   struct OfxCurrency
00696   {
00697     char currency[OFX_CURRENCY_LENGTH]; 
00698     double exchange_rate;  
00699     int must_convert;   
00700   };
00701 
00702 
00709   void ofx_set_status_cb(LibofxContextPtr ctx,
00710                          LibofxProcStatusCallback cb,
00711                          void *user_data);
00712 
00719   void ofx_set_account_cb(LibofxContextPtr ctx,
00720                           LibofxProcAccountCallback cb,
00721                           void *user_data);
00722 
00729   void ofx_set_security_cb(LibofxContextPtr ctx,
00730                            LibofxProcSecurityCallback cb,
00731                            void *user_data);
00732 
00739   void ofx_set_transaction_cb(LibofxContextPtr ctx,
00740                               LibofxProcTransactionCallback cb,
00741                               void *user_data);
00742 
00749   void ofx_set_statement_cb(LibofxContextPtr ctx,
00750                             LibofxProcStatementCallback cb,
00751                             void *user_data);
00752 
00753 
00757   int libofx_proc_buffer(LibofxContextPtr ctx,
00758                          const char *s, unsigned int size);
00759 
00760 
00761   /* **************************************** */
00762 
00768 
00772   struct OfxFiServiceInfo
00773   {
00774     char fid[OFX_FID_LENGTH];
00775     char org[OFX_ORG_LENGTH];
00776     char url[OFX_URL_LENGTH];
00777     int accountlist; 
00778     int statements; 
00779     int billpay; 
00780     int investments; 
00781   };
00782 
00792   struct OfxFiLogin
00793   {
00794     char fid[OFX_FID_LENGTH];
00795     char org[OFX_ORG_LENGTH];
00796     char userid[OFX_USERID_LENGTH];
00797     char userpass[OFX_USERPASS_LENGTH];
00798     char header_version[OFX_HEADERVERSION_LENGTH];
00799     char appid[OFX_APPID_LENGTH];
00800     char appver[OFX_APPVER_LENGTH];
00801   };
00802 
00803 #define OFX_AMOUNT_LENGTH (32 + 1)
00804 #define OFX_PAYACCT_LENGTH (32 + 1)
00805 #define OFX_STATE_LENGTH (5 + 1)
00806 #define OFX_POSTALCODE_LENGTH (11 + 1)
00807 #define OFX_NAME_LENGTH (32 + 1)
00808 
00809   struct OfxPayment
00810   {
00811     char amount[OFX_AMOUNT_LENGTH];
00812     char account[OFX_PAYACCT_LENGTH];
00813     char datedue[9];
00814     char memo[OFX_MEMO_LENGTH];
00815   };
00816 
00817   struct OfxPayee
00818   {
00819     char name[OFX_NAME_LENGTH];
00820     char address1[OFX_NAME_LENGTH];
00821     char city[OFX_NAME_LENGTH];
00822     char state[OFX_STATE_LENGTH];
00823     char postalcode[OFX_POSTALCODE_LENGTH];
00824     char phone[OFX_NAME_LENGTH];
00825   };
00826 
00838   char* libofx_request_statement( const struct OfxFiLogin* fi, const struct OfxAccountData* account, time_t date_from );
00839 
00850   char* libofx_request_accountinfo( const struct OfxFiLogin* login );
00851 
00852   char* libofx_request_payment( const struct OfxFiLogin* login, const struct OfxAccountData* account, const struct OfxPayee* payee, const struct OfxPayment* payment );
00853 
00854   char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid );
00855 
00857 
00858 #ifdef __cplusplus
00859 } // end of extern "C"
00860 #endif
00861 #endif // end of LIBOFX_H
libofx-0.9.4/doc/html/ofc__sgml_8cpp_source.html0000644000175000017500000013576711553133250016612 00000000000000 LibOFX: ofc_sgml.cpp Source File

ofc_sgml.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.cpp
00003                           -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <iostream>
00026 #include <stdlib.h>
00027 #include <string>
00028 #include "ParserEventGeneratorKit.h"
00029 #include "libofx.h"
00030 #include "ofx_utilities.hh"
00031 #include "messages.hh"
00032 #include "ofx_containers.hh"
00033 #include "ofc_sgml.hh"
00034 
00035 using namespace std;
00036 
00037 
00038 extern SGMLApplication::OpenEntityPtr entity_ptr;
00039 extern SGMLApplication::Position position;
00040 extern OfxMainContainer * MainContainer;
00041 
00044 class OFCApplication : public SGMLApplication
00045 {
00046 private:
00047   OfxGenericContainer *curr_container_element; 
00048   OfxGenericContainer *tmp_container_element;
00049   bool is_data_element; 
00050   string incoming_data; 
00051   LibofxContext * libofx_context;
00052 public:
00053   OFCApplication (LibofxContext * p_libofx_context)
00054   {
00055     MainContainer = NULL;
00056     curr_container_element = NULL;
00057     is_data_element = false;
00058     libofx_context = p_libofx_context;
00059   }
00060 
00065   void startElement (const StartElementEvent & event)
00066   {
00067     string identifier;
00068     CharStringtostring (event.gi, identifier);
00069     message_out(PARSER, "startElement event received from OpenSP for element " + identifier);
00070 
00071     position = event.pos;
00072 
00073     switch (event.contentType)
00074     {
00075     case StartElementEvent::empty:
00076       message_out(ERROR, "StartElementEvent::empty\n");
00077       break;
00078     case StartElementEvent::cdata:
00079       message_out(ERROR, "StartElementEvent::cdata\n");
00080       break;
00081     case StartElementEvent::rcdata:
00082       message_out(ERROR, "StartElementEvent::rcdata\n");
00083       break;
00084     case StartElementEvent::mixed:
00085       message_out(PARSER, "StartElementEvent::mixed");
00086       is_data_element = true;
00087       break;
00088     case StartElementEvent::element:
00089       message_out(PARSER, "StartElementEvent::element");
00090       is_data_element = false;
00091       break;
00092     default:
00093       message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?");
00094     }
00095 
00096     if (is_data_element == false)
00097     {
00098       /*------- The following are OFC entities ---------------*/
00099 
00100       if (identifier == "OFC")
00101       {
00102         message_out (PARSER, "Element " + identifier + " found");
00103         MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier);
00104         curr_container_element = MainContainer;
00105       }
00106       else if (identifier == "STATUS")
00107       {
00108         message_out (PARSER, "Element " + identifier + " found");
00109         curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier);
00110       }
00111       else if (identifier == "ACCTSTMT")
00112       {
00113         message_out (PARSER, "Element " + identifier + " found");
00114         curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier);
00115       }
00116       else if (identifier == "STMTRS")
00117       {
00118         message_out (PARSER, "Element " + identifier + " found");
00119         //STMTRS ignored, we will process it's attributes directly inside the STATEMENT,
00120         if (curr_container_element->type != "STATEMENT")
00121         {
00122           message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container");
00123         }
00124         else
00125         {
00126           curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00127         }
00128       }
00129       else if (identifier == "GENTRN" ||
00130                identifier == "STMTTRN")
00131       {
00132         message_out (PARSER, "Element " + identifier + " found");
00133         curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier);
00134       }
00135       else if (identifier == "BUYDEBT" ||
00136                identifier == "BUYMF" ||
00137                identifier == "BUYOPT" ||
00138                identifier == "BUYOTHER" ||
00139                identifier == "BUYSTOCK" ||
00140                identifier == "CLOSUREOPT" ||
00141                identifier == "INCOME" ||
00142                identifier == "INVEXPENSE" ||
00143                identifier == "JRNLFUND" ||
00144                identifier == "JRNLSEC" ||
00145                identifier == "MARGININTEREST" ||
00146                identifier == "REINVEST" ||
00147                identifier == "RETOFCAP" ||
00148                identifier == "SELLDEBT" ||
00149                identifier == "SELLMF" ||
00150                identifier == "SELLOPT" ||
00151                identifier == "SELLOTHER" ||
00152                identifier == "SELLSTOCK" ||
00153                identifier == "SPLIT" ||
00154                identifier == "TRANSFER" )
00155       {
00156         message_out (PARSER, "Element " + identifier + " found");
00157         curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier);
00158       }
00159       /*The following is a list of OFX elements whose attributes will be processed by the parent container*/
00160       else if (identifier == "INVBUY" ||
00161                identifier == "INVSELL" ||
00162                identifier == "INVTRAN" ||
00163                identifier == "SECID")
00164       {
00165         message_out (PARSER, "Element " + identifier + " found");
00166         curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier);
00167       }
00168 
00169       /* The different types of accounts */
00170       else if (identifier == "ACCOUNT" ||
00171                identifier == "ACCTFROM" )
00172       {
00173         message_out (PARSER, "Element " + identifier + " found");
00174         curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier);
00175       }
00176       else if (identifier == "SECINFO")
00177       {
00178         message_out (PARSER, "Element " + identifier + " found");
00179         curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier);
00180       }
00181       /* The different types of balances */
00182       else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL")
00183       {
00184         message_out (PARSER, "Element " + identifier + " found");
00185         curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier);
00186       }
00187       else
00188       {
00189         /* We dont know this OFX element, so we create a dummy container */
00190         curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier);
00191       }
00192     }
00193     else
00194     {
00195       /* The element was a data element.  OpenSP will call one or several data() callback with the data */
00196       message_out (PARSER, "Data element " + identifier + " found");
00197       /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here".  Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */
00198       if (incoming_data != "")
00199       {
00200         message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4.  The folowing data was lost: " + incoming_data );
00201         incoming_data.assign ("");
00202       }
00203     }
00204   }
00205 
00210   void endElement (const EndElementEvent & event)
00211   {
00212     string identifier;
00213     bool end_element_for_data_element;
00214 
00215     CharStringtostring (event.gi, identifier);
00216     end_element_for_data_element = is_data_element;
00217     message_out(PARSER, "endElement event received from OpenSP for element " + identifier);
00218 
00219     position = event.pos;
00220     if (curr_container_element == NULL)
00221     {
00222       message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)");
00223       incoming_data.assign ("");
00224     }
00225     else     //curr_container_element != NULL
00226     {
00227       if (end_element_for_data_element == true)
00228       {
00229         incoming_data = strip_whitespace(incoming_data);
00230 
00231         curr_container_element->add_attribute (identifier, incoming_data);
00232         message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element");
00233         incoming_data.assign ("");
00234         is_data_element = false;
00235       }
00236       else
00237       {
00238         if (identifier == curr_container_element->tag_identifier)
00239         {
00240           if (incoming_data != "")
00241           {
00242             message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!");
00243           }
00244 
00245           if (identifier == "OFX")
00246           {
00247             /* The main container is a special case */
00248             tmp_container_element = curr_container_element;
00249             curr_container_element = curr_container_element->getparent ();
00250             MainContainer->gen_event();
00251             delete MainContainer;
00252             MainContainer = NULL;
00253             message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed");
00254           }
00255           else
00256           {
00257             tmp_container_element = curr_container_element;
00258             curr_container_element = curr_container_element->getparent ();
00259             if (MainContainer != NULL)
00260             {
00261               tmp_container_element->add_to_main_tree();
00262               message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer");
00263             }
00264             else
00265             {
00266               message_out (ERROR, "MainContainer is NULL trying to add element " + identifier);
00267             }
00268           }
00269         }
00270         else
00271         {
00272           message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open.");
00273         }
00274       }
00275     }
00276   }
00277 
00282   void data (const DataEvent & event)
00283   {
00284     string tmp;
00285     position = event.pos;
00286     AppendCharStringtostring (event.data, incoming_data);
00287     message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data);
00288   }
00289 
00294   void error (const ErrorEvent & event)
00295   {
00296     string message;
00297     string string_buf;
00298     OfxMsgType error_type = ERROR;
00299 
00300     position = event.pos;
00301     message = message + "OpenSP parser: ";
00302     switch (event.type)
00303     {
00304     case SGMLApplication::ErrorEvent::quantity:
00305       message = message + "quantity (Exceeding a quantity limit):";
00306       error_type = ERROR;
00307       break;
00308     case SGMLApplication::ErrorEvent::idref:
00309       message = message + "idref (An IDREF to a non-existent ID):";
00310       error_type = ERROR;
00311       break;
00312     case SGMLApplication::ErrorEvent::capacity:
00313       message = message + "capacity (Exceeding a capacity limit):";
00314       error_type = ERROR;
00315       break;
00316     case SGMLApplication::ErrorEvent::otherError:
00317       message = message + "otherError (misc parse error):";
00318       error_type = ERROR;
00319       break;
00320     case SGMLApplication::ErrorEvent::warning:
00321       message = message + "warning (Not actually an error.):";
00322       error_type = WARNING;
00323       break;
00324     case SGMLApplication::ErrorEvent::info:
00325       message =  message + "info (An informationnal message.  Not actually an error):";
00326       error_type = INFO;
00327       break;
00328     default:
00329       message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):";
00330     }
00331     message =   message + "\n" + CharStringtostring (event.message, string_buf);
00332     message_out (error_type, message);
00333   }
00334 
00339   void openEntityChange (const OpenEntityPtr & para_entity_ptr)
00340   {
00341     message_out(DEBUG, "openEntityChange()\n");
00342     entity_ptr = para_entity_ptr;
00343 
00344   };
00345 
00346 private:
00347 };
00348 
00352 int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[])
00353 {
00354   message_out(DEBUG, "Begin ofx_proc_sgml()");
00355   message_out(DEBUG, argv[0]);
00356   message_out(DEBUG, argv[1]);
00357   message_out(DEBUG, argv[2]);
00358 
00359   ParserEventGeneratorKit parserKit;
00360   parserKit.setOption (ParserEventGeneratorKit::showOpenEntities);
00361   EventGenerator *egp = parserKit.makeEventGenerator (argc, argv);
00362   egp->inhibitMessages (true);  /* Error output is handled by libofx not OpenSP */
00363   OFCApplication *app = new OFCApplication(libofx_context);
00364   unsigned nErrors = egp->run (*app); /* Begin parsing */
00365   delete egp;
00366   return nErrors > 0;
00367 }
libofx-0.9.4/doc/html/structOfxSecurityData.html0000644000175000017500000003650111553133250016655 00000000000000 LibOFX: OfxSecurityData Struct Reference

OfxSecurityData Struct Reference

An abstraction of a security, such as a stock, mutual fund, etc. More...

Data Fields

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.

char unique_id [OFX_UNIQUE_ID_LENGTH]
int unique_id_valid
char unique_id_type [OFX_UNIQUE_ID_TYPE_LENGTH]
int unique_id_type_valid
char secname [OFX_SECNAME_LENGTH]
int secname_valid
OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

char ticker [OFX_TICKER_LENGTH]
int ticker_valid
double unitprice
int unitprice_valid
time_t date_unitprice
int date_unitprice_valid
char currency [OFX_CURRENCY_LENGTH]
int currency_valid
char memo [OFX_MEMO2_LENGTH]
int memo_valid

Detailed Description

An abstraction of a security, such as a stock, mutual fund, etc.

The OfxSecurityData stucture is used to hols the securyty information inside a OfxTransactionData struct for investment transactions.

Definition at line 344 of file inc/libofx.h.


Field Documentation

The currency is a string in ISO-4217 format. It overrides the one defined in the statement for the unit price

Definition at line 380 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

The date as of which the unit price was valid.

Definition at line 375 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

Extra information not included in name

Definition at line 383 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

The full name of the security

Definition at line 360 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

The ticker symbol of the security

Definition at line 368 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

The id of the security being traded.

Definition at line 353 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

Usially "CUSIP" for FIs in north america

Definition at line 356 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

The price of each unit of the security, as of date_unitprice

Definition at line 371 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/ofx__request__statement_8cpp.html0000644000175000017500000001176211553133250020214 00000000000000 LibOFX: ofx_request_statement.cpp File Reference

ofx_request_statement.cpp File Reference

Implementation of libofx_request_statement to create an OFX file containing a request for a statement. More...

Go to the source code of this file.

Functions

char * libofx_request_statement (const OfxFiLogin *login, const OfxAccountData *account, time_t date_from)
char * libofx_request_payment (const OfxFiLogin *login, const OfxAccountData *account, const OfxPayee *payee, const OfxPayment *payment)
char * libofx_request_payment_status (const struct OfxFiLogin *login, const char *transactionid)

Detailed Description

Implementation of libofx_request_statement to create an OFX file containing a request for a statement.

Definition in file ofx_request_statement.cpp.

libofx-0.9.4/doc/html/functions_0x67.html0000644000175000017500000001372411553133250015130 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- g -

libofx-0.9.4/doc/html/file__preproc_8cpp_source.html0000644000175000017500000005574511553133250017467 00000000000000 LibOFX: file_preproc.cpp Source File

file_preproc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002           file_preproc.cpp
00003                              -------------------
00004     copyright            : (C) 2004 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #include <iostream>
00021 #include <fstream>
00022 #include <stdlib.h>
00023 #include <stdio.h>
00024 #include <string>
00025 #include "libofx.h"
00026 #include "messages.hh"
00027 #include "ofx_preproc.hh"
00028 #include "context.hh"
00029 #include "file_preproc.hh"
00030 
00031 using namespace std;
00032 const unsigned int READ_BUFFER_SIZE = 1024;
00033 
00034 /* get_file_type_description returns a string description of a LibofxFileType
00035  * suitable for debugging output or user communication.
00036  */
00037 const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
00038 {
00039   const char * retval = "UNKNOWN (File format couldn't be sucessfully identified)";
00040 
00041   for (int i = 0; LibofxImportFormatList[i].format != LAST; i++)
00042   {
00043     if (LibofxImportFormatList[i].format == file_format)
00044     {
00045       retval = LibofxImportFormatList[i].description;
00046     }
00047   }
00048   return retval;
00049 };
00050 
00051 /*
00052 libofx_get_file_type returns a proper enum from a file type string.
00053 */
00054 enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string)
00055 {
00056   enum LibofxFileFormat retval = UNKNOWN;
00057   for (int i = 0; LibofxImportFormatList[i].format != LAST; i++)
00058   {
00059     if (strcmp(LibofxImportFormatList[i].format_name, file_type_string) == 0)
00060     {
00061       retval = LibofxImportFormatList[i].format;
00062     }
00063   }
00064   return retval;
00065 }
00066 
00067 int libofx_proc_file(LibofxContextPtr p_libofx_context, const char * p_filename, LibofxFileFormat p_file_type)
00068 {
00069   LibofxContext * libofx_context = (LibofxContext *) p_libofx_context;
00070 
00071   if (p_file_type == AUTODETECT)
00072   {
00073     message_out(INFO, string("libofx_proc_file(): File format not specified, autodecting..."));
00074     libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename));
00075     message_out(INFO, string("libofx_proc_file(): Detected file format: ") +
00076                 libofx_get_file_format_description(LibofxImportFormatList,
00077                     libofx_context->currentFileType() ));
00078   }
00079   else
00080   {
00081     libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename));
00082     message_out(INFO,
00083                 string("libofx_proc_file(): File format forced to: ") +
00084                 libofx_get_file_format_description(LibofxImportFormatList,
00085                     libofx_context->currentFileType() ));
00086   }
00087 
00088   switch (libofx_context->currentFileType())
00089   {
00090   case OFX:
00091     ofx_proc_file(libofx_context, p_filename);
00092     break;
00093   case OFC:
00094     ofx_proc_file(libofx_context, p_filename);
00095     break;
00096   default:
00097     message_out(ERROR, string("libofx_proc_file(): Detected file format not yet supported ou couldn't detect file format; aborting."));
00098   }
00099   return 0;
00100 }
00101 
00102 enum LibofxFileFormat libofx_detect_file_type(const char * p_filename)
00103 {
00104   enum LibofxFileFormat retval = UNKNOWN;
00105   ifstream input_file;
00106   char buffer[READ_BUFFER_SIZE];
00107   string s_buffer;
00108   bool type_found = false;
00109 
00110   if (p_filename != NULL && strcmp(p_filename, "") != 0)
00111   {
00112     message_out(DEBUG, string("libofx_detect_file_type():Opening file: ") + p_filename);
00113 
00114     input_file.open(p_filename);
00115 
00116     if (!input_file)
00117     {
00118       message_out(ERROR, "libofx_detect_file_type():Unable to open the input file " + string(p_filename));
00119       return retval;
00120     }
00121     else
00122     {
00123       do
00124       {
00125         input_file.getline(buffer, sizeof(buffer), '\n');
00126         //cout<<buffer<<"\n";
00127         s_buffer.assign(buffer);
00128         //cout<<"input_file.gcount(): "<<input_file.gcount()<<" sizeof(buffer): "<<sizeof(buffer)<<endl;
00129         if (input_file.gcount() < (sizeof(buffer) - 1))
00130         {
00131           s_buffer.append("\n");//Just in case...
00132         }
00133         else if ( !input_file.eof() && input_file.fail())
00134         {
00135           input_file.clear();
00136         }
00137 
00138         if (s_buffer.find("<OFX>") != string::npos || s_buffer.find("<ofx>") != string::npos)
00139         {
00140           message_out(DEBUG, "libofx_detect_file_type():<OFX> tag has been found");
00141           retval = OFX;
00142           type_found = true;
00143         }
00144         else if (s_buffer.find("<OFC>") != string::npos || s_buffer.find("<ofc>") != string::npos)
00145         {
00146           message_out(DEBUG, "libofx_detect_file_type():<OFC> tag has been found");
00147           retval = OFC;
00148           type_found = true;
00149         }
00150 
00151       }
00152       while (type_found == false && !input_file.eof() && !input_file.bad());
00153     }
00154     input_file.close();
00155   }
00156   else
00157   {
00158     message_out(ERROR, "libofx_detect_file_type(): No input file specified");
00159   }
00160   if (retval == UNKNOWN)
00161     message_out(ERROR, "libofx_detect_file_type(): Failed to identify input file format");
00162   return retval;
00163 }
00164 
00165 
00166 
00167 
00168 
libofx-0.9.4/doc/html/ofx__utilities_8hh.html0000644000175000017500000003373511553133250016135 00000000000000 LibOFX: ofx_utilities.hh File Reference

ofx_utilities.hh File Reference

Various simple functions for type conversion & al. More...

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, SGMLApplication::CharString s)
 Convert OpenSP CharString to a C++ stream.
wchar_t * CharStringtowchar_t (SGMLApplication::CharString source, wchar_t *dest)
 Convert OpenSP CharString and put it in the C wchar_t string provided.
string CharStringtostring (const SGMLApplication::CharString source, string &dest)
 Convert OpenSP CharString to a C++ STL string.
string AppendCharStringtostring (const SGMLApplication::CharString source, string &dest)
 Append an OpenSP CharString to an existing C++ STL string.
time_t ofxdate_to_time_t (const string ofxdate)
 Convert a C++ string containing a time in OFX format to a C time_t.
double ofxamount_to_double (const string ofxamount)
 Convert OFX amount of money to double float.
string strip_whitespace (const string para_string)
 Sanitize a string coming from OpenSP.
int mkTempFileName (const char *tmpl, char *buffer, unsigned int size)

Detailed Description

Various simple functions for type conversion & al.

Definition in file ofx_utilities.hh.


Function Documentation

string CharStringtostring ( const SGMLApplication::CharString  source,
string &  dest 
)

Convert OpenSP CharString to a C++ STL string.

Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging.

Definition at line 70 of file ofx_utilities.cpp.

double ofxamount_to_double ( const string  ofxamount)

Convert OFX amount of money to double float.

Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float.

Note:
The ofx number format is the following: "." or "," as decimal separator, NO thousands separator.

Definition at line 204 of file ofx_utilities.cpp.

time_t ofxdate_to_time_t ( const string  ofxdate)

Convert a C++ string containing a time in OFX format to a C time_t.

Converts a date from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format (see OFX 2.01 spec p.66) to a C time_t.

Parameters:
ofxdatedate from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format
Returns:
C time_t in the local time zone
Note:
  • The library always returns the time in the systems local time
  • OFX defines the date up to the millisecond. The library ignores those milliseconds, since ANSI C does not handle such precision cleanly. The date provided by LibOFX is precise to the second, assuming that information this precise was provided in the ofx file. So you wont know the millisecond you were ruined...
DEVIATION FROM THE SPECS : The OFX specifications (both version 1.6 and 2.02) state that a client should assume that if the server returns a date without � specific time, we assume it means 0h00 GMT. As such, when we apply the local timezone and for example you are in the EST timezone, we will remove 5h, and the transaction will have occurred on the prior day! This is probably not what the bank intended (and will lead to systematic errors), but the spec is quite explicit in this respect (Ref: OFX 2.01 spec pp. 66-68)

To solve this problem (since usually a time error is relatively unimportant, but date error is), and to avoid problems in Australia caused by the behaviour in libofx up to 0.6.4, it was decided starting with 0.6.5 to use the following behavior:

-No specific time is given in the file (date only): Considering that most banks seem to be sending dates in this format represented as local time (not compliant with the specs), the transaction is assumed to have occurred 11h59 (just before noon) LOCAL TIME. This way, we should never change the date, since you'd have to travel in a timezone at least 11 hours backwards or 13 hours forward from your own to introduce mistakes. However, if you are in timezone +13 or +14, and your bank meant the data to be interpreted by the spec, you will get the wrong date. We hope that banks in those timezone will either represent in local time like most, or specify the timezone properly.

-No timezone is specified, but exact time is, the same behavior is mostly used, as many banks just append zeros instead of using the short notation. However, the time specified is used, even if 0 (midnight).

-When a timezone is specified, it is always used to properly convert in local time, following the spec.

Definition at line 108 of file ofx_utilities.cpp.

string strip_whitespace ( const string  para_string)

Sanitize a string coming from OpenSP.

Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching.

Definition at line 227 of file ofx_utilities.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__sgml_8hh_source.html0000644000175000017500000001215111553133250021110 00000000000000 LibOFX: ofx_sgml.hh Source File

ofx_sgml.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.h
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFX_SGML_H
00020 #define OFX_SGML_H
00021 #include "context.hh"
00023 int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]);
00024 
00025 #endif
libofx-0.9.4/doc/html/classOfxTransactionContainer.png0000644000175000017500000000272611553133250020007 00000000000000‰PNG  IHDRnˆ¨zHWPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2eIDATxíÝÝv²:Ea_;Fïÿ’÷!?Xí×-Ÿ9:”BLY‹œÞæækB>Å׫Û}:êºMmuS7uƒº©ÔMÝÔMÝÔMÝp|Ý""ÒÆ~ßð¤Þý'ú¿ëv);L_·X?ªàä}/M0Lìu»–f¯[ NÜ#bÍV³¤ƒå¿{¤!ëÁÞàÈ÷èNðžº]ÌS·u H[ù`Ü—„•E¢ýw<¸šp?Á›ëv ;|VÝ–¬ä—{•¹:OMwÜíOpDÝNo‡O­[zo7¹\þ{>ùìÎÇÖí¤vø¬º•ül3Wþ{:½­ö”7×íôv˜½néµ_/ëË»ûJß%¯=éÇ@¾wu»˜¦¯Û="êL¥4Fþ®‚”Öÿ– êÁë,uËoªÛµì0ÝÎÏ¿ÔíRvP7uS7¨›ºAÝÔMÝÔMÝÔ ê¦nP7uS7¨›ºáDu›O±†|³’¦Ëã÷̉œÛÉçqâDÎmd<ˆ$;@ ÙA Ù©nHv€ºÉÉHuƒ@²öœSê¨uÔ €ºê¨uÔ €ºê¨uÔ ¸1!ž*ÎZ7J€lR‚lRdSÝ ›”€×²ËÀôu‹…®ÒÛ¡ìùmmÔ —®[¬õèWRÝ›gý㲨®\·uE»EĶzq‹ÛmY¥"­}ëgùZÏkÆUËXµ;OKb;Ù+· \»nkͪu)ª½Ëfþk¿zãÊôÛÓ×­fGꞺás궆¾þÜu±9aXÁ¶n?žñd‘Ô S×-¢ZäÒñ²ïõºåsó¡nøÄºåÖÕ]©× 'תqÝz[/IÝp底zÕUÕmP­Ý¾<Ósu³ºáCêv‹ˆº›ºÝ"â¥Õ¾Ûrâ²½þS–‡–j¥“–³ó”Õ‚ªn˜»n”ÙT7È&%@ÝÙ¤u£ȦºA6)³9!ž*>žo? nÀtmûÖ7@Ý€ùÚ¦o€ºóÎO¨ nÔ P7ꨠnÔ P7L“àœx!³cÇŽ;v¤Ø±c瑱cGŠ;ucÇŽ)vìH±cÇÎ#cÇŽ;vêÆŽ;RìØ‘bÇŽGÆŽ)vìNa÷õ6¾ßv%vìNj÷uŸŽú‘±cw&;Œ;uóÈØ©›GÆŽº $»ëÖ-""mT{Öíj\>Ô98š;6¸ânúÍÖ<²Éì::?Ýâðȱ¶³Û ¹äl?Ënªç~'~ÇÓÿír2»‘ίy¬íìvý@¦sãëôE;ùôU_>î±9ž?Ë×:çvžòîÈ»óøt¡v²âu›Ìn S]ºÜO¾nÒ»£#mg·û!«O•»uϺw½ý¬»9ÞβßWÍ^½ÇšÓ×­fG2ú—ºÍa7ÐiçÛÞ\Ä}ÉRçF´Ýî™@¦VGêê.—õû¿óã´ûš€wÆuw÷Î.ß/Öíòv]Þ¥òæëPÛÙí^d¾Ä²pÙ/«ê¯%ò¹ù’yÑþú]×îq Ó §Ý/ðÁ¶³Û=Èv%Þ^¥~[Tu.—yê 0–èm5/¨¬Ûåí:›@nÞÝͰöÆŽ´Ý®ÈêeŸ·G|,1¸áÁ‚;šþáýrÝf³ëë4köîæÆ7¨íìvƒ@¦u±qÌ»"ÊK¥q¼,Ñiu]v¥¥·¨¦¯–ãj¾2eõ»ý¦n³Ùut¶ÌÓ–[\ÇlïèHÛÙíF¼0OÔ»Cì<2vìÔÍ#c§n;vê&ìÔÍ#cÇNÝØ±S7ŒÝÌu›ê‘±cw"þ'˜ %ôfXcIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2file__preproc_8cpp.html0000644000175000017500000003126011553133250020550 00000000000000 LibOFX: file_preproc.cpp File Reference

file_preproc.cpp File Reference

File type detection, etc. More...

Go to the source code of this file.

Functions

const char * libofx_get_file_format_description (const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
 get_file_format_description returns a string description of a LibofxFileType.
enum LibofxFileFormat libofx_get_file_format_from_str (const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
 libofx_get_file_type returns a proper enum from a file type string.
int libofx_proc_file (LibofxContextPtr p_libofx_context, const char *p_filename, LibofxFileFormat p_file_type)
 libofx_proc_file is the entry point of the library.
enum LibofxFileFormat libofx_detect_file_type (const char *p_filename)
 libofx_detect_file_type tries to analyze a file to determine it's format.

Variables

const unsigned int READ_BUFFER_SIZE = 1024

Detailed Description

File type detection, etc.

Implements AutoDetection of file type, and handoff to specific parsers.

Definition in file fx-0.9.4/lib/file_preproc.cpp.


Function Documentation

enum LibofxFileFormat libofx_detect_file_type ( const char *  p_filename)

libofx_detect_file_type tries to analyze a file to determine it's format.

Parameters:
p_filenameFile name of the file to process
Returns:
Detected file format, UNKNOWN if unsuccessfull.

Definition at line 102 of file fx-0.9.4/lib/file_preproc.cpp.

const char* libofx_get_file_format_description ( const struct LibofxFileFormatInfo  format_list[],
enum LibofxFileFormat  file_format 
)

get_file_format_description returns a string description of a LibofxFileType.

The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList

The file format which should match one of the formats in the list.

Returns:
null terminated string suitable for debugging output or user communication.

Definition at line 37 of file fx-0.9.4/lib/file_preproc.cpp.

Referenced by libofx_proc_file().

enum LibofxFileFormat libofx_get_file_format_from_str ( const struct LibofxFileFormatInfo  format_list[],
const char *  file_type_string 
)

libofx_get_file_type returns a proper enum from a file type string.

The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList

The string which contain the file format matching one of the format_name of the list.

Returns:
the file format, or UNKNOWN if the format wasn't recognised.

Definition at line 54 of file fx-0.9.4/lib/file_preproc.cpp.

Referenced by main().

int libofx_proc_file ( LibofxContextPtr  libofx_context,
const char *  p_filename,
enum LibofxFileFormat  ftype 
)

libofx_proc_file is the entry point of the library.

libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.

Definition at line 67 of file fx-0.9.4/lib/file_preproc.cpp.

Referenced by main().

libofx-0.9.4/doc/html/navtree.js0000644000175000017500000004723711553133251013457 00000000000000var NAVTREE = [ [ "LibOFX", "index.html", [ [ "LibOFX developer's manual", "index.html", null ], [ "Data Structures", "annotated.html", [ [ "cmdline_parser_params", "structcmdline__parser__params.html", null ], [ "ErrorMsg", "structErrorMsg.html", null ], [ "tree< T, tree_node_allocator >::fixed_depth_iterator", "classtree_1_1fixed__depth__iterator.html", null ], [ "gengetopt_args_info", "structgengetopt__args__info.html", null ], [ "tree< T, tree_node_allocator >::iterator_base", "classtree_1_1iterator__base.html", null ], [ "tree< T, tree_node_allocator >::iterator_base_less", "classtree_1_1iterator__base__less.html", null ], [ "LibofxContext", "classLibofxContext.html", null ], [ "LibofxFileFormatInfo", "structLibofxFileFormatInfo.html", null ], [ "NodeParser", "classNodeParser.html", null ], [ "OFCApplication", "classOFCApplication.html", null ], [ "OfxAccountContainer", "classOfxAccountContainer.html", null ], [ "OfxAccountData", "structOfxAccountData.html", null ], [ "OfxAccountInfoRequest", "classOfxAccountInfoRequest.html", null ], [ "OfxAggregate", "classOfxAggregate.html", null ], [ "OFXApplication", "classOFXApplication.html", null ], [ "OfxBalanceContainer", "classOfxBalanceContainer.html", null ], [ "OfxBankTransactionContainer", "classOfxBankTransactionContainer.html", null ], [ "OfxCurrency", "structOfxCurrency.html", null ], [ "OfxDummyContainer", "classOfxDummyContainer.html", null ], [ "OfxFiLogin", "structOfxFiLogin.html", null ], [ "OfxFiServiceInfo", "structOfxFiServiceInfo.html", null ], [ "OfxGenericContainer", "classOfxGenericContainer.html", null ], [ "OfxInvestmentTransactionContainer", "classOfxInvestmentTransactionContainer.html", null ], [ "OfxMainContainer", "classOfxMainContainer.html", null ], [ "OfxPayee", "structOfxPayee.html", null ], [ "OfxPayment", "structOfxPayment.html", null ], [ "OfxPaymentRequest", "classOfxPaymentRequest.html", null ], [ "OfxPushUpContainer", "classOfxPushUpContainer.html", null ], [ "OfxRequest", "classOfxRequest.html", null ], [ "OfxSecurityContainer", "classOfxSecurityContainer.html", null ], [ "OfxSecurityData", "structOfxSecurityData.html", null ], [ "OfxStatementContainer", "classOfxStatementContainer.html", null ], [ "OfxStatementData", "structOfxStatementData.html", null ], [ "OfxStatementRequest", "classOfxStatementRequest.html", null ], [ "OfxStatusContainer", "classOfxStatusContainer.html", null ], [ "OfxStatusData", "structOfxStatusData.html", null ], [ "OfxTransactionContainer", "classOfxTransactionContainer.html", null ], [ "OfxTransactionData", "structOfxTransactionData.html", null ], [ "option", "structoption.html", null ], [ "tree< T, tree_node_allocator >::post_order_iterator", "classtree_1_1post__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::pre_order_iterator", "classtree_1_1pre__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::sibling_iterator", "classtree_1_1sibling__iterator.html", null ], [ "tree< T, tree_node_allocator >", "classtree.html", null ], [ "tree_node_< T >", "classtree__node__.html", null ] ] ], [ "Data Structure Index", "classes.html", null ], [ "Class Hierarchy", "hierarchy.html", [ [ "cmdline_parser_params", "structcmdline__parser__params.html", null ], [ "ErrorMsg", "structErrorMsg.html", null ], [ "gengetopt_args_info", "structgengetopt__args__info.html", null ], [ "tree< T, tree_node_allocator >::iterator_base", "classtree_1_1iterator__base.html", [ [ "tree< T, tree_node_allocator >::fixed_depth_iterator", "classtree_1_1fixed__depth__iterator.html", null ], [ "tree< T, tree_node_allocator >::fixed_depth_iterator", "classtree_1_1fixed__depth__iterator.html", null ], [ "tree< T, tree_node_allocator >::post_order_iterator", "classtree_1_1post__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::post_order_iterator", "classtree_1_1post__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::pre_order_iterator", "classtree_1_1pre__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::pre_order_iterator", "classtree_1_1pre__order__iterator.html", null ], [ "tree< T, tree_node_allocator >::sibling_iterator", "classtree_1_1sibling__iterator.html", null ], [ "tree< T, tree_node_allocator >::sibling_iterator", "classtree_1_1sibling__iterator.html", null ] ] ], [ "tree< T, tree_node_allocator >::iterator_base_less", "classtree_1_1iterator__base__less.html", null ], [ "LibofxContext", "classLibofxContext.html", null ], [ "LibofxFileFormatInfo", "structLibofxFileFormatInfo.html", null ], [ "NodeParser", "classNodeParser.html", null ], [ "OFCApplication", "classOFCApplication.html", null ], [ "OfxAccountData", "structOfxAccountData.html", null ], [ "OfxAggregate", "classOfxAggregate.html", [ [ "OfxRequest", "classOfxRequest.html", [ [ "OfxAccountInfoRequest", "classOfxAccountInfoRequest.html", null ], [ "OfxAccountInfoRequest", "classOfxAccountInfoRequest.html", null ], [ "OfxPaymentRequest", "classOfxPaymentRequest.html", null ], [ "OfxPaymentRequest", "classOfxPaymentRequest.html", null ], [ "OfxStatementRequest", "classOfxStatementRequest.html", null ], [ "OfxStatementRequest", "classOfxStatementRequest.html", null ] ] ], [ "OfxRequest", "classOfxRequest.html", null ] ] ], [ "OFXApplication", "classOFXApplication.html", null ], [ "OfxCurrency", "structOfxCurrency.html", null ], [ "OfxFiLogin", "structOfxFiLogin.html", null ], [ "OfxFiServiceInfo", "structOfxFiServiceInfo.html", null ], [ "OfxGenericContainer", "classOfxGenericContainer.html", [ [ "OfxAccountContainer", "classOfxAccountContainer.html", null ], [ "OfxAccountContainer", "classOfxAccountContainer.html", null ], [ "OfxBalanceContainer", "classOfxBalanceContainer.html", null ], [ "OfxBalanceContainer", "classOfxBalanceContainer.html", null ], [ "OfxDummyContainer", "classOfxDummyContainer.html", null ], [ "OfxDummyContainer", "classOfxDummyContainer.html", null ], [ "OfxMainContainer", "classOfxMainContainer.html", null ], [ "OfxMainContainer", "classOfxMainContainer.html", null ], [ "OfxPushUpContainer", "classOfxPushUpContainer.html", null ], [ "OfxPushUpContainer", "classOfxPushUpContainer.html", null ], [ "OfxSecurityContainer", "classOfxSecurityContainer.html", null ], [ "OfxSecurityContainer", "classOfxSecurityContainer.html", null ], [ "OfxStatementContainer", "classOfxStatementContainer.html", null ], [ "OfxStatementContainer", "classOfxStatementContainer.html", null ], [ "OfxStatusContainer", "classOfxStatusContainer.html", null ], [ "OfxStatusContainer", "classOfxStatusContainer.html", null ], [ "OfxTransactionContainer", "classOfxTransactionContainer.html", [ [ "OfxBankTransactionContainer", "classOfxBankTransactionContainer.html", null ], [ "OfxBankTransactionContainer", "classOfxBankTransactionContainer.html", null ], [ "OfxInvestmentTransactionContainer", "classOfxInvestmentTransactionContainer.html", null ], [ "OfxInvestmentTransactionContainer", "classOfxInvestmentTransactionContainer.html", null ] ] ], [ "OfxTransactionContainer", "classOfxTransactionContainer.html", null ] ] ], [ "OfxPayee", "structOfxPayee.html", null ], [ "OfxPayment", "structOfxPayment.html", null ], [ "OfxSecurityData", "structOfxSecurityData.html", null ], [ "OfxStatementData", "structOfxStatementData.html", null ], [ "OfxStatusData", "structOfxStatusData.html", null ], [ "OfxTransactionData", "structOfxTransactionData.html", null ], [ "option", "structoption.html", null ], [ "tree< T, tree_node_allocator >", "classtree.html", null ], [ "tree_node_< T >", "classtree__node__.html", null ] ] ], [ "Data Fields", "functions.html", null ], [ "Namespace List", "namespaces.html", [ [ "kp", "namespacekp.html", null ] ] ], [ "File List", "files.html", [ [ "ofxconnect/cmdline.c", null, null ], [ "ofxdump/cmdline.c", null, null ], [ "ofxconnect/cmdline.h", null, null ], [ "ofxdump/cmdline.h", null, null ], [ "config.h", null, null ], [ "context.cpp", null, null ], [ "fx-0.9.4/lib/context.cpp", null, null ], [ "context.hh", null, null ], [ "fx-0.9.4/lib/context.hh", null, null ], [ "file_preproc.cpp", "file__preproc_8cpp.html", null ], [ "fx-0.9.4/lib/file_preproc.cpp", "fx-0_89_84_2lib_2file__preproc_8cpp.html", null ], [ "file_preproc.hh", "file__preproc_8hh.html", null ], [ "fx-0.9.4/lib/file_preproc.hh", "fx-0_89_84_2lib_2file__preproc_8hh.html", null ], [ "getopt.c", null, null ], [ "fx-0.9.4/lib/getopt.c", null, null ], [ "getopt1.c", null, null ], [ "fx-0.9.4/lib/getopt1.c", null, null ], [ "gnugetopt.h", null, null ], [ "fx-0.9.4/lib/gnugetopt.h", null, null ], [ "inc/libofx.h", "inc_2libofx_8h.html", null ], [ "libofx-0.9.4/inc/libofx.h", "libofx-0_89_84_2inc_2libofx_8h.html", null ], [ "main_doc.c", null, null ], [ "messages.cpp", "messages_8cpp.html", null ], [ "fx-0.9.4/lib/messages.cpp", "fx-0_89_84_2lib_2messages_8cpp.html", null ], [ "messages.hh", "messages_8hh.html", null ], [ "fx-0.9.4/lib/messages.hh", "fx-0_89_84_2lib_2messages_8hh.html", null ], [ "nodeparser.cpp", "nodeparser_8cpp.html", null ], [ "nodeparser.h", "nodeparser_8h.html", null ], [ "ofc_sgml.cpp", "ofc__sgml_8cpp.html", null ], [ "fx-0.9.4/lib/ofc_sgml.cpp", "fx-0_89_84_2lib_2ofc__sgml_8cpp.html", null ], [ "ofc_sgml.hh", "ofc__sgml_8hh.html", null ], [ "fx-0.9.4/lib/ofc_sgml.hh", "fx-0_89_84_2lib_2ofc__sgml_8hh.html", null ], [ "ofx2qif.c", "ofx2qif_8c.html", null ], [ "ofx_aggregate.hh", "ofx__aggregate_8hh.html", null ], [ "fx-0.9.4/lib/ofx_aggregate.hh", "fx-0_89_84_2lib_2ofx__aggregate_8hh.html", null ], [ "ofx_container_account.cpp", "ofx__container__account_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_account.cpp", "fx-0_89_84_2lib_2ofx__container__account_8cpp.html", null ], [ "ofx_container_generic.cpp", "ofx__container__generic_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_generic.cpp", "fx-0_89_84_2lib_2ofx__container__generic_8cpp.html", null ], [ "ofx_container_main.cpp", "ofx__container__main_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_main.cpp", "fx-0_89_84_2lib_2ofx__container__main_8cpp.html", null ], [ "ofx_container_security.cpp", "ofx__container__security_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_security.cpp", "fx-0_89_84_2lib_2ofx__container__security_8cpp.html", null ], [ "ofx_container_statement.cpp", "ofx__container__statement_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_statement.cpp", "fx-0_89_84_2lib_2ofx__container__statement_8cpp.html", null ], [ "ofx_container_transaction.cpp", "ofx__container__transaction_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_container_transaction.cpp", "fx-0_89_84_2lib_2ofx__container__transaction_8cpp.html", null ], [ "ofx_containers.hh", "ofx__containers_8hh.html", null ], [ "fx-0.9.4/lib/ofx_containers.hh", "fx-0_89_84_2lib_2ofx__containers_8hh.html", null ], [ "ofx_containers_misc.cpp", "ofx__containers__misc_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_containers_misc.cpp", "fx-0_89_84_2lib_2ofx__containers__misc_8cpp.html", null ], [ "ofx_error_msg.hh", "ofx__error__msg_8hh.html", null ], [ "fx-0.9.4/lib/ofx_error_msg.hh", "fx-0_89_84_2lib_2ofx__error__msg_8hh.html", null ], [ "ofx_preproc.cpp", "ofx__preproc_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_preproc.cpp", "fx-0_89_84_2lib_2ofx__preproc_8cpp.html", null ], [ "ofx_preproc.hh", "ofx__preproc_8hh.html", null ], [ "fx-0.9.4/lib/ofx_preproc.hh", "fx-0_89_84_2lib_2ofx__preproc_8hh.html", null ], [ "ofx_request.cpp", "ofx__request_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_request.cpp", "fx-0_89_84_2lib_2ofx__request_8cpp.html", null ], [ "ofx_request.hh", "ofx__request_8hh.html", null ], [ "fx-0.9.4/lib/ofx_request.hh", "fx-0_89_84_2lib_2ofx__request_8hh.html", null ], [ "ofx_request_accountinfo.cpp", "ofx__request__accountinfo_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_request_accountinfo.cpp", "fx-0_89_84_2lib_2ofx__request__accountinfo_8cpp.html", null ], [ "ofx_request_accountinfo.hh", "ofx__request__accountinfo_8hh.html", null ], [ "fx-0.9.4/lib/ofx_request_accountinfo.hh", "fx-0_89_84_2lib_2ofx__request__accountinfo_8hh.html", null ], [ "ofx_request_statement.cpp", "ofx__request__statement_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_request_statement.cpp", "fx-0_89_84_2lib_2ofx__request__statement_8cpp.html", null ], [ "ofx_request_statement.hh", "ofx__request__statement_8hh.html", null ], [ "fx-0.9.4/lib/ofx_request_statement.hh", "fx-0_89_84_2lib_2ofx__request__statement_8hh.html", null ], [ "ofx_sgml.cpp", "ofx__sgml_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_sgml.cpp", "fx-0_89_84_2lib_2ofx__sgml_8cpp.html", null ], [ "ofx_sgml.hh", "ofx__sgml_8hh.html", null ], [ "fx-0.9.4/lib/ofx_sgml.hh", "fx-0_89_84_2lib_2ofx__sgml_8hh.html", null ], [ "ofx_utilities.cpp", "ofx__utilities_8cpp.html", null ], [ "fx-0.9.4/lib/ofx_utilities.cpp", "fx-0_89_84_2lib_2ofx__utilities_8cpp.html", null ], [ "ofx_utilities.hh", "ofx__utilities_8hh.html", null ], [ "fx-0.9.4/lib/ofx_utilities.hh", "fx-0_89_84_2lib_2ofx__utilities_8hh.html", null ], [ "ofxconnect.cpp", "ofxconnect_8cpp.html", null ], [ "ofxdump.cpp", "ofxdump_8cpp.html", null ], [ "ofxpartner.cpp", "ofxpartner_8cpp.html", null ], [ "ofxpartner.h", "ofxpartner_8h.html", null ], [ "tree.hh", null, null ], [ "fx-0.9.4/lib/tree.hh", null, null ], [ "win32.cpp", null, null ], [ "fx-0.9.4/lib/win32.cpp", null, null ], [ "win32.hh", null, null ], [ "fx-0.9.4/lib/win32.hh", null, null ] ] ], [ "Globals", "globals.html", null ] ] ] ]; function createIndent(o,domNode,node,level) { if (node.parentNode && node.parentNode.parentNode) { createIndent(o,domNode,node.parentNode,level+1); } var imgNode = document.createElement("img"); if (level==0 && node.childrenData) { node.plus_img = imgNode; node.expandToggle = document.createElement("a"); node.expandToggle.href = "javascript:void(0)"; node.expandToggle.onclick = function() { if (node.expanded) { $(node.getChildrenUL()).slideUp("fast"); if (node.isLast) { node.plus_img.src = node.relpath+"ftv2plastnode.png"; } else { node.plus_img.src = node.relpath+"ftv2pnode.png"; } node.expanded = false; } else { expandNode(o, node, false); } } node.expandToggle.appendChild(imgNode); domNode.appendChild(node.expandToggle); } else { domNode.appendChild(imgNode); } if (level==0) { if (node.isLast) { if (node.childrenData) { imgNode.src = node.relpath+"ftv2plastnode.png"; } else { imgNode.src = node.relpath+"ftv2lastnode.png"; domNode.appendChild(imgNode); } } else { if (node.childrenData) { imgNode.src = node.relpath+"ftv2pnode.png"; } else { imgNode.src = node.relpath+"ftv2node.png"; domNode.appendChild(imgNode); } } } else { if (node.isLast) { imgNode.src = node.relpath+"ftv2blank.png"; } else { imgNode.src = node.relpath+"ftv2vertline.png"; } } imgNode.border = "0"; } function newNode(o, po, text, link, childrenData, lastNode) { var node = new Object(); node.children = Array(); node.childrenData = childrenData; node.depth = po.depth + 1; node.relpath = po.relpath; node.isLast = lastNode; node.li = document.createElement("li"); po.getChildrenUL().appendChild(node.li); node.parentNode = po; node.itemDiv = document.createElement("div"); node.itemDiv.className = "item"; node.labelSpan = document.createElement("span"); node.labelSpan.className = "label"; createIndent(o,node.itemDiv,node,0); node.itemDiv.appendChild(node.labelSpan); node.li.appendChild(node.itemDiv); var a = document.createElement("a"); node.labelSpan.appendChild(a); node.label = document.createTextNode(text); a.appendChild(node.label); if (link) { a.href = node.relpath+link; } else { if (childrenData != null) { a.className = "nolink"; a.href = "javascript:void(0)"; a.onclick = node.expandToggle.onclick; node.expanded = false; } } node.childrenUL = null; node.getChildrenUL = function() { if (!node.childrenUL) { node.childrenUL = document.createElement("ul"); node.childrenUL.className = "children_ul"; node.childrenUL.style.display = "none"; node.li.appendChild(node.childrenUL); } return node.childrenUL; }; return node; } function showRoot() { var headerHeight = $("#top").height(); var footerHeight = $("#nav-path").height(); var windowHeight = $(window).height() - headerHeight - footerHeight; navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); } function expandNode(o, node, imm) { if (node.childrenData && !node.expanded) { if (!node.childrenVisited) { getNode(o, node); } if (imm) { $(node.getChildrenUL()).show(); } else { $(node.getChildrenUL()).slideDown("fast",showRoot); } if (node.isLast) { node.plus_img.src = node.relpath+"ftv2mlastnode.png"; } else { node.plus_img.src = node.relpath+"ftv2mnode.png"; } node.expanded = true; } } function getNode(o, po) { po.childrenVisited = true; var l = po.childrenData.length-1; for (var i in po.childrenData) { var nodeData = po.childrenData[i]; po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], i==l); } } function findNavTreePage(url, data) { var nodes = data; var result = null; for (var i in nodes) { var d = nodes[i]; if (d[1] == url) { return new Array(i); } else if (d[2] != null) // array of children { result = findNavTreePage(url, d[2]); if (result != null) { return (new Array(i).concat(result)); } } } return null; } function initNavTree(toroot,relpath) { var o = new Object(); o.toroot = toroot; o.node = new Object(); o.node.li = document.getElementById("nav-tree-contents"); o.node.childrenData = NAVTREE; o.node.children = new Array(); o.node.childrenUL = document.createElement("ul"); o.node.getChildrenUL = function() { return o.node.childrenUL; }; o.node.li.appendChild(o.node.childrenUL); o.node.depth = 0; o.node.relpath = relpath; getNode(o, o.node); o.breadcrumbs = findNavTreePage(toroot, NAVTREE); if (o.breadcrumbs == null) { o.breadcrumbs = findNavTreePage("index.html",NAVTREE); } if (o.breadcrumbs != null && o.breadcrumbs.length>0) { var p = o.node; for (var i in o.breadcrumbs) { var j = o.breadcrumbs[i]; p = p.children[j]; expandNode(o,p,true); } p.itemDiv.className = p.itemDiv.className + " selected"; p.itemDiv.id = "selected"; $(window).load(showRoot); } } libofx-0.9.4/doc/html/classOfxPaymentRequest.png0000644000175000017500000000216311553133250016640 00000000000000‰PNG  IHDRˆ¸“çPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíK¶ƒ DSæœìÉo@óSy¢!Šxk` ¢]^Êfúz_¨W.:qñž.SŠ}¸.ˆ.ˆ.ˆ.šÄA’ì$ÜõôÙ5pq®‹RqùCúí«þ=\œì¢PÜîÓ$YEg$ÄSÉϤi²ä†+~È'ú\œíb«¸Ï£¥ÿë†d’Y³ÿDr\œä¢ª¸íVs塟 ÀÅï]ì*.×hÖŠ»Ké_Kf¹7E€‹ß¹ØÑšl—*fqa+ÜÓ²Aââ—. Å-‚i³âÙN•Íl¹_ââl¥âÖ]V‹OrüM·f­i’óQìL5pq²‹bñ %½hýʶjàâ\GŠÏvªå•Sàâ.e1ô¡E¡:Qó/í]mM Ô A⢱ à‚8à‚8à‚8àbW.T‚¹8¤Ï—÷·.:q\$µ?=0ÀE'.@€‹¬v pщ à"/ßAÄE7.@€ à¸.@€ à¸.@€‹3Š÷¡>Ã|T°,@ À°,@ À°,@ À €Àâ}¡`Ñ‹÷t™ú‹,@ À°,š"$;IFüùÿ·Ž‡ñYl!?Ä÷ CO‹ÃXl °·Ð$É¿{¤â> Éó1:LžÀ¢G;›Ù¬ÁºÃXìBàöL¿_fo½@0ÞfñGÄ^¨'ßbÇÃ`,¾lHö)äž²YŒÀbAxßäÝKûeü<îµ_¢ÁdoÁä¯xù˜ŠÃXl"¨ÒFöG‰Ãø,@ Àâ—iÐ8Üš`X€ €Å.ª»8Àâ;}†x X€í |` Àby€`±À°,@ À°,@ À°8Š"|—ˆ8  "ˆ8  "ˆ8  BÄD%](è÷‡G–FÄDq@-×D’;·7R½dÚ1ß&‡~ã ˆ‹†jãP;Ÿ8ô‡ð#ɯkLˆ|Ndãî’ Ëu†ùü—dÉÇü)q¸A⪇å#nKpëœü/ηŒÌŸJw¸W^î»—ÿŽWWt¹Ð6?»°˜Åfq×8„9Š- ‰CÎó‘_=Ä¢’<˜8Üo³ˆ_{ö©ç-¹Y¬Ü’÷âÐsÂZ&ëZ‡e|fÛ‡‹AB}ÆÁv„µ8¼ä–5]oÛ’Ùüx!†!³qè:çVÜAn‡ËG†Ã‘Õ#oã”FÄDq@-ÖäB ñJ?¡“7Á™$IEND®B`‚libofx-0.9.4/doc/html/jquery.js0000644000175000017500000024562211553133251013330 00000000000000/* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); /* * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) {I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() {G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); /* * jQuery UI 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Resizable 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Resizables * * Depends: * ui.core.js */ (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)) {s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);; /** * jQuery.ScrollTo - Easy element scrolling using jQuery. * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php). * Date: 2/8/2008 * @author Ariel Flesler * @version 1.3.2 */ ;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); libofx-0.9.4/doc/html/fx-0_89_84_2lib_2gnugetopt_8h_source.html0000644000175000017500000005116211553133250021004 00000000000000 LibOFX: gnugetopt.h Source File

gnugetopt.h

00001 /* Declarations for getopt.
00002    Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _GETOPT_H
00021 
00022 #ifndef __need_getopt
00023 # define _GETOPT_H 1
00024 #endif
00025 
00026 /* If __GNU_LIBRARY__ is not already defined, either we are being used
00027    standalone, or this is the first header included in the source file.
00028    If we are being used with glibc, we need to include <features.h>, but
00029    that does not exist if we are standalone.  So: if __GNU_LIBRARY__ is
00030    not defined, include <ctype.h>, which will pull in <features.h> for us
00031    if it's from glibc.  (Why ctype.h?  It's guaranteed to exist and it
00032    doesn't flood the namespace with stuff the way some other headers do.)  */
00033 #if !defined __GNU_LIBRARY__
00034 # include <ctype.h>
00035 #endif
00036 
00037 #ifdef  __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 /* For communication from `getopt' to the caller.
00042    When `getopt' finds an option that takes an argument,
00043    the argument value is returned here.
00044    Also, when `ordering' is RETURN_IN_ORDER,
00045    each non-option ARGV-element is returned here.  */
00046 
00047 extern char *optarg;
00048 
00049 /* Index in ARGV of the next element to be scanned.
00050    This is used for communication to and from the caller
00051    and for communication between successive calls to `getopt'.
00052 
00053    On entry to `getopt', zero means this is the first call; initialize.
00054 
00055    When `getopt' returns -1, this is the index of the first of the
00056    non-option elements that the caller should itself scan.
00057 
00058    Otherwise, `optind' communicates from one call to the next
00059    how much of ARGV has been scanned so far.  */
00060 
00061 extern int optind;
00062 
00063 /* Callers store zero here to inhibit the error message `getopt' prints
00064    for unrecognized options.  */
00065 
00066 extern int opterr;
00067 
00068 /* Set to an option character which was unrecognized.  */
00069 
00070 extern int optopt;
00071 
00072 #ifndef __need_getopt
00073 /* Describe the long-named options requested by the application.
00074    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
00075    of `struct option' terminated by an element containing a name which is
00076    zero.
00077 
00078    The field `has_arg' is:
00079    no_argument          (or 0) if the option does not take an argument,
00080    required_argument    (or 1) if the option requires an argument,
00081    optional_argument    (or 2) if the option takes an optional argument.
00082 
00083    If the field `flag' is not NULL, it points to a variable that is set
00084    to the value given in the field `val' when the option is found, but
00085    left unchanged if the option is not found.
00086 
00087    To have a long-named option do something other than set an `int' to
00088    a compiled-in constant, such as set a value from `optarg', set the
00089    option's `flag' field to zero and its `val' field to a nonzero
00090    value (the equivalent single-letter option character, if there is
00091    one).  For long options that have a zero `flag' field, `getopt'
00092    returns the contents of the `val' field.  */
00093 
00094 struct option
00095 {
00096 # if (defined __STDC__ && __STDC__) || defined __cplusplus
00097   const char *name;
00098 # else
00099   char *name;
00100 # endif
00101   /* has_arg can't be an enum because some compilers complain about
00102      type mismatches in all the code that assumes it is an int.  */
00103   int has_arg;
00104   int *flag;
00105   int val;
00106 };
00107 
00108 /* Names for the values of the `has_arg' field of `struct option'.  */
00109 
00110 # define no_argument            0
00111 # define required_argument      1
00112 # define optional_argument      2
00113 #endif  /* need getopt */
00114 
00115 
00116 /* Get definitions and prototypes for functions to process the
00117    arguments in ARGV (ARGC of them, minus the program name) for
00118    options given in OPTS.
00119 
00120    Return the option character from OPTS just read.  Return -1 when
00121    there are no more options.  For unrecognized options, or options
00122    missing arguments, `optopt' is set to the option letter, and '?' is
00123    returned.
00124 
00125    The OPTS string is a list of characters which are recognized option
00126    letters, optionally followed by colons, specifying that that letter
00127    takes an argument, to be placed in `optarg'.
00128 
00129    If a letter in OPTS is followed by two colons, its argument is
00130    optional.  This behavior is specific to the GNU `getopt'.
00131 
00132    The argument `--' causes premature termination of argument
00133    scanning, explicitly telling `getopt' that there are no more
00134    options.
00135 
00136    If OPTS begins with `--', then non-option arguments are treated as
00137    arguments to the option '\0'.  This behavior is specific to the GNU
00138    `getopt'.  */
00139 
00140 #if (defined __STDC__ && __STDC__) || defined __cplusplus
00141 # ifdef __GNU_LIBRARY__
00142 /* Many other libraries have conflicting prototypes for getopt, with
00143    differences in the consts, in stdlib.h.  To avoid compilation
00144    errors, only prototype getopt for the GNU C library.  */
00145 extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
00146 # else /* not __GNU_LIBRARY__ */
00147 extern int getopt ();
00148 # endif /* __GNU_LIBRARY__ */
00149 
00150 # ifndef __need_getopt
00151 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
00152                         const struct option *__longopts, int *__longind);
00153 extern int getopt_long_only (int __argc, char *const *__argv,
00154                              const char *__shortopts,
00155                              const struct option *__longopts, int *__longind);
00156 
00157 /* Internal only.  Users should not call this directly.  */
00158 extern int _getopt_internal (int __argc, char *const *__argv,
00159                              const char *__shortopts,
00160                              const struct option *__longopts, int *__longind,
00161                              int __long_only);
00162 # endif
00163 #else /* not __STDC__ */
00164 extern int getopt ();
00165 # ifndef __need_getopt
00166 extern int getopt_long ();
00167 extern int getopt_long_only ();
00168 
00169 extern int _getopt_internal ();
00170 # endif
00171 #endif /* __STDC__ */
00172 
00173 #ifdef  __cplusplus
00174 }
00175 #endif
00176 
00177 /* Make sure we later can get all the definitions and declarations.  */
00178 #undef __need_getopt
00179 
00180 #endif /* getopt.h */
libofx-0.9.4/doc/html/structOfxPayment.html0000644000175000017500000001072411553133250015670 00000000000000 LibOFX: OfxPayment Struct Reference

OfxPayment Struct Reference

Data Fields

char amount [OFX_AMOUNT_LENGTH]
char account [OFX_PAYACCT_LENGTH]
char datedue [9]
char memo [OFX_MEMO_LENGTH]

Detailed Description

Definition at line 809 of file inc/libofx.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/classOfxBankTransactionContainer.html0000644000175000017500000002422611553133250020762 00000000000000 LibOFX: OfxBankTransactionContainer Class Reference

OfxBankTransactionContainer Class Reference

Represents a bank or credid card transaction. More...

Inheritance diagram for OfxBankTransactionContainer:
OfxTransactionContainer OfxTransactionContainer OfxGenericContainer OfxGenericContainer OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxBankTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxBankTransactionContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Detailed Description

Represents a bank or credid card transaction.

Built from <STMTTRN> OFX SGML entity

Definition at line 221 of file ofx_containers.hh.


Member Function Documentation

void OfxBankTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxTransactionContainer.

Definition at line 177 of file ofx_container_transaction.cpp.

void OfxBankTransactionContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxTransactionContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/getopt_8c_source.html0000644000175000017500000026674211553133250015622 00000000000000 LibOFX: getopt.c Source File

getopt.c

00001 /* Getopt for GNU.
00002    NOTE: getopt is now part of the C library, so if you don't know what
00003    "Keep this file name-space clean" means, talk to drepper@gnu.org
00004    before changing it!
00005    Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
00006         Free Software Foundation, Inc.
00007    This file is part of the GNU C Library.
00008 
00009    The GNU C Library is free software; you can redistribute it and/or
00010    modify it under the terms of the GNU Lesser General Public
00011    License as published by the Free Software Foundation; either
00012    version 2.1 of the License, or (at your option) any later version.
00013 
00014    The GNU C Library is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017    Lesser General Public License for more details.
00018 
00019    You should have received a copy of the GNU Lesser General Public
00020    License along with the GNU C Library; if not, write to the Free
00021    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00022    02111-1307 USA.  */
00023 
00024 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
00025    Ditto for AIX 3.2 and <stdlib.h>.  */
00026 #ifndef _NO_PROTO
00027 # define _NO_PROTO
00028 #endif
00029 
00030 #ifdef HAVE_CONFIG_H
00031 # include <config.h>
00032 #endif
00033 
00034 #if !defined __STDC__ || !__STDC__
00035 /* This is a separate conditional since some stdc systems
00036    reject `defined (const)'.  */
00037 # ifndef const
00038 #  define const
00039 # endif
00040 #endif
00041 
00042 #include <stdio.h>
00043 
00044 /* Comment out all this code if we are using the GNU C Library, and are not
00045    actually compiling the library itself.  This code is part of the GNU C
00046    Library, but also included in many other GNU distributions.  Compiling
00047    and linking in this code is a waste when using the GNU C library
00048    (especially if it is a shared library).  Rather than having every GNU
00049    program understand `configure --with-gnu-libc' and omit the object files,
00050    it is simpler to just do this in the source for each such file.  */
00051 
00052 #define GETOPT_INTERFACE_VERSION 2
00053 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
00054 # include <gnu-versions.h>
00055 # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
00056 #  define ELIDE_CODE
00057 # endif
00058 #endif
00059 
00060 #ifndef ELIDE_CODE
00061 
00062 
00063 /* This needs to come after some library #include
00064    to get __GNU_LIBRARY__ defined.  */
00065 #ifdef  __GNU_LIBRARY__
00066 /* Don't include stdlib.h for non-GNU C libraries because some of them
00067    contain conflicting prototypes for getopt.  */
00068 # include <stdlib.h>
00069 # include <unistd.h>
00070 #endif  /* GNU C library.  */
00071 
00072 #ifdef VMS
00073 # include <unixlib.h>
00074 # if HAVE_STRING_H - 0
00075 #  include <string.h>
00076 # endif
00077 #endif
00078 
00079 #ifndef _
00080 /* This is for other GNU distributions with internationalized messages.  */
00081 # if defined HAVE_LIBINTL_H || defined _LIBC
00082 #  include <libintl.h>
00083 #  ifndef _
00084 #   define _(msgid)     gettext (msgid)
00085 #  endif
00086 # else
00087 #  define _(msgid)      (msgid)
00088 # endif
00089 #endif
00090 
00091 /* This version of `getopt' appears to the caller like standard Unix `getopt'
00092    but it behaves differently for the user, since it allows the user
00093    to intersperse the options with the other arguments.
00094 
00095    As `getopt' works, it permutes the elements of ARGV so that,
00096    when it is done, all the options precede everything else.  Thus
00097    all application programs are extended to handle flexible argument order.
00098 
00099    Setting the environment variable POSIXLY_CORRECT disables permutation.
00100    Then the behavior is completely standard.
00101 
00102    GNU application programs can use a third alternative mode in which
00103    they can distinguish the relative order of options and other arguments.  */
00104 
00105 #include "getopt.h"
00106 
00107 /* For communication from `getopt' to the caller.
00108    When `getopt' finds an option that takes an argument,
00109    the argument value is returned here.
00110    Also, when `ordering' is RETURN_IN_ORDER,
00111    each non-option ARGV-element is returned here.  */
00112 
00113 char *optarg;
00114 
00115 /* Index in ARGV of the next element to be scanned.
00116    This is used for communication to and from the caller
00117    and for communication between successive calls to `getopt'.
00118 
00119    On entry to `getopt', zero means this is the first call; initialize.
00120 
00121    When `getopt' returns -1, this is the index of the first of the
00122    non-option elements that the caller should itself scan.
00123 
00124    Otherwise, `optind' communicates from one call to the next
00125    how much of ARGV has been scanned so far.  */
00126 
00127 /* 1003.2 says this must be 1 before any call.  */
00128 int optind = 1;
00129 
00130 /* Formerly, initialization of getopt depended on optind==0, which
00131    causes problems with re-calling getopt as programs generally don't
00132    know that. */
00133 
00134 int __getopt_initialized;
00135 
00136 /* The next char to be scanned in the option-element
00137    in which the last option character we returned was found.
00138    This allows us to pick up the scan where we left off.
00139 
00140    If this is zero, or a null string, it means resume the scan
00141    by advancing to the next ARGV-element.  */
00142 
00143 static char *nextchar;
00144 
00145 /* Callers store zero here to inhibit the error message
00146    for unrecognized options.  */
00147 
00148 int opterr = 1;
00149 
00150 /* Set to an option character which was unrecognized.
00151    This must be initialized on some systems to avoid linking in the
00152    system's own getopt implementation.  */
00153 
00154 int optopt = '?';
00155 
00156 /* Describe how to deal with options that follow non-option ARGV-elements.
00157 
00158    If the caller did not specify anything,
00159    the default is REQUIRE_ORDER if the environment variable
00160    POSIXLY_CORRECT is defined, PERMUTE otherwise.
00161 
00162    REQUIRE_ORDER means don't recognize them as options;
00163    stop option processing when the first non-option is seen.
00164    This is what Unix does.
00165    This mode of operation is selected by either setting the environment
00166    variable POSIXLY_CORRECT, or using `+' as the first character
00167    of the list of option characters.
00168 
00169    PERMUTE is the default.  We permute the contents of ARGV as we scan,
00170    so that eventually all the non-options are at the end.  This allows options
00171    to be given in any order, even with programs that were not written to
00172    expect this.
00173 
00174    RETURN_IN_ORDER is an option available to programs that were written
00175    to expect options and other ARGV-elements in any order and that care about
00176    the ordering of the two.  We describe each non-option ARGV-element
00177    as if it were the argument of an option with character code 1.
00178    Using `-' as the first character of the list of option characters
00179    selects this mode of operation.
00180 
00181    The special argument `--' forces an end of option-scanning regardless
00182    of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
00183    `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
00184 
00185 static enum
00186 {
00187   REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
00188 } ordering;
00189 
00190 /* Value of POSIXLY_CORRECT environment variable.  */
00191 static char *posixly_correct;
00192 
00193 #ifdef  __GNU_LIBRARY__
00194 /* We want to avoid inclusion of string.h with non-GNU libraries
00195    because there are many ways it can cause trouble.
00196    On some systems, it contains special magic macros that don't work
00197    in GCC.  */
00198 # include <string.h>
00199 # define my_index       strchr
00200 #else
00201 
00202 # if HAVE_STRING_H
00203 #  include <string.h>
00204 # else
00205 #  include <strings.h>
00206 # endif
00207 
00208 /* Avoid depending on library functions or files
00209    whose names are inconsistent.  */
00210 
00211 #ifndef getenv
00212 extern char *getenv ();
00213 #endif
00214 
00215 static char *
00216 my_index (str, chr)
00217      const char *str;
00218      int chr;
00219 {
00220   while (*str)
00221     {
00222       if (*str == chr)
00223         return (char *) str;
00224       str++;
00225     }
00226   return 0;
00227 }
00228 
00229 /* If using GCC, we can safely declare strlen this way.
00230    If not using GCC, it is ok not to declare it.  */
00231 #ifdef __GNUC__
00232 /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
00233    That was relevant to code that was here before.  */
00234 # if (!defined __STDC__ || !__STDC__) && !defined strlen
00235 /* gcc with -traditional declares the built-in strlen to return int,
00236    and has done so at least since version 2.4.5. -- rms.  */
00237 extern int strlen (const char *);
00238 # endif /* not __STDC__ */
00239 #endif /* __GNUC__ */
00240 
00241 #endif /* not __GNU_LIBRARY__ */
00242 
00243 /* Handle permutation of arguments.  */
00244 
00245 /* Describe the part of ARGV that contains non-options that have
00246    been skipped.  `first_nonopt' is the index in ARGV of the first of them;
00247    `last_nonopt' is the index after the last of them.  */
00248 
00249 static int first_nonopt;
00250 static int last_nonopt;
00251 
00252 #ifdef _LIBC
00253 /* Stored original parameters.
00254    XXX This is no good solution.  We should rather copy the args so
00255    that we can compare them later.  But we must not use malloc(3).  */
00256 extern int __libc_argc;
00257 extern char **__libc_argv;
00258 
00259 /* Bash 2.0 gives us an environment variable containing flags
00260    indicating ARGV elements that should not be considered arguments.  */
00261 
00262 # ifdef USE_NONOPTION_FLAGS
00263 /* Defined in getopt_init.c  */
00264 extern char *__getopt_nonoption_flags;
00265 
00266 static int nonoption_flags_max_len;
00267 static int nonoption_flags_len;
00268 # endif
00269 
00270 # ifdef USE_NONOPTION_FLAGS
00271 #  define SWAP_FLAGS(ch1, ch2) \
00272   if (nonoption_flags_len > 0)                                                \
00273     {                                                                         \
00274       char __tmp = __getopt_nonoption_flags[ch1];                             \
00275       __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];          \
00276       __getopt_nonoption_flags[ch2] = __tmp;                                  \
00277     }
00278 # else
00279 #  define SWAP_FLAGS(ch1, ch2)
00280 # endif
00281 #else   /* !_LIBC */
00282 # define SWAP_FLAGS(ch1, ch2)
00283 #endif  /* _LIBC */
00284 
00285 /* Exchange two adjacent subsequences of ARGV.
00286    One subsequence is elements [first_nonopt,last_nonopt)
00287    which contains all the non-options that have been skipped so far.
00288    The other is elements [last_nonopt,optind), which contains all
00289    the options processed since those non-options were skipped.
00290 
00291    `first_nonopt' and `last_nonopt' are relocated so that they describe
00292    the new indices of the non-options in ARGV after they are moved.  */
00293 
00294 #if defined __STDC__ && __STDC__
00295 static void exchange (char **);
00296 #endif
00297 
00298 static void
00299 exchange (argv)
00300      char **argv;
00301 {
00302   int bottom = first_nonopt;
00303   int middle = last_nonopt;
00304   int top = optind;
00305   char *tem;
00306 
00307   /* Exchange the shorter segment with the far end of the longer segment.
00308      That puts the shorter segment into the right place.
00309      It leaves the longer segment in the right place overall,
00310      but it consists of two parts that need to be swapped next.  */
00311 
00312 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00313   /* First make sure the handling of the `__getopt_nonoption_flags'
00314      string can work normally.  Our top argument must be in the range
00315      of the string.  */
00316   if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
00317     {
00318       /* We must extend the array.  The user plays games with us and
00319          presents new arguments.  */
00320       char *new_str = malloc (top + 1);
00321       if (new_str == NULL)
00322         nonoption_flags_len = nonoption_flags_max_len = 0;
00323       else
00324         {
00325           memset (__mempcpy (new_str, __getopt_nonoption_flags,
00326                              nonoption_flags_max_len),
00327                   '\0', top + 1 - nonoption_flags_max_len);
00328           nonoption_flags_max_len = top + 1;
00329           __getopt_nonoption_flags = new_str;
00330         }
00331     }
00332 #endif
00333 
00334   while (top > middle && middle > bottom)
00335     {
00336       if (top - middle > middle - bottom)
00337         {
00338           /* Bottom segment is the short one.  */
00339           int len = middle - bottom;
00340           register int i;
00341 
00342           /* Swap it with the top part of the top segment.  */
00343           for (i = 0; i < len; i++)
00344             {
00345               tem = argv[bottom + i];
00346               argv[bottom + i] = argv[top - (middle - bottom) + i];
00347               argv[top - (middle - bottom) + i] = tem;
00348               SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
00349             }
00350           /* Exclude the moved bottom segment from further swapping.  */
00351           top -= len;
00352         }
00353       else
00354         {
00355           /* Top segment is the short one.  */
00356           int len = top - middle;
00357           register int i;
00358 
00359           /* Swap it with the bottom part of the bottom segment.  */
00360           for (i = 0; i < len; i++)
00361             {
00362               tem = argv[bottom + i];
00363               argv[bottom + i] = argv[middle + i];
00364               argv[middle + i] = tem;
00365               SWAP_FLAGS (bottom + i, middle + i);
00366             }
00367           /* Exclude the moved top segment from further swapping.  */
00368           bottom += len;
00369         }
00370     }
00371 
00372   /* Update records for the slots the non-options now occupy.  */
00373 
00374   first_nonopt += (optind - last_nonopt);
00375   last_nonopt = optind;
00376 }
00377 
00378 /* Initialize the internal data when the first call is made.  */
00379 
00380 #if defined __STDC__ && __STDC__
00381 static const char *_getopt_initialize (int, char *const *, const char *);
00382 #endif
00383 static const char *
00384 _getopt_initialize (argc, argv, optstring)
00385      int argc;
00386      char *const *argv;
00387      const char *optstring;
00388 {
00389   /* Start processing options with ARGV-element 1 (since ARGV-element 0
00390      is the program name); the sequence of previously skipped
00391      non-option ARGV-elements is empty.  */
00392 
00393   first_nonopt = last_nonopt = optind;
00394 
00395   nextchar = NULL;
00396 
00397   posixly_correct = getenv ("POSIXLY_CORRECT");
00398 
00399   /* Determine how to handle the ordering of options and nonoptions.  */
00400 
00401   if (optstring[0] == '-')
00402     {
00403       ordering = RETURN_IN_ORDER;
00404       ++optstring;
00405     }
00406   else if (optstring[0] == '+')
00407     {
00408       ordering = REQUIRE_ORDER;
00409       ++optstring;
00410     }
00411   else if (posixly_correct != NULL)
00412     ordering = REQUIRE_ORDER;
00413   else
00414     ordering = PERMUTE;
00415 
00416 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00417   if (posixly_correct == NULL
00418       && argc == __libc_argc && argv == __libc_argv)
00419     {
00420       if (nonoption_flags_max_len == 0)
00421         {
00422           if (__getopt_nonoption_flags == NULL
00423               || __getopt_nonoption_flags[0] == '\0')
00424             nonoption_flags_max_len = -1;
00425           else
00426             {
00427               const char *orig_str = __getopt_nonoption_flags;
00428               int len = nonoption_flags_max_len = strlen (orig_str);
00429               if (nonoption_flags_max_len < argc)
00430                 nonoption_flags_max_len = argc;
00431               __getopt_nonoption_flags =
00432                 (char *) malloc (nonoption_flags_max_len);
00433               if (__getopt_nonoption_flags == NULL)
00434                 nonoption_flags_max_len = -1;
00435               else
00436                 memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
00437                         '\0', nonoption_flags_max_len - len);
00438             }
00439         }
00440       nonoption_flags_len = nonoption_flags_max_len;
00441     }
00442   else
00443     nonoption_flags_len = 0;
00444 #endif
00445 
00446   return optstring;
00447 }
00448 
00449 /* Scan elements of ARGV (whose length is ARGC) for option characters
00450    given in OPTSTRING.
00451 
00452    If an element of ARGV starts with '-', and is not exactly "-" or "--",
00453    then it is an option element.  The characters of this element
00454    (aside from the initial '-') are option characters.  If `getopt'
00455    is called repeatedly, it returns successively each of the option characters
00456    from each of the option elements.
00457 
00458    If `getopt' finds another option character, it returns that character,
00459    updating `optind' and `nextchar' so that the next call to `getopt' can
00460    resume the scan with the following option character or ARGV-element.
00461 
00462    If there are no more option characters, `getopt' returns -1.
00463    Then `optind' is the index in ARGV of the first ARGV-element
00464    that is not an option.  (The ARGV-elements have been permuted
00465    so that those that are not options now come last.)
00466 
00467    OPTSTRING is a string containing the legitimate option characters.
00468    If an option character is seen that is not listed in OPTSTRING,
00469    return '?' after printing an error message.  If you set `opterr' to
00470    zero, the error message is suppressed but we still return '?'.
00471 
00472    If a char in OPTSTRING is followed by a colon, that means it wants an arg,
00473    so the following text in the same ARGV-element, or the text of the following
00474    ARGV-element, is returned in `optarg'.  Two colons mean an option that
00475    wants an optional arg; if there is text in the current ARGV-element,
00476    it is returned in `optarg', otherwise `optarg' is set to zero.
00477 
00478    If OPTSTRING starts with `-' or `+', it requests different methods of
00479    handling the non-option ARGV-elements.
00480    See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
00481 
00482    Long-named options begin with `--' instead of `-'.
00483    Their names may be abbreviated as long as the abbreviation is unique
00484    or is an exact match for some defined option.  If they have an
00485    argument, it follows the option name in the same ARGV-element, separated
00486    from the option name by a `=', or else the in next ARGV-element.
00487    When `getopt' finds a long-named option, it returns 0 if that option's
00488    `flag' field is nonzero, the value of the option's `val' field
00489    if the `flag' field is zero.
00490 
00491    The elements of ARGV aren't really const, because we permute them.
00492    But we pretend they're const in the prototype to be compatible
00493    with other systems.
00494 
00495    LONGOPTS is a vector of `struct option' terminated by an
00496    element containing a name which is zero.
00497 
00498    LONGIND returns the index in LONGOPT of the long-named option found.
00499    It is only valid when a long-named option has been found by the most
00500    recent call.
00501 
00502    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
00503    long-named options.  */
00504 
00505 int
00506 _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
00507      int argc;
00508      char *const *argv;
00509      const char *optstring;
00510      const struct option *longopts;
00511      int *longind;
00512      int long_only;
00513 {
00514   int print_errors = opterr;
00515   if (optstring[0] == ':')
00516     print_errors = 0;
00517 
00518   if (argc < 1)
00519     return -1;
00520 
00521   optarg = NULL;
00522 
00523   if (optind == 0 || !__getopt_initialized)
00524     {
00525       if (optind == 0)
00526         optind = 1;     /* Don't scan ARGV[0], the program name.  */
00527       optstring = _getopt_initialize (argc, argv, optstring);
00528       __getopt_initialized = 1;
00529     }
00530 
00531   /* Test whether ARGV[optind] points to a non-option argument.
00532      Either it does not have option syntax, or there is an environment flag
00533      from the shell indicating it is not an option.  The later information
00534      is only used when the used in the GNU libc.  */
00535 #if defined _LIBC && defined USE_NONOPTION_FLAGS
00536 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'       \
00537                       || (optind < nonoption_flags_len                        \
00538                           && __getopt_nonoption_flags[optind] == '1'))
00539 #else
00540 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
00541 #endif
00542 
00543   if (nextchar == NULL || *nextchar == '\0')
00544     {
00545       /* Advance to the next ARGV-element.  */
00546 
00547       /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
00548          moved back by the user (who may also have changed the arguments).  */
00549       if (last_nonopt > optind)
00550         last_nonopt = optind;
00551       if (first_nonopt > optind)
00552         first_nonopt = optind;
00553 
00554       if (ordering == PERMUTE)
00555         {
00556           /* If we have just processed some options following some non-options,
00557              exchange them so that the options come first.  */
00558 
00559           if (first_nonopt != last_nonopt && last_nonopt != optind)
00560             exchange ((char **) argv);
00561           else if (last_nonopt != optind)
00562             first_nonopt = optind;
00563 
00564           /* Skip any additional non-options
00565              and extend the range of non-options previously skipped.  */
00566 
00567           while (optind < argc && NONOPTION_P)
00568             optind++;
00569           last_nonopt = optind;
00570         }
00571 
00572       /* The special ARGV-element `--' means premature end of options.
00573          Skip it like a null option,
00574          then exchange with previous non-options as if it were an option,
00575          then skip everything else like a non-option.  */
00576 
00577       if (optind != argc && !strcmp (argv[optind], "--"))
00578         {
00579           optind++;
00580 
00581           if (first_nonopt != last_nonopt && last_nonopt != optind)
00582             exchange ((char **) argv);
00583           else if (first_nonopt == last_nonopt)
00584             first_nonopt = optind;
00585           last_nonopt = argc;
00586 
00587           optind = argc;
00588         }
00589 
00590       /* If we have done all the ARGV-elements, stop the scan
00591          and back over any non-options that we skipped and permuted.  */
00592 
00593       if (optind == argc)
00594         {
00595           /* Set the next-arg-index to point at the non-options
00596              that we previously skipped, so the caller will digest them.  */
00597           if (first_nonopt != last_nonopt)
00598             optind = first_nonopt;
00599           return -1;
00600         }
00601 
00602       /* If we have come to a non-option and did not permute it,
00603          either stop the scan or describe it to the caller and pass it by.  */
00604 
00605       if (NONOPTION_P)
00606         {
00607           if (ordering == REQUIRE_ORDER)
00608             return -1;
00609           optarg = argv[optind++];
00610           return 1;
00611         }
00612 
00613       /* We have found another option-ARGV-element.
00614          Skip the initial punctuation.  */
00615 
00616       nextchar = (argv[optind] + 1
00617                   + (longopts != NULL && argv[optind][1] == '-'));
00618     }
00619 
00620   /* Decode the current option-ARGV-element.  */
00621 
00622   /* Check whether the ARGV-element is a long option.
00623 
00624      If long_only and the ARGV-element has the form "-f", where f is
00625      a valid short option, don't consider it an abbreviated form of
00626      a long option that starts with f.  Otherwise there would be no
00627      way to give the -f short option.
00628 
00629      On the other hand, if there's a long option "fubar" and
00630      the ARGV-element is "-fu", do consider that an abbreviation of
00631      the long option, just like "--fu", and not "-f" with arg "u".
00632 
00633      This distinction seems to be the most useful approach.  */
00634 
00635   if (longopts != NULL
00636       && (argv[optind][1] == '-'
00637           || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
00638     {
00639       char *nameend;
00640       const struct option *p;
00641       const struct option *pfound = NULL;
00642       int exact = 0;
00643       int ambig = 0;
00644       int indfound = -1;
00645       int option_index;
00646 
00647       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
00648         /* Do nothing.  */ ;
00649 
00650       /* Test all long options for either exact match
00651          or abbreviated matches.  */
00652       for (p = longopts, option_index = 0; p->name; p++, option_index++)
00653         if (!strncmp (p->name, nextchar, nameend - nextchar))
00654           {
00655             if ((unsigned int) (nameend - nextchar)
00656                 == (unsigned int) strlen (p->name))
00657               {
00658                 /* Exact match found.  */
00659                 pfound = p;
00660                 indfound = option_index;
00661                 exact = 1;
00662                 break;
00663               }
00664             else if (pfound == NULL)
00665               {
00666                 /* First nonexact match found.  */
00667                 pfound = p;
00668                 indfound = option_index;
00669               }
00670             else if (long_only
00671                      || pfound->has_arg != p->has_arg
00672                      || pfound->flag != p->flag
00673                      || pfound->val != p->val)
00674               /* Second or later nonexact match found.  */
00675               ambig = 1;
00676           }
00677 
00678       if (ambig && !exact)
00679         {
00680           if (print_errors)
00681             fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
00682                      argv[0], argv[optind]);
00683           nextchar += strlen (nextchar);
00684           optind++;
00685           optopt = 0;
00686           return '?';
00687         }
00688 
00689       if (pfound != NULL)
00690         {
00691           option_index = indfound;
00692           optind++;
00693           if (*nameend)
00694             {
00695               /* Don't test has_arg with >, because some C compilers don't
00696                  allow it to be used on enums.  */
00697               if (pfound->has_arg)
00698                 optarg = nameend + 1;
00699               else
00700                 {
00701                   if (print_errors)
00702                     {
00703                       if (argv[optind - 1][1] == '-')
00704                         /* --option */
00705                         fprintf (stderr,
00706                                  _("%s: option `--%s' doesn't allow an argument\n"),
00707                                  argv[0], pfound->name);
00708                       else
00709                         /* +option or -option */
00710                         fprintf (stderr,
00711                                  _("%s: option `%c%s' doesn't allow an argument\n"),
00712                                  argv[0], argv[optind - 1][0], pfound->name);
00713                     }
00714 
00715                   nextchar += strlen (nextchar);
00716 
00717                   optopt = pfound->val;
00718                   return '?';
00719                 }
00720             }
00721           else if (pfound->has_arg == 1)
00722             {
00723               if (optind < argc)
00724                 optarg = argv[optind++];
00725               else
00726                 {
00727                   if (print_errors)
00728                     fprintf (stderr,
00729                            _("%s: option `%s' requires an argument\n"),
00730                            argv[0], argv[optind - 1]);
00731                   nextchar += strlen (nextchar);
00732                   optopt = pfound->val;
00733                   return optstring[0] == ':' ? ':' : '?';
00734                 }
00735             }
00736           nextchar += strlen (nextchar);
00737           if (longind != NULL)
00738             *longind = option_index;
00739           if (pfound->flag)
00740             {
00741               *(pfound->flag) = pfound->val;
00742               return 0;
00743             }
00744           return pfound->val;
00745         }
00746 
00747       /* Can't find it as a long option.  If this is not getopt_long_only,
00748          or the option starts with '--' or is not a valid short
00749          option, then it's an error.
00750          Otherwise interpret it as a short option.  */
00751       if (!long_only || argv[optind][1] == '-'
00752           || my_index (optstring, *nextchar) == NULL)
00753         {
00754           if (print_errors)
00755             {
00756               if (argv[optind][1] == '-')
00757                 /* --option */
00758                 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
00759                          argv[0], nextchar);
00760               else
00761                 /* +option or -option */
00762                 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
00763                          argv[0], argv[optind][0], nextchar);
00764             }
00765           nextchar = (char *) "";
00766           optind++;
00767           optopt = 0;
00768           return '?';
00769         }
00770     }
00771 
00772   /* Look at and handle the next short option-character.  */
00773 
00774   {
00775     char c = *nextchar++;
00776     char *temp = my_index (optstring, c);
00777 
00778     /* Increment `optind' when we start to process its last character.  */
00779     if (*nextchar == '\0')
00780       ++optind;
00781 
00782     if (temp == NULL || c == ':')
00783       {
00784         if (print_errors)
00785           {
00786             if (posixly_correct)
00787               /* 1003.2 specifies the format of this message.  */
00788               fprintf (stderr, _("%s: illegal option -- %c\n"),
00789                        argv[0], c);
00790             else
00791               fprintf (stderr, _("%s: invalid option -- %c\n"),
00792                        argv[0], c);
00793           }
00794         optopt = c;
00795         return '?';
00796       }
00797     /* Convenience. Treat POSIX -W foo same as long option --foo */
00798     if (temp[0] == 'W' && temp[1] == ';')
00799       {
00800         char *nameend;
00801         const struct option *p;
00802         const struct option *pfound = NULL;
00803         int exact = 0;
00804         int ambig = 0;
00805         int indfound = 0;
00806         int option_index;
00807 
00808         /* This is an option that requires an argument.  */
00809         if (*nextchar != '\0')
00810           {
00811             optarg = nextchar;
00812             /* If we end this ARGV-element by taking the rest as an arg,
00813                we must advance to the next element now.  */
00814             optind++;
00815           }
00816         else if (optind == argc)
00817           {
00818             if (print_errors)
00819               {
00820                 /* 1003.2 specifies the format of this message.  */
00821                 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
00822                          argv[0], c);
00823               }
00824             optopt = c;
00825             if (optstring[0] == ':')
00826               c = ':';
00827             else
00828               c = '?';
00829             return c;
00830           }
00831         else
00832           /* We already incremented `optind' once;
00833              increment it again when taking next ARGV-elt as argument.  */
00834           optarg = argv[optind++];
00835 
00836         /* optarg is now the argument, see if it's in the
00837            table of longopts.  */
00838 
00839         for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
00840           /* Do nothing.  */ ;
00841 
00842         /* Test all long options for either exact match
00843            or abbreviated matches.  */
00844         for (p = longopts, option_index = 0; p->name; p++, option_index++)
00845           if (!strncmp (p->name, nextchar, nameend - nextchar))
00846             {
00847               if ((unsigned int) (nameend - nextchar) == strlen (p->name))
00848                 {
00849                   /* Exact match found.  */
00850                   pfound = p;
00851                   indfound = option_index;
00852                   exact = 1;
00853                   break;
00854                 }
00855               else if (pfound == NULL)
00856                 {
00857                   /* First nonexact match found.  */
00858                   pfound = p;
00859                   indfound = option_index;
00860                 }
00861               else
00862                 /* Second or later nonexact match found.  */
00863                 ambig = 1;
00864             }
00865         if (ambig && !exact)
00866           {
00867             if (print_errors)
00868               fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
00869                        argv[0], argv[optind]);
00870             nextchar += strlen (nextchar);
00871             optind++;
00872             return '?';
00873           }
00874         if (pfound != NULL)
00875           {
00876             option_index = indfound;
00877             if (*nameend)
00878               {
00879                 /* Don't test has_arg with >, because some C compilers don't
00880                    allow it to be used on enums.  */
00881                 if (pfound->has_arg)
00882                   optarg = nameend + 1;
00883                 else
00884                   {
00885                     if (print_errors)
00886                       fprintf (stderr, _("\
00887 %s: option `-W %s' doesn't allow an argument\n"),
00888                                argv[0], pfound->name);
00889 
00890                     nextchar += strlen (nextchar);
00891                     return '?';
00892                   }
00893               }
00894             else if (pfound->has_arg == 1)
00895               {
00896                 if (optind < argc)
00897                   optarg = argv[optind++];
00898                 else
00899                   {
00900                     if (print_errors)
00901                       fprintf (stderr,
00902                                _("%s: option `%s' requires an argument\n"),
00903                                argv[0], argv[optind - 1]);
00904                     nextchar += strlen (nextchar);
00905                     return optstring[0] == ':' ? ':' : '?';
00906                   }
00907               }
00908             nextchar += strlen (nextchar);
00909             if (longind != NULL)
00910               *longind = option_index;
00911             if (pfound->flag)
00912               {
00913                 *(pfound->flag) = pfound->val;
00914                 return 0;
00915               }
00916             return pfound->val;
00917           }
00918           nextchar = NULL;
00919           return 'W';   /* Let the application handle it.   */
00920       }
00921     if (temp[1] == ':')
00922       {
00923         if (temp[2] == ':')
00924           {
00925             /* This is an option that accepts an argument optionally.  */
00926             if (*nextchar != '\0')
00927               {
00928                 optarg = nextchar;
00929                 optind++;
00930               }
00931             else
00932               optarg = NULL;
00933             nextchar = NULL;
00934           }
00935         else
00936           {
00937             /* This is an option that requires an argument.  */
00938             if (*nextchar != '\0')
00939               {
00940                 optarg = nextchar;
00941                 /* If we end this ARGV-element by taking the rest as an arg,
00942                    we must advance to the next element now.  */
00943                 optind++;
00944               }
00945             else if (optind == argc)
00946               {
00947                 if (print_errors)
00948                   {
00949                     /* 1003.2 specifies the format of this message.  */
00950                     fprintf (stderr,
00951                              _("%s: option requires an argument -- %c\n"),
00952                              argv[0], c);
00953                   }
00954                 optopt = c;
00955                 if (optstring[0] == ':')
00956                   c = ':';
00957                 else
00958                   c = '?';
00959               }
00960             else
00961               /* We already incremented `optind' once;
00962                  increment it again when taking next ARGV-elt as argument.  */
00963               optarg = argv[optind++];
00964             nextchar = NULL;
00965           }
00966       }
00967     return c;
00968   }
00969 }
00970 
00971 int
00972 getopt (argc, argv, optstring)
00973      int argc;
00974      char *const *argv;
00975      const char *optstring;
00976 {
00977   return _getopt_internal (argc, argv, optstring,
00978                            (const struct option *) 0,
00979                            (int *) 0,
00980                            0);
00981 }
00982 
00983 #endif  /* Not ELIDE_CODE.  */
00984 
00985 #ifdef TEST
00986 
00987 /* Compile with -DTEST to make an executable for use in testing
00988    the above definition of `getopt'.  */
00989 
00990 int
00991 main (argc, argv)
00992      int argc;
00993      char **argv;
00994 {
00995   int c;
00996   int digit_optind = 0;
00997 
00998   while (1)
00999     {
01000       int this_option_optind = optind ? optind : 1;
01001 
01002       c = getopt (argc, argv, "abc:d:0123456789");
01003       if (c == -1)
01004         break;
01005 
01006       switch (c)
01007         {
01008         case '0':
01009         case '1':
01010         case '2':
01011         case '3':
01012         case '4':
01013         case '5':
01014         case '6':
01015         case '7':
01016         case '8':
01017         case '9':
01018           if (digit_optind != 0 && digit_optind != this_option_optind)
01019             printf ("digits occur in two different argv-elements.\n");
01020           digit_optind = this_option_optind;
01021           printf ("option %c\n", c);
01022           break;
01023 
01024         case 'a':
01025           printf ("option a\n");
01026           break;
01027 
01028         case 'b':
01029           printf ("option b\n");
01030           break;
01031 
01032         case 'c':
01033           printf ("option c with value `%s'\n", optarg);
01034           break;
01035 
01036         case '?':
01037           break;
01038 
01039         default:
01040           printf ("?? getopt returned character code 0%o ??\n", c);
01041         }
01042     }
01043 
01044   if (optind < argc)
01045     {
01046       printf ("non-option ARGV-elements: ");
01047       while (optind < argc)
01048         printf ("%s ", argv[optind++]);
01049       printf ("\n");
01050     }
01051 
01052   exit (0);
01053 }
01054 
01055 #endif /* TEST */
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2file__preproc_8hh.html0000644000175000017500000001222111553133250020361 00000000000000 LibOFX: file_preproc.hh File Reference

file_preproc.hh File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Functions

enum LibofxFileFormat libofx_detect_file_type (const char *p_filename)
 libofx_detect_file_type tries to analyze a file to determine it's format.

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file fx-0.9.4/lib/file_preproc.hh.


Function Documentation

enum LibofxFileFormat libofx_detect_file_type ( const char *  p_filename)

libofx_detect_file_type tries to analyze a file to determine it's format.

Parameters:
p_filenameFile name of the file to process
Returns:
Detected file format, UNKNOWN if unsuccessfull.

Definition at line 102 of file file_preproc.cpp.

Referenced by libofx_proc_file().

libofx-0.9.4/doc/html/structOfxStatusData.html0000644000175000017500000004673111553133250016337 00000000000000 LibOFX: OfxStatusData Struct Reference

OfxStatusData Struct Reference

An abstraction of an OFX STATUS element. More...

Data Fields

Additional information

To give a minimum of context, the name of the OFX SGML element where this <STATUS> is located is available.

char ofx_element_name [OFX_ELEMENT_NAME_LENGTH]
int ofx_element_name_valid
OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

char * server_message
int server_message_valid

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.
enum  Severity {
  INFO, WARN, ERROR, INFO,
  WARN, ERROR
}
enum  Severity {
  INFO, WARN, ERROR, INFO,
  WARN, ERROR
}
int code
const char * name
const char * description
int code_valid
enum OfxStatusData::Severity severity
int severity_valid

Detailed Description

An abstraction of an OFX STATUS element.

The OfxStatusData structure represents a STATUS OFX element sent by the OFX server. Be carefull, you do not have much context except the entity name so your application should probably ignore this status if code==0. However, you should display a message if the status in non-zero, since an error probably occurred on the server side.

In a future version of this API, OfxStatusData structures might be linked from the OFX structures they are related to.

Definition at line 201 of file inc/libofx.h.


Member Enumeration Documentation

Severity of the error

Enumerator:
INFO 

The status is an informational message

WARN 

The status is a warning

ERROR 

The status is a true error

INFO 

The status is an informational message

WARN 

The status is a warning

ERROR 

The status is a true error

Definition at line 221 of file inc/libofx.h.

Severity of the error

Enumerator:
INFO 

The status is an informational message

WARN 

The status is a warning

ERROR 

The status is a true error

INFO 

The status is an informational message

WARN 

The status is a warning

ERROR 

The status is a true error

Definition at line 221 of file libofx-0.9.4/inc/libofx.h.


Field Documentation

Status code

Definition at line 215 of file inc/libofx.h.

Referenced by OfxStatusContainer::add_attribute().

If code_valid is true, so is name and description (They are obtained from a lookup table)

Definition at line 218 of file inc/libofx.h.

Referenced by OfxStatusContainer::add_attribute().

Code long description, from ofx_error_msg.h

Definition at line 217 of file inc/libofx.h.

Referenced by OfxStatusContainer::add_attribute().

const char * OfxStatusData::name

Code short name

Definition at line 216 of file inc/libofx.h.

Referenced by OfxStatusContainer::add_attribute().

Name of the OFX element this status is relevant to

Definition at line 209 of file inc/libofx.h.

Explanation given by the server for the Status Code. Especially important for generic errors.

Definition at line 234 of file inc/libofx.h.

Referenced by OfxStatusContainer::add_attribute().


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__account_8cpp.html0000644000175000017500000000753211553133250022615 00000000000000 LibOFX: ofx_container_account.cpp File Reference

ofx_container_account.cpp File Reference

Implementation of OfxAccountContainer for bank, credit card and investment accounts. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxAccountContainer for bank, credit card and investment accounts.

Definition in file fx-0.9.4/lib/ofx_container_account.cpp.

libofx-0.9.4/doc/html/ofx__sgml_8cpp.html0000644000175000017500000002031211553133250015232 00000000000000 LibOFX: ofx_sgml.cpp File Reference

ofx_sgml.cpp File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Data Structures

class  OFXApplication
 This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Functions

int ofx_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Variables

OfxMainContainerMainContainer = NULL
SGMLApplication::OpenEntityPtr entity_ptr
SGMLApplication::Position position

Detailed Description

OFX/SGML parsing functionnality.

Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/

Definition in file ofx_sgml.cpp.


Function Documentation

int ofx_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofx_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 368 of file ofx_sgml.cpp.

Referenced by libofx_proc_buffer(), and ofx_proc_file().


Variable Documentation

SGMLApplication::OpenEntityPtr entity_ptr

Global for determining the line number in OpenSP

Definition at line 25 of file messages.cpp.

SGMLApplication::Position position

Global for determining the line number in OpenSP

Definition at line 26 of file messages.cpp.

libofx-0.9.4/doc/html/ofx__preproc_8hh.html0000644000175000017500000002264611553133250015573 00000000000000 LibOFX: ofx_preproc.hh File Reference

ofx_preproc.hh File Reference

Preprocessing of the OFX files before parsing. More...

Go to the source code of this file.

Defines

#define OPENSPDCL_FILENAME   "opensp.dcl"
#define OFX160DTD_FILENAME   "ofx160.dtd"
#define OFCDTD_FILENAME   "ofc.dtd"

Functions

string sanitize_proprietary_tags (string input_string)
 Removes proprietary tags and comments.
string find_dtd (LibofxContextPtr ctx, string dtd_filename)
 Find the appropriate DTD for the file version.
int ofx_proc_file (LibofxContextPtr libofx_context, const char *)
 ofx_proc_file process an ofx or ofc file.

Detailed Description

Preprocessing of the OFX files before parsing.

Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.

Definition in file ofx_preproc.hh.


Function Documentation

string find_dtd ( LibofxContextPtr  ctx,
string  dtd_filename 
)

Find the appropriate DTD for the file version.

This function will try to find a DTD matching the requested_version and return the full path of the DTD found (or an empty string if unsuccessful)

Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly

It will look, in (order)

1- The environment variable OFX_DTD_PATH (if present) 2- On windows only, a relative path specified by get_dtd_installation_directory() 3- The path specified by the makefile in MAKEFILE_DTD_PATH, thru LIBOFX_DTD_DIR in configure (if present) 4- Any hardcoded paths in DTD_SEARCH_PATH

Definition at line 636 of file ofx_preproc.cpp.

int ofx_proc_file ( LibofxContextPtr  ctx,
const char *  p_filename 
)

ofx_proc_file process an ofx or ofc file.

libofx_proc_file must be called with a list of 1 or more OFX files to be parsed in command line format.

ofx_proc_file process an ofx or ofc file.

Takes care of comment striping, dtd locating, etc.

Definition at line 81 of file ofx_preproc.cpp.

string sanitize_proprietary_tags ( string  input_string)

Removes proprietary tags and comments.

This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it

Definition at line 487 of file ofx_preproc.cpp.

libofx-0.9.4/doc/html/namespacekp.html0000644000175000017500000000742411553133251014624 00000000000000 LibOFX: kp Namespace Reference

kp Namespace Reference

Functions

template<class T1 , class T2 >
void constructor (T1 *p, T2 &val)
template<class T1 >
void constructor (T1 *p)
template<class T1 >
void destructor (T1 *p)

Detailed Description

libofx-0.9.4/doc/html/ofx__container__main_8cpp.html0000644000175000017500000000625411553133250017426 00000000000000 LibOFX: ofx_container_main.cpp File Reference

ofx_container_main.cpp File Reference

Implementation of OfxMainContainer. More...

Go to the source code of this file.


Detailed Description

Implementation of OfxMainContainer.

Definition in file ofx_container_main.cpp.

libofx-0.9.4/doc/html/classOFXApplication.html0000644000175000017500000004336411553133250016205 00000000000000 LibOFX: OFXApplication Class Reference

OFXApplication Class Reference

This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Public Member Functions

 OFXApplication (LibofxContext *p_libofx_context)
void startElement (const StartElementEvent &event)
 Callback: Start of an OFX element.
void endElement (const EndElementEvent &event)
 Callback: End of an OFX element.
void data (const DataEvent &event)
 Callback: Data from an OFX element.
void error (const ErrorEvent &event)
 Callback: SGML parse error.
void openEntityChange (const OpenEntityPtr &para_entity_ptr)
 Callback: Receive internal OpenSP state.
 OFXApplication (LibofxContext *p_libofx_context)
void startElement (const StartElementEvent &event)
 Callback: Start of an OFX element.
void endElement (const EndElementEvent &event)
 Callback: End of an OFX element.
void data (const DataEvent &event)
 Callback: Data from an OFX element.
void error (const ErrorEvent &event)
 Callback: SGML parse error.
void openEntityChange (const OpenEntityPtr &para_entity_ptr)
 Callback: Receive internal OpenSP state.

Detailed Description

This object is driven by OpenSP as it parses the SGML from the ofx file(s)

Definition at line 44 of file ofx_sgml.cpp.


Member Function Documentation

void OFXApplication::data ( const DataEvent &  event) [inline]

Callback: Data from an OFX element.

An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data.

Definition at line 298 of file ofx_sgml.cpp.

void OFXApplication::data ( const DataEvent &  event) [inline]

Callback: Data from an OFX element.

An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data.

Definition at line 298 of file fx-0.9.4/lib/ofx_sgml.cpp.

void OFXApplication::endElement ( const EndElementEvent &  event) [inline]

Callback: End of an OFX element.

An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file.

Definition at line 216 of file ofx_sgml.cpp.

void OFXApplication::endElement ( const EndElementEvent &  event) [inline]

Callback: End of an OFX element.

An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file.

Definition at line 216 of file fx-0.9.4/lib/ofx_sgml.cpp.

void OFXApplication::error ( const ErrorEvent &  event) [inline]

Callback: SGML parse error.

An OpenSP callback, get's called when a parser error has occured.

Definition at line 310 of file ofx_sgml.cpp.

void OFXApplication::error ( const ErrorEvent &  event) [inline]

Callback: SGML parse error.

An OpenSP callback, get's called when a parser error has occured.

Definition at line 310 of file fx-0.9.4/lib/ofx_sgml.cpp.

void OFXApplication::openEntityChange ( const OpenEntityPtr &  para_entity_ptr) [inline]

Callback: Receive internal OpenSP state.

An Internal OpenSP callback, used to be able to generate line number.

Definition at line 355 of file ofx_sgml.cpp.

void OFXApplication::openEntityChange ( const OpenEntityPtr &  para_entity_ptr) [inline]

Callback: Receive internal OpenSP state.

An Internal OpenSP callback, used to be able to generate line number.

Definition at line 355 of file fx-0.9.4/lib/ofx_sgml.cpp.

void OFXApplication::startElement ( const StartElementEvent &  event) [inline]

Callback: Start of an OFX element.

An OpenSP callback, get's called when the opening tag of an OFX element appears in the file

Definition at line 71 of file ofx_sgml.cpp.

void OFXApplication::startElement ( const StartElementEvent &  event) [inline]

Callback: Start of an OFX element.

An OpenSP callback, get's called when the opening tag of an OFX element appears in the file

Definition at line 71 of file fx-0.9.4/lib/ofx_sgml.cpp.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/doxygen.png0000644000175000017500000000754611553133250013636 00000000000000‰PNG  IHDRh ;ˆØ-IDATxí]{XŒyÿ¾sZ%Ê”NF:¨´FåЪքbÝè@;~ÓŽÃ"DH‘ÚZ•ð–m_Œéè4ÄÙÚ!ë-‡2«U«Ce[Š"§š_ñÌ3óLSìõ¾ï¾öº|®««y>§ïý¹ïïá_ ™L†öþZ·¼ß¦ajëñ®¹L•oñúþ}«.Íë2Þãû$Zöå);*.d¥~Ûìß³wˆ—·'ˆâ0³Ëâþ@áû!ZZeÊÿÁÞͺwÓøÏÔÚ‰ù?ØO =\Lâ[òg²dxr0Ð —€¤Rrj·Jž€‘*í.WJN5¨äÉqÈMªÔ[mºÞ•’Sb58™Ä¼RB5½¥•’SRus[2<ÙÄ %·˜˜•²V'˜ê+%§$fv˜ØÄºR»«Kó$ ¡¥C 4ã+xº˜£½sQÙ}f¶ðÀ[²vôZ €ç6c}”½!,Lt×ï<ÂÅ«µ°dx†H)/ÎÙfí襧¥C«1¶v£ôº[~– ÏÑåÅ9%DÏDKgžrN}M9úY««3*/Îi謷%ÓU^œ#¶vôr'p²=]ÌÑ_§7®ßy„ìS¸ª½ëkÊaÉð´-/Î!E²vôâà902œíÁÉ–FæŸ*¸Å,ý­– O!1k>QÓÓ³¦°dx¦X:ûð¼=GÃÂD×ï<ÂþÃ'¸fvRªKó‚UZjbóièþ¤`èõýˆtº9cùœ‘xÕÚªV W­­°sžabóièw1ó1x%îæhŒ¹Þ¶¸9׉>oÕ®hkG¯~¥—Nl°sž"^™ÀdŽ2%sw…ø¨•¼W­­‹ìœ§D¸z¯àí W †Æç˜8c>‚í1”ô‡m·Bvêî«ÖÖ8܉ÞAˆZò þT…u—r­½ª´th9kÂÖRêåŸSfÛþ/d§–°‰¾äœ1kçb„A.ܸ@ø“+;:j ÛÚÑË«ôÒ‰|#­Ýp4i®â¨]¼â߯óV~éØÇŒ…xfv$Õ¥y| S[ö;BOK‡V“ÅßÖàÎÌa 4x0¶Ï:ÂßDN54>Çgœõxp÷ªo;Z:´¬œÃÉ”º€ÕÇðë™ïbÛ‡ªöü|Ñ^TŠ7=$4)L!Ü/åuü’#)9/rqÃ%îØÅï¬~a”çŽÅ-à¸poE ‚”®,|gŽ¥m /9/ŠsÃâ˜Ø|šœ±c Ó/åu¨ü Êë€P\…aÁÂ’ó¢‡1,¦¥Ó¢Ã;ueòyªKó\ä…°üÃ"7-K!3>õ2ÊËËamm åÚÈr7M.(~[2ÓÝÉ„Œ]©¨C<¿í»b9Ç[)v[~Ñ,_º@\|î8ËqÜ´{· Ð}QÞ”ugr7àÛÈJ]|Úe¤ïÚ`ƒ–­æçÿ¤à™4s5Ü+µÕÒ¡•©Æ\§áéãû¶Ù•ýxàJ,ûÌudùùs&@yŽõI…eD…Ÿ;ç8nZÁž={ʘfóQU|X ÞØÚ)ض˜"ÞtîVÜ-ÏwÐo¨ãç¢ý‰œöJy>¶6è°¹ ÌFrÊf¥ÑÍú’ KbÏà¼(!@~»ó³) F¹{€í€Ave'3£Hÿ£¦˜î»Íu @³¯Aò±¬$èj÷"s&û…½&ób~¶t”»w¢ÿ¼¼¥þŠ·öQÓ J~Iå âJÚö½˜Ÿ]=ÊÝ;=|S{ºû™Éç‘“nçÊÜ9ôË¿ÈõË„.{ù®‰Ü´`Œb³ßÅÊå ÅâÚž)†j\Þ€ÔΕ›ÞY_ÂE_¸â.gÚ0uõ‹‘Ÿ‰2ݪiDàWËÐÜX'ÖìkÀÌÿº©ü–ñqýòV¶gDO³¯Ý„¦âÁÔôçE 6È ä1cZŒ¦ÄÄ—n£¹±NXxú(¿] ±ãgL_ºM!ÓÐb4Ü+e´´Ê¤âŽdüƒç62[é£]Am­ž,b÷@Jáé£Õ„ÿð‘Ü_Ù,Wºˆr€‘®Îèr_g8ÕÕ&(ÁQAäÛ4·­Ÿò.«ö—¯­ajëAïghS–öÝFJËÛhheg©‹³;Lýcs é/¼RƒÈõËÄ¢ì,‘—¾84†íõ‰9™óõ:n–œ`‰²³Ä,o_ï~†6YIqaÐÑî¥vÊèã¸v>=V”E¹æXÞ¾5™é=uu›^À/ °A”eD䆸ÍX¹j®S¬‘#§Ï^Ëžç3œŒÇì-ÂÙ£[Ã@µövmæÏ ’X ÊÎÊW¤×vú9šÚúѽµõQ_{ͽ3žäW\ø¦æØ:p¤ajëeIÉ)tšâîŽåáܱ8Iû£>xødÆöEóöëd:ÛŒ4µõk¾OŽƒNI¼‰¨½q>m•á1!)[©›Vàb47ýa @æšṉ̃ p…%5Pþ~üä¾Z‚æ¦?| 3³•0DN  á}® Unû¬@ú® » 3¹ÌÁÃ'‹Tç(,©ÁÏ—ïÂÁÊ^.ŠM¤ÄA8a?šUÙ¾äJ<§à2S÷ þ~…@=hjë3-GÍÄ|ŸÈ8Y.¯—¨®]XRƒèËIT9X²A€›¿ž$ÚéÇÛÈõ™hIPvã!ÀvHÿ°}Úo)Ͷ‡8rŠßš ¶=…Ч*^÷˜éiEïŸÂ«8‘"<˜Ìö Ht™¶œ·"Б²æ–͘á¿Êx.üZ‹˜M!b~ƒé Ã!c ’bwÀ·zëqT\È L*a.ˆŒÙÁP7:Û*(FÁñøpáÁô8¶O@â¿5<å9•17>yö“1z¸a‡zs{/Q†9æ‘ ´j}S¹vYD*n]Í!rÐhyakÔj ™Ê„«úgúÍ‘ d¦©­_¾*llé]^&}ˆ˜¨ÍhnúÃÛpȨèí[¨ä.Y»µ7..ÐÔÖOŽÚ²ÆµÉX|Úeœ%¤ÈL%äL¿9e ‰Étå¼ÇO^ (ˆÛp 3U±%ßär ‡ŒJŽ ›§vÎ2éCÊ Äzá2SãfúÍ1êÃ]Ïõ™@ÝÈ™¼€ÄÜn’èÛp%®Ö"nËJR µß2GÛ+Z™Š[¥?’@„½[PèâÙcÐWKþÂÕZìÛó=’â×Q÷ŸšiøÏäôîÓ?yê¬E`3‡ª+Wá‡ý;ñìÉÃŽöîÓ¿fóæHŠÛÒ%¸x2!%#Mì?;p)î°™*à²u;p_zÉ%#M !pˆ‚WÇR†Š«phϦÝi‚Eª8ügFôîÓ?ÔÁíKÈïü²ëp)_+Ç©XÀPÅž‘&ˆ#jðÌí&q=˜n˜0ÚLí¬×n>Dá•\Ê¢á÷J[ts»I¢è5³)¼&~J ¤:Úè´µAB„î@‹PKÆ´×doCú)ñÑaSteLgÓ.㦶襩›Àÿ?MàÙ¿|Ö¸bÙšs+s’¤Ÿ¸†ÑtïÙ›À@€<öòyÓ¶_=ï ‡žok®Ô‡Û¶½ÚžŸ¿x¾Œª¢Ã=ä_C?ÝlÐßB™«WŠp·òœ‰ÙcK3=hh(b%ùÐ7u@}mEû»ÃtØxØØØâRÁ)ÔUÿ¢%“2™ ݺ)©Ø™¢;¸œŸnÝ{†®ÃÆÎ†‰¡î_2Ÿ´úªŠ ý‘ýLKϲַÆöEe÷¡A(ô¤ù%ž?iÀÓÆßÓ¸›`N·zýàëÑ,ñðÞo´w¯ÊNõ{elЧ‡òÉ«}ð·êq¥ì&ªKsñüÉÃän=>º`á°±³Ýÿ*q:½âht§¿Õw_Z”ÞòòÙ^š:cå¾nÝ{âùÓ†‹Ýº÷Ì`N£;‘×›Üj*ÿµ½¥å¥K¯Þ}^4?&ý=zi¡—¦zkõCcýPBht'×ÿÑ|UE‡ä1 ý;ž&5v›øßõëÛµ]@kS}ðÿpŽªª¢ÃâÕ¥y &þ>Ø{fÝ>Pð~ÛÿÞžk˜^œIEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__account_8cpp_source.html0000644000175000017500000006266611553133250024206 00000000000000 LibOFX: ofx_container_account.cpp Source File

ofx_container_account.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_account.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <string>
00025 #include "messages.hh"
00026 #include "libofx.h"
00027 #include "ofx_containers.hh"
00028 #include "ofx_utilities.hh"
00029 
00030 extern OfxMainContainer * MainContainer;
00031 
00032 /***************************************************************************
00033  *                      OfxAccountContainer                                *
00034  ***************************************************************************/
00035 
00036 OfxAccountContainer::OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00037   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00038 {
00039   memset(&data, 0, sizeof(data));
00040   type = "ACCOUNT";
00041   strcpy(bankid, "");
00042   strcpy(branchid, "");
00043   strcpy(acctid, "");
00044   strcpy(acctkey, "");
00045   strcpy(brokerid, "");
00046   if (para_tag_identifier == "CCACCTFROM")
00047   {
00048     /*Set the type for a creditcard account.  Bank account specific
00049         OFX elements will set this attribute elsewhere */
00050     data.account_type = data.OFX_CREDITCARD;
00051     data.account_type_valid = true;
00052   }
00053   if (para_tag_identifier == "INVACCTFROM")
00054   {
00055     /*Set the type for an investment account.  Bank account specific
00056         OFX elements will set this attribute elsewhere */
00057     data.account_type = data.OFX_INVESTMENT;
00058     data.account_type_valid = true;
00059   }
00060   if (parentcontainer != NULL && ((OfxStatementContainer*)parentcontainer)->data.currency_valid == true)
00061   {
00062     strncpy(data.currency, ((OfxStatementContainer*)parentcontainer)->data.currency, OFX_CURRENCY_LENGTH); /* In ISO-4217 format */
00063     data.currency_valid = true;
00064   }
00065 }
00066 OfxAccountContainer::~OfxAccountContainer()
00067 {
00068   /*  if (parentcontainer->type == "STATEMENT")
00069       {
00070       ((OfxStatementContainer*)parentcontainer)->add_account(data);
00071       }
00072       ofx_proc_account_cb (data);*/
00073 }
00074 
00075 void OfxAccountContainer::add_attribute(const string identifier, const string value)
00076 {
00077   if ( identifier == "BANKID")
00078   {
00079     strncpy(bankid, value.c_str(), OFX_BANKID_LENGTH);
00080     data.bank_id_valid = true;
00081     strncpy(data.bank_id, value.c_str(), OFX_BANKID_LENGTH);
00082   }
00083   else if ( identifier == "BRANCHID")
00084   {
00085     strncpy(branchid, value.c_str(), OFX_BRANCHID_LENGTH);
00086     data.branch_id_valid = true;
00087     strncpy(data.branch_id, value.c_str(), OFX_BRANCHID_LENGTH);
00088   }
00089   else if ( identifier == "ACCTID")
00090   {
00091     strncpy(acctid, value.c_str(), OFX_ACCTID_LENGTH);
00092     data.account_number_valid = true;
00093     strncpy(data.account_number, value.c_str(), OFX_ACCTID_LENGTH);
00094   }
00095   else if ( identifier == "ACCTKEY")
00096   {
00097     strncpy(acctkey, value.c_str(), OFX_ACCTKEY_LENGTH);
00098   }
00099   else if ( identifier == "BROKERID")     /* For investment accounts */
00100   {
00101     strncpy(brokerid, value.c_str(), OFX_BROKERID_LENGTH);
00102     data.broker_id_valid = true;
00103     strncpy(data.broker_id, value.c_str(), OFX_BROKERID_LENGTH);
00104   }
00105   else if ((identifier == "ACCTTYPE") || (identifier == "ACCTTYPE2"))
00106   {
00107     data.account_type_valid = true;
00108     if (value == "CHECKING")
00109     {
00110       data.account_type = data.OFX_CHECKING;
00111     }
00112     else if (value == "SAVINGS")
00113     {
00114       data.account_type = data.OFX_SAVINGS;
00115     }
00116     else if (value == "MONEYMRKT")
00117     {
00118       data.account_type = data.OFX_MONEYMRKT;
00119     }
00120     else if (value == "CREDITLINE")
00121     {
00122       data.account_type = data.OFX_CREDITLINE;
00123     }
00124     else if (value == "CMA")
00125     {
00126       data.account_type = data.OFX_CMA;
00127     }
00128     /* AccountType CREDITCARD is set at object creation, if appropriate */
00129     else
00130     {
00131       data.account_type_valid = false;
00132     }
00133   }
00134   else
00135   {
00136     /* Redirect unknown identifiers to the base class */
00137     OfxGenericContainer::add_attribute(identifier, value);
00138   }
00139 }//end OfxAccountContainer::add_attribute()
00140 
00141 int OfxAccountContainer::gen_event()
00142 {
00143   libofx_context->accountCallback(data);
00144   return true;
00145 }
00146 
00147 int  OfxAccountContainer::add_to_main_tree()
00148 {
00149   gen_account_id ();
00150 
00151   if (MainContainer != NULL)
00152   {
00153     return MainContainer->add_container(this);
00154   }
00155   else
00156   {
00157     return false;
00158   }
00159 }
00160 
00161 void OfxAccountContainer::gen_account_id(void)
00162 {
00163   if (data.account_type == OfxAccountData::OFX_CREDITCARD)
00164   {
00165     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00166     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00167     strncat(data.account_id, acctkey, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00168 
00169     strncat(data.account_name, "Credit card ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00170     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00171   }
00172   else if (data.account_type == OfxAccountData::OFX_INVESTMENT)
00173   {
00174     strncat(data.account_id, brokerid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00175     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00176     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00177 
00178     strncat(data.account_name, "Investment account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00179     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00180     strncat(data.account_name, " at broker ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00181     strncat(data.account_name, brokerid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00182   }
00183   else
00184   {
00185     strncat(data.account_id, bankid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00186     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00187     strncat(data.account_id, branchid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00188     strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00189     strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id));
00190 
00191     strncat(data.account_name, "Bank account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00192     strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name));
00193   }
00194   if (strlen(data.account_id) >= 0)
00195   {
00196     data.account_id_valid = true;
00197   }
00198 }//end OfxAccountContainer::gen_account_id()
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__statement_8cpp_source.html0000644000175000017500000007725111553133250024260 00000000000000 LibOFX: ofx_request_statement.cpp Source File

ofx_request_statement.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request_statement.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "libofx.h"
00027 #include "ofx_utilities.hh"
00028 #include "ofx_request_statement.hh"
00029 
00030 using namespace std;
00031 
00032 char* libofx_request_statement( const OfxFiLogin* login, const OfxAccountData* account, time_t date_from )
00033 {
00034   OfxStatementRequest strq( *login, *account, date_from );
00035   string request = OfxHeader(login->header_version) + strq.Output();
00036 
00037   unsigned size = request.size();
00038   char* result = (char*)malloc(size + 1);
00039   request.copy(result, size);
00040   result[size] = 0;
00041 
00042   return result;
00043 }
00044 
00045 OfxStatementRequest::OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from ):
00046   OfxRequest(fi),
00047   m_account(account),
00048   m_date_from(from)
00049 {
00050   Add( SignOnRequest() );
00051 
00052   if ( account.account_type == account.OFX_CREDITCARD )
00053     Add(CreditCardStatementRequest());
00054   else if ( account.account_type == account.OFX_INVESTMENT )
00055     Add(InvestmentStatementRequest());
00056   else
00057     Add(BankStatementRequest());
00058 }
00059 
00060 OfxAggregate OfxStatementRequest::BankStatementRequest(void) const
00061 {
00062   OfxAggregate bankacctfromTag("BANKACCTFROM");
00063   bankacctfromTag.Add( "BANKID", m_account.bank_id );
00064   bankacctfromTag.Add( "ACCTID", m_account.account_number );
00065   if ( m_account.account_type ==  m_account.OFX_CHECKING )
00066     bankacctfromTag.Add( "ACCTTYPE", "CHECKING" );
00067   else if  ( m_account.account_type == m_account.OFX_SAVINGS )
00068     bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" );
00069   else if  ( m_account.account_type == m_account.OFX_MONEYMRKT )
00070     bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" );
00071   else if  ( m_account.account_type == m_account.OFX_CREDITLINE )
00072     bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" );
00073   else if  ( m_account.account_type == m_account.OFX_CMA )
00074     bankacctfromTag.Add( "ACCTTYPE", "CMA" );
00075 
00076   OfxAggregate inctranTag("INCTRAN");
00077   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00078   inctranTag.Add( "INCLUDE", "Y" );
00079 
00080   OfxAggregate stmtrqTag("STMTRQ");
00081   stmtrqTag.Add( bankacctfromTag );
00082   stmtrqTag.Add( inctranTag );
00083 
00084   return RequestMessage("BANK", "STMT", stmtrqTag);
00085 }
00086 
00087 OfxAggregate OfxStatementRequest::CreditCardStatementRequest(void) const
00088 {
00089   /*
00090    QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]"));
00091 
00092    return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ")
00093      .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum()))
00094      .subtag(Tag("INCTRAN").element("DTSTART",dtstart_string).element("INCLUDE","Y")));
00095   }
00096   */
00097   OfxAggregate ccacctfromTag("CCACCTFROM");
00098   ccacctfromTag.Add( "ACCTID", m_account.account_number );
00099 
00100   OfxAggregate inctranTag("INCTRAN");
00101   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00102   inctranTag.Add( "INCLUDE", "Y" );
00103 
00104   OfxAggregate ccstmtrqTag("CCSTMTRQ");
00105   ccstmtrqTag.Add( ccacctfromTag );
00106   ccstmtrqTag.Add( inctranTag );
00107 
00108   return RequestMessage("CREDITCARD", "CCSTMT", ccstmtrqTag);
00109 }
00110 
00111 OfxAggregate OfxStatementRequest::InvestmentStatementRequest(void) const
00112 {
00113   OfxAggregate invacctfromTag("INVACCTFROM");
00114 
00115   invacctfromTag.Add( "BROKERID", m_account.broker_id );
00116   invacctfromTag.Add( "ACCTID", m_account.account_number );
00117 
00118   OfxAggregate inctranTag("INCTRAN");
00119   inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) );
00120   inctranTag.Add( "INCLUDE", "Y" );
00121 
00122   OfxAggregate incposTag("INCPOS");
00123   incposTag.Add( "DTASOF", time_t_to_ofxdatetime( time(NULL) ) );
00124   incposTag.Add( "INCLUDE", "Y" );
00125 
00126   OfxAggregate invstmtrqTag("INVSTMTRQ");
00127   invstmtrqTag.Add( invacctfromTag );
00128   invstmtrqTag.Add( inctranTag );
00129   invstmtrqTag.Add( "INCOO", "Y" );
00130   invstmtrqTag.Add( incposTag );
00131   invstmtrqTag.Add( "INCBAL", "Y" );
00132 
00133   return RequestMessage("INVSTMT", "INVSTMT", invstmtrqTag);
00134 }
00135 
00136 char* libofx_request_payment( const OfxFiLogin* login, const OfxAccountData* account, const OfxPayee* payee, const OfxPayment* payment )
00137 {
00138   OfxPaymentRequest strq( *login, *account, *payee, *payment );
00139   string request = OfxHeader(login->header_version) + strq.Output();
00140 
00141   unsigned size = request.size();
00142   char* result = (char*)malloc(size + 1);
00143   request.copy(result, size);
00144   result[size] = 0;
00145 
00146   return result;
00147 }
00148 
00149 OfxPaymentRequest::OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment ):
00150   OfxRequest(fi),
00151   m_account(account),
00152   m_payee(payee),
00153   m_payment(payment)
00154 {
00155   Add( SignOnRequest() );
00156 
00157   OfxAggregate bankacctfromTag("BANKACCTFROM");
00158   bankacctfromTag.Add( "BANKID", m_account.bank_id );
00159   bankacctfromTag.Add( "ACCTID", m_account.account_number );
00160   if ( m_account.account_type == m_account.OFX_CHECKING)
00161     bankacctfromTag.Add( "ACCTTYPE", "CHECKING" );
00162   else if  ( m_account.account_type == m_account.OFX_SAVINGS )
00163     bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" );
00164   else if  ( m_account.account_type == m_account.OFX_MONEYMRKT )
00165     bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" );
00166   else if  ( m_account.account_type ==  m_account.OFX_CREDITLINE )
00167     bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" );
00168   else if  ( m_account.account_type == m_account.OFX_CMA )
00169     bankacctfromTag.Add( "ACCTTYPE", "CMA" );
00170 
00171   OfxAggregate payeeTag("PAYEE");
00172   payeeTag.Add( "NAME", m_payee.name );
00173   payeeTag.Add( "ADDR1", m_payee.address1 );
00174   payeeTag.Add( "CITY", m_payee.city );
00175   payeeTag.Add( "STATE", m_payee.state );
00176   payeeTag.Add( "POSTALCODE", m_payee.postalcode );
00177   payeeTag.Add( "PHONE", m_payee.phone );
00178 
00179   OfxAggregate pmtinfoTag("PMTINFO");
00180   pmtinfoTag.Add( bankacctfromTag );
00181   pmtinfoTag.Add( "TRNAMT", m_payment.amount );
00182   pmtinfoTag.Add( payeeTag );
00183   pmtinfoTag.Add( "PAYACCT", m_payment.account );
00184   pmtinfoTag.Add( "DTDUE", m_payment.datedue );
00185   pmtinfoTag.Add( "MEMO", m_payment.memo );
00186 
00187   OfxAggregate pmtrqTag("PMTRQ");
00188   pmtrqTag.Add( pmtinfoTag );
00189 
00190   Add( RequestMessage("BILLPAY", "PMT", pmtrqTag) );
00191 }
00192 
00193 char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid )
00194 {
00195 #if 0
00196   OfxAggregate pmtinqrqTag( "PMTINQRQ" );
00197   pmtinqrqTag.Add( "SRVRTID", transactionid );
00198 
00199   OfxRequest ofx(*login);
00200   ofx.Add( ofx.SignOnRequest() );
00201   ofx.Add( ofx.RequestMessage("BILLPAY", "PMTINQ", pmtinqrqTag) );
00202 
00203   string request = OfxHeader() + ofx.Output();
00204 
00205   unsigned size = request.size();
00206   char* result = (char*)malloc(size + 1);
00207   request.copy(result, size);
00208   result[size] = 0;
00209 #else
00210   OfxAggregate payeesyncrq( "PAYEESYNCRQ" );
00211   payeesyncrq.Add( "TOKEN", "0" );
00212   payeesyncrq.Add( "TOKENONLY", "N" );
00213   payeesyncrq.Add( "REFRESH", "Y" );
00214   payeesyncrq.Add( "REJECTIFMISSING", "N" );
00215 
00216   OfxAggregate message( "BILLPAYMSGSRQV1" );
00217   message.Add( payeesyncrq );
00218 
00219   OfxRequest ofx(*login);
00220   ofx.Add( ofx.SignOnRequest() );
00221   ofx.Add( message );
00222 
00223   string request = OfxHeader(login->header_version) + ofx.Output();
00224 
00225   unsigned size = request.size();
00226   char* result = (char*)malloc(size + 1);
00227   request.copy(result, size);
00228   result[size] = 0;
00229 
00230 #endif
00231   return result;
00232 }
00233 
00234 // vim:cin:si:ai:et:ts=2:sw=2:
00235 
libofx-0.9.4/doc/html/structOfxTransactionData.html0000644000175000017500000012307511553133250017336 00000000000000 LibOFX: OfxTransactionData Struct Reference

OfxTransactionData Struct Reference

An abstraction of a transaction in an account. More...

Data Fields

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.

char account_id [OFX_ACCOUNT_ID_LENGTH]
struct OfxAccountDataaccount_ptr
int account_id_valid
TransactionType transactiontype
int transactiontype_valid
InvTransactionType invtransactiontype
int invtransactiontype_valid
double units
int units_valid
double unitprice
int unitprice_valid
double amount
int amount_valid
char fi_id [256]
int fi_id_valid
OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

char unique_id [OFX_UNIQUE_ID_LENGTH]
int unique_id_valid
char unique_id_type [OFX_UNIQUE_ID_TYPE_LENGTH]
int unique_id_type_valid
struct OfxSecurityDatasecurity_data_ptr
int security_data_valid
time_t date_posted
int date_posted_valid
time_t date_initiated
int date_initiated_valid
time_t date_funds_available
int date_funds_available_valid
char fi_id_corrected [256]
int fi_id_corrected_valid
FiIdCorrectionAction fi_id_correction_action
int fi_id_correction_action_valid
char server_transaction_id [OFX_SVRTID2_LENGTH]
int server_transaction_id_valid
char check_number [OFX_CHECK_NUMBER_LENGTH]
int check_number_valid
char reference_number [OFX_REFERENCE_NUMBER_LENGTH]
int reference_number_valid
long int standard_industrial_code
int standard_industrial_code_valid
char payee_id [OFX_SVRTID2_LENGTH]
int payee_id_valid
char name [OFX_TRANSACTION_NAME_LENGTH]
int name_valid
char memo [OFX_MEMO2_LENGTH]
int memo_valid
double commission
int commission_valid
double fees
int fees_valid
double oldunits
int oldunits_valid
double newunits
int newunits_valid

Detailed Description

An abstraction of a transaction in an account.

The OfxTransactionData stucture contains all available information about an actual transaction in an account.

Definition at line 461 of file inc/libofx.h.


Field Documentation

Use this for matching with the relevant account in your application

Definition at line 469 of file inc/libofx.h.

Pointer to the full account structure, see OfxAccountData

Definition at line 472 of file inc/libofx.h.

Total monetary amount of the transaction, signage will determine if money went in or out. amount is the total amount: -(units) * unitprice - various fees

Definition at line 499 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxBankTransactionContainer::add_attribute().

The check number is most likely an integer and can probably be converted properly with atoi(). However the spec allows for up to 12 digits, so it is not garanteed to work

Definition at line 565 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

Commission paid to broker (investment transactions only)

Definition at line 587 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute().

Date the funds are available (not always provided) (ex: the date you are allowed to withdraw a deposit

Definition at line 541 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

Date the transaction was initiated (ex: date you bought something in a store for credit card; trade date for stocks; day of record for stock split)

Mandatory for investment transactions

Definition at line 533 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxTransactionContainer::add_attribute().

Date the transaction took effect (ex: date it appeared on your credit card bill). Setlement date; for stock split, execution date.

Mandatory for bank and credit card transactions

Definition at line 526 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxTransactionContainer::add_attribute().

Fees applied to trade (investment transactions only)

Definition at line 590 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute().

Generated by the financial institution (fi), unique id of the transaction, to be used to detect duplicate downloads

Definition at line 505 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

IMPORTANT: if fi_id_corrected is present, this transaction is meant to replace or delete the transaction with this fi_id. See OfxTransactionData::fi_id_correction_action to know what to do.

Definition at line 549 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken

Definition at line 554 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

Extra information not included in name

Definition at line 584 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

Can be the name of the payee or the description of the transaction

Definition at line 580 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

The identifier of the payee

Definition at line 577 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

Might present in addition to or instead of a check_number. Not necessarily a number

Definition at line 570 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

A pointer to the security's data.

Definition at line 524 of file inc/libofx.h.

Referenced by OfxTransactionContainer::gen_event().

Used for user initiated transaction such as payment or funds transfer. Can be seen as a confirmation number.

Definition at line 559 of file inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute().

The standard industrial code can have at most 6 digits

Definition at line 573 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

Investment transaction type. You should read this if transactiontype == OFX_OTHER. See OFX spec 1.6 p.442 to 445 for details

Definition at line 479 of file inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute().

The id of the security being traded. Mandatory for investment transactions

Definition at line 517 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxTransactionContainer::gen_event().

Usially "CUSIP" for FIs in north america

Definition at line 519 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute().

Value of each unit, 1.00 if the commodity is money

Definition at line 495 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxBankTransactionContainer::add_attribute().

Variation of the number of units of the commodity

Suppose units is -10, ave unitprice is 1. If the commodity is stock, you have 10 less stock, but 10 more dollars in you amccount (fees not considered, see amount). If commodity is money, you have 10 less dollars in your pocket, but 10 more in your account

Definition at line 492 of file inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and OfxBankTransactionContainer::add_attribute().


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__utilities_8cpp.html0000644000175000017500000003375011553133250020774 00000000000000 LibOFX: ofx_utilities.cpp File Reference

ofx_utilities.cpp File Reference

Various simple functions for type conversion & al. More...

Go to the source code of this file.

Defines

#define DIRSEP   "/"

Functions

string CharStringtostring (const SGMLApplication::CharString source, string &dest)
 Convert OpenSP CharString to a C++ STL string.
string AppendCharStringtostring (const SGMLApplication::CharString source, string &dest)
 Append an OpenSP CharString to an existing C++ STL string.
time_t ofxdate_to_time_t (const string ofxdate)
 Convert a C++ string containing a time in OFX format to a C time_t.
double ofxamount_to_double (const string ofxamount)
 Convert OFX amount of money to double float.
string strip_whitespace (const string para_string)
 Sanitize a string coming from OpenSP.
std::string get_tmp_dir ()
int mkTempFileName (const char *tmpl, char *buffer, unsigned int size)

Detailed Description

Various simple functions for type conversion & al.

Definition in file fx-0.9.4/lib/ofx_utilities.cpp.


Function Documentation

string CharStringtostring ( const SGMLApplication::CharString  source,
string &  dest 
)

Convert OpenSP CharString to a C++ STL string.

Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging.

Definition at line 70 of file fx-0.9.4/lib/ofx_utilities.cpp.

double ofxamount_to_double ( const string  ofxamount)

Convert OFX amount of money to double float.

Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float.

Note:
The ofx number format is the following: "." or "," as decimal separator, NO thousands separator.

Definition at line 204 of file fx-0.9.4/lib/ofx_utilities.cpp.

time_t ofxdate_to_time_t ( const string  ofxdate)

Convert a C++ string containing a time in OFX format to a C time_t.

Converts a date from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format (see OFX 2.01 spec p.66) to a C time_t.

Parameters:
ofxdatedate from the YYYYMMDDHHMMSS.XXX[gmt offset:tz name] OFX format
Returns:
C time_t in the local time zone
Note:
  • The library always returns the time in the systems local time
  • OFX defines the date up to the millisecond. The library ignores those milliseconds, since ANSI C does not handle such precision cleanly. The date provided by LibOFX is precise to the second, assuming that information this precise was provided in the ofx file. So you wont know the millisecond you were ruined...
DEVIATION FROM THE SPECS : The OFX specifications (both version 1.6 and 2.02) state that a client should assume that if the server returns a date without � specific time, we assume it means 0h00 GMT. As such, when we apply the local timezone and for example you are in the EST timezone, we will remove 5h, and the transaction will have occurred on the prior day! This is probably not what the bank intended (and will lead to systematic errors), but the spec is quite explicit in this respect (Ref: OFX 2.01 spec pp. 66-68)

To solve this problem (since usually a time error is relatively unimportant, but date error is), and to avoid problems in Australia caused by the behaviour in libofx up to 0.6.4, it was decided starting with 0.6.5 to use the following behavior:

-No specific time is given in the file (date only): Considering that most banks seem to be sending dates in this format represented as local time (not compliant with the specs), the transaction is assumed to have occurred 11h59 (just before noon) LOCAL TIME. This way, we should never change the date, since you'd have to travel in a timezone at least 11 hours backwards or 13 hours forward from your own to introduce mistakes. However, if you are in timezone +13 or +14, and your bank meant the data to be interpreted by the spec, you will get the wrong date. We hope that banks in those timezone will either represent in local time like most, or specify the timezone properly.

-No timezone is specified, but exact time is, the same behavior is mostly used, as many banks just append zeros instead of using the short notation. However, the time specified is used, even if 0 (midnight).

-When a timezone is specified, it is always used to properly convert in local time, following the spec.

Definition at line 108 of file fx-0.9.4/lib/ofx_utilities.cpp.

string strip_whitespace ( const string  para_string)

Sanitize a string coming from OpenSP.

Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching.

Definition at line 227 of file fx-0.9.4/lib/ofx_utilities.cpp.

libofx-0.9.4/doc/html/classOfxInvestmentTransactionContainer.png0000644000175000017500000000260611553133250022061 00000000000000‰PNG  IHDRnˆ¨zHWPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÝÛ’ª0„aSåû?ò¾ G 3°G_—¥˜Ã‚æO'·—¯ u)⎻—r÷µL§wܽ’;ȸãNÜ ãNÜ ãŽ;q³ ¹›0néâ¶mwÒ¨ÀxÀ÷…Œ;îéÈ_ÍÍKÛ©»®ÿwÜ=ÔÝISéæ±DD~¾n/IõßiHî ŽòµÄ°ÀsqÇÝcÝý¯©¼¤«ÒëY^lþîn Þx22î¸{ˆ»_™ZïW6ˆæ¹ÛgêÜܘÚöŽ ü2·»;™JÙï¼­ÿŽ›*³þwÜÝÇÝÝŽìþ¹›Ãù¨©ÑU?åÉȸãîÞîNšJ[G»ä àÀ‘]v„Ñà¡©çîÜq÷XwgM¥ƒµ3µDDùm¦ lÿÖݾÑKtnj'!㎻‡º;mêõõdÜq÷HwqǸAƸAÆwâfAr'nqǸqǸAÆÝÌq›P 2î¸{Iw×õ‰÷z¾¸ãŽ)î¸ûHw×ëÌ̸ãŽ)î¸ûHw×ëÌ̸ãŽ)î¸ûTwóãŽ;¦¸ãNÜ ãŽ;¦¸ãŽ)î¸ãŽ)î¸cŠ;Œ;î˜âŽ;¦¸ãŽ»_˜š[s/Hìèƒ7dì2Â2ÂŽ #ì #ì2ì2Â2ÂŽ #ì #ì2ì2ÂŽ ÃŽ #ì #ì&Õׄ»WE¶L§Ï‰vA†va‡da'na‡Ýß ‹ˆHµ!·™¿,ƒ±Ã µåpuqÃn&d‘¿Ú·xæÇ–ª?… »A–wÅ%"¶øb‰eYwºHûgþ®?y^7®Ù ›æ2>m«}±C@Å »)eTÍÞMëzY>ýÏh\-¿ž¯º†ÄOܰûdùŵß7<» »{d?Î8´?Šv“#‹h6ÊÔ_ÛÎ#+sËævŸˆ¬kßw»Üïö‘®ºíXܰ›YEÔâÚC¶ƒç¦­T:†Ì‰Ý‡ ["¢}ÁdKD,Q_lÓ¶¬×ëü§™V†Våê¶ër‰¸¬IÉut^ù£Îý‚Û"͉ÛM>]Êž¸Ñ›Å­0»?›ÜÝö÷Ívr{¯oŠ´qûqF{3¢÷Û%ÒñkÇí1í9¶‰[יΠÚv>nen9øÒc‰½cܶÇVŽÛædê†õÉhâ¶IîÁ³j?n£«íQJôÊq«©yi3²éÄm÷tååç¶RåXÜœnôNq»DD»ÂGq»ä!±~5‹~mJÓ»ƒlí¬Çc.±NoJõEšÚÖ.õjÉæÅÞ n,Y›,‘µÉ‘µ)ndm²D$nDÖ&Kdm²DôÿksB¡zGýÞ à XIEND®B`‚libofx-0.9.4/doc/html/globals_0x6c.html0000644000175000017500000002233211553133251014613 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- l -

libofx-0.9.4/doc/html/classtree_1_1sibling__iterator.html0000644000175000017500000003674111553133251020406 00000000000000 LibOFX: tree< T, tree_node_allocator >::sibling_iterator Class Reference

tree< T, tree_node_allocator >::sibling_iterator Class Reference

Iterator which traverses only the nodes which are siblings of each other. More...

Inheritance diagram for tree< T, tree_node_allocator >::sibling_iterator:
tree< T, tree_node_allocator >::iterator_base tree< T, tree_node_allocator >::iterator_base

Public Member Functions

 sibling_iterator (tree_node *)
 sibling_iterator (const sibling_iterator &)
 sibling_iterator (const iterator_base &)
bool operator== (const sibling_iterator &) const
bool operator!= (const sibling_iterator &) const
sibling_iteratoroperator++ ()
sibling_iteratoroperator-- ()
sibling_iterator operator++ (int)
sibling_iterator operator-- (int)
sibling_iteratoroperator+= (unsigned int)
sibling_iteratoroperator-= (unsigned int)
tree_noderange_first () const
tree_noderange_last () const
 sibling_iterator (tree_node *)
 sibling_iterator (const sibling_iterator &)
 sibling_iterator (const iterator_base &)
bool operator== (const sibling_iterator &) const
bool operator!= (const sibling_iterator &) const
sibling_iteratoroperator++ ()
sibling_iteratoroperator-- ()
sibling_iterator operator++ (int)
sibling_iterator operator-- (int)
sibling_iteratoroperator+= (unsigned int)
sibling_iteratoroperator-= (unsigned int)
tree_noderange_first () const
tree_noderange_last () const

Data Fields

tree_nodeparent_

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::sibling_iterator

Iterator which traverses only the nodes which are siblings of each other.

Definition at line 230 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/globals_0x73.html0000644000175000017500000001251111553133251014532 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- s -

libofx-0.9.4/doc/html/classOFCApplication.html0000644000175000017500000004336411553133250016160 00000000000000 LibOFX: OFCApplication Class Reference

OFCApplication Class Reference

This object is driven by OpenSP as it parses the SGML from the ofx file(s) More...

Public Member Functions

 OFCApplication (LibofxContext *p_libofx_context)
void startElement (const StartElementEvent &event)
 Callback: Start of an OFX element.
void endElement (const EndElementEvent &event)
 Callback: End of an OFX element.
void data (const DataEvent &event)
 Callback: Data from an OFX element.
void error (const ErrorEvent &event)
 Callback: SGML parse error.
void openEntityChange (const OpenEntityPtr &para_entity_ptr)
 Callback: Receive internal OpenSP state.
 OFCApplication (LibofxContext *p_libofx_context)
void startElement (const StartElementEvent &event)
 Callback: Start of an OFX element.
void endElement (const EndElementEvent &event)
 Callback: End of an OFX element.
void data (const DataEvent &event)
 Callback: Data from an OFX element.
void error (const ErrorEvent &event)
 Callback: SGML parse error.
void openEntityChange (const OpenEntityPtr &para_entity_ptr)
 Callback: Receive internal OpenSP state.

Detailed Description

This object is driven by OpenSP as it parses the SGML from the ofx file(s)

Definition at line 44 of file ofc_sgml.cpp.


Member Function Documentation

void OFCApplication::data ( const DataEvent &  event) [inline]

Callback: Data from an OFX element.

An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data.

Definition at line 282 of file ofc_sgml.cpp.

void OFCApplication::data ( const DataEvent &  event) [inline]

Callback: Data from an OFX element.

An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data.

Definition at line 282 of file fx-0.9.4/lib/ofc_sgml.cpp.

void OFCApplication::endElement ( const EndElementEvent &  event) [inline]

Callback: End of an OFX element.

An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file.

Definition at line 210 of file ofc_sgml.cpp.

void OFCApplication::endElement ( const EndElementEvent &  event) [inline]

Callback: End of an OFX element.

An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file.

Definition at line 210 of file fx-0.9.4/lib/ofc_sgml.cpp.

void OFCApplication::error ( const ErrorEvent &  event) [inline]

Callback: SGML parse error.

An OpenSP callback, get's called when a parser error has occured.

Definition at line 294 of file ofc_sgml.cpp.

void OFCApplication::error ( const ErrorEvent &  event) [inline]

Callback: SGML parse error.

An OpenSP callback, get's called when a parser error has occured.

Definition at line 294 of file fx-0.9.4/lib/ofc_sgml.cpp.

void OFCApplication::openEntityChange ( const OpenEntityPtr &  para_entity_ptr) [inline]

Callback: Receive internal OpenSP state.

An Internal OpenSP callback, used to be able to generate line number.

Definition at line 339 of file ofc_sgml.cpp.

void OFCApplication::openEntityChange ( const OpenEntityPtr &  para_entity_ptr) [inline]

Callback: Receive internal OpenSP state.

An Internal OpenSP callback, used to be able to generate line number.

Definition at line 339 of file fx-0.9.4/lib/ofc_sgml.cpp.

void OFCApplication::startElement ( const StartElementEvent &  event) [inline]

Callback: Start of an OFX element.

An OpenSP callback, get's called when the opening tag of an OFX element appears in the file

Definition at line 65 of file ofc_sgml.cpp.

void OFCApplication::startElement ( const StartElementEvent &  event) [inline]

Callback: Start of an OFX element.

An OpenSP callback, get's called when the opening tag of an OFX element appears in the file

Definition at line 65 of file fx-0.9.4/lib/ofc_sgml.cpp.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__aggregate_8hh.html0000644000175000017500000000727011553133250016043 00000000000000 LibOFX: ofx_aggregate.hh File Reference

ofx_aggregate.hh File Reference

Declaration of OfxAggregate which allows you to construct a single OFX aggregate. More...

Go to the source code of this file.

Data Structures

class  OfxAggregate
 A single aggregate as described in the OFX 1.02 specification. More...

Detailed Description

Declaration of OfxAggregate which allows you to construct a single OFX aggregate.

Definition in file ofx_aggregate.hh.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__statement_8cpp.html0000644000175000017500000000765011553133250023166 00000000000000 LibOFX: ofx_container_statement.cpp File Reference

ofx_container_statement.cpp File Reference

Implementation of OfxStatementContainer for bank statements, credit cart statements, etc. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxStatementContainer for bank statements, credit cart statements, etc.

Definition in file fx-0.9.4/lib/ofx_container_statement.cpp.

libofx-0.9.4/doc/html/functions_enum.html0000644000175000017500000000607611553133250015372 00000000000000 LibOFX: Data Fields - Enumerations
 
libofx-0.9.4/doc/html/functions_0x74.html0000644000175000017500000001406211553133250015122 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- t -

libofx-0.9.4/doc/html/ofx__containers_8hh_source.html0000644000175000017500000010316611553133250017643 00000000000000 LibOFX: ofx_containers.hh Source File

ofx_containers.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_proc_rs.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 #ifndef OFX_PROC_H
00022 #define OFX_PROC_H
00023 #include "libofx.h"
00024 #include "tree.hh"
00025 #include "context.hh"
00026 
00027 using namespace std;
00028 
00033 class OfxGenericContainer
00034 {
00035 public:
00036   string type;
00037   string tag_identifier; 
00038   OfxGenericContainer *parentcontainer;
00039   LibofxContext *libofx_context;
00040 
00041   OfxGenericContainer(LibofxContext *p_libofx_context);
00042   OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer);
00043   OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00044 
00045   virtual ~OfxGenericContainer() {};
00046 
00053   virtual void add_attribute(const string identifier, const string value);
00059   virtual int gen_event();
00060 
00066   virtual int add_to_main_tree();
00067 
00069   OfxGenericContainer* getparent();
00070 };//End class OfxGenericObject
00071 
00076 class OfxDummyContainer: public OfxGenericContainer
00077 {
00078 public:
00079   OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00080   void add_attribute(const string identifier, const string value);
00081 };
00082 
00087 class OfxPushUpContainer: public OfxGenericContainer
00088 {
00089 public:
00090 
00091   OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00092   void add_attribute(const string identifier, const string value);
00093 };
00094 
00096 class OfxStatusContainer: public OfxGenericContainer
00097 {
00098 public:
00099   OfxStatusData data;
00100 
00101   OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00102   ~OfxStatusContainer();
00103   void add_attribute(const string identifier, const string value);
00104 };
00105 
00110 class OfxBalanceContainer: public OfxGenericContainer
00111 {
00112 public:
00113   /* Not yet complete see spec 1.6 p.63 */
00114   //char name[OFX_BALANCE_NAME_LENGTH];
00115   //char description[OFX_BALANCE_DESCRIPTION_LENGTH];
00116   //enum BalanceType{DOLLAR, PERCENT, NUMBER} balance_type;
00117   double amount; 
00118   int amount_valid;
00119   time_t date; 
00120   int date_valid;
00121 
00122   OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00123   ~OfxBalanceContainer();
00124   void add_attribute(const string identifier, const string value);
00125 };
00126 
00127 /***************************************************************************
00128  *                          OfxStatementContainer                          *
00129  ***************************************************************************/
00134 class OfxStatementContainer: public OfxGenericContainer
00135 {
00136 public:
00137   OfxStatementData data;
00138 
00139   OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00140   ~OfxStatementContainer();
00141   void add_attribute(const string identifier, const string value);
00142   virtual int add_to_main_tree();
00143   virtual int gen_event();
00144   void add_account(OfxAccountData * account_data);
00145   void add_balance(OfxBalanceContainer* ptr_balance_container);
00146 //  void add_transaction(const OfxTransactionData transaction_data);
00147 
00148 };
00149 
00150 /***************************************************************************
00151  *                           OfxAccountContaine r                          *
00152  ***************************************************************************/
00157 class OfxAccountContainer: public OfxGenericContainer
00158 {
00159 public:
00160   OfxAccountData data;
00161 
00162   OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00163   ~OfxAccountContainer();
00164   void add_attribute(const string identifier, const string value);
00165   int add_to_main_tree();
00166   virtual int gen_event();
00167 private:
00168   void gen_account_id(void);
00169   char bankid[OFX_BANKID_LENGTH];
00170   char branchid[OFX_BRANCHID_LENGTH];
00171   char acctid[OFX_ACCTID_LENGTH];
00172   char acctkey[OFX_ACCTKEY_LENGTH];
00173   char brokerid[OFX_BROKERID_LENGTH];
00174 };
00175 
00176 /***************************************************************************
00177  *                           OfxSecurityContainer                          *
00178  ***************************************************************************/
00181 class OfxSecurityContainer: public OfxGenericContainer
00182 {
00183 public:
00184   OfxSecurityData data;
00185 
00186   OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00187   ~OfxSecurityContainer();
00188   void add_attribute(const string identifier, const string value);
00189   virtual int gen_event();
00190   virtual int add_to_main_tree();
00191 private:
00192   OfxStatementContainer * parent_statement;
00193 };
00194 
00195 
00196 /***************************************************************************
00197  *                        OfxTransactionContainer                          *
00198  ***************************************************************************/
00201 class OfxTransactionContainer: public OfxGenericContainer
00202 {
00203 public:
00204   OfxTransactionData data;
00205 
00206   OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00207   ~OfxTransactionContainer();
00208   virtual void add_attribute(const string identifier, const string value);
00209   void add_account(OfxAccountData * account_data);
00210 
00211   virtual int gen_event();
00212   virtual int add_to_main_tree();
00213 private:
00214   OfxStatementContainer * parent_statement;
00215 };
00216 
00221 class OfxBankTransactionContainer: public OfxTransactionContainer
00222 {
00223 public:
00224   OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00225   void add_attribute(const string identifier, const string value);
00226 };
00227 
00232 class OfxInvestmentTransactionContainer: public OfxTransactionContainer
00233 {
00234 public:
00235   OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00236 
00237   void add_attribute(const string identifier, const string value);
00238 };
00239 
00240 /***************************************************************************
00241  *                             OfxMainContainer                            *
00242  ***************************************************************************/
00247 class OfxMainContainer: public OfxGenericContainer
00248 {
00249 public:
00250   OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier);
00251   ~OfxMainContainer();
00252   int add_container(OfxGenericContainer * container);
00253   int add_container(OfxStatementContainer * container);
00254   int add_container(OfxAccountContainer * container);
00255   int add_container(OfxTransactionContainer * container);
00256   int add_container(OfxSecurityContainer * container);
00257   int gen_event();
00258   OfxSecurityData * find_security(string unique_id);
00259 private:
00260   tree<OfxGenericContainer *> security_tree;
00261   tree<OfxGenericContainer *> account_tree;
00262 };
00263 
00264 
00265 #endif
libofx-0.9.4/doc/html/open.png0000644000175000017500000000016611553133250013111 00000000000000‰PNG  IHDR à‘=IDATxí1 “ت¦@@   ]01ÀQXY~Jr?D>„¥¶þ’n¼ áFÍ  }ÈúÂéãÏ\ ÄáÿòIEND®B`‚libofx-0.9.4/doc/html/classOfxAccountInfoRequest.html0000644000175000017500000001703111553133250017613 00000000000000 LibOFX: OfxAccountInfoRequest Class Reference

OfxAccountInfoRequest Class Reference

An account information request. More...

Inheritance diagram for OfxAccountInfoRequest:
OfxRequest OfxRequest OfxAggregate OfxAggregate OfxAggregate OfxAggregate

Public Member Functions

 OfxAccountInfoRequest (const OfxFiLogin &fi)
 OfxAccountInfoRequest (const OfxFiLogin &fi)

Detailed Description

An account information request.

This is an entire OFX aggregate, with all subordinate aggregates needed to log onto the OFX server of a single financial institution and download a list of all accounts for this user.

Definition at line 37 of file ofx_request_accountinfo.hh.


Constructor & Destructor Documentation

OfxAccountInfoRequest::OfxAccountInfoRequest ( const OfxFiLogin fi)

Creates the request aggregate to obtain an account list from this fi.

Parameters:
fiThe information needed to log on user into one financial institution

Definition at line 75 of file ofx_request_accountinfo.cpp.

OfxAccountInfoRequest::OfxAccountInfoRequest ( const OfxFiLogin fi)

Creates the request aggregate to obtain an account list from this fi.

Parameters:
fiThe information needed to log on user into one financial institution

The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/structErrorMsg.html0000644000175000017500000001413011553133250015331 00000000000000 LibOFX: ErrorMsg Struct Reference

ErrorMsg Struct Reference

An abstraction of an OFX error code sent by an OFX server. More...

Data Fields

int code
const char * name
const char * description

Detailed Description

An abstraction of an OFX error code sent by an OFX server.

Definition at line 23 of file ofx_error_msg.hh.


Field Documentation

The error's code

Definition at line 25 of file ofx_error_msg.hh.

Referenced by find_error_msg().

const char * ErrorMsg::description

The long description of the error

Definition at line 27 of file ofx_error_msg.hh.

const char * ErrorMsg::name

The error's name

Definition at line 26 of file ofx_error_msg.hh.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/ftv2folderclosed.png0000644000175000017500000000112611553133251015415 00000000000000‰PNG  IHDRÚ}\ˆIDATxí]MkQ=÷_‹¡b’f’Öˆ-I“FmÛ*¥Ø­+€;7ú$‚ÿÁ…ÿÁ•¸sãBÑ'¡¥®ºPRq!Jk:óîuñf&3I5lW ûo8çžsî¼Ù’ˆà0/u¨èGApì âó7Ÿdms'U»4Ãj{’þ ÁÚæj•l¼&Þ}ø‚Õöä_+ùñ“uù¸ý3! ll}µžE (-†EPλ¸s«žÚp:Nêŧ/¶:·oVQ.¸(å]x9å‚‹æÅj•,êNc¦’ÅÔÙ ¦Ïe0uÆÞÕóY¼^߯JkâÁP‹¾ýè"uË"ð}Žù†í> Ã8qÜ-`÷g‘ž=¶.àpûˆØç¾oF™Ù‚Qès0 ¢ì’õ‘B¾ÿè•ܘŸ€X "$q? (¥ðòýg<¼»˜ y@³ÄõºìukXbëÒVåHt÷MÜa2 "ëß„¦Æw(ìîù0" X$²‚i²)ENÖÐ}ÃðY AúBWkä(ð(À^7€ Gñwâ(Jyî8Sƒ! ðv£wÐ%¿…hœ¬d>™±“ƒôµJ6·Ò*ëë—=}­éé…FQ/4Šújc\Ï×Çu«VÐízQ/ÎõÒ¬§—šž^¾RÒËse=W-èÌØ©gTPÊ»÷þÿÑŽ”àÔùùÞbiIEND®B`‚libofx-0.9.4/doc/html/classOfxDummyContainer.html0000644000175000017500000002356011553133250016774 00000000000000 LibOFX: OfxDummyContainer Class Reference

OfxDummyContainer Class Reference

A container to holds OFX SGML elements that LibOFX knows nothing about. More...

Inheritance diagram for OfxDummyContainer:
OfxGenericContainer OfxGenericContainer

Public Member Functions

 OfxDummyContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.
 OfxDummyContainer (LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier)
void add_attribute (const string identifier, const string value)
 Add data to a container object.

Detailed Description

A container to holds OFX SGML elements that LibOFX knows nothing about.

The OfxDummyContainer is used for elements (not data elements) that are not recognised. Note that recognised objects may very well be a children of an OfxDummyContainer.

Definition at line 76 of file ofx_containers.hh.


Member Function Documentation

void OfxDummyContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.

Definition at line 47 of file ofx_containers_misc.cpp.

void OfxDummyContainer::add_attribute ( const string  identifier,
const string  value 
) [virtual]

Add data to a container object.

Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it.

Parameters:
identifierThe name of the data element
valueThe concatenated string of the data

Reimplemented from OfxGenericContainer.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__sgml_8hh.html0000644000175000017500000001152211553133250015052 00000000000000 LibOFX: ofx_sgml.hh File Reference

ofx_sgml.hh File Reference

OFX/SGML parsing functionnality. More...

Go to the source code of this file.

Functions

int ofx_proc_sgml (LibofxContext *libofx_context, int argc, char *argv[])
 Parses a DTD and OFX file(s)

Detailed Description

OFX/SGML parsing functionnality.

Definition in file ofx_sgml.hh.


Function Documentation

int ofx_proc_sgml ( LibofxContext libofx_context,
int  argc,
char *  argv[] 
)

Parses a DTD and OFX file(s)

ofx_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files.

Definition at line 368 of file ofx_sgml.cpp.

libofx-0.9.4/doc/html/classtree_1_1sibling__iterator.png0000644000175000017500000000177611553133251020226 00000000000000‰PNG  IHDR2P4±oPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÛ’¬ ES5ÿÿÉç„ÄK×éѵkjl% ¸Ü„×å9-›`ÐùYQ#mhx:@Á2XË`,ƒe°ÌC,#{Ñ’t £Éï? íÖŒcŽ<± tÎXÆÅ|”ƒ¯ÿA˼†N…""ë*«ä_Û¥_tœ!«y(²Š+šî2[$ßþ剂¹˜Q¦_”ÑÐ2Ðéu™ôšuyéƒ}f”,3¦"u¾ú /%e[Eþ¡uÌ 3ZT»¦Q—Nd³Ô¶dÅg´oì/®ïÚˆv¨M³_)ˆégÖÛm®–NÇ2Rú–”NµEgŒ¡˜5çEPôgY7•)[:é.”¯V?k™×Óéì#íɹ}Ôô—(ÄE tg5 BQÇJ»¦™.ón:û­wï´žn½WOëI³‹sÿ´>p0½Ž†R<•;‘mHŠÞbÝ Õår¬º«ýu•ma¦HJ}ÕýRMÌ(³œ%)FÝì[:Þ2óò°ž¤Ø2йb™1Iºr³ŽÌxÑ2§sj=[W»ÌÓéË`,ƒe° –Á2X˼É2ÈIY èüwý~ÑZ¾OÐ t®3ù… t€Ï2 t€Ïbt€ @(Ð t€‚ è:@P óD(h$ ¶FXa„° Â2Ë ,ƒ° BXa„e–AXa„°Ì%È WŒ-À$ð |@¼ŽÏ.&I: ¶.áÉÊõ%O<Å2÷XÆÅ|ef_ËÜjYY$ÿÚ.}”ã YÌC‘E\Ñt—-c‹¤âÛ¿ãxIºrۋɩٰÌ[ùœö%–Hàø€> HPნ¾ìýp*tåÝj—IEND®B`‚libofx-0.9.4/doc/html/ofxconnect_2cmdline_8c_source.html0000644000175000017500000035067111553133250020236 00000000000000 LibOFX: cmdline.c Source File

cmdline.c

00001 /*
00002   File autogenerated by gengetopt version 2.22.4
00003   generated with the following command:
00004   gengetopt --unamed-opts 
00005 
00006   The developers of gengetopt consider the fixed text that goes in all
00007   gengetopt output files to be in the public domain:
00008   we make no copyright claims on it.
00009 */
00010 
00011 /* If we use autoconf.  */
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include <string.h>
00019 
00020 #ifndef FIX_UNUSED
00021 #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
00022 #endif
00023 
00024 #include <getopt.h>
00025 
00026 #include "cmdline.h"
00027 
00028 const char *gengetopt_args_info_purpose = "prints to stdout the created OFX file based on the options you pass it. \ncurrently it will only create a statement request file.  you can POST this to \nan OFX server to request a statement from that financial institution for that \naccount.";
00029 
00030 const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]... [FILES]...";
00031 
00032 const char *gengetopt_args_info_description = "";
00033 
00034 const char *gengetopt_args_info_help[] = {
00035   "  -h, --help                Print help and exit",
00036   "  -V, --version             Print version and exit",
00037   "      --fipid=STRING        FI partner identifier (looks up fid, org & url from \n                              partner server)",
00038   "      --fid=STRING          FI identifier",
00039   "      --org=STRING          FI org tag",
00040   "      --bank=STRING         IBAN bank identifier",
00041   "      --broker=STRING       Broker identifier",
00042   "      --user=STRING         User name",
00043   "      --pass=STRING         Password",
00044   "      --acct=STRING         Account ID",
00045   "      --type=INT            Account Type 1=checking 2=invest 3=ccard",
00046   "      --past=LONG           How far back to look from today (in days)",
00047   "      --url=STRING          Url to POST the data to (otherwise goes to stdout)",
00048   "      --trid=INT            Transaction id",
00049   "\n Group: command",
00050   "  -s, --statement-req       Request for a statement",
00051   "  -a, --accountinfo-req     Request for a list of accounts",
00052   "  -p, --payment-req         Request to make a payment",
00053   "  -i, --paymentinquiry-req  Request to inquire about the status of a payment",
00054   "  -b, --bank-list           List all known banks",
00055   "  -f, --bank-fipid          List all fipids for a given bank",
00056   "  -v, --bank-services       List supported services for a given fipid",
00057   "      --allsupport          List all banks which support online banking",
00058     0
00059 };
00060 
00061 typedef enum {ARG_NO
00062   , ARG_STRING
00063   , ARG_INT
00064   , ARG_LONG
00065 } cmdline_parser_arg_type;
00066 
00067 static
00068 void clear_given (struct gengetopt_args_info *args_info);
00069 static
00070 void clear_args (struct gengetopt_args_info *args_info);
00071 
00072 static int
00073 cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
00074                         struct cmdline_parser_params *params, const char *additional_error);
00075 
00076 
00077 static char *
00078 gengetopt_strdup (const char *s);
00079 
00080 static
00081 void clear_given (struct gengetopt_args_info *args_info)
00082 {
00083   args_info->help_given = 0 ;
00084   args_info->version_given = 0 ;
00085   args_info->fipid_given = 0 ;
00086   args_info->fid_given = 0 ;
00087   args_info->org_given = 0 ;
00088   args_info->bank_given = 0 ;
00089   args_info->broker_given = 0 ;
00090   args_info->user_given = 0 ;
00091   args_info->pass_given = 0 ;
00092   args_info->acct_given = 0 ;
00093   args_info->type_given = 0 ;
00094   args_info->past_given = 0 ;
00095   args_info->url_given = 0 ;
00096   args_info->trid_given = 0 ;
00097   args_info->statement_req_given = 0 ;
00098   args_info->accountinfo_req_given = 0 ;
00099   args_info->payment_req_given = 0 ;
00100   args_info->paymentinquiry_req_given = 0 ;
00101   args_info->bank_list_given = 0 ;
00102   args_info->bank_fipid_given = 0 ;
00103   args_info->bank_services_given = 0 ;
00104   args_info->allsupport_given = 0 ;
00105   args_info->command_group_counter = 0 ;
00106 }
00107 
00108 static
00109 void clear_args (struct gengetopt_args_info *args_info)
00110 {
00111   FIX_UNUSED (args_info);
00112   args_info->fipid_arg = NULL;
00113   args_info->fipid_orig = NULL;
00114   args_info->fid_arg = NULL;
00115   args_info->fid_orig = NULL;
00116   args_info->org_arg = NULL;
00117   args_info->org_orig = NULL;
00118   args_info->bank_arg = NULL;
00119   args_info->bank_orig = NULL;
00120   args_info->broker_arg = NULL;
00121   args_info->broker_orig = NULL;
00122   args_info->user_arg = NULL;
00123   args_info->user_orig = NULL;
00124   args_info->pass_arg = NULL;
00125   args_info->pass_orig = NULL;
00126   args_info->acct_arg = NULL;
00127   args_info->acct_orig = NULL;
00128   args_info->type_orig = NULL;
00129   args_info->past_orig = NULL;
00130   args_info->url_arg = NULL;
00131   args_info->url_orig = NULL;
00132   args_info->trid_orig = NULL;
00133   
00134 }
00135 
00136 static
00137 void init_args_info(struct gengetopt_args_info *args_info)
00138 {
00139 
00140 
00141   args_info->help_help = gengetopt_args_info_help[0] ;
00142   args_info->version_help = gengetopt_args_info_help[1] ;
00143   args_info->fipid_help = gengetopt_args_info_help[2] ;
00144   args_info->fid_help = gengetopt_args_info_help[3] ;
00145   args_info->org_help = gengetopt_args_info_help[4] ;
00146   args_info->bank_help = gengetopt_args_info_help[5] ;
00147   args_info->broker_help = gengetopt_args_info_help[6] ;
00148   args_info->user_help = gengetopt_args_info_help[7] ;
00149   args_info->pass_help = gengetopt_args_info_help[8] ;
00150   args_info->acct_help = gengetopt_args_info_help[9] ;
00151   args_info->type_help = gengetopt_args_info_help[10] ;
00152   args_info->past_help = gengetopt_args_info_help[11] ;
00153   args_info->url_help = gengetopt_args_info_help[12] ;
00154   args_info->trid_help = gengetopt_args_info_help[13] ;
00155   args_info->statement_req_help = gengetopt_args_info_help[15] ;
00156   args_info->accountinfo_req_help = gengetopt_args_info_help[16] ;
00157   args_info->payment_req_help = gengetopt_args_info_help[17] ;
00158   args_info->paymentinquiry_req_help = gengetopt_args_info_help[18] ;
00159   args_info->bank_list_help = gengetopt_args_info_help[19] ;
00160   args_info->bank_fipid_help = gengetopt_args_info_help[20] ;
00161   args_info->bank_services_help = gengetopt_args_info_help[21] ;
00162   args_info->allsupport_help = gengetopt_args_info_help[22] ;
00163   
00164 }
00165 
00166 void
00167 cmdline_parser_print_version (void)
00168 {
00169   printf ("%s %s\n",
00170      (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
00171      CMDLINE_PARSER_VERSION);
00172 }
00173 
00174 static void print_help_common(void) {
00175   cmdline_parser_print_version ();
00176 
00177   if (strlen(gengetopt_args_info_purpose) > 0)
00178     printf("\n%s\n", gengetopt_args_info_purpose);
00179 
00180   if (strlen(gengetopt_args_info_usage) > 0)
00181     printf("\n%s\n", gengetopt_args_info_usage);
00182 
00183   printf("\n");
00184 
00185   if (strlen(gengetopt_args_info_description) > 0)
00186     printf("%s\n\n", gengetopt_args_info_description);
00187 }
00188 
00189 void
00190 cmdline_parser_print_help (void)
00191 {
00192   int i = 0;
00193   print_help_common();
00194   while (gengetopt_args_info_help[i])
00195     printf("%s\n", gengetopt_args_info_help[i++]);
00196 }
00197 
00198 void
00199 cmdline_parser_init (struct gengetopt_args_info *args_info)
00200 {
00201   clear_given (args_info);
00202   clear_args (args_info);
00203   init_args_info (args_info);
00204 
00205   args_info->inputs = 0;
00206   args_info->inputs_num = 0;
00207 }
00208 
00209 void
00210 cmdline_parser_params_init(struct cmdline_parser_params *params)
00211 {
00212   if (params)
00213     { 
00214       params->override = 0;
00215       params->initialize = 1;
00216       params->check_required = 1;
00217       params->check_ambiguity = 0;
00218       params->print_errors = 1;
00219     }
00220 }
00221 
00222 struct cmdline_parser_params *
00223 cmdline_parser_params_create(void)
00224 {
00225   struct cmdline_parser_params *params = 
00226     (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params));
00227   cmdline_parser_params_init(params);  
00228   return params;
00229 }
00230 
00231 static void
00232 free_string_field (char **s)
00233 {
00234   if (*s)
00235     {
00236       free (*s);
00237       *s = 0;
00238     }
00239 }
00240 
00241 
00242 static void
00243 cmdline_parser_release (struct gengetopt_args_info *args_info)
00244 {
00245   unsigned int i;
00246   free_string_field (&(args_info->fipid_arg));
00247   free_string_field (&(args_info->fipid_orig));
00248   free_string_field (&(args_info->fid_arg));
00249   free_string_field (&(args_info->fid_orig));
00250   free_string_field (&(args_info->org_arg));
00251   free_string_field (&(args_info->org_orig));
00252   free_string_field (&(args_info->bank_arg));
00253   free_string_field (&(args_info->bank_orig));
00254   free_string_field (&(args_info->broker_arg));
00255   free_string_field (&(args_info->broker_orig));
00256   free_string_field (&(args_info->user_arg));
00257   free_string_field (&(args_info->user_orig));
00258   free_string_field (&(args_info->pass_arg));
00259   free_string_field (&(args_info->pass_orig));
00260   free_string_field (&(args_info->acct_arg));
00261   free_string_field (&(args_info->acct_orig));
00262   free_string_field (&(args_info->type_orig));
00263   free_string_field (&(args_info->past_orig));
00264   free_string_field (&(args_info->url_arg));
00265   free_string_field (&(args_info->url_orig));
00266   free_string_field (&(args_info->trid_orig));
00267   
00268   
00269   for (i = 0; i < args_info->inputs_num; ++i)
00270     free (args_info->inputs [i]);
00271 
00272   if (args_info->inputs_num)
00273     free (args_info->inputs);
00274 
00275   clear_given (args_info);
00276 }
00277 
00278 
00279 static void
00280 write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
00281 {
00282   FIX_UNUSED (values);
00283   if (arg) {
00284     fprintf(outfile, "%s=\"%s\"\n", opt, arg);
00285   } else {
00286     fprintf(outfile, "%s\n", opt);
00287   }
00288 }
00289 
00290 
00291 int
00292 cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
00293 {
00294   int i = 0;
00295 
00296   if (!outfile)
00297     {
00298       fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
00299       return EXIT_FAILURE;
00300     }
00301 
00302   if (args_info->help_given)
00303     write_into_file(outfile, "help", 0, 0 );
00304   if (args_info->version_given)
00305     write_into_file(outfile, "version", 0, 0 );
00306   if (args_info->fipid_given)
00307     write_into_file(outfile, "fipid", args_info->fipid_orig, 0);
00308   if (args_info->fid_given)
00309     write_into_file(outfile, "fid", args_info->fid_orig, 0);
00310   if (args_info->org_given)
00311     write_into_file(outfile, "org", args_info->org_orig, 0);
00312   if (args_info->bank_given)
00313     write_into_file(outfile, "bank", args_info->bank_orig, 0);
00314   if (args_info->broker_given)
00315     write_into_file(outfile, "broker", args_info->broker_orig, 0);
00316   if (args_info->user_given)
00317     write_into_file(outfile, "user", args_info->user_orig, 0);
00318   if (args_info->pass_given)
00319     write_into_file(outfile, "pass", args_info->pass_orig, 0);
00320   if (args_info->acct_given)
00321     write_into_file(outfile, "acct", args_info->acct_orig, 0);
00322   if (args_info->type_given)
00323     write_into_file(outfile, "type", args_info->type_orig, 0);
00324   if (args_info->past_given)
00325     write_into_file(outfile, "past", args_info->past_orig, 0);
00326   if (args_info->url_given)
00327     write_into_file(outfile, "url", args_info->url_orig, 0);
00328   if (args_info->trid_given)
00329     write_into_file(outfile, "trid", args_info->trid_orig, 0);
00330   if (args_info->statement_req_given)
00331     write_into_file(outfile, "statement-req", 0, 0 );
00332   if (args_info->accountinfo_req_given)
00333     write_into_file(outfile, "accountinfo-req", 0, 0 );
00334   if (args_info->payment_req_given)
00335     write_into_file(outfile, "payment-req", 0, 0 );
00336   if (args_info->paymentinquiry_req_given)
00337     write_into_file(outfile, "paymentinquiry-req", 0, 0 );
00338   if (args_info->bank_list_given)
00339     write_into_file(outfile, "bank-list", 0, 0 );
00340   if (args_info->bank_fipid_given)
00341     write_into_file(outfile, "bank-fipid", 0, 0 );
00342   if (args_info->bank_services_given)
00343     write_into_file(outfile, "bank-services", 0, 0 );
00344   if (args_info->allsupport_given)
00345     write_into_file(outfile, "allsupport", 0, 0 );
00346   
00347 
00348   i = EXIT_SUCCESS;
00349   return i;
00350 }
00351 
00352 int
00353 cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
00354 {
00355   FILE *outfile;
00356   int i = 0;
00357 
00358   outfile = fopen(filename, "w");
00359 
00360   if (!outfile)
00361     {
00362       fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename);
00363       return EXIT_FAILURE;
00364     }
00365 
00366   i = cmdline_parser_dump(outfile, args_info);
00367   fclose (outfile);
00368 
00369   return i;
00370 }
00371 
00372 void
00373 cmdline_parser_free (struct gengetopt_args_info *args_info)
00374 {
00375   cmdline_parser_release (args_info);
00376 }
00377 
00379 char *
00380 gengetopt_strdup (const char *s)
00381 {
00382   char *result = 0;
00383   if (!s)
00384     return result;
00385 
00386   result = (char*)malloc(strlen(s) + 1);
00387   if (result == (char*)0)
00388     return (char*)0;
00389   strcpy(result, s);
00390   return result;
00391 }
00392 
00393 static void
00394 reset_group_command(struct gengetopt_args_info *args_info)
00395 {
00396   if (! args_info->command_group_counter)
00397     return;
00398   
00399   args_info->statement_req_given = 0 ;
00400   args_info->accountinfo_req_given = 0 ;
00401   args_info->payment_req_given = 0 ;
00402   args_info->paymentinquiry_req_given = 0 ;
00403   args_info->bank_list_given = 0 ;
00404   args_info->bank_fipid_given = 0 ;
00405   args_info->bank_services_given = 0 ;
00406   args_info->allsupport_given = 0 ;
00407 
00408   args_info->command_group_counter = 0;
00409 }
00410 
00411 int
00412 cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
00413 {
00414   return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
00415 }
00416 
00417 int
00418 cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
00419                    struct cmdline_parser_params *params)
00420 {
00421   int result;
00422   result = cmdline_parser_internal (argc, argv, args_info, params, 0);
00423 
00424   if (result == EXIT_FAILURE)
00425     {
00426       cmdline_parser_free (args_info);
00427       exit (EXIT_FAILURE);
00428     }
00429   
00430   return result;
00431 }
00432 
00433 int
00434 cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
00435 {
00436   int result;
00437   struct cmdline_parser_params params;
00438   
00439   params.override = override;
00440   params.initialize = initialize;
00441   params.check_required = check_required;
00442   params.check_ambiguity = 0;
00443   params.print_errors = 1;
00444 
00445   result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
00446 
00447   if (result == EXIT_FAILURE)
00448     {
00449       cmdline_parser_free (args_info);
00450       exit (EXIT_FAILURE);
00451     }
00452   
00453   return result;
00454 }
00455 
00456 int
00457 cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name)
00458 {
00459   FIX_UNUSED (args_info);
00460   FIX_UNUSED (prog_name);
00461   return EXIT_SUCCESS;
00462 }
00463 
00464 
00465 static char *package_name = 0;
00466 
00485 static
00486 int update_arg(void *field, char **orig_field,
00487                unsigned int *field_given, unsigned int *prev_given, 
00488                char *value, const char *possible_values[],
00489                const char *default_value,
00490                cmdline_parser_arg_type arg_type,
00491                int check_ambiguity, int override,
00492                int no_free, int multiple_option,
00493                const char *long_opt, char short_opt,
00494                const char *additional_error)
00495 {
00496   char *stop_char = 0;
00497   const char *val = value;
00498   int found;
00499   char **string_field;
00500   FIX_UNUSED (field);
00501 
00502   stop_char = 0;
00503   found = 0;
00504 
00505   if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
00506     {
00507       if (short_opt != '-')
00508         fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n", 
00509                package_name, long_opt, short_opt,
00510                (additional_error ? additional_error : ""));
00511       else
00512         fprintf (stderr, "%s: `--%s' option given more than once%s\n", 
00513                package_name, long_opt,
00514                (additional_error ? additional_error : ""));
00515       return 1; /* failure */
00516     }
00517 
00518   FIX_UNUSED (default_value);
00519     
00520   if (field_given && *field_given && ! override)
00521     return 0;
00522   if (prev_given)
00523     (*prev_given)++;
00524   if (field_given)
00525     (*field_given)++;
00526   if (possible_values)
00527     val = possible_values[found];
00528 
00529   switch(arg_type) {
00530   case ARG_INT:
00531     if (val) *((int *)field) = strtol (val, &stop_char, 0);
00532     break;
00533   case ARG_LONG:
00534     if (val) *((long *)field) = (long)strtol (val, &stop_char, 0);
00535     break;
00536   case ARG_STRING:
00537     if (val) {
00538       string_field = (char **)field;
00539       if (!no_free && *string_field)
00540         free (*string_field); /* free previous string */
00541       *string_field = gengetopt_strdup (val);
00542     }
00543     break;
00544   default:
00545     break;
00546   };
00547 
00548   /* check numeric conversion */
00549   switch(arg_type) {
00550   case ARG_INT:
00551   case ARG_LONG:
00552     if (val && !(stop_char && *stop_char == '\0')) {
00553       fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val);
00554       return 1; /* failure */
00555     }
00556     break;
00557   default:
00558     ;
00559   };
00560 
00561   /* store the original value */
00562   switch(arg_type) {
00563   case ARG_NO:
00564     break;
00565   default:
00566     if (value && orig_field) {
00567       if (no_free) {
00568         *orig_field = value;
00569       } else {
00570         if (*orig_field)
00571           free (*orig_field); /* free previous string */
00572         *orig_field = gengetopt_strdup (value);
00573       }
00574     }
00575   };
00576 
00577   return 0; /* OK */
00578 }
00579 
00580 
00581 int
00582 cmdline_parser_internal (
00583   int argc, char **argv, struct gengetopt_args_info *args_info,
00584                         struct cmdline_parser_params *params, const char *additional_error)
00585 {
00586   int c;        /* Character of the parsed option.  */
00587 
00588   int error = 0;
00589   struct gengetopt_args_info local_args_info;
00590   
00591   int override;
00592   int initialize;
00593   int check_required;
00594   int check_ambiguity;
00595   
00596   package_name = argv[0];
00597   
00598   override = params->override;
00599   initialize = params->initialize;
00600   check_required = params->check_required;
00601   check_ambiguity = params->check_ambiguity;
00602 
00603   if (initialize)
00604     cmdline_parser_init (args_info);
00605 
00606   cmdline_parser_init (&local_args_info);
00607 
00608   optarg = 0;
00609   optind = 0;
00610   opterr = params->print_errors;
00611   optopt = '?';
00612 
00613   while (1)
00614     {
00615       int option_index = 0;
00616 
00617       static struct option long_options[] = {
00618         { "help",       0, NULL, 'h' },
00619         { "version",    0, NULL, 'V' },
00620         { "fipid",      1, NULL, 0 },
00621         { "fid",        1, NULL, 0 },
00622         { "org",        1, NULL, 0 },
00623         { "bank",       1, NULL, 0 },
00624         { "broker",     1, NULL, 0 },
00625         { "user",       1, NULL, 0 },
00626         { "pass",       1, NULL, 0 },
00627         { "acct",       1, NULL, 0 },
00628         { "type",       1, NULL, 0 },
00629         { "past",       1, NULL, 0 },
00630         { "url",        1, NULL, 0 },
00631         { "trid",       1, NULL, 0 },
00632         { "statement-req",      0, NULL, 's' },
00633         { "accountinfo-req",    0, NULL, 'a' },
00634         { "payment-req",        0, NULL, 'p' },
00635         { "paymentinquiry-req", 0, NULL, 'i' },
00636         { "bank-list",  0, NULL, 'b' },
00637         { "bank-fipid", 0, NULL, 'f' },
00638         { "bank-services",      0, NULL, 'v' },
00639         { "allsupport", 0, NULL, 0 },
00640         { 0,  0, 0, 0 }
00641       };
00642 
00643       c = getopt_long (argc, argv, "hVsapibfv", long_options, &option_index);
00644 
00645       if (c == -1) break;       /* Exit from `while (1)' loop.  */
00646 
00647       switch (c)
00648         {
00649         case 'h':       /* Print help and exit.  */
00650           cmdline_parser_print_help ();
00651           cmdline_parser_free (&local_args_info);
00652           exit (EXIT_SUCCESS);
00653 
00654         case 'V':       /* Print version and exit.  */
00655           cmdline_parser_print_version ();
00656           cmdline_parser_free (&local_args_info);
00657           exit (EXIT_SUCCESS);
00658 
00659         case 's':       /* Request for a statement.  */
00660         
00661           if (args_info->command_group_counter && override)
00662             reset_group_command (args_info);
00663           args_info->command_group_counter += 1;
00664         
00665           if (update_arg( 0 , 
00666                0 , &(args_info->statement_req_given),
00667               &(local_args_info.statement_req_given), optarg, 0, 0, ARG_NO,
00668               check_ambiguity, override, 0, 0,
00669               "statement-req", 's',
00670               additional_error))
00671             goto failure;
00672         
00673           break;
00674         case 'a':       /* Request for a list of accounts.  */
00675         
00676           if (args_info->command_group_counter && override)
00677             reset_group_command (args_info);
00678           args_info->command_group_counter += 1;
00679         
00680           if (update_arg( 0 , 
00681                0 , &(args_info->accountinfo_req_given),
00682               &(local_args_info.accountinfo_req_given), optarg, 0, 0, ARG_NO,
00683               check_ambiguity, override, 0, 0,
00684               "accountinfo-req", 'a',
00685               additional_error))
00686             goto failure;
00687         
00688           break;
00689         case 'p':       /* Request to make a payment.  */
00690         
00691           if (args_info->command_group_counter && override)
00692             reset_group_command (args_info);
00693           args_info->command_group_counter += 1;
00694         
00695           if (update_arg( 0 , 
00696                0 , &(args_info->payment_req_given),
00697               &(local_args_info.payment_req_given), optarg, 0, 0, ARG_NO,
00698               check_ambiguity, override, 0, 0,
00699               "payment-req", 'p',
00700               additional_error))
00701             goto failure;
00702         
00703           break;
00704         case 'i':       /* Request to inquire about the status of a payment.  */
00705         
00706           if (args_info->command_group_counter && override)
00707             reset_group_command (args_info);
00708           args_info->command_group_counter += 1;
00709         
00710           if (update_arg( 0 , 
00711                0 , &(args_info->paymentinquiry_req_given),
00712               &(local_args_info.paymentinquiry_req_given), optarg, 0, 0, ARG_NO,
00713               check_ambiguity, override, 0, 0,
00714               "paymentinquiry-req", 'i',
00715               additional_error))
00716             goto failure;
00717         
00718           break;
00719         case 'b':       /* List all known banks.  */
00720         
00721           if (args_info->command_group_counter && override)
00722             reset_group_command (args_info);
00723           args_info->command_group_counter += 1;
00724         
00725           if (update_arg( 0 , 
00726                0 , &(args_info->bank_list_given),
00727               &(local_args_info.bank_list_given), optarg, 0, 0, ARG_NO,
00728               check_ambiguity, override, 0, 0,
00729               "bank-list", 'b',
00730               additional_error))
00731             goto failure;
00732         
00733           break;
00734         case 'f':       /* List all fipids for a given bank.  */
00735         
00736           if (args_info->command_group_counter && override)
00737             reset_group_command (args_info);
00738           args_info->command_group_counter += 1;
00739         
00740           if (update_arg( 0 , 
00741                0 , &(args_info->bank_fipid_given),
00742               &(local_args_info.bank_fipid_given), optarg, 0, 0, ARG_NO,
00743               check_ambiguity, override, 0, 0,
00744               "bank-fipid", 'f',
00745               additional_error))
00746             goto failure;
00747         
00748           break;
00749         case 'v':       /* List supported services for a given fipid.  */
00750         
00751           if (args_info->command_group_counter && override)
00752             reset_group_command (args_info);
00753           args_info->command_group_counter += 1;
00754         
00755           if (update_arg( 0 , 
00756                0 , &(args_info->bank_services_given),
00757               &(local_args_info.bank_services_given), optarg, 0, 0, ARG_NO,
00758               check_ambiguity, override, 0, 0,
00759               "bank-services", 'v',
00760               additional_error))
00761             goto failure;
00762         
00763           break;
00764 
00765         case 0: /* Long option with no short option */
00766           /* FI partner identifier (looks up fid, org & url from partner server).  */
00767           if (strcmp (long_options[option_index].name, "fipid") == 0)
00768           {
00769           
00770           
00771             if (update_arg( (void *)&(args_info->fipid_arg), 
00772                  &(args_info->fipid_orig), &(args_info->fipid_given),
00773                 &(local_args_info.fipid_given), optarg, 0, 0, ARG_STRING,
00774                 check_ambiguity, override, 0, 0,
00775                 "fipid", '-',
00776                 additional_error))
00777               goto failure;
00778           
00779           }
00780           /* FI identifier.  */
00781           else if (strcmp (long_options[option_index].name, "fid") == 0)
00782           {
00783           
00784           
00785             if (update_arg( (void *)&(args_info->fid_arg), 
00786                  &(args_info->fid_orig), &(args_info->fid_given),
00787                 &(local_args_info.fid_given), optarg, 0, 0, ARG_STRING,
00788                 check_ambiguity, override, 0, 0,
00789                 "fid", '-',
00790                 additional_error))
00791               goto failure;
00792           
00793           }
00794           /* FI org tag.  */
00795           else if (strcmp (long_options[option_index].name, "org") == 0)
00796           {
00797           
00798           
00799             if (update_arg( (void *)&(args_info->org_arg), 
00800                  &(args_info->org_orig), &(args_info->org_given),
00801                 &(local_args_info.org_given), optarg, 0, 0, ARG_STRING,
00802                 check_ambiguity, override, 0, 0,
00803                 "org", '-',
00804                 additional_error))
00805               goto failure;
00806           
00807           }
00808           /* IBAN bank identifier.  */
00809           else if (strcmp (long_options[option_index].name, "bank") == 0)
00810           {
00811           
00812           
00813             if (update_arg( (void *)&(args_info->bank_arg), 
00814                  &(args_info->bank_orig), &(args_info->bank_given),
00815                 &(local_args_info.bank_given), optarg, 0, 0, ARG_STRING,
00816                 check_ambiguity, override, 0, 0,
00817                 "bank", '-',
00818                 additional_error))
00819               goto failure;
00820           
00821           }
00822           /* Broker identifier.  */
00823           else if (strcmp (long_options[option_index].name, "broker") == 0)
00824           {
00825           
00826           
00827             if (update_arg( (void *)&(args_info->broker_arg), 
00828                  &(args_info->broker_orig), &(args_info->broker_given),
00829                 &(local_args_info.broker_given), optarg, 0, 0, ARG_STRING,
00830                 check_ambiguity, override, 0, 0,
00831                 "broker", '-',
00832                 additional_error))
00833               goto failure;
00834           
00835           }
00836           /* User name.  */
00837           else if (strcmp (long_options[option_index].name, "user") == 0)
00838           {
00839           
00840           
00841             if (update_arg( (void *)&(args_info->user_arg), 
00842                  &(args_info->user_orig), &(args_info->user_given),
00843                 &(local_args_info.user_given), optarg, 0, 0, ARG_STRING,
00844                 check_ambiguity, override, 0, 0,
00845                 "user", '-',
00846                 additional_error))
00847               goto failure;
00848           
00849           }
00850           /* Password.  */
00851           else if (strcmp (long_options[option_index].name, "pass") == 0)
00852           {
00853           
00854           
00855             if (update_arg( (void *)&(args_info->pass_arg), 
00856                  &(args_info->pass_orig), &(args_info->pass_given),
00857                 &(local_args_info.pass_given), optarg, 0, 0, ARG_STRING,
00858                 check_ambiguity, override, 0, 0,
00859                 "pass", '-',
00860                 additional_error))
00861               goto failure;
00862           
00863           }
00864           /* Account ID.  */
00865           else if (strcmp (long_options[option_index].name, "acct") == 0)
00866           {
00867           
00868           
00869             if (update_arg( (void *)&(args_info->acct_arg), 
00870                  &(args_info->acct_orig), &(args_info->acct_given),
00871                 &(local_args_info.acct_given), optarg, 0, 0, ARG_STRING,
00872                 check_ambiguity, override, 0, 0,
00873                 "acct", '-',
00874                 additional_error))
00875               goto failure;
00876           
00877           }
00878           /* Account Type 1=checking 2=invest 3=ccard.  */
00879           else if (strcmp (long_options[option_index].name, "type") == 0)
00880           {
00881           
00882           
00883             if (update_arg( (void *)&(args_info->type_arg), 
00884                  &(args_info->type_orig), &(args_info->type_given),
00885                 &(local_args_info.type_given), optarg, 0, 0, ARG_INT,
00886                 check_ambiguity, override, 0, 0,
00887                 "type", '-',
00888                 additional_error))
00889               goto failure;
00890           
00891           }
00892           /* How far back to look from today (in days).  */
00893           else if (strcmp (long_options[option_index].name, "past") == 0)
00894           {
00895           
00896           
00897             if (update_arg( (void *)&(args_info->past_arg), 
00898                  &(args_info->past_orig), &(args_info->past_given),
00899                 &(local_args_info.past_given), optarg, 0, 0, ARG_LONG,
00900                 check_ambiguity, override, 0, 0,
00901                 "past", '-',
00902                 additional_error))
00903               goto failure;
00904           
00905           }
00906           /* Url to POST the data to (otherwise goes to stdout).  */
00907           else if (strcmp (long_options[option_index].name, "url") == 0)
00908           {
00909           
00910           
00911             if (update_arg( (void *)&(args_info->url_arg), 
00912                  &(args_info->url_orig), &(args_info->url_given),
00913                 &(local_args_info.url_given), optarg, 0, 0, ARG_STRING,
00914                 check_ambiguity, override, 0, 0,
00915                 "url", '-',
00916                 additional_error))
00917               goto failure;
00918           
00919           }
00920           /* Transaction id.  */
00921           else if (strcmp (long_options[option_index].name, "trid") == 0)
00922           {
00923           
00924           
00925             if (update_arg( (void *)&(args_info->trid_arg), 
00926                  &(args_info->trid_orig), &(args_info->trid_given),
00927                 &(local_args_info.trid_given), optarg, 0, 0, ARG_INT,
00928                 check_ambiguity, override, 0, 0,
00929                 "trid", '-',
00930                 additional_error))
00931               goto failure;
00932           
00933           }
00934           /* List all banks which support online banking.  */
00935           else if (strcmp (long_options[option_index].name, "allsupport") == 0)
00936           {
00937           
00938             if (args_info->command_group_counter && override)
00939               reset_group_command (args_info);
00940             args_info->command_group_counter += 1;
00941           
00942             if (update_arg( 0 , 
00943                  0 , &(args_info->allsupport_given),
00944                 &(local_args_info.allsupport_given), optarg, 0, 0, ARG_NO,
00945                 check_ambiguity, override, 0, 0,
00946                 "allsupport", '-',
00947                 additional_error))
00948               goto failure;
00949           
00950           }
00951           
00952           break;
00953         case '?':       /* Invalid option.  */
00954           /* `getopt_long' already printed an error message.  */
00955           goto failure;
00956 
00957         default:        /* bug: option not considered.  */
00958           fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : ""));
00959           abort ();
00960         } /* switch */
00961     } /* while */
00962 
00963   if (args_info->command_group_counter > 1)
00964     {
00965       fprintf (stderr, "%s: %d options of group command were given. At most one is required%s.\n", argv[0], args_info->command_group_counter, (additional_error ? additional_error : ""));
00966       error = 1;
00967     }
00968   
00969 
00970 
00971 
00972   cmdline_parser_release (&local_args_info);
00973 
00974   if ( error )
00975     return (EXIT_FAILURE);
00976 
00977   if (optind < argc)
00978     {
00979       int i = 0 ;
00980       int found_prog_name = 0;
00981       /* whether program name, i.e., argv[0], is in the remaining args
00982          (this may happen with some implementations of getopt,
00983           but surely not with the one included by gengetopt) */
00984 
00985       i = optind;
00986       while (i < argc)
00987         if (argv[i++] == argv[0]) {
00988           found_prog_name = 1;
00989           break;
00990         }
00991       i = 0;
00992 
00993       args_info->inputs_num = argc - optind - found_prog_name;
00994       args_info->inputs =
00995         (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
00996       while (optind < argc)
00997         if (argv[optind++] != argv[0])
00998           args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
00999     }
01000 
01001   return 0;
01002 
01003 failure:
01004   
01005   cmdline_parser_release (&local_args_info);
01006   return (EXIT_FAILURE);
01007 }
libofx-0.9.4/doc/html/ofx__container__transaction_8cpp_source.html0000644000175000017500000015313211553133250022405 00000000000000 LibOFX: ofx_container_transaction.cpp Source File

ofx_container_transaction.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_container_account.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstdlib>
00025 #include <string>
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_containers.hh"
00029 #include "ofx_utilities.hh"
00030 
00031 extern OfxMainContainer * MainContainer;
00032 
00033 /***************************************************************************
00034  *                      OfxTransactionContainer                            *
00035  ***************************************************************************/
00036 
00037 OfxTransactionContainer::OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00038   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00039 {
00040   OfxGenericContainer * tmp_parentcontainer = parentcontainer;
00041 
00042   memset(&data, 0, sizeof(data));
00043   type = "TRANSACTION";
00044   /* Find the parent statement container*/
00045   while (tmp_parentcontainer != NULL && tmp_parentcontainer->type != "STATEMENT")
00046   {
00047     tmp_parentcontainer = tmp_parentcontainer->parentcontainer;
00048   }
00049   if (tmp_parentcontainer != NULL)
00050   {
00051     parent_statement = (OfxStatementContainer*)tmp_parentcontainer;
00052   }
00053   else
00054   {
00055     parent_statement = NULL;
00056     message_out(ERROR, "Unable to find the enclosing statement container this transaction");
00057   }
00058   if (parent_statement != NULL && parent_statement->data.account_id_valid == true)
00059   {
00060     strncpy(data.account_id, parent_statement->data.account_id, OFX_ACCOUNT_ID_LENGTH);
00061     data.account_id_valid = true;
00062   }
00063 }
00064 OfxTransactionContainer::~OfxTransactionContainer()
00065 {
00066 
00067 }
00068 
00069 int OfxTransactionContainer::gen_event()
00070 {
00071   if (data.unique_id_valid == true && MainContainer != NULL)
00072   {
00073     data.security_data_ptr = MainContainer->find_security(data.unique_id);
00074     if (data.security_data_ptr != NULL)
00075     {
00076       data.security_data_valid = true;
00077     }
00078   }
00079   libofx_context->transactionCallback(data);
00080   return true;
00081 }
00082 
00083 int  OfxTransactionContainer::add_to_main_tree()
00084 {
00085 
00086   if (MainContainer != NULL)
00087   {
00088     return MainContainer->add_container(this);
00089   }
00090   else
00091   {
00092     return false;
00093   }
00094 }
00095 
00096 
00097 void OfxTransactionContainer::add_attribute(const string identifier, const string value)
00098 {
00099 
00100   if (identifier == "DTPOSTED")
00101   {
00102     data.date_posted = ofxdate_to_time_t(value);
00103     data.date_posted_valid = true;
00104   }
00105   else if (identifier == "DTUSER")
00106   {
00107     data.date_initiated = ofxdate_to_time_t(value);
00108     data.date_initiated_valid = true;
00109   }
00110   else if (identifier == "DTAVAIL")
00111   {
00112     data.date_funds_available = ofxdate_to_time_t(value);
00113     data.date_funds_available_valid = true;
00114   }
00115   else if (identifier == "FITID")
00116   {
00117     strncpy(data.fi_id, value.c_str(), sizeof(data.fi_id));
00118     data.fi_id_valid = true;
00119   }
00120   else if (identifier == "CORRECTFITID")
00121   {
00122     strncpy(data.fi_id_corrected, value.c_str(), sizeof(data.fi_id));
00123     data.fi_id_corrected_valid = true;
00124   }
00125   else if (identifier == "CORRECTACTION")
00126   {
00127     data.fi_id_correction_action_valid = true;
00128     if (value == "REPLACE")
00129     {
00130       data.fi_id_correction_action = REPLACE;
00131     }
00132     else if (value == "DELETE")
00133     {
00134       data.fi_id_correction_action = DELETE;
00135     }
00136     else
00137     {
00138       data.fi_id_correction_action_valid = false;
00139     }
00140   }
00141   else if ((identifier == "SRVRTID") || (identifier == "SRVRTID2"))
00142   {
00143     strncpy(data.server_transaction_id, value.c_str(), sizeof(data.server_transaction_id));
00144     data.server_transaction_id_valid = true;
00145   }
00146   else if (identifier == "MEMO" || identifier == "MEMO2")
00147   {
00148     strncpy(data.memo, value.c_str(), sizeof(data.memo));
00149     data.memo_valid = true;
00150   }
00151   else
00152   {
00153     /* Redirect unknown identifiers to the base class */
00154     OfxGenericContainer::add_attribute(identifier, value);
00155   }
00156 }// end OfxTransactionContainer::add_attribute()
00157 
00158 void OfxTransactionContainer::add_account(OfxAccountData * account_data)
00159 {
00160   if (account_data->account_id_valid == true)
00161   {
00162     data.account_ptr = account_data;
00163     strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH);
00164     data.account_id_valid = true;
00165   }
00166 }
00167 
00168 /***************************************************************************
00169  *                      OfxBankTransactionContainer                        *
00170  ***************************************************************************/
00171 
00172 OfxBankTransactionContainer::OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00173   OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00174 {
00175   ;
00176 }
00177 void OfxBankTransactionContainer::add_attribute(const string identifier, const string value)
00178 {
00179   if ( identifier == "TRNTYPE")
00180   {
00181     data.transactiontype_valid = true;
00182     if (value == "CREDIT")
00183     {
00184       data.transactiontype = OFX_CREDIT;
00185     }
00186     else if (value == "DEBIT")
00187     {
00188       data.transactiontype = OFX_DEBIT;
00189     }
00190     else if (value == "INT")
00191     {
00192       data.transactiontype = OFX_INT;
00193     }
00194     else if (value == "DIV")
00195     {
00196       data.transactiontype = OFX_DIV;
00197     }
00198     else if (value == "FEE")
00199     {
00200       data.transactiontype = OFX_FEE;
00201     }
00202     else if (value == "SRVCHG")
00203     {
00204       data.transactiontype = OFX_SRVCHG;
00205     }
00206     else if (value == "DEP")
00207     {
00208       data.transactiontype = OFX_DEP;
00209     }
00210     else if (value == "ATM")
00211     {
00212       data.transactiontype = OFX_ATM;
00213     }
00214     else if (value == "POS")
00215     {
00216       data.transactiontype = OFX_POS;
00217     }
00218     else if (value == "XFER")
00219     {
00220       data.transactiontype = OFX_XFER;
00221     }
00222     else if (value == "CHECK")
00223     {
00224       data.transactiontype = OFX_CHECK;
00225     }
00226     else if (value == "PAYMENT")
00227     {
00228       data.transactiontype = OFX_PAYMENT;
00229     }
00230     else if (value == "CASH")
00231     {
00232       data.transactiontype = OFX_CASH;
00233     }
00234     else if (value == "DIRECTDEP")
00235     {
00236       data.transactiontype = OFX_DIRECTDEP;
00237     }
00238     else if (value == "DIRECTDEBIT")
00239     {
00240       data.transactiontype = OFX_DIRECTDEBIT;
00241     }
00242     else if (value == "REPEATPMT")
00243     {
00244       data.transactiontype = OFX_REPEATPMT;
00245     }
00246     else if (value == "OTHER")
00247     {
00248       data.transactiontype = OFX_OTHER;
00249     }
00250     else
00251     {
00252       data.transactiontype_valid = false;
00253     }
00254   }//end TRANSTYPE
00255   else if (identifier == "TRNAMT")
00256   {
00257     data.amount = ofxamount_to_double(value);
00258     data.amount_valid = true;
00259     data.units = -data.amount;
00260     data.units_valid = true;
00261     data.unitprice = 1.00;
00262     data.unitprice_valid = true;
00263   }
00264   else if (identifier == "CHECKNUM")
00265   {
00266     strncpy(data.check_number, value.c_str(), sizeof(data.check_number));
00267     data.check_number_valid = true;
00268   }
00269   else if (identifier == "REFNUM")
00270   {
00271     strncpy(data.reference_number, value.c_str(), sizeof(data.reference_number));
00272     data.reference_number_valid = true;
00273   }
00274   else if (identifier == "SIC")
00275   {
00276     data.standard_industrial_code = atoi(value.c_str());
00277     data.standard_industrial_code_valid = true;
00278   }
00279   else if ((identifier == "PAYEEID") || (identifier == "PAYEEID2"))
00280   {
00281     strncpy(data.payee_id, value.c_str(), sizeof(data.payee_id));
00282     data.payee_id_valid = true;
00283   }
00284   else if (identifier == "NAME")
00285   {
00286     strncpy(data.name, value.c_str(), sizeof(data.name));
00287     data.name_valid = true;
00288   }
00289   else
00290   {
00291     /* Redirect unknown identifiers to base class */
00292     OfxTransactionContainer::add_attribute(identifier, value);
00293   }
00294 }//end OfxBankTransactionContainer::add_attribute
00295 
00296 
00297 /***************************************************************************
00298  *                    OfxInvestmentTransactionContainer                    *
00299  ***************************************************************************/
00300 
00301 OfxInvestmentTransactionContainer::OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00302   OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00303 {
00304   type = "INVESTMENT";
00305   data.transactiontype = OFX_OTHER;
00306   data.transactiontype_valid = true;
00307 
00308   data.invtransactiontype_valid = true;
00309   if (para_tag_identifier == "BUYDEBT")
00310   {
00311     data.invtransactiontype = OFX_BUYDEBT;
00312   }
00313   else if (para_tag_identifier == "BUYMF")
00314   {
00315     data.invtransactiontype = OFX_BUYMF;
00316   }
00317   else if (para_tag_identifier == "BUYOPT")
00318   {
00319     data.invtransactiontype = OFX_BUYOPT;
00320   }
00321   else if (para_tag_identifier == "BUYOTHER")
00322   {
00323     data.invtransactiontype = OFX_BUYOTHER;
00324   }
00325   else if (para_tag_identifier == "BUYSTOCK")
00326   {
00327     data.invtransactiontype = OFX_BUYSTOCK;
00328   }
00329   else if (para_tag_identifier == "CLOSUREOPT")
00330   {
00331     data.invtransactiontype = OFX_CLOSUREOPT;
00332   }
00333   else if (para_tag_identifier == "INCOME")
00334   {
00335     data.invtransactiontype = OFX_INCOME;
00336   }
00337   else if (para_tag_identifier == "INVEXPENSE")
00338   {
00339     data.invtransactiontype = OFX_INVEXPENSE;
00340   }
00341   else if (para_tag_identifier == "JRNLFUND")
00342   {
00343     data.invtransactiontype = OFX_JRNLFUND;
00344   }
00345   else if (para_tag_identifier == "JRNLSEC")
00346   {
00347     data.invtransactiontype = OFX_JRNLSEC;
00348   }
00349   else if (para_tag_identifier == "MARGININTEREST")
00350   {
00351     data.invtransactiontype = OFX_MARGININTEREST;
00352   }
00353   else if (para_tag_identifier == "REINVEST")
00354   {
00355     data.invtransactiontype = OFX_REINVEST;
00356   }
00357   else if (para_tag_identifier == "RETOFCAP")
00358   {
00359     data.invtransactiontype = OFX_RETOFCAP;
00360   }
00361   else if (para_tag_identifier == "SELLDEBT")
00362   {
00363     data.invtransactiontype = OFX_SELLDEBT;
00364   }
00365   else if (para_tag_identifier == "SELLMF")
00366   {
00367     data.invtransactiontype = OFX_SELLMF;
00368   }
00369   else if (para_tag_identifier == "SELLOPT")
00370   {
00371     data.invtransactiontype = OFX_SELLOPT;
00372   }
00373   else if (para_tag_identifier == "SELLOTHER")
00374   {
00375     data.invtransactiontype = OFX_SELLOTHER;
00376   }
00377   else if (para_tag_identifier == "SELLSTOCK")
00378   {
00379     data.invtransactiontype = OFX_SELLSTOCK;
00380   }
00381   else if (para_tag_identifier == "SPLIT")
00382   {
00383     data.invtransactiontype = OFX_SPLIT;
00384   }
00385   else if (para_tag_identifier == "TRANSFER")
00386   {
00387     data.invtransactiontype = OFX_TRANSFER;
00388   }
00389   else
00390   {
00391     message_out(ERROR, "This should not happen, " + para_tag_identifier + " is an unknown investment transaction type");
00392     data.invtransactiontype_valid = false;
00393   }
00394 }
00395 
00396 void OfxInvestmentTransactionContainer::add_attribute(const string identifier, const string value)
00397 {
00398   if (identifier == "UNIQUEID")
00399   {
00400     strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id));
00401     data.unique_id_valid = true;
00402   }
00403   else if (identifier == "UNIQUEIDTYPE")
00404   {
00405     strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type));
00406     data.unique_id_type_valid = true;
00407   }
00408   else if (identifier == "UNITS")
00409   {
00410     data.units = ofxamount_to_double(value);
00411     data.units_valid = true;
00412   }
00413   else if (identifier == "UNITPRICE")
00414   {
00415     data.unitprice = ofxamount_to_double(value);
00416     data.unitprice_valid = true;
00417   }
00418   else if (identifier == "MKTVAL")
00419   {
00420     message_out(DEBUG, "MKTVAL of " + value + " ignored since MKTVAL should always be UNITS*UNITPRICE");
00421   }
00422   else if (identifier == "TOTAL")
00423   {
00424     data.amount = ofxamount_to_double(value);
00425     data.amount_valid = true;
00426   }
00427   else if (identifier == "DTSETTLE")
00428   {
00429     data.date_posted = ofxdate_to_time_t(value);
00430     data.date_posted_valid = true;
00431   }
00432   else if (identifier == "DTTRADE")
00433   {
00434     data.date_initiated = ofxdate_to_time_t(value);
00435     data.date_initiated_valid = true;
00436   }
00437   else if (identifier == "COMMISSION")
00438   {
00439     data.commission = ofxamount_to_double(value);
00440     data.commission_valid = true;
00441   }
00442   else if (identifier == "FEES")
00443   {
00444     data.fees = ofxamount_to_double(value);
00445     data.fees_valid = true;
00446   }
00447   else if (identifier == "OLDUNITS")
00448   {
00449     data.oldunits = ofxamount_to_double(value);
00450     data.oldunits_valid = true;
00451   }
00452   else if (identifier == "NEWUNITS")
00453   {
00454     data.newunits = ofxamount_to_double(value);
00455     data.newunits_valid = true;
00456   }
00457   else
00458   {
00459     /* Redirect unknown identifiers to the base class */
00460     OfxTransactionContainer::add_attribute(identifier, value);
00461   }
00462 }//end OfxInvestmentTransactionContainer::add_attribute
00463 
libofx-0.9.4/doc/html/classOfxAccountInfoRequest.png0000644000175000017500000000217711553133250017440 00000000000000‰PNG  IHDR^ˆ¯PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÝÝ’¢0EaVùþ<$ø3 ¢Ý!ùvÍFÀÝËÅáörm,—%šuÐì:5••fço•fôÒŒ^~DÍè¥YSzED¤bq×÷l>z*ÍZoös¡È/åUc_£ï Ò¬ùf?J׊)"µ˜Ë-·@›)¦)ÝË'y)ß5C¥YûͶÊÎgõóÛy)R¯â¨»w›´ •fÍ6ÛY(=±ïK½^ú5TšµØìÍB1Çg…æÊ·Éþ-óô8*ÍZjöÖ8MOê—¾?T]Îùö ×¬­f?Jš—ÊW…ª§uuä{Oëí¨4k¿ÙÏ…ÒD|ZhŠùMÞ¤ÃÓÜMãtŠ¹Û†iº•fÍ7ÛPhó¼}ñÉžìC¥YëÍŽº{Z?~òg¨4k¢ÙAß—Ùùð囦çïDÍZhv|œ~4ôšýy3¨4£—fôò#jF/Í~Q¯ÆR Ò¬£fsûØ•>Í:h•f_ìsk••f4ƒJ³¯öi”•f4ƒJ³ïVjtÎkÖE3¨4ƒJ3zi¦TšA¥½4Ó *ÍÒŒ^ši¶¯P»i÷GÄÌ̓T‚T˜A…T‚T˜A…T‚T˜A…T‚T˜A…™@…T˜ýU®³®˜]§¦r½0ƒ 3¨èE/¨0ƒ ³S£ŠˆH;ÅJÞÿÿ©£ê5:³í¨"¿¬÷²D/ÌŽ¡JmL‘­ôæ2"-Ökyw8½0Û*³H{w+ ªê¨A§fo¢š"Ýló¶¤ó€j܇#fÇP­3=PeŒù z Èìcƒ~!WÝ‚õŽ£1ÛŒjáR0*Q%x‘^k ƒê…ÙvTSšÜOPMù“ ª^K/ê5<³¨ö<ÞMozÎ *Ì ÂŒ^ÈzuÌ *Ì ÂŒ^ô *Ì~Uc9…^˜ývnü˜A…Y¤nXafç$…fPavNX`fPa&PafPa&PafP fPaÖ *ÙÚ˜"ôz ½Dè%ôz‰ÐKè%ô¡—ÐKè%B/¡—t‘h,~‘¾ôRGè%ô¢—ÐKè%]éó~Úìûµ£:v½D,—ÝÖƒ^}êù¥ücóÏ]éuï疋Ыg½–MDrjV-´y©Ü¤ÿq‰˜—ª7åQó¡ùÜtÑz-ïÒ«s½Vmþ?ßÌ»éß²WUŸ”ô­×L¯‘ôº¤±R?/‹Í3Ùžªq7ëòH¬¦×ˆzn¼«×úL£­Ð+_þñ;¤ÿ‡ã2Vêuw‰jzÕVÓ«S½ '*½ž µO¯å¤W§Ò«[½.éIõL¯KþènSzS½YZ­­NJlYËczõªWßH/zÑKè%#êu¦:B/¡½è¥ŽÐKΣWcû?Æ»/'RÅIEND®B`‚libofx-0.9.4/doc/html/globals_enum.html0000644000175000017500000000760511553133251015005 00000000000000 LibOFX: Globals
libofx-0.9.4/doc/html/nodeparser_8h.html0000644000175000017500000000646511553133250015101 00000000000000 LibOFX: nodeparser.h File Reference

nodeparser.h File Reference

Declaration of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath. More...

Go to the source code of this file.

Data Structures

class  NodeParser

Detailed Description

Declaration of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath.

Definition in file nodeparser.h.

libofx-0.9.4/doc/html/functions_0x77.html0000644000175000017500000001121111553133250015116 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- w -

libofx-0.9.4/doc/html/tabs.css0000644000175000017500000000210711553133250013102 00000000000000.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } libofx-0.9.4/doc/html/globals_0x75.html0000644000175000017500000001055411553133251014541 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- u -

libofx-0.9.4/doc/html/classtree_1_1post__order__iterator.png0000644000175000017500000000204211553133250021100 00000000000000‰PNG  IHDRdP€»™PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2±IDATxíÛ’­* E]ÕÿÿÉç‹Iˆ—µ½³ºÚ¥$Óðºü y-U°8‚ígE³Ò&ƒÆlÐÂd˜ “a2L†0&{®Éd/U’dÌáÐîœqÌ‘§—L¶[MÖÄ<€ÖA.ÿ‡É^‰­CKDÖUVÉ¿ê¥_mœ!«y(²J3iºË´ì$iòú/ ÔÄŒ2ÛEu^tÚd`;ÜÉÒûo/ßiðI†%ËŒ©H¯þÂKI©«È?t¢ŽdF‹òk:ÕÉÀvÈdæ|­V›áQ´—¦éÛ?äÓìö1ýÌí¶ÖºÃd`;j2)MSJ›Ü£¥3Æ´LÈšó"Zz¨}¡íû4Ó–6¾K«Ä«Õ_6Øv2mï¹O²7Ø^¢&"èÞ;Ÿ¤[Ж:ÓúŸã‰N¶“Ç¥_Ü龯NþZþø·i~û\Ì.g?ûgŽË—cëÒ*öÌm0ê†Ûq¼›¡ZlŽUw[s_¥®ØL’‡RSo7J¿­‹e–ƒ,Ũ› &Û“ÍkÔ)¿K&ÛGL6†%ICnÖÙŠwšìUØ®’ïÑ­ìMØ …É0&Ãd˜ a2L†É0ÙL†æ¥L†Î`{”~º®‡ lÐÛ£`ý‚ lÐÛ߇.°A lŸÀ-°A lZ`ƒØ …À-°A lZ`ƒؾ:%œC·@“!L†0B˜ a2„0Âd“!„É&C˜ !L†0B˜ì+%h^Øå¤É@+ÀÁ p°B€ƒà`õp»ü$é4ñ^¸ ‡î4B<Ò­<Åd6Yó%&¹“Ýj2YY$ÿª—>ãq†,æ¡È"ͤé.›ÌN’&¯ÿr¡`A¾Š)¡sí ÔtÒÖéVÇd×;Y²Í¶ïy§,̨û­ÇT¤ÎWᥤÔUäfÒf&S FEÓEuúÕ1Ù &3[ïw#4Y›áÔ^š³ÒFÄ›¯à Jh²àµöêtŸ¢;L&åœrí™LgŒMfB–œ™LµÞÜÚZðEŒM–WКLt«c²û:™Æ:×ÉzƒQ«Ù;.ýÐt'óE:Ì-Ö²6“ý“ã²ÙÓ³Çeî aHï\Lf]ï“G&Ó+—˜ìc&+û“O4s°™PÝäºê,ͱên;©{i&ÉCé‹¶·˜Àe¹BåÚ8“¹:Ýê˜ìšÉ>˜ð µÿ±z¯5Ù8^’.†\[Ë\3ËÀd/ü:édl¬à`8XVp°z 84¯'oä(áœP•ZIEND®B`‚libofx-0.9.4/doc/html/classOfxDummyContainer.png0000644000175000017500000000122711553133250016610 00000000000000‰PNG  IHDRPâ ÂPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2&IDATxíÁŽÃ0DC*õÿ?y ñlꬲ5‰UÅ„Œ_1¾.¯¶¸•PóZ§[DRA ‘ ‘É¥HDDÔñeýfq&‡Z§ÌTc"ľB²ÇF '< LU£"4YV±zéÿÑÅökM±E”,þµ ,€‘ÌU³aÿz¾([·„ÝÏß“CÁ¾À$SÔ@ÛºCï‰5ÒÛ;ûU\`É·Õ|¡<“\Ã"üiPà’ï¨ùتù=¡)GE /=ræà|C šñæ‡3zܪN%CÇ]2W‰ð‹<ˆðŸz³èô³H¬3^ò$Kw$@2U‹˜gÉL5DB$DB$DB$D2 I HJ©ù³½/¨q•PC$†w%&%Ô ÐPˆI 5DÂñJ$DB$DB$DB$DB$÷FRËJýAOj6"!"!"!"!‘ ‘ ‘ÉI“V % ‘ ‘ü³þ~œ¸`f‹U©‹Dì „ÆÊt™c›-‹DYDÄv¨M㤤ù-h®w‹VQß³€W¿’°Í‰,¯æì´ÄPB½h§ó.H6Å}—€D’Â]*8žB’ö×#Ùænì4?J88Æ1ä¸êÜ8q¢ñ°Gâ_cHnÒ%Öâ ‰…Ú0Ý#ñýTF‘Ýåo©dRÇ!¹`?CrÅvwpˆ„Hˆ„Hˆê)`må·¶9CKøÁIEND®B`‚libofx-0.9.4/doc/html/main__doc_8c_source.html0000644000175000017500000000463611553133250016220 00000000000000 LibOFX: main_doc.c Source File

main_doc.c

00001 
libofx-0.9.4/doc/html/functions_0x62.html0000644000175000017500000001622411553133250015121 00000000000000 LibOFX: Data Fields
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- b -

libofx-0.9.4/doc/html/tab_a.png0000644000175000017500000000021411553133250013210 00000000000000‰PNG  IHDR$ÇÇ[SIDATxí» €@wçÉ¡œˆ˜*æ‚M˜ØIïÎF†ýL :®‡±nÌëN™ ¶±Á’„ØN&â¼_ ɭɾ}Õ¶8~î¾îOwv-ÿêA4Y)Ñ}IEND®B`‚libofx-0.9.4/doc/html/classtree_1_1iterator__base.html0000644000175000017500000003774511553133250017675 00000000000000 LibOFX: tree< T, tree_node_allocator >::iterator_base Class Reference

tree< T, tree_node_allocator >::iterator_base Class Reference

Base class for iterators, only pointers stored, no traversal logic. More...

Inheritance diagram for tree< T, tree_node_allocator >::iterator_base:
tree< T, tree_node_allocator >::fixed_depth_iterator tree< T, tree_node_allocator >::fixed_depth_iterator tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::pre_order_iterator tree< T, tree_node_allocator >::pre_order_iterator tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::sibling_iterator

Public Types

typedef T value_type
typedef T * pointer
typedef T & reference
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef
std::bidirectional_iterator_tag 
iterator_category
typedef T value_type
typedef T * pointer
typedef T & reference
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef
std::bidirectional_iterator_tag 
iterator_category

Public Member Functions

 iterator_base (tree_node *)
T & operator* () const
T * operator-> () const
void skip_children ()
 When called, the next increment/decrement skips children of this node.
unsigned int number_of_children () const
 Number of children of the node pointed to by the iterator.
sibling_iterator begin () const
sibling_iterator end () const
 iterator_base (tree_node *)
T & operator* () const
T * operator-> () const
void skip_children ()
 When called, the next increment/decrement skips children of this node.
unsigned int number_of_children () const
 Number of children of the node pointed to by the iterator.
sibling_iterator begin () const
sibling_iterator end () const

Data Fields

tree_nodenode

Protected Attributes

bool skip_current_children_

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::iterator_base

Base class for iterators, only pointers stored, no traversal logic.

Definition at line 130 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__request__statement_8hh_source.html0000644000175000017500000002166611553133250021415 00000000000000 LibOFX: ofx_request_statement.hh Source File

ofx_request_statement.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_request_statement.hh
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef OFX_REQ_STATEMENT_H
00021 #define OFX_REQ_STATEMENT_H
00022 
00023 #include <string>
00024 #include "libofx.h"
00025 #include "ofx_request.hh"
00026 
00027 using namespace std;
00028 
00037 class OfxStatementRequest: public OfxRequest
00038 {
00039 public:
00049   OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from );
00050 
00051 protected:
00059   OfxAggregate BankStatementRequest(void) const;
00060 
00068   OfxAggregate CreditCardStatementRequest(void) const;
00069 
00077   OfxAggregate InvestmentStatementRequest(void) const;
00078 
00079 private:
00080   OfxAccountData m_account;
00081   time_t m_date_from;
00082 };
00083 
00084 class OfxPaymentRequest: public OfxRequest
00085 {
00086 public:
00097   OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment );
00098 protected:
00099 
00100 private:
00101   OfxAccountData m_account;
00102   OfxPayee m_payee;
00103   OfxPayment m_payment;
00104 };
00105 
00106 #endif // OFX_REQ_STATEMENT_H
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2tree_8hh_source.html0000644000175000017500000063445411553133250020112 00000000000000 LibOFX: tree.hh Source File

tree.hh

00001 /*
00002 
00003    $Id: tree.hh,v 1.6 2006-07-20 04:41:16 benoitg Exp $
00004 
00005    STL-like templated tree class.
00006    Copyright (C) 2001-2005  Kasper Peeters <kasper.peeters@aei.mpg.de>.
00007 
00008 */
00009 
00026 /*
00027    This program is free software; you can redistribute it and/or modify
00028    it under the terms of the GNU General Public License as published by
00029    the Free Software Foundation; version 2.
00030 
00031    This program is distributed in the hope that it will be useful,
00032    but WITHOUT ANY WARRANTY; without even the implied warranty of
00033    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00034    GNU General Public License for more details.
00035 
00036    You should have received a copy of the GNU General Public License
00037    along with this program; if not, write to the Free Software
00038    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00039 */
00040 
00058 #ifndef tree_hh_
00059 #define tree_hh_
00060 
00061 #include <cassert>
00062 #include <memory>
00063 #include <stdexcept>
00064 #include <iterator>
00065 #include <set>
00066 
00067 // HP-style construct/destroy have gone from the standard,
00068 // so here is a copy.
00069 
00070 namespace kp
00071 {
00072 
00073 template <class T1, class T2>
00074 void constructor(T1* p, T2& val)
00075 {
00076   new ((void *) p) T1(val);
00077 }
00078 
00079 template <class T1>
00080 void constructor(T1* p)
00081 {
00082   new ((void *) p) T1;
00083 }
00084 
00085 template <class T1>
00086 void destructor(T1* p)
00087 {
00088   p->~T1();
00089 }
00090 
00091 };
00092 
00094 template<class T>
00095 class tree_node_   // size: 5*4=20 bytes (on 32 bit arch), can be reduced by 8.
00096 {
00097 public:
00098   tree_node_<T> *parent;
00099   tree_node_<T> *first_child, *last_child;
00100   tree_node_<T> *prev_sibling, *next_sibling;
00101   T data;
00102 }; // __attribute__((packed));
00103 
00104 template < class T, class tree_node_allocator = std::allocator<tree_node_<T> > >
00105 class tree
00106 {
00107 protected:
00108   typedef tree_node_<T> tree_node;
00109 public:
00111   typedef T value_type;
00112 
00113   class iterator_base;
00114   class pre_order_iterator;
00115   class post_order_iterator;
00116   class sibling_iterator;
00117 
00118   tree();
00119   tree(const T&);
00120   tree(const iterator_base&);
00121   tree(const tree<T, tree_node_allocator>&);
00122   ~tree();
00123   void operator=(const tree<T, tree_node_allocator>&);
00124 
00126 #ifdef __SGI_STL_PORT
00127   class iterator_base : public stlport::bidirectional_iterator<T, ptrdiff_t>
00128   {
00129 #else
00130   class iterator_base
00131   {
00132 #endif
00133   public:
00134     typedef T                               value_type;
00135     typedef T*                              pointer;
00136     typedef T&                              reference;
00137     typedef size_t                          size_type;
00138     typedef ptrdiff_t                       difference_type;
00139     typedef std::bidirectional_iterator_tag iterator_category;
00140 
00141     iterator_base();
00142     iterator_base(tree_node *);
00143 
00144     T&             operator*() const;
00145     T*             operator->() const;
00146 
00148     void         skip_children();
00150     unsigned int number_of_children() const;
00151 
00152     sibling_iterator begin() const;
00153     sibling_iterator end() const;
00154 
00155     tree_node *node;
00156   protected:
00157     bool skip_current_children_;
00158   };
00159 
00161   class pre_order_iterator : public iterator_base
00162   {
00163   public:
00164     pre_order_iterator();
00165     pre_order_iterator(tree_node *);
00166     pre_order_iterator(const iterator_base&);
00167     pre_order_iterator(const sibling_iterator&);
00168 
00169     bool    operator==(const pre_order_iterator&) const;
00170     bool    operator!=(const pre_order_iterator&) const;
00171     pre_order_iterator&  operator++();
00172     pre_order_iterator&  operator--();
00173     pre_order_iterator   operator++(int);
00174     pre_order_iterator   operator--(int);
00175     pre_order_iterator&  operator+=(unsigned int);
00176     pre_order_iterator&  operator-=(unsigned int);
00177   };
00178 
00180   class post_order_iterator : public iterator_base
00181   {
00182   public:
00183     post_order_iterator();
00184     post_order_iterator(tree_node *);
00185     post_order_iterator(const iterator_base&);
00186     post_order_iterator(const sibling_iterator&);
00187 
00188     bool    operator==(const post_order_iterator&) const;
00189     bool    operator!=(const post_order_iterator&) const;
00190     post_order_iterator&  operator++();
00191     post_order_iterator&  operator--();
00192     post_order_iterator   operator++(int);
00193     post_order_iterator   operator--(int);
00194     post_order_iterator&  operator+=(unsigned int);
00195     post_order_iterator&  operator-=(unsigned int);
00196 
00198     void descend_all();
00199   };
00200 
00202   typedef pre_order_iterator iterator;
00203 
00205   class fixed_depth_iterator : public iterator_base
00206   {
00207   public:
00208     fixed_depth_iterator();
00209     fixed_depth_iterator(tree_node *);
00210     fixed_depth_iterator(const iterator_base&);
00211     fixed_depth_iterator(const sibling_iterator&);
00212     fixed_depth_iterator(const fixed_depth_iterator&);
00213 
00214     bool    operator==(const fixed_depth_iterator&) const;
00215     bool    operator!=(const fixed_depth_iterator&) const;
00216     fixed_depth_iterator&  operator++();
00217     fixed_depth_iterator&  operator--();
00218     fixed_depth_iterator   operator++(int);
00219     fixed_depth_iterator   operator--(int);
00220     fixed_depth_iterator&  operator+=(unsigned int);
00221     fixed_depth_iterator&  operator-=(unsigned int);
00222 
00223     tree_node *first_parent_;
00224   private:
00225     void set_first_parent_();
00226     void find_leftmost_parent_();
00227   };
00228 
00230   class sibling_iterator : public iterator_base
00231   {
00232   public:
00233     sibling_iterator();
00234     sibling_iterator(tree_node *);
00235     sibling_iterator(const sibling_iterator&);
00236     sibling_iterator(const iterator_base&);
00237 
00238     bool    operator==(const sibling_iterator&) const;
00239     bool    operator!=(const sibling_iterator&) const;
00240     sibling_iterator&  operator++();
00241     sibling_iterator&  operator--();
00242     sibling_iterator   operator++(int);
00243     sibling_iterator   operator--(int);
00244     sibling_iterator&  operator+=(unsigned int);
00245     sibling_iterator&  operator-=(unsigned int);
00246 
00247     tree_node *range_first() const;
00248     tree_node *range_last() const;
00249     tree_node *parent_;
00250   private:
00251     void set_parent_();
00252   };
00253 
00255   inline pre_order_iterator   begin() const;
00257   inline pre_order_iterator   end() const;
00259   post_order_iterator  begin_post() const;
00261   post_order_iterator  end_post() const;
00263   fixed_depth_iterator begin_fixed(const iterator_base&, unsigned int) const;
00265   fixed_depth_iterator end_fixed(const iterator_base&, unsigned int) const;
00267   sibling_iterator     begin(const iterator_base&) const;
00269   sibling_iterator     end(const iterator_base&) const;
00270 
00272   template<typename iter> iter parent(iter) const;
00274   template<typename iter> iter previous_sibling(iter) const;
00276   template<typename iter> iter next_sibling(iter) const;
00278   template<typename iter> iter next_at_same_depth(iter) const;
00279 
00281   void     clear();
00283   template<typename iter> iter erase(iter);
00285   void     erase_children(const iterator_base&);
00286 
00288   template<typename iter> iter append_child(iter position);
00290   template<typename iter> iter append_child(iter position, const T& x);
00292   template<typename iter> iter append_child(iter position, iter other_position);
00294   template<typename iter> iter append_children(iter position, sibling_iterator from, sibling_iterator to);
00295 
00297   pre_order_iterator set_head(const T& x);
00299   template<typename iter> iter insert(iter position, const T& x);
00301   sibling_iterator insert(sibling_iterator position, const T& x);
00303   template<typename iter> iter insert_subtree(iter position, const iterator_base& subtree);
00305   template<typename iter> iter insert_after(iter position, const T& x);
00306 
00308   template<typename iter> iter replace(iter position, const T& x);
00310   template<typename iter> iter replace(iter position, const iterator_base& from);
00312   sibling_iterator replace(sibling_iterator orig_begin, sibling_iterator orig_end,
00313                            sibling_iterator new_begin,  sibling_iterator new_end);
00314 
00316   template<typename iter> iter flatten(iter position);
00318   template<typename iter> iter reparent(iter position, sibling_iterator begin, sibling_iterator end);
00320   template<typename iter> iter reparent(iter position, iter from);
00321 
00323   template<typename iter> iter move_after(iter target, iter source);
00325   template<typename iter> iter move_before(iter target, iter source);
00327   template<typename iter> iter move_ontop(iter target, iter source);
00328 
00330   void     merge(sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator,
00331                  bool duplicate_leaves = false);
00333   void     sort(sibling_iterator from, sibling_iterator to, bool deep = false);
00334   template<class StrictWeakOrdering>
00335   void     sort(sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep = false);
00337   template<typename iter>
00338   bool     equal(const iter& one, const iter& two, const iter& three) const;
00339   template<typename iter, class BinaryPredicate>
00340   bool     equal(const iter& one, const iter& two, const iter& three, BinaryPredicate) const;
00341   template<typename iter>
00342   bool     equal_subtree(const iter& one, const iter& two) const;
00343   template<typename iter, class BinaryPredicate>
00344   bool     equal_subtree(const iter& one, const iter& two, BinaryPredicate) const;
00346   tree     subtree(sibling_iterator from, sibling_iterator to) const;
00347   void     subtree(tree&, sibling_iterator from, sibling_iterator to) const;
00349   void     swap(sibling_iterator it);
00350 
00352   int      size() const;
00354   bool     empty() const;
00356   int      depth(const iterator_base&) const;
00358   unsigned int number_of_children(const iterator_base&) const;
00360   unsigned int number_of_siblings(const iterator_base&) const;
00362   bool     is_in_subtree(const iterator_base& position, const iterator_base& begin,
00363                          const iterator_base& end) const;
00365   bool     is_valid(const iterator_base&) const;
00366 
00368   unsigned int index(sibling_iterator it) const;
00370   sibling_iterator  child(const iterator_base& position, unsigned int) const;
00371 
00373   class iterator_base_less
00374   {
00375   public:
00376     bool operator()(const typename tree<T, tree_node_allocator>::iterator_base& one,
00377                     const typename tree<T, tree_node_allocator>::iterator_base& two) const
00378     {
00379       return one.node < two.node;
00380     }
00381   };
00382   tree_node *head, *feet;    // head/feet are always dummy; if an iterator points to them it is invalid
00383 private:
00384   tree_node_allocator alloc_;
00385   void head_initialise_();
00386   void copy_(const tree<T, tree_node_allocator>& other);
00387 
00389   template<class StrictWeakOrdering>
00390   class compare_nodes
00391   {
00392   public:
00393     compare_nodes(StrictWeakOrdering comp) : comp_(comp) {};
00394 
00395     bool operator()(const tree_node *a, const tree_node *b)
00396     {
00397       static StrictWeakOrdering comp;
00398       return comp(a->data, b->data);
00399     }
00400   private:
00401     StrictWeakOrdering comp_;
00402   };
00403 };
00404 
00405 //template <class T, class tree_node_allocator>
00406 //class iterator_base_less {
00407 // public:
00408 //    bool operator()(const typename tree<T, tree_node_allocator>::iterator_base& one,
00409 //                  const typename tree<T, tree_node_allocator>::iterator_base& two) const
00410 //       {
00411 //       txtout << "operatorclass<" << one.node < two.node << std::endl;
00412 //       return one.node < two.node;
00413 //       }
00414 //};
00415 
00416 //template <class T, class tree_node_allocator>
00417 //bool operator<(const typename tree<T, tree_node_allocator>::iterator& one,
00418 //             const typename tree<T, tree_node_allocator>::iterator& two)
00419 // {
00420 // txtout << "operator< " << one.node < two.node << std::endl;
00421 // if(one.node < two.node) return true;
00422 // return false;
00423 // }
00424 
00425 template <class T, class tree_node_allocator>
00426 bool operator>(const typename tree<T, tree_node_allocator>::iterator_base& one,
00427                const typename tree<T, tree_node_allocator>::iterator_base& two)
00428 {
00429   if (one.node > two.node) return true;
00430   return false;
00431 }
00432 
00433 
00434 
00435 // Tree
00436 
00437 template <class T, class tree_node_allocator>
00438 tree<T, tree_node_allocator>::tree()
00439 {
00440   head_initialise_();
00441 }
00442 
00443 template <class T, class tree_node_allocator>
00444 tree<T, tree_node_allocator>::tree(const T& x)
00445 {
00446   head_initialise_();
00447   set_head(x);
00448 }
00449 
00450 template <class T, class tree_node_allocator>
00451 tree<T, tree_node_allocator>::tree(const iterator_base& other)
00452 {
00453   head_initialise_();
00454   set_head((*other));
00455   replace(begin(), other);
00456 }
00457 
00458 template <class T, class tree_node_allocator>
00459 tree<T, tree_node_allocator>::~tree()
00460 {
00461   clear();
00462   alloc_.deallocate(head, 1);
00463   alloc_.deallocate(feet, 1);
00464 }
00465 
00466 template <class T, class tree_node_allocator>
00467 void tree<T, tree_node_allocator>::head_initialise_()
00468 {
00469   head = alloc_.allocate(1, 0); // MSVC does not have default second argument
00470   feet = alloc_.allocate(1, 0);
00471 
00472   head->parent = 0;
00473   head->first_child = 0;
00474   head->last_child = 0;
00475   head->prev_sibling = 0; //head;
00476   head->next_sibling = feet; //head;
00477 
00478   feet->parent = 0;
00479   feet->first_child = 0;
00480   feet->last_child = 0;
00481   feet->prev_sibling = head;
00482   feet->next_sibling = 0;
00483 }
00484 
00485 template <class T, class tree_node_allocator>
00486 void tree<T, tree_node_allocator>::operator=(const tree<T, tree_node_allocator>& other)
00487 {
00488   copy_(other);
00489 }
00490 
00491 template <class T, class tree_node_allocator>
00492 tree<T, tree_node_allocator>::tree(const tree<T, tree_node_allocator>& other)
00493 {
00494   head_initialise_();
00495   copy_(other);
00496 }
00497 
00498 template <class T, class tree_node_allocator>
00499 void tree<T, tree_node_allocator>::copy_(const tree<T, tree_node_allocator>& other)
00500 {
00501   clear();
00502   pre_order_iterator it = other.begin(), to = begin();
00503   while (it != other.end())
00504   {
00505     to = insert(to, (*it));
00506     it.skip_children();
00507     ++it;
00508   }
00509   to = begin();
00510   it = other.begin();
00511   while (it != other.end())
00512   {
00513     to = replace(to, it);
00514     to.skip_children();
00515     it.skip_children();
00516     ++to;
00517     ++it;
00518   }
00519 }
00520 
00521 template <class T, class tree_node_allocator>
00522 void tree<T, tree_node_allocator>::clear()
00523 {
00524   if (head)
00525     while (head->next_sibling != feet)
00526       erase(pre_order_iterator(head->next_sibling));
00527 }
00528 
00529 template<class T, class tree_node_allocator>
00530 void tree<T, tree_node_allocator>::erase_children(const iterator_base& it)
00531 {
00532   tree_node *cur = it.node->first_child;
00533   tree_node *prev = 0;
00534 
00535   while (cur != 0)
00536   {
00537     prev = cur;
00538     cur = cur->next_sibling;
00539     erase_children(pre_order_iterator(prev));
00540     kp::destructor(&prev->data);
00541     alloc_.deallocate(prev, 1);
00542   }
00543   it.node->first_child = 0;
00544   it.node->last_child = 0;
00545 }
00546 
00547 template<class T, class tree_node_allocator>
00548 template<class iter>
00549 iter tree<T, tree_node_allocator>::erase(iter it)
00550 {
00551   tree_node *cur = it.node;
00552   assert(cur != head);
00553   iter ret = it;
00554   ret.skip_children();
00555   ++ret;
00556   erase_children(it);
00557   if (cur->prev_sibling == 0)
00558   {
00559     cur->parent->first_child = cur->next_sibling;
00560   }
00561   else
00562   {
00563     cur->prev_sibling->next_sibling = cur->next_sibling;
00564   }
00565   if (cur->next_sibling == 0)
00566   {
00567     cur->parent->last_child = cur->prev_sibling;
00568   }
00569   else
00570   {
00571     cur->next_sibling->prev_sibling = cur->prev_sibling;
00572   }
00573 
00574   kp::destructor(&cur->data);
00575   alloc_.deallocate(cur, 1);
00576   return ret;
00577 }
00578 
00579 template <class T, class tree_node_allocator>
00580 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::begin() const
00581 {
00582   return pre_order_iterator(head->next_sibling);
00583 }
00584 
00585 template <class T, class tree_node_allocator>
00586 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::end() const
00587 {
00588   return pre_order_iterator(feet);
00589 }
00590 
00591 template <class T, class tree_node_allocator>
00592 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::begin_post() const
00593 {
00594   tree_node *tmp = head->next_sibling;
00595   if (tmp != feet)
00596   {
00597     while (tmp->first_child)
00598       tmp = tmp->first_child;
00599   }
00600   return post_order_iterator(tmp);
00601 }
00602 
00603 template <class T, class tree_node_allocator>
00604 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::end_post() const
00605 {
00606   return post_order_iterator(feet);
00607 }
00608 
00609 template <class T, class tree_node_allocator>
00610 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::begin_fixed(const iterator_base& pos, unsigned int dp) const
00611 {
00612   tree_node *tmp = pos.node;
00613   unsigned int curdepth = 0;
00614   while (curdepth < dp)   // go down one level
00615   {
00616     while (tmp->first_child == 0)
00617     {
00618       tmp = tmp->next_sibling;
00619       if (tmp == 0)
00620         throw std::range_error("tree: begin_fixed out of range");
00621     }
00622     tmp = tmp->first_child;
00623     ++curdepth;
00624   }
00625   return tmp;
00626 }
00627 
00628 template <class T, class tree_node_allocator>
00629 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::end_fixed(const iterator_base& pos, unsigned int dp) const
00630 {
00631   assert(1 == 0); // FIXME: not correct yet
00632   tree_node *tmp = pos.node;
00633   unsigned int curdepth = 1;
00634   while (curdepth < dp)   // go down one level
00635   {
00636     while (tmp->first_child == 0)
00637     {
00638       tmp = tmp->next_sibling;
00639       if (tmp == 0)
00640         throw std::range_error("tree: end_fixed out of range");
00641     }
00642     tmp = tmp->first_child;
00643     ++curdepth;
00644   }
00645   return tmp;
00646 }
00647 
00648 template <class T, class tree_node_allocator>
00649 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::begin(const iterator_base& pos) const
00650 {
00651   if (pos.node->first_child == 0)
00652   {
00653     return end(pos);
00654   }
00655   return pos.node->first_child;
00656 }
00657 
00658 template <class T, class tree_node_allocator>
00659 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::end(const iterator_base& pos) const
00660 {
00661   sibling_iterator ret(0);
00662   ret.parent_ = pos.node;
00663   return ret;
00664 }
00665 
00666 template <class T, class tree_node_allocator>
00667 template <typename iter>
00668 iter tree<T, tree_node_allocator>::parent(iter position) const
00669 {
00670   assert(position.node != 0);
00671   return iter(position.node->parent);
00672 }
00673 
00674 template <class T, class tree_node_allocator>
00675 template <typename iter>
00676 iter tree<T, tree_node_allocator>::previous_sibling(iter position) const
00677 {
00678   assert(position.node != 0);
00679   iter ret(position);
00680   ret.node = position.node->prev_sibling;
00681   return ret;
00682 }
00683 
00684 template <class T, class tree_node_allocator>
00685 template <typename iter>
00686 iter tree<T, tree_node_allocator>::next_sibling(iter position) const
00687 {
00688   assert(position.node != 0);
00689   iter ret(position);
00690   ret.node = position.node->next_sibling;
00691   return ret;
00692 }
00693 
00694 template <class T, class tree_node_allocator>
00695 template <typename iter>
00696 iter tree<T, tree_node_allocator>::next_at_same_depth(iter position) const
00697 {
00698   assert(position.node != 0);
00699   iter ret(position);
00700 
00701   if (position.node->next_sibling)
00702   {
00703     ret.node = position.node->next_sibling;
00704   }
00705   else
00706   {
00707     int relative_depth = 0;
00708 upper:
00709     do
00710     {
00711       ret.node = ret.node->parent;
00712       if (ret.node == 0) return ret;
00713       --relative_depth;
00714     }
00715     while (ret.node->next_sibling == 0);
00716 lower:
00717     ret.node = ret.node->next_sibling;
00718     while (ret.node->first_child == 0)
00719     {
00720       if (ret.node->next_sibling == 0)
00721         goto upper;
00722       ret.node = ret.node->next_sibling;
00723       if (ret.node == 0) return ret;
00724     }
00725     while (relative_depth < 0 && ret.node->first_child != 0)
00726     {
00727       ret.node = ret.node->first_child;
00728       ++relative_depth;
00729     }
00730     if (relative_depth < 0)
00731     {
00732       if (ret.node->next_sibling == 0) goto upper;
00733       else                          goto lower;
00734     }
00735   }
00736   return ret;
00737 }
00738 
00739 template <class T, class tree_node_allocator>
00740 template <typename iter>
00741 iter tree<T, tree_node_allocator>::append_child(iter position)
00742 {
00743   assert(position.node != head);
00744 
00745   tree_node* tmp = alloc_.allocate(1, 0);
00746   kp::constructor(&tmp->data);
00747   tmp->first_child = 0;
00748   tmp->last_child = 0;
00749 
00750   tmp->parent = position.node;
00751   if (position.node->last_child != 0)
00752   {
00753     position.node->last_child->next_sibling = tmp;
00754   }
00755   else
00756   {
00757     position.node->first_child = tmp;
00758   }
00759   tmp->prev_sibling = position.node->last_child;
00760   position.node->last_child = tmp;
00761   tmp->next_sibling = 0;
00762   return tmp;
00763 }
00764 
00765 template <class T, class tree_node_allocator>
00766 template <class iter>
00767 iter tree<T, tree_node_allocator>::append_child(iter position, const T& x)
00768 {
00769   // If your program fails here you probably used 'append_child' to add the top
00770   // node to an empty tree. From version 1.45 the top element should be added
00771   // using 'insert'. See the documentation for further information, and sorry about
00772   // the API change.
00773   assert(position.node != head);
00774 
00775   tree_node* tmp = alloc_.allocate(1, 0);
00776   kp::constructor(&tmp->data, x);
00777   tmp->first_child = 0;
00778   tmp->last_child = 0;
00779 
00780   tmp->parent = position.node;
00781   if (position.node->last_child != 0)
00782   {
00783     position.node->last_child->next_sibling = tmp;
00784   }
00785   else
00786   {
00787     position.node->first_child = tmp;
00788   }
00789   tmp->prev_sibling = position.node->last_child;
00790   position.node->last_child = tmp;
00791   tmp->next_sibling = 0;
00792   return tmp;
00793 }
00794 
00795 template <class T, class tree_node_allocator>
00796 template <class iter>
00797 iter tree<T, tree_node_allocator>::append_child(iter position, iter other)
00798 {
00799   assert(position.node != head);
00800 
00801   sibling_iterator aargh = append_child(position, value_type());
00802   return replace(aargh, other);
00803 }
00804 
00805 template <class T, class tree_node_allocator>
00806 template <class iter>
00807 iter tree<T, tree_node_allocator>::append_children(iter position, sibling_iterator from, sibling_iterator to)
00808 {
00809   iter ret = from;
00810 
00811   while (from != to)
00812   {
00813     insert_subtree(position.end(), from);
00814     ++from;
00815   }
00816   return ret;
00817 }
00818 
00819 template <class T, class tree_node_allocator>
00820 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::set_head(const T& x)
00821 {
00822   assert(head->next_sibling == feet);
00823   return insert(iterator(feet), x);
00824 }
00825 
00826 template <class T, class tree_node_allocator>
00827 template <class iter>
00828 iter tree<T, tree_node_allocator>::insert(iter position, const T& x)
00829 {
00830   if (position.node == 0)
00831   {
00832     position.node = feet; // Backward compatibility: when calling insert on a null node,
00833     // insert before the feet.
00834   }
00835   tree_node* tmp = alloc_.allocate(1, 0);
00836   kp::constructor(&tmp->data, x);
00837   tmp->first_child = 0;
00838   tmp->last_child = 0;
00839 
00840   tmp->parent = position.node->parent;
00841   tmp->next_sibling = position.node;
00842   tmp->prev_sibling = position.node->prev_sibling;
00843   position.node->prev_sibling = tmp;
00844 
00845   if (tmp->prev_sibling == 0)
00846   {
00847     if (tmp->parent) // when inserting nodes at the head, there is no parent
00848       tmp->parent->first_child = tmp;
00849   }
00850   else
00851     tmp->prev_sibling->next_sibling = tmp;
00852   return tmp;
00853 }
00854 
00855 template <class T, class tree_node_allocator>
00856 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::insert(sibling_iterator position, const T& x)
00857 {
00858   tree_node* tmp = alloc_.allocate(1, 0);
00859   kp::constructor(&tmp->data, x);
00860   tmp->first_child = 0;
00861   tmp->last_child = 0;
00862 
00863   tmp->next_sibling = position.node;
00864   if (position.node == 0)   // iterator points to end of a subtree
00865   {
00866     tmp->parent = position.parent_;
00867     tmp->prev_sibling = position.range_last();
00868     tmp->parent->last_child = tmp;
00869   }
00870   else
00871   {
00872     tmp->parent = position.node->parent;
00873     tmp->prev_sibling = position.node->prev_sibling;
00874     position.node->prev_sibling = tmp;
00875   }
00876 
00877   if (tmp->prev_sibling == 0)
00878   {
00879     if (tmp->parent) // when inserting nodes at the head, there is no parent
00880       tmp->parent->first_child = tmp;
00881   }
00882   else
00883     tmp->prev_sibling->next_sibling = tmp;
00884   return tmp;
00885 }
00886 
00887 template <class T, class tree_node_allocator>
00888 template <class iter>
00889 iter tree<T, tree_node_allocator>::insert_after(iter position, const T& x)
00890 {
00891   tree_node* tmp = alloc_.allocate(1, 0);
00892   kp::constructor(&tmp->data, x);
00893   tmp->first_child = 0;
00894   tmp->last_child = 0;
00895 
00896   tmp->parent = position.node->parent;
00897   tmp->prev_sibling = position.node;
00898   tmp->next_sibling = position.node->next_sibling;
00899   position.node->next_sibling = tmp;
00900 
00901   if (tmp->next_sibling == 0)
00902   {
00903     if (tmp->parent) // when inserting nodes at the head, there is no parent
00904       tmp->parent->last_child = tmp;
00905   }
00906   else
00907   {
00908     tmp->next_sibling->prev_sibling = tmp;
00909   }
00910   return tmp;
00911 }
00912 
00913 template <class T, class tree_node_allocator>
00914 template <class iter>
00915 iter tree<T, tree_node_allocator>::insert_subtree(iter position, const iterator_base& subtree)
00916 {
00917   // insert dummy
00918   iter it = insert(position, value_type());
00919   // replace dummy with subtree
00920   return replace(it, subtree);
00921 }
00922 
00923 // template <class T, class tree_node_allocator>
00924 // template <class iter>
00925 // iter tree<T, tree_node_allocator>::insert_subtree(sibling_iterator position, iter subtree)
00926 //    {
00927 //    // insert dummy
00928 //    iter it(insert(position, value_type()));
00929 //    // replace dummy with subtree
00930 //    return replace(it, subtree);
00931 //    }
00932 
00933 template <class T, class tree_node_allocator>
00934 template <class iter>
00935 iter tree<T, tree_node_allocator>::replace(iter position, const T& x)
00936 {
00937   kp::destructor(&position.node->data);
00938   kp::constructor(&position.node->data, x);
00939   return position;
00940 }
00941 
00942 template <class T, class tree_node_allocator>
00943 template <class iter>
00944 iter tree<T, tree_node_allocator>::replace(iter position, const iterator_base& from)
00945 {
00946   assert(position.node != head);
00947   tree_node *current_from = from.node;
00948   tree_node *start_from = from.node;
00949   tree_node *current_to  = position.node;
00950 
00951   // replace the node at position with head of the replacement tree at from
00952   erase_children(position);
00953   tree_node* tmp = alloc_.allocate(1, 0);
00954   kp::constructor(&tmp->data, (*from));
00955   tmp->first_child = 0;
00956   tmp->last_child = 0;
00957   if (current_to->prev_sibling == 0)
00958   {
00959     current_to->parent->first_child = tmp;
00960   }
00961   else
00962   {
00963     current_to->prev_sibling->next_sibling = tmp;
00964   }
00965   tmp->prev_sibling = current_to->prev_sibling;
00966   if (current_to->next_sibling == 0)
00967   {
00968     current_to->parent->last_child = tmp;
00969   }
00970   else
00971   {
00972     current_to->next_sibling->prev_sibling = tmp;
00973   }
00974   tmp->next_sibling = current_to->next_sibling;
00975   tmp->parent = current_to->parent;
00976   kp::destructor(&current_to->data);
00977   alloc_.deallocate(current_to, 1);
00978   current_to = tmp;
00979 
00980   // only at this stage can we fix 'last'
00981   tree_node *last = from.node->next_sibling;
00982 
00983   pre_order_iterator toit = tmp;
00984   // copy all children
00985   do
00986   {
00987     assert(current_from != 0);
00988     if (current_from->first_child != 0)
00989     {
00990       current_from = current_from->first_child;
00991       toit = append_child(toit, current_from->data);
00992     }
00993     else
00994     {
00995       while (current_from->next_sibling == 0 && current_from != start_from)
00996       {
00997         current_from = current_from->parent;
00998         toit = parent(toit);
00999         assert(current_from != 0);
01000       }
01001       current_from = current_from->next_sibling;
01002       if (current_from != last)
01003       {
01004         toit = append_child(parent(toit), current_from->data);
01005       }
01006     }
01007   }
01008   while (current_from != last);
01009 
01010   return current_to;
01011 }
01012 
01013 template <class T, class tree_node_allocator>
01014 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::replace(
01015   sibling_iterator orig_begin,
01016   sibling_iterator orig_end,
01017   sibling_iterator new_begin,
01018   sibling_iterator new_end)
01019 {
01020   tree_node *orig_first = orig_begin.node;
01021   tree_node *new_first = new_begin.node;
01022   tree_node *orig_last = orig_first;
01023   while ((++orig_begin) != orig_end)
01024     orig_last = orig_last->next_sibling;
01025   tree_node *new_last = new_first;
01026   while ((++new_begin) != new_end)
01027     new_last = new_last->next_sibling;
01028 
01029   // insert all siblings in new_first..new_last before orig_first
01030   bool first = true;
01031   pre_order_iterator ret;
01032   while (1 == 1)
01033   {
01034     pre_order_iterator tt = insert_subtree(pre_order_iterator(orig_first), pre_order_iterator(new_first));
01035     if (first)
01036     {
01037       ret = tt;
01038       first = false;
01039     }
01040     if (new_first == new_last)
01041       break;
01042     new_first = new_first->next_sibling;
01043   }
01044 
01045   // erase old range of siblings
01046   bool last = false;
01047   tree_node *next = orig_first;
01048   while (1 == 1)
01049   {
01050     if (next == orig_last)
01051       last = true;
01052     next = next->next_sibling;
01053     erase((pre_order_iterator)orig_first);
01054     if (last)
01055       break;
01056     orig_first = next;
01057   }
01058   return ret;
01059 }
01060 
01061 template <class T, class tree_node_allocator>
01062 template <typename iter>
01063 iter tree<T, tree_node_allocator>::flatten(iter position)
01064 {
01065   if (position.node->first_child == 0)
01066     return position;
01067 
01068   tree_node *tmp = position.node->first_child;
01069   while (tmp)
01070   {
01071     tmp->parent = position.node->parent;
01072     tmp = tmp->next_sibling;
01073   }
01074   if (position.node->next_sibling)
01075   {
01076     position.node->last_child->next_sibling = position.node->next_sibling;
01077     position.node->next_sibling->prev_sibling = position.node->last_child;
01078   }
01079   else
01080   {
01081     position.node->parent->last_child = position.node->last_child;
01082   }
01083   position.node->next_sibling = position.node->first_child;
01084   position.node->next_sibling->prev_sibling = position.node;
01085   position.node->first_child = 0;
01086   position.node->last_child = 0;
01087 
01088   return position;
01089 }
01090 
01091 
01092 template <class T, class tree_node_allocator>
01093 template <typename iter>
01094 iter tree<T, tree_node_allocator>::reparent(iter position, sibling_iterator begin, sibling_iterator end)
01095 {
01096   tree_node *first = begin.node;
01097   tree_node *last = first;
01098   if (begin == end) return begin;
01099   // determine last node
01100   while ((++begin) != end)
01101   {
01102     last = last->next_sibling;
01103   }
01104   // move subtree
01105   if (first->prev_sibling == 0)
01106   {
01107     first->parent->first_child = last->next_sibling;
01108   }
01109   else
01110   {
01111     first->prev_sibling->next_sibling = last->next_sibling;
01112   }
01113   if (last->next_sibling == 0)
01114   {
01115     last->parent->last_child = first->prev_sibling;
01116   }
01117   else
01118   {
01119     last->next_sibling->prev_sibling = first->prev_sibling;
01120   }
01121   if (position.node->first_child == 0)
01122   {
01123     position.node->first_child = first;
01124     position.node->last_child = last;
01125     first->prev_sibling = 0;
01126   }
01127   else
01128   {
01129     position.node->last_child->next_sibling = first;
01130     first->prev_sibling = position.node->last_child;
01131     position.node->last_child = last;
01132   }
01133   last->next_sibling = 0;
01134 
01135   tree_node *pos = first;
01136   while (1 == 1)
01137   {
01138     pos->parent = position.node;
01139     if (pos == last) break;
01140     pos = pos->next_sibling;
01141   }
01142 
01143   return first;
01144 }
01145 
01146 template <class T, class tree_node_allocator>
01147 template <typename iter> iter tree<T, tree_node_allocator>::reparent(iter position, iter from)
01148 {
01149   if (from.node->first_child == 0) return position;
01150   return reparent(position, from.node->first_child, end(from));
01151 }
01152 
01153 template <class T, class tree_node_allocator>
01154 template <typename iter> iter tree<T, tree_node_allocator>::move_after(iter target, iter source)
01155 {
01156   tree_node *dst = target.node;
01157   tree_node *src = source.node;
01158   assert(dst);
01159   assert(src);
01160 
01161   if (dst == src) return source;
01162 
01163   // take src out of the tree
01164   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01165   else                     src->parent->first_child = src->next_sibling;
01166   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01167   else                     src->parent->last_child = src->prev_sibling;
01168 
01169   // connect it to the new point
01170   if (dst->next_sibling != 0) dst->next_sibling->prev_sibling = src;
01171   else                     dst->parent->last_child = src;
01172   src->next_sibling = dst->next_sibling;
01173   dst->next_sibling = src;
01174   src->prev_sibling = dst;
01175   src->parent = dst->parent;
01176   return src;
01177 }
01178 
01179 
01180 template <class T, class tree_node_allocator>
01181 template <typename iter> iter tree<T, tree_node_allocator>::move_before(iter target, iter source)
01182 {
01183   tree_node *dst = target.node;
01184   tree_node *src = source.node;
01185   assert(dst);
01186   assert(src);
01187 
01188   if (dst == src) return source;
01189 
01190   // take src out of the tree
01191   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01192   else                     src->parent->first_child = src->next_sibling;
01193   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01194   else                     src->parent->last_child = src->prev_sibling;
01195 
01196   // connect it to the new point
01197   if (dst->prev_sibling != 0) dst->prev_sibling->next_sibling = src;
01198   else                     dst->parent->first_child = src;
01199   src->prev_sibling = dst->prev_sibling;
01200   dst->prev_sibling = src;
01201   src->next_sibling = dst;
01202   src->parent = dst->parent;
01203   return src;
01204 }
01205 
01206 template <class T, class tree_node_allocator>
01207 template <typename iter> iter tree<T, tree_node_allocator>::move_ontop(iter target, iter source)
01208 {
01209   tree_node *dst = target.node;
01210   tree_node *src = source.node;
01211   assert(dst);
01212   assert(src);
01213 
01214   if (dst == src) return source;
01215 
01216   // remember connection points
01217   tree_node *b_prev_sibling = dst->prev_sibling;
01218   tree_node *b_next_sibling = dst->next_sibling;
01219   tree_node *b_parent = dst->parent;
01220 
01221   // remove target
01222   erase(target);
01223 
01224   // take src out of the tree
01225   if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling;
01226   else                     src->parent->first_child = src->next_sibling;
01227   if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling;
01228   else                     src->parent->last_child = src->prev_sibling;
01229 
01230   // connect it to the new point
01231   if (b_prev_sibling != 0) b_prev_sibling->next_sibling = src;
01232   else                  b_parent->first_child = src;
01233   if (b_next_sibling != 0) b_next_sibling->prev_sibling = src;
01234   else                  b_parent->last_child = src;
01235   src->prev_sibling = b_prev_sibling;
01236   src->next_sibling = b_next_sibling;
01237   src->parent = b_parent;
01238   return src;
01239 }
01240 
01241 template <class T, class tree_node_allocator>
01242 void tree<T, tree_node_allocator>::merge(sibling_iterator to1,   sibling_iterator to2,
01243     sibling_iterator from1, sibling_iterator from2,
01244     bool duplicate_leaves)
01245 {
01246   sibling_iterator fnd;
01247   while (from1 != from2)
01248   {
01249     if ((fnd = std::find(to1, to2, (*from1))) != to2)   // element found
01250     {
01251       if (from1.begin() == from1.end())   // full depth reached
01252       {
01253         if (duplicate_leaves)
01254           append_child(parent(to1), (*from1));
01255       }
01256       else     // descend further
01257       {
01258         merge(fnd.begin(), fnd.end(), from1.begin(), from1.end(), duplicate_leaves);
01259       }
01260     }
01261     else     // element missing
01262     {
01263       insert_subtree(to2, from1);
01264     }
01265     ++from1;
01266   }
01267 }
01268 
01269 
01270 template <class T, class tree_node_allocator>
01271 void tree<T, tree_node_allocator>::sort(sibling_iterator from, sibling_iterator to, bool deep)
01272 {
01273   std::less<T> comp;
01274   sort(from, to, comp, deep);
01275 }
01276 
01277 template <class T, class tree_node_allocator>
01278 template <class StrictWeakOrdering>
01279 void tree<T, tree_node_allocator>::sort(sibling_iterator from, sibling_iterator to,
01280                                         StrictWeakOrdering comp, bool deep)
01281 {
01282   if (from == to) return;
01283   // make list of sorted nodes
01284   // CHECK: if multiset stores equivalent nodes in the order in which they
01285   // are inserted, then this routine should be called 'stable_sort'.
01286   std::multiset<tree_node *, compare_nodes<StrictWeakOrdering> > nodes(comp);
01287   sibling_iterator it = from, it2 = to;
01288   while (it != to)
01289   {
01290     nodes.insert(it.node);
01291     ++it;
01292   }
01293   // reassemble
01294   --it2;
01295 
01296   // prev and next are the nodes before and after the sorted range
01297   tree_node *prev = from.node->prev_sibling;
01298   tree_node *next = it2.node->next_sibling;
01299   typename std::multiset<tree_node *, compare_nodes<StrictWeakOrdering> >::iterator nit = nodes.begin(), eit = nodes.end();
01300   if (prev == 0)
01301   {
01302     if ((*nit)->parent != 0) // to catch "sorting the head" situations, when there is no parent
01303       (*nit)->parent->first_child = (*nit);
01304   }
01305   else prev->next_sibling = (*nit);
01306 
01307   --eit;
01308   while (nit != eit)
01309   {
01310     (*nit)->prev_sibling = prev;
01311     if (prev)
01312       prev->next_sibling = (*nit);
01313     prev = (*nit);
01314     ++nit;
01315   }
01316   // prev now points to the last-but-one node in the sorted range
01317   if (prev)
01318     prev->next_sibling = (*eit);
01319 
01320   // eit points to the last node in the sorted range.
01321   (*eit)->next_sibling = next;
01322   (*eit)->prev_sibling = prev; // missed in the loop above
01323   if (next == 0)
01324   {
01325     if ((*eit)->parent != 0) // to catch "sorting the head" situations, when there is no parent
01326       (*eit)->parent->last_child = (*eit);
01327   }
01328   else next->prev_sibling = (*eit);
01329 
01330   if (deep)   // sort the children of each node too
01331   {
01332     sibling_iterator bcs(*nodes.begin());
01333     sibling_iterator ecs(*eit);
01334     ++ecs;
01335     while (bcs != ecs)
01336     {
01337       sort(begin(bcs), end(bcs), comp, deep);
01338       ++bcs;
01339     }
01340   }
01341 }
01342 
01343 template <class T, class tree_node_allocator>
01344 template <typename iter>
01345 bool tree<T, tree_node_allocator>::equal(const iter& one_, const iter& two, const iter& three_) const
01346 {
01347   std::equal_to<T> comp;
01348   return equal(one_, two, three_, comp);
01349 }
01350 
01351 template <class T, class tree_node_allocator>
01352 template <typename iter>
01353 bool tree<T, tree_node_allocator>::equal_subtree(const iter& one_, const iter& two_) const
01354 {
01355   std::equal_to<T> comp;
01356   return equal_subtree(one_, two_, comp);
01357 }
01358 
01359 template <class T, class tree_node_allocator>
01360 template <typename iter, class BinaryPredicate>
01361 bool tree<T, tree_node_allocator>::equal(const iter& one_, const iter& two, const iter& three_, BinaryPredicate fun) const
01362 {
01363   pre_order_iterator one(one_), three(three_);
01364 
01365 // if(one==two && is_valid(three) && three.number_of_children()!=0)
01366 //    return false;
01367   while (one != two && is_valid(three))
01368   {
01369     if (!fun(*one, *three))
01370       return false;
01371     if (one.number_of_children() != three.number_of_children())
01372       return false;
01373     ++one;
01374     ++three;
01375   }
01376   return true;
01377 }
01378 
01379 template <class T, class tree_node_allocator>
01380 template <typename iter, class BinaryPredicate>
01381 bool tree<T, tree_node_allocator>::equal_subtree(const iter& one_, const iter& two_, BinaryPredicate fun) const
01382 {
01383   pre_order_iterator one(one_), two(two_);
01384 
01385   if (!fun(*one, *two)) return false;
01386   if (number_of_children(one) != number_of_children(two)) return false;
01387   return equal(begin(one), end(one), begin(two), fun);
01388 }
01389 
01390 template <class T, class tree_node_allocator>
01391 tree<T, tree_node_allocator> tree<T, tree_node_allocator>::subtree(sibling_iterator from, sibling_iterator to) const
01392 {
01393   tree tmp;
01394   tmp.set_head(value_type());
01395   tmp.replace(tmp.begin(), tmp.end(), from, to);
01396   return tmp;
01397 }
01398 
01399 template <class T, class tree_node_allocator>
01400 void tree<T, tree_node_allocator>::subtree(tree& tmp, sibling_iterator from, sibling_iterator to) const
01401 {
01402   tmp.set_head(value_type());
01403   tmp.replace(tmp.begin(), tmp.end(), from, to);
01404 }
01405 
01406 template <class T, class tree_node_allocator>
01407 int tree<T, tree_node_allocator>::size() const
01408 {
01409   int i = 0;
01410   pre_order_iterator it = begin(), eit = end();
01411   while (it != eit)
01412   {
01413     ++i;
01414     ++it;
01415   }
01416   return i;
01417 }
01418 
01419 template <class T, class tree_node_allocator>
01420 bool tree<T, tree_node_allocator>::empty() const
01421 {
01422   pre_order_iterator it = begin(), eit = end();
01423   return (it == eit);
01424 }
01425 
01426 template <class T, class tree_node_allocator>
01427 int tree<T, tree_node_allocator>::depth(const iterator_base& it) const
01428 {
01429   tree_node* pos = it.node;
01430   assert(pos != 0);
01431   int ret = 0;
01432   while (pos->parent != 0)
01433   {
01434     pos = pos->parent;
01435     ++ret;
01436   }
01437   return ret;
01438 }
01439 
01440 template <class T, class tree_node_allocator>
01441 unsigned int tree<T, tree_node_allocator>::number_of_children(const iterator_base& it) const
01442 {
01443   tree_node *pos = it.node->first_child;
01444   if (pos == 0) return 0;
01445 
01446   unsigned int ret = 1;
01447 //   while(pos!=it.node->last_child) {
01448 //      ++ret;
01449 //      pos=pos->next_sibling;
01450 //      }
01451   while ((pos = pos->next_sibling))
01452     ++ret;
01453   return ret;
01454 }
01455 
01456 template <class T, class tree_node_allocator>
01457 unsigned int tree<T, tree_node_allocator>::number_of_siblings(const iterator_base& it) const
01458 {
01459   tree_node *pos = it.node;
01460   unsigned int ret = 0;
01461   while (pos->next_sibling &&
01462          pos->next_sibling != head &&
01463          pos->next_sibling != feet)
01464   {
01465     ++ret;
01466     pos = pos->next_sibling;
01467   }
01468   return ret;
01469 }
01470 
01471 template <class T, class tree_node_allocator>
01472 void tree<T, tree_node_allocator>::swap(sibling_iterator it)
01473 {
01474   tree_node *nxt = it.node->next_sibling;
01475   if (nxt)
01476   {
01477     if (it.node->prev_sibling)
01478       it.node->prev_sibling->next_sibling = nxt;
01479     else
01480       it.node->parent->first_child = nxt;
01481     nxt->prev_sibling = it.node->prev_sibling;
01482     tree_node *nxtnxt = nxt->next_sibling;
01483     if (nxtnxt)
01484       nxtnxt->prev_sibling = it.node;
01485     else
01486       it.node->parent->last_child = it.node;
01487     nxt->next_sibling = it.node;
01488     it.node->prev_sibling = nxt;
01489     it.node->next_sibling = nxtnxt;
01490   }
01491 }
01492 
01493 // template <class BinaryPredicate>
01494 // tree<T, tree_node_allocator>::iterator tree<T, tree_node_allocator>::find_subtree(
01495 //    sibling_iterator subfrom, sibling_iterator subto, iterator from, iterator to,
01496 //    BinaryPredicate fun) const
01497 //    {
01498 //    assert(1==0); // this routine is not finished yet.
01499 //    while(from!=to) {
01500 //       if(fun(*subfrom, *from)) {
01501 //
01502 //          }
01503 //       }
01504 //    return to;
01505 //    }
01506 
01507 template <class T, class tree_node_allocator>
01508 bool tree<T, tree_node_allocator>::is_in_subtree(const iterator_base& it, const iterator_base& begin,
01509     const iterator_base& end) const
01510 {
01511   // FIXME: this should be optimised.
01512   pre_order_iterator tmp = begin;
01513   while (tmp != end)
01514   {
01515     if (tmp == it) return true;
01516     ++tmp;
01517   }
01518   return false;
01519 }
01520 
01521 template <class T, class tree_node_allocator>
01522 bool tree<T, tree_node_allocator>::is_valid(const iterator_base& it) const
01523 {
01524   if (it.node == 0 || it.node == feet) return false;
01525   else return true;
01526 }
01527 
01528 template <class T, class tree_node_allocator>
01529 unsigned int tree<T, tree_node_allocator>::index(sibling_iterator it) const
01530 {
01531   unsigned int ind = 0;
01532   if (it.node->parent == 0)
01533   {
01534     while (it.node->prev_sibling != head)
01535     {
01536       it.node = it.node->prev_sibling;
01537       ++ind;
01538     }
01539   }
01540   else
01541   {
01542     while (it.node->prev_sibling != 0)
01543     {
01544       it.node = it.node->prev_sibling;
01545       ++ind;
01546     }
01547   }
01548   return ind;
01549 }
01550 
01551 
01552 template <class T, class tree_node_allocator>
01553 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::child(const iterator_base& it, unsigned int num) const
01554 {
01555   tree_node *tmp = it.node->first_child;
01556   while (num--)
01557   {
01558     assert(tmp != 0);
01559     tmp = tmp->next_sibling;
01560   }
01561   return tmp;
01562 }
01563 
01564 
01565 
01566 
01567 // Iterator base
01568 
01569 template <class T, class tree_node_allocator>
01570 tree<T, tree_node_allocator>::iterator_base::iterator_base()
01571   : node(0), skip_current_children_(false)
01572 {
01573 }
01574 
01575 template <class T, class tree_node_allocator>
01576 tree<T, tree_node_allocator>::iterator_base::iterator_base(tree_node *tn)
01577   : node(tn), skip_current_children_(false)
01578 {
01579 }
01580 
01581 template <class T, class tree_node_allocator>
01582 T& tree<T, tree_node_allocator>::iterator_base::operator*() const
01583 {
01584   return node->data;
01585 }
01586 
01587 template <class T, class tree_node_allocator>
01588 T* tree<T, tree_node_allocator>::iterator_base::operator->() const
01589 {
01590   return &(node->data);
01591 }
01592 
01593 template <class T, class tree_node_allocator>
01594 bool tree<T, tree_node_allocator>::post_order_iterator::operator!=(const post_order_iterator& other) const
01595 {
01596   if (other.node != this->node) return true;
01597   else return false;
01598 }
01599 
01600 template <class T, class tree_node_allocator>
01601 bool tree<T, tree_node_allocator>::post_order_iterator::operator==(const post_order_iterator& other) const
01602 {
01603   if (other.node == this->node) return true;
01604   else return false;
01605 }
01606 
01607 template <class T, class tree_node_allocator>
01608 bool tree<T, tree_node_allocator>::pre_order_iterator::operator!=(const pre_order_iterator& other) const
01609 {
01610   if (other.node != this->node) return true;
01611   else return false;
01612 }
01613 
01614 template <class T, class tree_node_allocator>
01615 bool tree<T, tree_node_allocator>::pre_order_iterator::operator==(const pre_order_iterator& other) const
01616 {
01617   if (other.node == this->node) return true;
01618   else return false;
01619 }
01620 
01621 template <class T, class tree_node_allocator>
01622 bool tree<T, tree_node_allocator>::sibling_iterator::operator!=(const sibling_iterator& other) const
01623 {
01624   if (other.node != this->node) return true;
01625   else return false;
01626 }
01627 
01628 template <class T, class tree_node_allocator>
01629 bool tree<T, tree_node_allocator>::sibling_iterator::operator==(const sibling_iterator& other) const
01630 {
01631   if (other.node == this->node) return true;
01632   else return false;
01633 }
01634 
01635 template <class T, class tree_node_allocator>
01636 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::iterator_base::begin() const
01637 {
01638   sibling_iterator ret(node->first_child);
01639   ret.parent_ = this->node;
01640   return ret;
01641 }
01642 
01643 template <class T, class tree_node_allocator>
01644 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::iterator_base::end() const
01645 {
01646   sibling_iterator ret(0);
01647   ret.parent_ = node;
01648   return ret;
01649 }
01650 
01651 template <class T, class tree_node_allocator>
01652 void tree<T, tree_node_allocator>::iterator_base::skip_children()
01653 {
01654   skip_current_children_ = true;
01655 }
01656 
01657 template <class T, class tree_node_allocator>
01658 unsigned int tree<T, tree_node_allocator>::iterator_base::number_of_children() const
01659 {
01660   tree_node *pos = node->first_child;
01661   if (pos == 0) return 0;
01662 
01663   unsigned int ret = 1;
01664   while (pos != node->last_child)
01665   {
01666     ++ret;
01667     pos = pos->next_sibling;
01668   }
01669   return ret;
01670 }
01671 
01672 
01673 
01674 // Pre-order iterator
01675 
01676 template <class T, class tree_node_allocator>
01677 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator()
01678   : iterator_base(0)
01679 {
01680 }
01681 
01682 template <class T, class tree_node_allocator>
01683 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(tree_node *tn)
01684   : iterator_base(tn)
01685 {
01686 }
01687 
01688 template <class T, class tree_node_allocator>
01689 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(const iterator_base &other)
01690   : iterator_base(other.node)
01691 {
01692 }
01693 
01694 template <class T, class tree_node_allocator>
01695 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator(const sibling_iterator& other)
01696   : iterator_base(other.node)
01697 {
01698   if (this->node == 0)
01699   {
01700     if (other.range_last() != 0)
01701       this->node = other.range_last();
01702     else
01703       this->node = other.parent_;
01704     this->skip_children();
01705     ++(*this);
01706   }
01707 }
01708 
01709 template <class T, class tree_node_allocator>
01710 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator++()
01711 {
01712   assert(this->node != 0);
01713   if (!this->skip_current_children_ && this->node->first_child != 0)
01714   {
01715     this->node = this->node->first_child;
01716   }
01717   else
01718   {
01719     this->skip_current_children_ = false;
01720     while (this->node->next_sibling == 0)
01721     {
01722       this->node = this->node->parent;
01723       if (this->node == 0)
01724         return *this;
01725     }
01726     this->node = this->node->next_sibling;
01727   }
01728   return *this;
01729 }
01730 
01731 template <class T, class tree_node_allocator>
01732 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator--()
01733 {
01734   assert(this->node != 0);
01735   if (this->node->prev_sibling)
01736   {
01737     this->node = this->node->prev_sibling;
01738     while (this->node->last_child)
01739       this->node = this->node->last_child;
01740   }
01741   else
01742   {
01743     this->node = this->node->parent;
01744     if (this->node == 0)
01745       return *this;
01746   }
01747   return *this;
01748 }
01749 
01750 template <class T, class tree_node_allocator>
01751 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::pre_order_iterator::operator++(int n)
01752 {
01753   pre_order_iterator copy = *this;
01754   ++(*this);
01755   return copy;
01756 }
01757 
01758 template <class T, class tree_node_allocator>
01759 typename tree<T, tree_node_allocator>::pre_order_iterator tree<T, tree_node_allocator>::pre_order_iterator::operator--(int n)
01760 {
01761   pre_order_iterator copy = *this;
01762   --(*this);
01763   return copy;
01764 }
01765 
01766 template <class T, class tree_node_allocator>
01767 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator+=(unsigned int num)
01768 {
01769   while (num > 0)
01770   {
01771     ++(*this);
01772     --num;
01773   }
01774   return (*this);
01775 }
01776 
01777 template <class T, class tree_node_allocator>
01778 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, tree_node_allocator>::pre_order_iterator::operator-=(unsigned int num)
01779 {
01780   while (num > 0)
01781   {
01782     --(*this);
01783     --num;
01784   }
01785   return (*this);
01786 }
01787 
01788 
01789 
01790 // Post-order iterator
01791 
01792 template <class T, class tree_node_allocator>
01793 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator()
01794   : iterator_base(0)
01795 {
01796 }
01797 
01798 template <class T, class tree_node_allocator>
01799 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(tree_node *tn)
01800   : iterator_base(tn)
01801 {
01802 }
01803 
01804 template <class T, class tree_node_allocator>
01805 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(const iterator_base &other)
01806   : iterator_base(other.node)
01807 {
01808 }
01809 
01810 template <class T, class tree_node_allocator>
01811 tree<T, tree_node_allocator>::post_order_iterator::post_order_iterator(const sibling_iterator& other)
01812   : iterator_base(other.node)
01813 {
01814   if (this->node == 0)
01815   {
01816     if (other.range_last() != 0)
01817       this->node = other.range_last();
01818     else
01819       this->node = other.parent_;
01820     this->skip_children();
01821     ++(*this);
01822   }
01823 }
01824 
01825 template <class T, class tree_node_allocator>
01826 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator++()
01827 {
01828   assert(this->node != 0);
01829   if (this->node->next_sibling == 0)
01830   {
01831     this->node = this->node->parent;
01832     this->skip_current_children_ = false;
01833   }
01834   else
01835   {
01836     this->node = this->node->next_sibling;
01837     if (this->skip_current_children_)
01838     {
01839       this->skip_current_children_ = false;
01840     }
01841     else
01842     {
01843       while (this->node->first_child)
01844         this->node = this->node->first_child;
01845     }
01846   }
01847   return *this;
01848 }
01849 
01850 template <class T, class tree_node_allocator>
01851 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator--()
01852 {
01853   assert(this->node != 0);
01854   if (this->skip_current_children_ || this->node->last_child == 0)
01855   {
01856     this->skip_current_children_ = false;
01857     while (this->node->prev_sibling == 0)
01858       this->node = this->node->parent;
01859     this->node = this->node->prev_sibling;
01860   }
01861   else
01862   {
01863     this->node = this->node->last_child;
01864   }
01865   return *this;
01866 }
01867 
01868 template <class T, class tree_node_allocator>
01869 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::post_order_iterator::operator++(int)
01870 {
01871   post_order_iterator copy = *this;
01872   ++(*this);
01873   return copy;
01874 }
01875 
01876 template <class T, class tree_node_allocator>
01877 typename tree<T, tree_node_allocator>::post_order_iterator tree<T, tree_node_allocator>::post_order_iterator::operator--(int)
01878 {
01879   post_order_iterator copy = *this;
01880   --(*this);
01881   return copy;
01882 }
01883 
01884 
01885 template <class T, class tree_node_allocator>
01886 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator+=(unsigned int num)
01887 {
01888   while (num > 0)
01889   {
01890     ++(*this);
01891     --num;
01892   }
01893   return (*this);
01894 }
01895 
01896 template <class T, class tree_node_allocator>
01897 typename tree<T, tree_node_allocator>::post_order_iterator& tree<T, tree_node_allocator>::post_order_iterator::operator-=(unsigned int num)
01898 {
01899   while (num > 0)
01900   {
01901     --(*this);
01902     --num;
01903   }
01904   return (*this);
01905 }
01906 
01907 template <class T, class tree_node_allocator>
01908 void tree<T, tree_node_allocator>::post_order_iterator::descend_all()
01909 {
01910   assert(this->node != 0);
01911   while (this->node->first_child)
01912     this->node = this->node->first_child;
01913 }
01914 
01915 
01916 // Fixed depth iterator
01917 
01918 template <class T, class tree_node_allocator>
01919 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator()
01920   : iterator_base()
01921 {
01922   set_first_parent_();
01923 }
01924 
01925 template <class T, class tree_node_allocator>
01926 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(tree_node *tn)
01927   : iterator_base(tn)
01928 {
01929   set_first_parent_();
01930 }
01931 
01932 template <class T, class tree_node_allocator>
01933 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const iterator_base& other)
01934   : iterator_base(other.node)
01935 {
01936   set_first_parent_();
01937 }
01938 
01939 template <class T, class tree_node_allocator>
01940 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const sibling_iterator& other)
01941   : iterator_base(other.node), first_parent_(other.parent_)
01942 {
01943   find_leftmost_parent_();
01944 }
01945 
01946 template <class T, class tree_node_allocator>
01947 tree<T, tree_node_allocator>::fixed_depth_iterator::fixed_depth_iterator(const fixed_depth_iterator& other)
01948   : iterator_base(other.node), first_parent_(other.first_parent_)
01949 {
01950 }
01951 
01952 template <class T, class tree_node_allocator>
01953 void tree<T, tree_node_allocator>::fixed_depth_iterator::set_first_parent_()
01954 {
01955   return; // FIXME: we do not use first_parent_ yet, and it actually needs some serious reworking if
01956   // it is ever to work at the 'head' level.
01957   first_parent_ = 0;
01958   if (this->node == 0) return;
01959   if (this->node->parent != 0)
01960     first_parent_ = this->node->parent;
01961   if (first_parent_)
01962     find_leftmost_parent_();
01963 }
01964 
01965 template <class T, class tree_node_allocator>
01966 void tree<T, tree_node_allocator>::fixed_depth_iterator::find_leftmost_parent_()
01967 {
01968   return; // FIXME: see 'set_first_parent()'
01969   tree_node *tmppar = first_parent_;
01970   while (tmppar->prev_sibling)
01971   {
01972     tmppar = tmppar->prev_sibling;
01973     if (tmppar->first_child)
01974       first_parent_ = tmppar;
01975   }
01976 }
01977 
01978 template <class T, class tree_node_allocator>
01979 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator++()
01980 {
01981   assert(this->node != 0);
01982 
01983   if (this->node->next_sibling)
01984   {
01985     this->node = this->node->next_sibling;
01986   }
01987   else
01988   {
01989     int relative_depth = 0;
01990 upper:
01991     do
01992     {
01993       this->node = this->node->parent;
01994       if (this->node == 0) return *this;
01995       --relative_depth;
01996     }
01997     while (this->node->next_sibling == 0);
01998 lower:
01999     this->node = this->node->next_sibling;
02000     while (this->node->first_child == 0)
02001     {
02002       if (this->node->next_sibling == 0)
02003         goto upper;
02004       this->node = this->node->next_sibling;
02005       if (this->node == 0) return *this;
02006     }
02007     while (relative_depth < 0 && this->node->first_child != 0)
02008     {
02009       this->node = this->node->first_child;
02010       ++relative_depth;
02011     }
02012     if (relative_depth < 0)
02013     {
02014       if (this->node->next_sibling == 0) goto upper;
02015       else                          goto lower;
02016     }
02017   }
02018   return *this;
02019 
02020 // if(this->node->next_sibling!=0) {
02021 //    this->node=this->node->next_sibling;
02022 //    assert(this->node!=0);
02023 //    if(this->node->parent==0 && this->node->next_sibling==0) // feet element
02024 //       this->node=0;
02025 //    }
02026 // else {
02027 //    tree_node *par=this->node->parent;
02028 //    do {
02029 //       par=par->next_sibling;
02030 //       if(par==0) { // FIXME: need to keep track of this!
02031 //          this->node=0;
02032 //          return *this;
02033 //          }
02034 //       } while(par->first_child==0);
02035 //    this->node=par->first_child;
02036 //    }
02037   return *this;
02038 }
02039 
02040 template <class T, class tree_node_allocator>
02041 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator--()
02042 {
02043   assert(this->node != 0);
02044   if (this->node->prev_sibling != 0)
02045   {
02046     this->node = this->node->prev_sibling;
02047     assert(this->node != 0);
02048     if (this->node->parent == 0 && this->node->prev_sibling == 0) // head element
02049       this->node = 0;
02050   }
02051   else
02052   {
02053     tree_node *par = this->node->parent;
02054     do
02055     {
02056       par = par->prev_sibling;
02057       if (par == 0)   // FIXME: need to keep track of this!
02058       {
02059         this->node = 0;
02060         return *this;
02061       }
02062     }
02063     while (par->last_child == 0);
02064     this->node = par->last_child;
02065   }
02066   return *this;
02067 }
02068 
02069 template <class T, class tree_node_allocator>
02070 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::fixed_depth_iterator::operator++(int)
02071 {
02072   fixed_depth_iterator copy = *this;
02073   ++(*this);
02074   return copy;
02075 }
02076 
02077 template <class T, class tree_node_allocator>
02078 typename tree<T, tree_node_allocator>::fixed_depth_iterator tree<T, tree_node_allocator>::fixed_depth_iterator::operator--(int)
02079 {
02080   fixed_depth_iterator copy = *this;
02081   --(*this);
02082   return copy;
02083 }
02084 
02085 template <class T, class tree_node_allocator>
02086 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator-=(unsigned int num)
02087 {
02088   while (num > 0)
02089   {
02090     --(*this);
02091     --(num);
02092   }
02093   return (*this);
02094 }
02095 
02096 template <class T, class tree_node_allocator>
02097 typename tree<T, tree_node_allocator>::fixed_depth_iterator& tree<T, tree_node_allocator>::fixed_depth_iterator::operator+=(unsigned int num)
02098 {
02099   while (num > 0)
02100   {
02101     ++(*this);
02102     --(num);
02103   }
02104   return *this;
02105 }
02106 
02107 // FIXME: add the other members of fixed_depth_iterator.
02108 
02109 
02110 // Sibling iterator
02111 
02112 template <class T, class tree_node_allocator>
02113 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator()
02114   : iterator_base()
02115 {
02116   set_parent_();
02117 }
02118 
02119 template <class T, class tree_node_allocator>
02120 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(tree_node *tn)
02121   : iterator_base(tn)
02122 {
02123   set_parent_();
02124 }
02125 
02126 template <class T, class tree_node_allocator>
02127 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(const iterator_base& other)
02128   : iterator_base(other.node)
02129 {
02130   set_parent_();
02131 }
02132 
02133 template <class T, class tree_node_allocator>
02134 tree<T, tree_node_allocator>::sibling_iterator::sibling_iterator(const sibling_iterator& other)
02135   : iterator_base(other), parent_(other.parent_)
02136 {
02137 }
02138 
02139 template <class T, class tree_node_allocator>
02140 void tree<T, tree_node_allocator>::sibling_iterator::set_parent_()
02141 {
02142   parent_ = 0;
02143   if (this->node == 0) return;
02144   if (this->node->parent != 0)
02145     parent_ = this->node->parent;
02146 }
02147 
02148 template <class T, class tree_node_allocator>
02149 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator++()
02150 {
02151   if (this->node)
02152     this->node = this->node->next_sibling;
02153   return *this;
02154 }
02155 
02156 template <class T, class tree_node_allocator>
02157 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator--()
02158 {
02159   if (this->node) this->node = this->node->prev_sibling;
02160   else
02161   {
02162     assert(parent_);
02163     this->node = parent_->last_child;
02164   }
02165   return *this;
02166 }
02167 
02168 template <class T, class tree_node_allocator>
02169 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::sibling_iterator::operator++(int)
02170 {
02171   sibling_iterator copy = *this;
02172   ++(*this);
02173   return copy;
02174 }
02175 
02176 template <class T, class tree_node_allocator>
02177 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::sibling_iterator::operator--(int)
02178 {
02179   sibling_iterator copy = *this;
02180   --(*this);
02181   return copy;
02182 }
02183 
02184 template <class T, class tree_node_allocator>
02185 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator+=(unsigned int num)
02186 {
02187   while (num > 0)
02188   {
02189     ++(*this);
02190     --num;
02191   }
02192   return (*this);
02193 }
02194 
02195 template <class T, class tree_node_allocator>
02196 typename tree<T, tree_node_allocator>::sibling_iterator& tree<T, tree_node_allocator>::sibling_iterator::operator-=(unsigned int num)
02197 {
02198   while (num > 0)
02199   {
02200     --(*this);
02201     --num;
02202   }
02203   return (*this);
02204 }
02205 
02206 template <class T, class tree_node_allocator>
02207 typename tree<T, tree_node_allocator>::tree_node *tree<T, tree_node_allocator>::sibling_iterator::range_first() const
02208 {
02209   tree_node *tmp = parent_->first_child;
02210   return tmp;
02211 }
02212 
02213 template <class T, class tree_node_allocator>
02214 typename tree<T, tree_node_allocator>::tree_node *tree<T, tree_node_allocator>::sibling_iterator::range_last() const
02215 {
02216   return parent_->last_child;
02217 }
02218 
02219 
02220 #endif
02221 
02222 // Local variables:
02223 // default-tab-width: 3
02224 // End:
libofx-0.9.4/doc/html/structoption.html0000644000175000017500000001043411553133250015104 00000000000000 LibOFX: option Struct Reference

option Struct Reference

Data Fields

char * name
int has_arg
int * flag
int val

Detailed Description

Definition at line 94 of file gnugetopt.h.


The documentation for this struct was generated from the following files:
libofx-0.9.4/doc/html/globals_0x6d.html0000644000175000017500000001115711553133251014617 00000000000000 LibOFX: Globals
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- m -

libofx-0.9.4/doc/html/classOfxStatementRequest.png0000644000175000017500000000217011553133250017165 00000000000000‰PNG  IHDR&ˆä™ÐÃPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíɶƒ _›sòÿŸüt#ˆNaª»HMrS”°ýûÏŸ]ªíò™ 'ÄA—Z»€ƒ.hB4¡ šÐ¥MDDô <õÇwgâ KÑ.;Ä^Âï‘sžÂA—²]¶+è§eÑßuu¼¼¼M2M굿bCæû t)Ü%£‚ÙjÒÚ©mܵ8Ûöº”é’[A÷¾eí¡qÐåç]ÎV·<­Up—ÂSõvwE»ƒ.?ërnAÓ=oÓÔ¤œÿÌó‹+]~Øe»‚ ÊUˆö½èÎç÷`ºî²SA×¤Õ “¸{ÓÛuåÓm×fo=ËÄA—²]ö*$XÁÖ¯d%]Šv¹Xa±ï¥W~ˆƒ.ïw¹jª_½’ŸÛ_¿Þxjèòz— Ú3yfq¥Ë»]ÀA4¡ šÐMèR•&Åà Kõ]®æ{ÿ+ ]ªíºd4øÖÃ.Õv]²TÃ.Õv]òJT³¶Ò¥â.à  8躀ƒ.hB4¡ šÐMèBpÐåz…šRÓÔÀ¥ïg.à€ 8à¸pÀp\ÀpÀp\ÀA฀.à€Ë½|Š. pùL…S«&p\ÀpÀpiY=Fìxÿ£=k2— b/óóC#k2—cúdã0rˆÆcvØ¥&Cq9Ãþ¯-F<Žè®ŽW“¡¸œÅáöaÛƒ# ޾7¡¸\Ä1¯£’à0Tñ¶=†&½r¹¿¸z:Ñãß0â¦Ó—cþ¿¶öàùjt†Ëe“®–+8&»b0â1}éT“‘¸äàÈÊñóÑ&q\À—Êp\MïšôÁp\ÀpÀ¥*ÅS©&py4ß¾þ\À—b4¾ð€ 8àò xÀpy฀.à€ 8฀.à p\À—7qõ O0A‚&M@@Є  A‚&Mš4!Mš4!hBÞŽsЂ&à hBЄ  A4iUqÇú6Íy8¥â>”5õz𴤉ØËB 9­IîÜ£I{šø7±™¶1qkDøâ®ºûì\¯Í¾¹EED¿*³C4iR›Q7©é ‰›ÿà<¸añ¯Iô5¬&­kb‚¸÷èÚr¦SÄÖ—àBr›NOš ‹­óÑâ<ö&¾à×U(¶´¼éÛÇbp}ëH7!ZFÒH#šøÙ fzS“ýM'ÕMô5ù0𴦉n+ñLÏ[„ˆü‰?Šñ;ˆ7"¼0Kù MšÒ¤Ôo  š  š  šŒS€  A‚&MФ5MЧ?¦ÿî%©QÔÜëiIEND®B`‚libofx-0.9.4/doc/html/functions_func.html0000644000175000017500000004442311553133250015357 00000000000000 LibOFX: Data Fields - Functions
 

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- i -

- m -

- n -

- o -

- p -

- r -

- s -

libofx-0.9.4/doc/html/doxygen.css0000644000175000017500000002735511553133250013642 00000000000000/* The standard CSS for doxygen */ body, table, div, p, dl { font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-size: 12px; } /* @group Heading Levels */ h1 { font-size: 150%; } h2 { font-size: 120%; } h3 { font-size: 100%; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd, p.starttd { margin-top: 2px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; padding: 2px; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code { color: #4665A2; } a.codeRef { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } .fragment { font-family: monospace, fixed; font-size: 105%; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 10px; margin-right: 10px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-top: 1px solid #C4CFE5; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memTemplParams { color: #4665A2; white-space: nowrap; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .memitem { padding: 0; margin-bottom: 10px; } .memname { white-space: nowrap; font-weight: bold; margin-left: 6px; } .memproto { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 8px; border-top-left-radius: 8px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 8px; -moz-border-radius-topleft: 8px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 8px; -webkit-border-top-left-radius: 8px; background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; } .memdoc { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 2px 5px; background-color: #FBFCFD; border-top-width: 0; /* opera specific markup */ border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); /* webkit specific markup */ -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .params, .retval, .exception, .tparams { border-spacing: 6px 2px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } /* @end */ /* @group Directory (tree) */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin: 0px; } /* these are for tree view when used as main index */ .directory { font-size: 9pt; font-weight: bold; margin: 5px; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } /* The following two styles can be used to replace the root node title with an image of your choice. Simply uncomment the next two styles, specify the name of your image and be sure to set 'height' to the proper pixel height of your image. */ /* .directory h3.swap { height: 61px; background-repeat: no-repeat; background-image: url("yourimage.gif"); } .directory h3.swap span { display: none; } */ .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } /* these are for tree view when not used as main index */ .directory-alt { font-size: 100%; font-weight: bold; } .directory-alt h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory-alt > h3 { margin-top: 0; } .directory-alt p { margin: 0px; white-space: nowrap; } .directory-alt div { display: none; margin: 0px; } .directory-alt img { vertical-align: -30%; } /* @end */ div.dynheader { margin-top: 8px; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; text-align:left; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; padding-left: 5px; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug { border-left:4px solid; padding: 0 0 0 6px; } dl.note { border-color: #D0D000; } dl.warning, dl.attention { border-color: #FF0000; } dl.pre, dl.post, dl.invariant { border-color: #00D000; } dl.deprecated { border-color: #505050; } dl.todo { border-color: #00C0E0; } dl.test { border-color: #3030E0; } dl.bug { border-color: #C08050; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% arial,sans-serif; margin: 0px; padding: 0px; } #projectbrief { font: 120% arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } libofx-0.9.4/doc/html/ofxdump_8cpp_source.html0000644000175000017500000020377211553133250016334 00000000000000 LibOFX: ofxdump.cpp Source File

ofxdump.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofxdump.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00022 /***************************************************************************
00023  *                                                                         *
00024  *   This program is free software; you can redistribute it and/or modify  *
00025  *   it under the terms of the GNU General Public License as published by  *
00026  *   the Free Software Foundation; either version 2 of the License, or     *
00027  *   (at your option) any later version.                                   *
00028  *                                                                         *
00029  ***************************************************************************/
00030 #include <iostream>
00031 #include <iomanip>
00032 #include <cstdlib>
00033 #include <cstring>
00034 #include <string>
00035 #include "libofx.h"
00036 #include <stdio.h>              /* for printf() */
00037 #include <config.h>             /* Include config constants, e.g., VERSION TF */
00038 #include <errno.h>
00039 
00040 #include "cmdline.h" /* Gengetopt generated parser */
00041 
00042 using namespace std;
00043 
00044 
00045 int ofx_proc_security_cb(struct OfxSecurityData data, void * security_data)
00046 {
00047   char dest_string[255];
00048   cout<<"ofx_proc_security():\n";
00049   if(data.unique_id_valid==true){
00050     cout<<"    Unique ID of the security being traded: "<<data.unique_id<<"\n";
00051   }
00052   if(data.unique_id_type_valid==true){
00053     cout<<"    Format of the Unique ID: "<<data.unique_id_type<<"\n";
00054   }
00055   if(data.secname_valid==true){
00056     cout<<"    Name of the security: "<<data.secname<<"\n";
00057   }
00058   if(data.ticker_valid==true){
00059     cout<<"    Ticker symbol: "<<data.ticker<<"\n";
00060   }
00061   if(data.unitprice_valid==true){
00062     cout<<"    Price of each unit of the security: "<<data.unitprice<<"\n";
00063   }
00064   if(data.date_unitprice_valid==true){
00065     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_unitprice)));
00066     cout<<"    Date as of which the unitprice is valid: "<<dest_string<<"\n";
00067   }
00068   if(data.currency_valid==true){
00069     cout<<"    Currency of the unitprice: "<<data.currency<<"\n";
00070   }
00071   if(data.memo_valid==true){
00072     cout<<"    Extra transaction information (memo): "<<data.memo<<"\n";
00073   }
00074   cout<<"\n";
00075   return 0;
00076 }
00077 
00078 int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_data)
00079 {
00080   char dest_string[255];
00081   cout<<"ofx_proc_transaction():\n";
00082   
00083   if(data.account_id_valid==true){
00084     cout<<"    Account ID : "<<data.account_id<<"\n";
00085   }
00086   
00087   if(data.transactiontype_valid==true)
00088     {
00089       if(data.transactiontype==OFX_CREDIT)
00090         strncpy(dest_string, "CREDIT: Generic credit", sizeof(dest_string));
00091       else if (data.transactiontype==OFX_DEBIT)
00092         strncpy(dest_string, "DEBIT: Generic debit", sizeof(dest_string));
00093       else if (data.transactiontype==OFX_INT)
00094         strncpy(dest_string, "INT: Interest earned or paid (Note: Depends on signage of amount)", sizeof(dest_string));
00095       else if (data.transactiontype==OFX_DIV)
00096         strncpy(dest_string, "DIV: Dividend", sizeof(dest_string));
00097       else if (data.transactiontype==OFX_FEE)
00098         strncpy(dest_string, "FEE: FI fee", sizeof(dest_string));
00099       else if (data.transactiontype==OFX_SRVCHG)
00100         strncpy(dest_string, "SRVCHG: Service charge", sizeof(dest_string));
00101       else if (data.transactiontype==OFX_DEP)
00102         strncpy(dest_string, "DEP: Deposit", sizeof(dest_string));
00103       else if (data.transactiontype==OFX_ATM)
00104         strncpy(dest_string, "ATM: ATM debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
00105       else if (data.transactiontype==OFX_POS)
00106         strncpy(dest_string, "POS: Point of sale debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
00107       else if (data.transactiontype==OFX_XFER)
00108         strncpy(dest_string, "XFER: Transfer", sizeof(dest_string));
00109       else if (data.transactiontype==OFX_CHECK)
00110         strncpy(dest_string, "CHECK: Check", sizeof(dest_string));
00111       else if (data.transactiontype==OFX_PAYMENT)
00112         strncpy(dest_string, "PAYMENT: Electronic payment", sizeof(dest_string));
00113       else if (data.transactiontype==OFX_CASH)
00114         strncpy(dest_string, "CASH: Cash withdrawal", sizeof(dest_string));
00115       else if (data.transactiontype==OFX_DIRECTDEP)
00116         strncpy(dest_string, "DIRECTDEP: Direct deposit", sizeof(dest_string));
00117       else if (data.transactiontype==OFX_DIRECTDEBIT)
00118         strncpy(dest_string, "DIRECTDEBIT: Merchant initiated debit", sizeof(dest_string));
00119       else if (data.transactiontype==OFX_REPEATPMT)
00120         strncpy(dest_string, "REPEATPMT: Repeating payment/standing order", sizeof(dest_string));
00121       else if (data.transactiontype==OFX_OTHER)
00122         strncpy(dest_string, "OTHER: Other", sizeof(dest_string));
00123       else
00124         strncpy(dest_string, "Unknown transaction type", sizeof(dest_string));
00125       cout<<"    Transaction type: "<<dest_string<<"\n";
00126     }
00127 
00128   
00129   if(data.date_initiated_valid==true){
00130     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_initiated)));
00131     cout<<"    Date initiated: "<<dest_string<<"\n";
00132   }
00133   if(data.date_posted_valid==true){
00134     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_posted)));
00135     cout<<"    Date posted: "<<dest_string<<"\n";
00136   }
00137   if(data.date_funds_available_valid==true){
00138     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_funds_available)));
00139     cout<<"    Date funds are available: "<<dest_string<<"\n";
00140   }
00141   if(data.amount_valid==true){
00142     cout<<"    Total money amount: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.amount<<"\n";
00143   }
00144   if(data.units_valid==true){
00145     cout<<"    # of units: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.units<<"\n";
00146   }
00147   if(data.oldunits_valid==true){
00148     cout<<"    # of units before split: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.oldunits<<"\n";
00149   }
00150   if(data.newunits_valid==true){
00151     cout<<"    # of units after split: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.newunits<<"\n";
00152   }
00153   if(data.unitprice_valid==true){
00154     cout<<"    Unit price: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.unitprice<<"\n";
00155   }
00156   if(data.fees_valid==true){
00157     cout<<"    Fees: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.fees<<"\n";
00158   }
00159   if(data.commission_valid==true){
00160     cout<<"    Commission: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.commission<<"\n";
00161   }
00162   if(data.fi_id_valid==true){
00163     cout<<"    Financial institution's ID for this transaction: "<<data.fi_id<<"\n";
00164   }
00165   if(data.fi_id_corrected_valid==true){
00166     cout<<"    Financial institution ID replaced or corrected by this transaction: "<<data.fi_id_corrected<<"\n";
00167   }
00168   if(data.fi_id_correction_action_valid==true){
00169     cout<<"    Action to take on the corrected transaction: ";
00170     if (data.fi_id_correction_action==DELETE)
00171       cout<<"DELETE\n";
00172     else if (data.fi_id_correction_action==REPLACE)
00173       cout<<"REPLACE\n";
00174     else
00175       cout<<"ofx_proc_transaction(): This should not happen!\n";
00176     }
00177   if(data.invtransactiontype_valid==true){
00178     cout<<"    Investment transaction type: ";
00179     if (data.invtransactiontype==OFX_BUYDEBT)
00180       strncpy(dest_string, "BUYDEBT (Buy debt security)", sizeof(dest_string));
00181     else if (data.invtransactiontype==OFX_BUYMF)
00182       strncpy(dest_string, "BUYMF (Buy mutual fund)", sizeof(dest_string));
00183     else if (data.invtransactiontype==OFX_BUYOPT)
00184       strncpy(dest_string, "BUYOPT (Buy option)", sizeof(dest_string));
00185     else if (data.invtransactiontype==OFX_BUYOTHER)
00186       strncpy(dest_string, "BUYOTHER (Buy other security type)", sizeof(dest_string));
00187     else if (data.invtransactiontype==OFX_BUYSTOCK)
00188       strncpy(dest_string, "BUYSTOCK (Buy stock))", sizeof(dest_string));
00189     else if (data.invtransactiontype==OFX_CLOSUREOPT)
00190       strncpy(dest_string, "CLOSUREOPT (Close a position for an option)", sizeof(dest_string));
00191     else if (data.invtransactiontype==OFX_INCOME)
00192       strncpy(dest_string, "INCOME (Investment income is realized as cash into the investment account)", sizeof(dest_string));
00193     else if (data.invtransactiontype==OFX_INVEXPENSE)
00194       strncpy(dest_string, "INVEXPENSE (Misc investment expense that is associated with a specific security)", sizeof(dest_string));
00195     else if (data.invtransactiontype==OFX_JRNLFUND)
00196       strncpy(dest_string, "JRNLFUND (Journaling cash holdings between subaccounts within the same investment account)", sizeof(dest_string));
00197     else if (data.invtransactiontype==OFX_MARGININTEREST)
00198       strncpy(dest_string, "MARGININTEREST (Margin interest expense)", sizeof(dest_string));
00199     else if (data.invtransactiontype==OFX_REINVEST)
00200       strncpy(dest_string, "REINVEST (Reinvestment of income)", sizeof(dest_string));
00201     else if (data.invtransactiontype==OFX_RETOFCAP)
00202       strncpy(dest_string, "RETOFCAP (Return of capital)", sizeof(dest_string));
00203     else if (data.invtransactiontype==OFX_SELLDEBT)
00204       strncpy(dest_string, "SELLDEBT (Sell debt security.  Used when debt is sold, called, or reached maturity)", sizeof(dest_string));
00205     else if (data.invtransactiontype==OFX_SELLMF)
00206       strncpy(dest_string, "SELLMF (Sell mutual fund)", sizeof(dest_string));
00207     else if (data.invtransactiontype==OFX_SELLOPT)
00208       strncpy(dest_string, "SELLOPT (Sell option)", sizeof(dest_string));
00209     else if (data.invtransactiontype==OFX_SELLOTHER)
00210       strncpy(dest_string, "SELLOTHER (Sell other type of security)", sizeof(dest_string));
00211     else if (data.invtransactiontype==OFX_SELLSTOCK)
00212       strncpy(dest_string, "SELLSTOCK (Sell stock)", sizeof(dest_string));
00213     else if (data.invtransactiontype==OFX_SPLIT)
00214       strncpy(dest_string, "SPLIT (Stock or mutial fund split)", sizeof(dest_string));
00215     else if (data.invtransactiontype==OFX_TRANSFER)
00216       strncpy(dest_string, "TRANSFER (Transfer holdings in and out of the investment account)", sizeof(dest_string));
00217     else 
00218       strncpy(dest_string, "ERROR, this investment transaction type is unknown.  This is a bug in ofxdump", sizeof(dest_string));
00219     
00220     cout<<dest_string<<"\n";
00221   }
00222   if(data.unique_id_valid==true){
00223     cout<<"    Unique ID of the security being traded: "<<data.unique_id<<"\n";
00224   }
00225   if(data.unique_id_type_valid==true){
00226     cout<<"    Format of the Unique ID: "<<data.unique_id_type<<"\n";
00227   }
00228   if(data.security_data_valid==true){
00229     ofx_proc_security_cb(*(data.security_data_ptr), NULL );
00230   }
00231 
00232   if(data.server_transaction_id_valid==true){
00233     cout<<"    Server's transaction ID (confirmation number): "<<data.server_transaction_id<<"\n";
00234   }
00235   if(data.check_number_valid==true){
00236     cout<<"    Check number: "<<data.check_number<<"\n";
00237   }
00238   if(data.reference_number_valid==true){
00239     cout<<"    Reference number: "<<data.reference_number<<"\n";
00240   }
00241   if(data.standard_industrial_code_valid==true){
00242     cout<<"    Standard Industrial Code: "<<data.standard_industrial_code<<"\n";
00243   }
00244   if(data.payee_id_valid==true){
00245     cout<<"    Payee_id: "<<data.payee_id<<"\n";
00246   }
00247   if(data.name_valid==true){
00248     cout<<"    Name of payee or transaction description: "<<data.name<<"\n";
00249   }
00250   if(data.memo_valid==true){
00251     cout<<"    Extra transaction information (memo): "<<data.memo<<"\n";
00252   }
00253   cout<<"\n";
00254   return 0;
00255 }//end ofx_proc_transaction()
00256 
00257 int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data)
00258 {
00259   char dest_string[255];
00260   cout<<"ofx_proc_statement():\n";
00261   if(data.currency_valid==true){
00262     cout<<"    Currency: "<<data.currency<<"\n";
00263   }
00264   if(data.account_id_valid==true){
00265     cout<<"    Account ID: "<<data.account_id<<"\n";
00266   }
00267   if(data.date_start_valid==true){
00268     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_start)));
00269     cout<<"    Start date of this statement: "<<dest_string<<"\n";
00270   }
00271   if(data.date_end_valid==true){
00272     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.date_end)));
00273     cout<<"    End date of this statement: "<<dest_string<<"\n";
00274   }
00275   if(data.ledger_balance_valid==true){
00276     cout<<"    Ledger balance: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.ledger_balance<<"\n";
00277   }
00278   if(data.ledger_balance_date_valid==true){
00279     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.ledger_balance_date)));
00280     cout<<"    Ledger balance date: "<<dest_string<<"\n";
00281   }
00282   if(data.available_balance_valid==true){
00283     cout<<"    Available balance: "<<setiosflags(ios::fixed)<<setiosflags(ios::showpoint)<<setprecision(2)<<data.available_balance<<"\n";
00284   }
00285   if(data.available_balance_date_valid==true){
00286     strftime(dest_string,sizeof(dest_string),"%c %Z",localtime(&(data.available_balance_date)));
00287     cout<<"    Ledger balance date: "<<dest_string<<"\n";
00288   }
00289   if(data.marketing_info_valid==true){
00290     cout<<"    Marketing information: "<<data.marketing_info<<"\n";
00291   }
00292   cout<<"\n";
00293   return 0;
00294 }//end ofx_proc_statement()
00295 
00296 int ofx_proc_account_cb(struct OfxAccountData data, void * account_data)
00297 {
00298   cout<<"ofx_proc_account():\n";
00299   if(data.account_id_valid==true){
00300     cout<<"    Account ID: "<<data.account_id<<"\n";
00301     cout<<"    Account name: "<<data.account_name<<"\n";
00302   }
00303   if(data.account_type_valid==true){
00304     cout<<"    Account type: ";
00305     switch(data.account_type){
00306     case OfxAccountData::OFX_CHECKING : cout<<"CHECKING\n";
00307       break;
00308     case OfxAccountData::OFX_SAVINGS : cout<<"SAVINGS\n";
00309       break;
00310     case OfxAccountData::OFX_MONEYMRKT : cout<<"MONEYMRKT\n";
00311       break;
00312     case OfxAccountData::OFX_CREDITLINE : cout<<"CREDITLINE\n";
00313       break;
00314     case OfxAccountData::OFX_CMA : cout<<"CMA\n";
00315       break;
00316     case OfxAccountData::OFX_CREDITCARD : cout<<"CREDITCARD\n";
00317       break;
00318     case OfxAccountData::OFX_INVESTMENT : cout<<"INVESTMENT\n";
00319       break;
00320     default: cout<<"ofx_proc_account() WRITEME: This is an unknown account type!";
00321     }
00322   }
00323   if(data.currency_valid==true){
00324     cout<<"    Currency: "<<data.currency<<"\n";
00325   }
00326 
00327   if (data.bank_id_valid)
00328     cout<<"    Bank ID: "<<data.bank_id << endl;;
00329 
00330   if (data.branch_id_valid)
00331     cout<<"    Branch ID: "<<data.branch_id << endl;
00332 
00333   if (data.account_number_valid)
00334     cout<<"    Account #: "<<data.account_number << endl;
00335 
00336   cout<<"\n";
00337   return 0;
00338 }//end ofx_proc_account()
00339 
00340 
00341 
00342 int ofx_proc_status_cb(struct OfxStatusData data, void * status_data)
00343 {
00344   cout<<"ofx_proc_status():\n";
00345   if(data.ofx_element_name_valid==true){
00346     cout<<"    Ofx entity this status is relevent to: "<< data.ofx_element_name<<" \n";
00347   }
00348   if(data.severity_valid==true){
00349     cout<<"    Severity: ";
00350     switch(data.severity){
00351     case OfxStatusData::INFO : cout<<"INFO\n";
00352       break;
00353     case OfxStatusData::WARN : cout<<"WARN\n";
00354       break;
00355     case OfxStatusData::ERROR : cout<<"ERROR\n";
00356       break;
00357     default: cout<<"WRITEME: Unknown status severity!\n";
00358     }
00359   }
00360   if(data.code_valid==true){
00361     cout<<"    Code: "<<data.code<<", name: "<<data.name<<"\n    Description: "<<data.description<<"\n";
00362   }
00363   if(data.server_message_valid==true){
00364     cout<<"    Server Message: "<<data.server_message<<"\n";
00365   }
00366   cout<<"\n";
00367   return 0;
00368 }
00369 
00370 
00371 int main (int argc, char *argv[])
00372 {
00374   extern int ofx_PARSER_msg;
00375   extern int ofx_DEBUG_msg;
00376   extern int ofx_WARNING_msg;
00377   extern int ofx_ERROR_msg;
00378   extern int ofx_INFO_msg;
00379   extern int ofx_STATUS_msg;
00380 
00381   gengetopt_args_info args_info;
00382 
00383   /* let's call our cmdline parser */
00384   if (cmdline_parser (argc, argv, &args_info) != 0)
00385     exit(1) ;
00386 
00387   //  if (args_info.msg_parser_given)
00388   //    cout << "The msg_parser option was given!" << endl;
00389 
00390   //  cout << "The flag is " << ( args_info.msg_parser_flag ? "on" : "off" ) <<
00391   //    "." << endl ;
00392   args_info.msg_parser_flag ? ofx_PARSER_msg = true : ofx_PARSER_msg = false;
00393   args_info.msg_debug_flag ? ofx_DEBUG_msg = true : ofx_DEBUG_msg = false;
00394   args_info.msg_warning_flag ? ofx_WARNING_msg = true : ofx_WARNING_msg = false;
00395   args_info.msg_error_flag ? ofx_ERROR_msg = true : ofx_ERROR_msg = false;
00396   args_info.msg_info_flag ? ofx_INFO_msg = true : ofx_INFO_msg = false;
00397   args_info.msg_status_flag ? ofx_STATUS_msg = true : ofx_STATUS_msg;
00398 
00399   bool skiphelp = false;
00400   
00401   if(args_info.list_import_formats_given)
00402     {
00403       skiphelp = true;
00404       cout <<"The supported file formats for the 'input-file-format' argument are:"<<endl;
00405       for(int i=0; LibofxImportFormatList[i].format!=LAST; i++)
00406         {
00407           cout <<"     "<<LibofxImportFormatList[i].description<<endl;
00408         }
00409     }
00410                   
00411   LibofxContextPtr libofx_context = libofx_get_new_context();
00412 
00413   //char **inputs ; /* unamed options */
00414   //unsigned inputs_num ; /* unamed options number */
00415   if (args_info.inputs_num  > 0)
00416     {
00417       const char* filename = args_info.inputs[0];
00418 
00419 
00420       ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);
00421       ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0);
00422       ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0);
00423       ofx_set_security_cb(libofx_context, ofx_proc_security_cb, 0);
00424       ofx_set_status_cb(libofx_context, ofx_proc_status_cb, 0);
00425 
00426       enum LibofxFileFormat file_format = libofx_get_file_format_from_str(LibofxImportFormatList, args_info.import_format_arg);
00428       if(args_info.inputs_num  > 1)
00429         {
00430           cout << "Sorry, currently, only the first file is processed as the library can't deal with more right now.  The following files were ignored:"<<endl;
00431           for ( unsigned i = 1 ; i < args_info.inputs_num ; ++i )
00432             {
00433               cout << "file: " << args_info.inputs[i] << endl ;
00434               }
00435         }
00436       libofx_proc_file(libofx_context, args_info.inputs[0], file_format);
00437     }
00438   else
00439     {
00440       if ( !skiphelp )
00441         cmdline_parser_print_help();
00442     }
00443   return 0;
00444 }
libofx-0.9.4/doc/html/ofx__container__statement_8cpp.html0000644000175000017500000000750611553133250020507 00000000000000 LibOFX: ofx_container_statement.cpp File Reference

ofx_container_statement.cpp File Reference

Implementation of OfxStatementContainer for bank statements, credit cart statements, etc. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxStatementContainer for bank statements, credit cart statements, etc.

Definition in file ofx_container_statement.cpp.

libofx-0.9.4/doc/html/files.html0000644000175000017500000006145711553133251013445 00000000000000 LibOFX: File List

File List

Here is a list of all documented files with brief descriptions:
ofxconnect/cmdline.c [code]
ofxdump/cmdline.c [code]
ofxconnect/cmdline.h [code]
ofxdump/cmdline.h [code]
config.h [code]
context.cpp [code]
fx-0.9.4/lib/context.cpp [code]
context.hh [code]
fx-0.9.4/lib/context.hh [code]
file_preproc.cpp [code]File type detection, etc
fx-0.9.4/lib/file_preproc.cpp [code]File type detection, etc
file_preproc.hh [code]Preprocessing of the OFX files before parsing
fx-0.9.4/lib/file_preproc.hh [code]Preprocessing of the OFX files before parsing
getopt.c [code]
fx-0.9.4/lib/getopt.c [code]
getopt1.c [code]
fx-0.9.4/lib/getopt1.c [code]
gnugetopt.h [code]
fx-0.9.4/lib/gnugetopt.h [code]
inc/libofx.h [code]Main header file containing the LibOfx API
libofx-0.9.4/inc/libofx.h [code]Main header file containing the LibOfx API
main_doc.c [code]
messages.cpp [code]Message IO functionality
fx-0.9.4/lib/messages.cpp [code]Message IO functionality
messages.hh [code]Message IO functionality
fx-0.9.4/lib/messages.hh [code]Message IO functionality
nodeparser.cpp [code]Implementation of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath
nodeparser.h [code]Declaration of nodeparser object, which facilitiates searching for nodes in an XML file using a notation similiar to XPath
ofc_sgml.cpp [code]OFX/SGML parsing functionnality
fx-0.9.4/lib/ofc_sgml.cpp [code]OFX/SGML parsing functionnality
ofc_sgml.hh [code]OFX/SGML parsing functionnality
fx-0.9.4/lib/ofc_sgml.hh [code]OFX/SGML parsing functionnality
ofx2qif.c [code]Code for ofx2qif utility. C example code
ofx_aggregate.hh [code]Declaration of OfxAggregate which allows you to construct a single OFX aggregate
fx-0.9.4/lib/ofx_aggregate.hh [code]Declaration of OfxAggregate which allows you to construct a single OFX aggregate
ofx_container_account.cpp [code]Implementation of OfxAccountContainer for bank, credit card and investment accounts
fx-0.9.4/lib/ofx_container_account.cpp [code]Implementation of OfxAccountContainer for bank, credit card and investment accounts
ofx_container_generic.cpp [code]Implementation of OfxGenericContainer
fx-0.9.4/lib/ofx_container_generic.cpp [code]Implementation of OfxGenericContainer
ofx_container_main.cpp [code]Implementation of OfxMainContainer
fx-0.9.4/lib/ofx_container_main.cpp [code]Implementation of OfxMainContainer
ofx_container_security.cpp [code]Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc
fx-0.9.4/lib/ofx_container_security.cpp [code]Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc
ofx_container_statement.cpp [code]Implementation of OfxStatementContainer for bank statements, credit cart statements, etc
fx-0.9.4/lib/ofx_container_statement.cpp [code]Implementation of OfxStatementContainer for bank statements, credit cart statements, etc
ofx_container_transaction.cpp [code]Implementation of OfxTransactionContainer, OfxBankTransactionContainer and OfxInvestmentTransactionContainer
fx-0.9.4/lib/ofx_container_transaction.cpp [code]Implementation of OfxTransactionContainer, OfxBankTransactionContainer and OfxInvestmentTransactionContainer
ofx_containers.hh [code]LibOFX internal object code
fx-0.9.4/lib/ofx_containers.hh [code]LibOFX internal object code
ofx_containers_misc.cpp [code]LibOFX internal object code
fx-0.9.4/lib/ofx_containers_misc.cpp [code]LibOFX internal object code
ofx_error_msg.hh [code]OFX error code management functionnality
fx-0.9.4/lib/ofx_error_msg.hh [code]OFX error code management functionnality
ofx_preproc.cpp [code]Preprocessing of the OFX files before parsing
fx-0.9.4/lib/ofx_preproc.cpp [code]Preprocessing of the OFX files before parsing
ofx_preproc.hh [code]Preprocessing of the OFX files before parsing
fx-0.9.4/lib/ofx_preproc.hh [code]Preprocessing of the OFX files before parsing
ofx_request.cpp [code]Implementation of an OfxRequests to create an OFX file containing a generic request
fx-0.9.4/lib/ofx_request.cpp [code]Implementation of an OfxRequests to create an OFX file containing a generic request
ofx_request.hh [code]Declaration of an OfxRequests to create an OFX file containing a generic request
fx-0.9.4/lib/ofx_request.hh [code]Declaration of an OfxRequests to create an OFX file containing a generic request
ofx_request_accountinfo.cpp [code]Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user
fx-0.9.4/lib/ofx_request_accountinfo.cpp [code]Implementation of libofx_request_accountinfo to create an OFX file containing a request for all account info at this FI for this user
ofx_request_accountinfo.hh [code]Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user
fx-0.9.4/lib/ofx_request_accountinfo.hh [code]Declaration of OfxRequestAccountInfo create an OFX file containing a request for all account info at this FI for this user
ofx_request_statement.cpp [code]Implementation of libofx_request_statement to create an OFX file containing a request for a statement
fx-0.9.4/lib/ofx_request_statement.cpp [code]Implementation of libofx_request_statement to create an OFX file containing a request for a statement
ofx_request_statement.hh [code]Declaration of libofx_request_statement to create an OFX file containing a request for a statement
fx-0.9.4/lib/ofx_request_statement.hh [code]Declaration of libofx_request_statement to create an OFX file containing a request for a statement
ofx_sgml.cpp [code]OFX/SGML parsing functionnality
fx-0.9.4/lib/ofx_sgml.cpp [code]OFX/SGML parsing functionnality
ofx_sgml.hh [code]OFX/SGML parsing functionnality
fx-0.9.4/lib/ofx_sgml.hh [code]OFX/SGML parsing functionnality
ofx_utilities.cpp [code]Various simple functions for type conversion & al
fx-0.9.4/lib/ofx_utilities.cpp [code]Various simple functions for type conversion & al
ofx_utilities.hh [code]Various simple functions for type conversion & al
fx-0.9.4/lib/ofx_utilities.hh [code]Various simple functions for type conversion & al
ofxconnect.cpp [code]Code for ofxconnect utility. C++ example code
ofxdump.cpp [code]Code for ofxdump utility. C++ example code
ofxpartner.cpp [code]Methods for connecting to the OFX partner server to retrieve OFX server information
ofxpartner.h [code]Methods for connecting to the OFX partner server to retrieve OFX server information
tree.hh [code]
fx-0.9.4/lib/tree.hh [code]
win32.cpp [code]
fx-0.9.4/lib/win32.cpp [code]
win32.hh [code]
fx-0.9.4/lib/win32.hh [code]
libofx-0.9.4/doc/html/closed.png0000644000175000017500000000017611553133250013422 00000000000000‰PNG  IHDR à‘EIDATxíÝA @! PŠ­iš/`Є.È?,!ƒu zlÞ–Jh1ߘ+výRLé§x@‘Ù (*79HÑ þl)¡ó²‰IEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request_8cpp_source.html0000644000175000017500000003505011553133250022024 00000000000000 LibOFX: ofx_request.cpp Source File

ofx_request.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_request.cpp
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <cstring>
00025 #include <string>
00026 #include "messages.hh"
00027 #include "libofx.h"
00028 #include "ofx_request.hh"
00029 
00030 using namespace std;
00031 
00032 string time_t_to_ofxdatetime( time_t time )
00033 {
00034   static char buffer[51];
00035 
00036   strftime( buffer, 50, "%Y%m%d%H%M%S.000", localtime(&time) );
00037   buffer[50] = 0;
00038 
00039   return string(buffer);
00040 }
00041 
00042 string time_t_to_ofxdate( time_t time )
00043 {
00044   static char buffer[51];
00045 
00046   strftime( buffer, 50, "%Y%m%d", localtime(&time) );
00047   buffer[50] = 0;
00048 
00049   return string(buffer);
00050 }
00051 
00052 string OfxHeader(const char *hver)
00053 {
00054   if (hver == NULL || hver[0] == 0)
00055     hver = "102";
00056 
00057   if (strcmp(hver, "103") == 0)
00058     /* TODO: check for differences in version 102 and 103 */
00059     return string("OFXHEADER:100\r\n"
00060                   "DATA:OFXSGML\r\n"
00061                   "VERSION:103\r\n"
00062                   "SECURITY:NONE\r\n"
00063                   "ENCODING:USASCII\r\n"
00064                   "CHARSET:1252\r\n"
00065                   "COMPRESSION:NONE\r\n"
00066                   "OLDFILEUID:NONE\r\n"
00067                   "NEWFILEUID:")
00068            + time_t_to_ofxdatetime( time(NULL) )
00069            + string("\r\n\r\n");
00070   else
00071     return string("OFXHEADER:100\r\n"
00072                   "DATA:OFXSGML\r\n"
00073                   "VERSION:102\r\n"
00074                   "SECURITY:NONE\r\n"
00075                   "ENCODING:USASCII\r\n"
00076                   "CHARSET:1252\r\n"
00077                   "COMPRESSION:NONE\r\n"
00078                   "OLDFILEUID:NONE\r\n"
00079                   "NEWFILEUID:")
00080            + time_t_to_ofxdatetime( time(NULL) )
00081            + string("\r\n\r\n");
00082 }
00083 
00084 OfxAggregate OfxRequest::SignOnRequest(void) const
00085 {
00086   OfxAggregate fiTag("FI");
00087   fiTag.Add( "ORG", m_login.org );
00088   if ( strlen(m_login.fid) > 0 )
00089     fiTag.Add( "FID", m_login.fid );
00090 
00091   OfxAggregate sonrqTag("SONRQ");
00092   sonrqTag.Add( "DTCLIENT", time_t_to_ofxdatetime( time(NULL) ) );
00093   sonrqTag.Add( "USERID", m_login.userid);
00094   sonrqTag.Add( "USERPASS", m_login.userpass);
00095   sonrqTag.Add( "LANGUAGE", "ENG");
00096   sonrqTag.Add( fiTag );
00097   if ( strlen(m_login.appid) > 0 )
00098     sonrqTag.Add( "APPID", m_login.appid);
00099   else
00100     sonrqTag.Add( "APPID", "QWIN");
00101   if ( strlen(m_login.appver) > 0 )
00102     sonrqTag.Add( "APPVER", m_login.appver);
00103   else
00104     sonrqTag.Add( "APPVER", "1400");
00105 
00106   OfxAggregate signonmsgTag("SIGNONMSGSRQV1");
00107   signonmsgTag.Add( sonrqTag );
00108 
00109   return signonmsgTag;
00110 }
00111 
00112 OfxAggregate OfxRequest::RequestMessage(const string& _msgType, const string& _trnType, const OfxAggregate& _request) const
00113 {
00114   OfxAggregate trnrqTag( _trnType + "TRNRQ" );
00115   trnrqTag.Add( "TRNUID", time_t_to_ofxdatetime( time(NULL) ) );
00116   trnrqTag.Add( "CLTCOOKIE", "1" );
00117   trnrqTag.Add( _request );
00118 
00119   OfxAggregate result( _msgType + "MSGSRQV1" );
00120   result.Add( trnrqTag );
00121 
00122   return result;
00123 }
libofx-0.9.4/doc/html/tab_b.png0000644000175000017500000000026211553133250013214 00000000000000‰PNG  IHDR$ÇÇ[yIDATxíÝÛ Â €Ñ?|SVÓˆ´bB#P®½8³‰O¾:É™D>ßm{SûIí'¹äz(!•TBÞ‰y#¤WìJDp¾ã|Ã…†ó »ìR˜]áá æ™Ð6q·‰›]ç•qŠŒÓÊÕD.&0èÀ =ƒJD”ˆü=@*é*ç×IEND®B`‚libofx-0.9.4/doc/html/fx-0_89_84_2lib_2context_8hh_source.html0000644000175000017500000002555311553133250020631 00000000000000 LibOFX: context.hh Source File

context.hh

00001 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #ifndef CONTEXT_H
00015 #define CONTEXT_H
00016 #include <string.h>
00017 #include <time.h>               // for time_t
00018 #include "libofx.h"
00019 #include "ParserEventGeneratorKit.h"
00020 
00021 #include <string>
00022 
00023 
00024 using namespace std;
00025 class LibofxContext
00026 {
00027 private:
00028   LibofxFileFormat _current_file_type;
00029 
00030   LibofxProcStatusCallback _statusCallback;
00031   LibofxProcAccountCallback _accountCallback;
00032   LibofxProcSecurityCallback _securityCallback;
00033   LibofxProcTransactionCallback _transactionCallback;
00034   LibofxProcStatementCallback _statementCallback;
00035 
00036   void * _statementData;
00037   void * _accountData;
00038   void * _transactionData;
00039   void * _securityData;
00040   void * _statusData;
00041 
00042   std::string _dtdDir;
00043 
00044 public:
00045   LibofxContext();
00046   ~LibofxContext();
00047 
00048   LibofxFileFormat currentFileType() const;
00049   void setCurrentFileType(LibofxFileFormat t);
00050 
00051   const std::string &dtdDir() const
00052   {
00053     return _dtdDir;
00054   };
00055   void setDtdDir(const std::string &s)
00056   {
00057     _dtdDir = s;
00058   };
00059 
00060   int statementCallback(const struct OfxStatementData data);
00061   int accountCallback(const struct OfxAccountData data);
00062   int transactionCallback(const struct OfxTransactionData data);
00063   int securityCallback(const struct OfxSecurityData data);
00064   int statusCallback(const struct OfxStatusData data);
00065 
00066   void setStatusCallback(LibofxProcStatusCallback cb, void *user_data);
00067   void setAccountCallback(LibofxProcAccountCallback cb, void *user_data);
00068   void setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data);
00069   void setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data);
00070   void setStatementCallback(LibofxProcStatementCallback cb, void *user_data);
00071 
00072 
00073 };//End class LibofxContext
00074 
00075 
00076 
00077 
00078 #endif
libofx-0.9.4/doc/html/inc_2libofx_8h.html0000644000175000017500000033400411553133250015126 00000000000000 LibOFX: libofx.h File Reference

libofx.h File Reference

Main header file containing the LibOfx API. More...

Go to the source code of this file.

Data Structures

struct  LibofxFileFormatInfo
struct  OfxStatusData
 An abstraction of an OFX STATUS element. More...
struct  OfxAccountData
 An abstraction of an account. More...
struct  OfxSecurityData
 An abstraction of a security, such as a stock, mutual fund, etc. More...
struct  OfxTransactionData
 An abstraction of a transaction in an account. More...
struct  OfxStatementData
 An abstraction of an account statement. More...
struct  OfxCurrency
 NOT YET SUPPORTED. More...
struct  OfxFiServiceInfo
 Information returned by the OFX Partner Server about a financial institution. More...
struct  OfxFiLogin
 Information sufficient to log into an financial institution. More...
struct  OfxPayment
struct  OfxPayee

Defines

#define LIBOFX_MAJOR_VERSION   0
#define LIBOFX_MINOR_VERSION   9
#define LIBOFX_MICRO_VERSION   4
#define LIBOFX_BUILD_VERSION   0
#define LIBOFX_VERSION_RELEASE_STRING   "0.9.4"
#define true   1
#define false   0
#define OFX_ELEMENT_NAME_LENGTH   100
#define OFX_SVRTID2_LENGTH   (36 + 1)
#define OFX_CHECK_NUMBER_LENGTH   (12 + 1)
#define OFX_REFERENCE_NUMBER_LENGTH   (32 + 1)
#define OFX_FITID_LENGTH   (255 + 1)
#define OFX_TOKEN2_LENGTH   (36 + 1)
#define OFX_MEMO_LENGTH   (255 + 1)
#define OFX_MEMO2_LENGTH   (390 + 1)
#define OFX_BALANCE_NAME_LENGTH   (32 + 1)
#define OFX_BALANCE_DESCRIPTION_LENGTH   (80 + 1)
#define OFX_CURRENCY_LENGTH   (3 + 1)
#define OFX_BANKID_LENGTH   (9 + 1)
#define OFX_BRANCHID_LENGTH   (22 + 1)
#define OFX_ACCTID_LENGTH   (22 + 1)
#define OFX_ACCTKEY_LENGTH   (22 + 1)
#define OFX_BROKERID_LENGTH   (22 + 1)
#define OFX_ACCOUNT_ID_LENGTH   (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1)
#define OFX_ACCOUNT_NAME_LENGTH   255
#define OFX_MARKETING_INFO_LENGTH   (360 + 1)
#define OFX_TRANSACTION_NAME_LENGTH   (32 + 1)
#define OFX_UNIQUE_ID_LENGTH   (32 + 1)
#define OFX_UNIQUE_ID_TYPE_LENGTH   (10 + 1)
#define OFX_SECNAME_LENGTH   (32 + 1)
#define OFX_TICKER_LENGTH   (32 + 1)
#define OFX_ORG_LENGTH   (32 + 1)
#define OFX_FID_LENGTH   (32 + 1)
#define OFX_USERID_LENGTH   (32 + 1)
#define OFX_USERPASS_LENGTH   (32 + 1)
#define OFX_URL_LENGTH   (500 + 1)
#define OFX_APPID_LENGTH   (32)
#define OFX_APPVER_LENGTH   (32)
#define OFX_HEADERVERSION_LENGTH   (32)

Typedefs

typedef void * LibofxContextPtr
typedef int(* LibofxProcStatusCallback )(const struct OfxStatusData data, void *status_data)
 The callback function for the OfxStatusData stucture.
typedef int(* LibofxProcAccountCallback )(const struct OfxAccountData data, void *account_data)
 The callback function for the OfxAccountData stucture.
typedef int(* LibofxProcSecurityCallback )(const struct OfxSecurityData data, void *security_data)
 The callback function for the OfxSecurityData stucture.
typedef int(* LibofxProcTransactionCallback )(const struct OfxTransactionData data, void *transaction_data)
 The callback function for the OfxTransactionData stucture.
typedef int(* LibofxProcStatementCallback )(const struct OfxStatementData data, void *statement_data)
 The callback function for the OfxStatementData stucture.

Enumerations

enum  LibofxFileFormat {
  AUTODETECT, OFX, OFC, QIF,
  UNKNOWN, LAST, AUTODETECT, OFX,
  OFC, QIF, UNKNOWN, LAST
}
enum  TransactionType {
  OFX_CREDIT, OFX_DEBIT, OFX_INT, OFX_DIV,
  OFX_FEE, OFX_SRVCHG, OFX_DEP, OFX_ATM,
  OFX_POS, OFX_XFER, OFX_CHECK, OFX_PAYMENT,
  OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT, OFX_REPEATPMT,
  OFX_OTHER, OFX_CREDIT, OFX_DEBIT, OFX_INT,
  OFX_DIV, OFX_FEE, OFX_SRVCHG, OFX_DEP,
  OFX_ATM, OFX_POS, OFX_XFER, OFX_CHECK,
  OFX_PAYMENT, OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT,
  OFX_REPEATPMT, OFX_OTHER
}
enum  InvTransactionType {
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER,
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER
}
enum  FiIdCorrectionAction { DELETE, REPLACE, DELETE, REPLACE }

Functions

LibofxContextPtr libofx_get_new_context ()
 Initialise the library and return a new context.
int libofx_free_context (LibofxContextPtr)
 Free all ressources used by this context.
void libofx_set_dtd_dir (LibofxContextPtr libofx_context, const char *s)
enum LibofxFileFormat libofx_get_file_format_from_str (const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
 libofx_get_file_type returns a proper enum from a file type string.
const char * libofx_get_file_format_description (const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
 get_file_format_description returns a string description of a LibofxFileType.
int libofx_proc_file (LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
 libofx_proc_file is the entry point of the library.
void ofx_set_status_cb (LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
void ofx_set_account_cb (LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
void ofx_set_security_cb (LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
void ofx_set_transaction_cb (LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
void ofx_set_statement_cb (LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
int libofx_proc_buffer (LibofxContextPtr ctx, const char *s, unsigned int size)

Variables

struct LibofxFileFormatInfo LibofxImportFormatList []
struct LibofxFileFormatInfo LibofxExportFormatList []

Creating OFX Files

This group deals with creating OFX files
#define OFX_AMOUNT_LENGTH   (32 + 1)
#define OFX_PAYACCT_LENGTH   (32 + 1)
#define OFX_STATE_LENGTH   (5 + 1)
#define OFX_POSTALCODE_LENGTH   (11 + 1)
#define OFX_NAME_LENGTH   (32 + 1)
char * libofx_request_statement (const struct OfxFiLogin *fi, const struct OfxAccountData *account, time_t date_from)
 Creates an OFX statement request in string form.
char * libofx_request_accountinfo (const struct OfxFiLogin *login)
 Creates an OFX account info (list) request in string form.
char * libofx_request_payment (const struct OfxFiLogin *login, const struct OfxAccountData *account, const struct OfxPayee *payee, const struct OfxPayment *payment)
char * libofx_request_payment_status (const struct OfxFiLogin *login, const char *transactionid)

Detailed Description

Main header file containing the LibOfx API.

This file should be included for all applications who use this API. This header file will work with both C and C++ programs. The entire API is made of the following structures and functions.

All of the following ofx_proc_* functions are callbacks (Except ofx_proc_file which is the entry point). They must be implemented by your program, but can be left empty if not needed. They are called each time the associated structure is filled by the library.

Important note: The variables associated with every data element have a _valid companion. Always check that data_valid == true before using. Not only will you ensure that the data is meaningfull, but also that pointers are valid and strings point to a null terminated string. Elements listed as mandatory are for information purpose only, do not trust the bank not to send you non-conforming data...

Definition in file inc/libofx.h.


Typedef Documentation

typedef int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)

The callback function for the OfxAccountData stucture.

The ofx_proc_account_cb event is always generated first, to allow the application to create accounts or ask the user to match an existing account before the ofx_proc_statement and ofx_proc_transaction event are received. An OfxAccountData is passed to this event.

Note however that this OfxAccountData structure will also be available as part of OfxStatementData structure passed to ofx_proc_statement event, as well as a pointer to an arbitrary data structure.

Definition at line 335 of file inc/libofx.h.

typedef int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)

The callback function for the OfxSecurityData stucture.

An ofx_proc_security_cb event is generated for any securities listed in the ofx file. It is generated after ofx_proc_statement but before ofx_proc_transaction. It is meant to be used to allow the client to create a new commodity or security (such as a new stock type). Please note however that this information is usually also available as part of each OfxtransactionData.

An OfxSecurityData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 400 of file inc/libofx.h.

typedef int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)

The callback function for the OfxStatementData stucture.

The ofx_proc_statement_cb event is sent after all ofx_proc_transaction events have been sent. An OfxStatementData is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 690 of file inc/libofx.h.

typedef int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)

The callback function for the OfxStatusData stucture.

An ofx_proc_status_cb event is sent everytime the server has generated a OFX STATUS element. As such, it could be received at any time(but not during other events). An OfxStatusData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 250 of file inc/libofx.h.

typedef int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)

The callback function for the OfxTransactionData stucture.

An ofx_proc_transaction_cb event is generated for every transaction in the ofx response, after ofx_proc_statement (and possibly ofx_proc_security is generated. An OfxTransactionData structure is passed to this event, as well as a pointer to an arbitrary data structure.

Definition at line 612 of file inc/libofx.h.


Enumeration Type Documentation

Enumerator:
DELETE 

The transaction with a fi_id matching fi_id_corrected should be deleted

REPLACE 

The transaction with a fi_id matching fi_id_corrected should be replaced with this one

DELETE 

The transaction with a fi_id matching fi_id_corrected should be deleted

REPLACE 

The transaction with a fi_id matching fi_id_corrected should be replaced with this one

Definition at line 447 of file inc/libofx.h.

Enumerator:
OFX_BUYDEBT 

Buy debt security

OFX_BUYMF 

Buy mutual fund

OFX_BUYOPT 

Buy option

OFX_BUYOTHER 

Buy other security type

OFX_BUYSTOCK 

Buy stock

OFX_CLOSUREOPT 

Close a position for an option

OFX_INCOME 

Investment income is realized as cash into the investment account

OFX_INVEXPENSE 

Misc investment expense that is associated with a specific security

OFX_JRNLFUND 

Journaling cash holdings between subaccounts within the same investment account

OFX_JRNLSEC 

Journaling security holdings between subaccounts within the same investment account

OFX_MARGININTEREST 

Margin interest expense

OFX_REINVEST 

Reinvestment of income

OFX_RETOFCAP 

Return of capital

OFX_SELLDEBT 

Sell debt security. Used when debt is sold, called, or reached maturity

OFX_SELLMF 

Sell mutual fund

OFX_SELLOPT 

Sell option

OFX_SELLOTHER 

Sell other type of security

OFX_SELLSTOCK 

Sell stock

OFX_SPLIT 

Stock or mutial fund split

OFX_TRANSFER 

Transfer holdings in and out of the investment account

OFX_BUYDEBT 

Buy debt security

OFX_BUYMF 

Buy mutual fund

OFX_BUYOPT 

Buy option

OFX_BUYOTHER 

Buy other security type

OFX_BUYSTOCK 

Buy stock

OFX_CLOSUREOPT 

Close a position for an option

OFX_INCOME 

Investment income is realized as cash into the investment account

OFX_INVEXPENSE 

Misc investment expense that is associated with a specific security

OFX_JRNLFUND 

Journaling cash holdings between subaccounts within the same investment account

OFX_JRNLSEC 

Journaling security holdings between subaccounts within the same investment account

OFX_MARGININTEREST 

Margin interest expense

OFX_REINVEST 

Reinvestment of income

OFX_RETOFCAP 

Return of capital

OFX_SELLDEBT 

Sell debt security. Used when debt is sold, called, or reached maturity

OFX_SELLMF 

Sell mutual fund

OFX_SELLOPT 

Sell option

OFX_SELLOTHER 

Sell other type of security

OFX_SELLSTOCK 

Sell stock

OFX_SPLIT 

Stock or mutial fund split

OFX_TRANSFER 

Transfer holdings in and out of the investment account

Definition at line 423 of file inc/libofx.h.

List of possible file formats

Enumerator:
AUTODETECT 

Not really a file format, used to tell the library to try to autodetect the format

OFX 

Open Financial eXchange (OFX/QFX) file

OFC 

Microsoft Open Financial Connectivity (OFC)

QIF 

Intuit Quicken Interchange Format (QIF)

UNKNOWN 

Unknown file format

LAST 

Not a file format, meant as a loop breaking condition

AUTODETECT 

Not really a file format, used to tell the library to try to autodetect the format

OFX 

Open Financial eXchange (OFX/QFX) file

OFC 

Microsoft Open Financial Connectivity (OFC)

QIF 

Intuit Quicken Interchange Format (QIF)

UNKNOWN 

Unknown file format

LAST 

Not a file format, meant as a loop breaking condition

Definition at line 115 of file inc/libofx.h.

Enumerator:
OFX_CREDIT 

Generic credit

OFX_DEBIT 

Generic debit

OFX_INT 

Interest earned or paid (Note: Depends on signage of amount)

OFX_DIV 

Dividend

OFX_FEE 

FI fee

OFX_SRVCHG 

Service charge

OFX_DEP 

Deposit

OFX_ATM 

ATM debit or credit (Note: Depends on signage of amount)

OFX_POS 

Point of sale debit or credit (Note: Depends on signage of amount)

OFX_XFER 

Transfer

OFX_CHECK 

Check

OFX_PAYMENT 

Electronic payment

OFX_CASH 

Cash withdrawal

OFX_DIRECTDEP 

Direct deposit

OFX_DIRECTDEBIT 

Merchant initiated debit

OFX_REPEATPMT 

Repeating payment/standing order

OFX_OTHER 

Somer other type of transaction

OFX_CREDIT 

Generic credit

OFX_DEBIT 

Generic debit

OFX_INT 

Interest earned or paid (Note: Depends on signage of amount)

OFX_DIV 

Dividend

OFX_FEE 

FI fee

OFX_SRVCHG 

Service charge

OFX_DEP 

Deposit

OFX_ATM 

ATM debit or credit (Note: Depends on signage of amount)

OFX_POS 

Point of sale debit or credit (Note: Depends on signage of amount)

OFX_XFER 

Transfer

OFX_CHECK 

Check

OFX_PAYMENT 

Electronic payment

OFX_CASH 

Cash withdrawal

OFX_DIRECTDEP 

Direct deposit

OFX_DIRECTDEBIT 

Merchant initiated debit

OFX_REPEATPMT 

Repeating payment/standing order

OFX_OTHER 

Somer other type of transaction

Definition at line 402 of file inc/libofx.h.


Function Documentation

int libofx_free_context ( LibofxContextPtr  )

Free all ressources used by this context.

Returns:
0 if successfull.

Definition at line 158 of file context.cpp.

Referenced by libofx_free_context().

const char* libofx_get_file_format_description ( const struct LibofxFileFormatInfo  format_list[],
enum LibofxFileFormat  file_format 
)

get_file_format_description returns a string description of a LibofxFileType.

The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList

The file format which should match one of the formats in the list.

Returns:
null terminated string suitable for debugging output or user communication.

Definition at line 37 of file file_preproc.cpp.

Referenced by libofx_proc_file().

enum LibofxFileFormat libofx_get_file_format_from_str ( const struct LibofxFileFormatInfo  format_list[],
const char *  file_type_string 
)

libofx_get_file_type returns a proper enum from a file type string.

The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList

The string which contain the file format matching one of the format_name of the list.

Returns:
the file format, or UNKNOWN if the format wasn't recognised.

Definition at line 54 of file file_preproc.cpp.

Referenced by main().

LibofxContextPtr libofx_get_new_context ( )

Initialise the library and return a new context.

Returns:
the new context, to be used by the other functions.
Note:
: Actual object returned is LibofxContext *

Definition at line 153 of file context.cpp.

Referenced by libofx_get_new_context(), and main().

int libofx_proc_buffer ( LibofxContextPtr  ctx,
const char *  s,
unsigned int  size 
)

Parses the content of the given buffer.

Definition at line 326 of file ofx_preproc.cpp.

int libofx_proc_file ( LibofxContextPtr  libofx_context,
const char *  p_filename,
enum LibofxFileFormat  ftype 
)

libofx_proc_file is the entry point of the library.

libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.

Definition at line 67 of file file_preproc.cpp.

Referenced by main().

char* libofx_request_accountinfo ( const struct OfxFiLogin login)

Creates an OFX account info (list) request in string form.

Creates a string which should be passed to an OFX server. This string is an OFX request suitable to retrieve a list of accounts from the fi

Parameters:
fiIdentifies the financial institution and the user logging in.
Returns:
string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free.
char* libofx_request_statement ( const struct OfxFiLogin fi,
const struct OfxAccountData account,
time_t  date_from 
)

Creates an OFX statement request in string form.

Creates a string which should be passed to an OFX server. This string is an OFX request suitable to retrieve a statement for the account from the fi

Parameters:
fiIdentifies the financial institution and the user logging in.
accountIdenfities the account for which a statement is desired
Returns:
string pointer to the request. This is allocated via malloc(), and is the callers responsibility to free.
void ofx_set_account_cb ( LibofxContextPtr  ctx,
LibofxProcAccountCallback  cb,
void *  user_data 
)

Set the account callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 186 of file context.cpp.

Referenced by main(), and ofx_set_account_cb().

void ofx_set_security_cb ( LibofxContextPtr  ctx,
LibofxProcSecurityCallback  cb,
void *  user_data 
)

Set the security callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 195 of file context.cpp.

Referenced by main(), and ofx_set_security_cb().

void ofx_set_statement_cb ( LibofxContextPtr  ctx,
LibofxProcStatementCallback  cb,
void *  user_data 
)

Set the statement callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 213 of file context.cpp.

Referenced by main(), and ofx_set_statement_cb().

void ofx_set_status_cb ( LibofxContextPtr  ctx,
LibofxProcStatusCallback  cb,
void *  user_data 
)

Set the status callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 178 of file context.cpp.

Referenced by main(), and ofx_set_status_cb().

void ofx_set_transaction_cb ( LibofxContextPtr  ctx,
LibofxProcTransactionCallback  cb,
void *  user_data 
)

Set the transaction callback in the given context.

Parameters:
ctxcontext
cbcallback function
user_datauser data to be passed to the callback

Definition at line 204 of file context.cpp.

Referenced by main(), and ofx_set_transaction_cb().


Variable Documentation

struct LibofxFileFormatInfo LibofxExportFormatList[]
Initial value:
  {
    {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
    {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
  }

Definition at line 144 of file inc/libofx.h.

struct LibofxFileFormatInfo LibofxImportFormatList[]
Initial value:
  {
    {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"},
    {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"},
    {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"},
    {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
    {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
  }

Definition at line 135 of file inc/libofx.h.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__request__statement_8cpp.html0000644000175000017500000001216611553133250022672 00000000000000 LibOFX: ofx_request_statement.cpp File Reference

ofx_request_statement.cpp File Reference

Implementation of libofx_request_statement to create an OFX file containing a request for a statement. More...

Go to the source code of this file.

Functions

char * libofx_request_statement (const OfxFiLogin *login, const OfxAccountData *account, time_t date_from)
char * libofx_request_payment (const OfxFiLogin *login, const OfxAccountData *account, const OfxPayee *payee, const OfxPayment *payment)
char * libofx_request_payment_status (const struct OfxFiLogin *login, const char *transactionid)

Detailed Description

Implementation of libofx_request_statement to create an OFX file containing a request for a statement.

Definition in file fx-0.9.4/lib/ofx_request_statement.cpp.

libofx-0.9.4/doc/html/classOfxRequest.html0000644000175000017500000004037311553133250015467 00000000000000 LibOFX: OfxRequest Class Reference

OfxRequest Class Reference

A generic request. More...

Inheritance diagram for OfxRequest:
OfxAggregate OfxAggregate OfxAccountInfoRequest OfxAccountInfoRequest OfxPaymentRequest OfxPaymentRequest OfxStatementRequest OfxStatementRequest

Public Member Functions

 OfxRequest (const OfxFiLogin &fi)
OfxAggregate SignOnRequest (void) const
OfxAggregate RequestMessage (const string &msgtype, const string &trntype, const OfxAggregate &aggregate) const
 OfxRequest (const OfxFiLogin &fi)
OfxAggregate SignOnRequest (void) const
OfxAggregate RequestMessage (const string &msgtype, const string &trntype, const OfxAggregate &aggregate) const

Protected Attributes

OfxFiLogin m_login

Detailed Description

A generic request.

This is an entire OFX aggregate, with all subordinate aggregates needed to log onto the OFX server of a single financial institution and process a request. The details of the particular request are up to subclasses of this one.

Definition at line 36 of file ofx_request.hh.


Constructor & Destructor Documentation

OfxRequest::OfxRequest ( const OfxFiLogin fi) [inline]

Creates the generic request aggregate.

Parameters:
fiThe information needed to log on user into one financial institution

Definition at line 45 of file ofx_request.hh.

OfxRequest::OfxRequest ( const OfxFiLogin fi) [inline]

Creates the generic request aggregate.

Parameters:
fiThe information needed to log on user into one financial institution

Definition at line 45 of file fx-0.9.4/lib/ofx_request.hh.


Member Function Documentation

OfxAggregate OfxRequest::RequestMessage ( const string &  msgtype,
const string &  trntype,
const OfxAggregate aggregate 
) const

Creates a message aggregate

Parameters:
msgtypeThe type of message. This will be prepended to "MSGSRQV1" to become the tagname of the overall aggregate
trntypeThe type of transactions being requested. This will be prepended to "TRNRQ" to become the tagname of the subordinate aggregate.
aggregateThe actual contents of the message, which will be a sub aggregate of the xxxTRNRQ aggregate.
Returns:
The message aggregate created

Definition at line 112 of file ofx_request.cpp.

Referenced by OfxStatementRequest::BankStatementRequest(), OfxStatementRequest::CreditCardStatementRequest(), OfxStatementRequest::InvestmentStatementRequest(), OfxAccountInfoRequest::OfxAccountInfoRequest(), and OfxPaymentRequest::OfxPaymentRequest().

OfxAggregate OfxRequest::RequestMessage ( const string &  msgtype,
const string &  trntype,
const OfxAggregate aggregate 
) const

Creates a message aggregate

Parameters:
msgtypeThe type of message. This will be prepended to "MSGSRQV1" to become the tagname of the overall aggregate
trntypeThe type of transactions being requested. This will be prepended to "TRNRQ" to become the tagname of the subordinate aggregate.
aggregateThe actual contents of the message, which will be a sub aggregate of the xxxTRNRQ aggregate.
Returns:
The message aggregate created
OfxAggregate OfxRequest::SignOnRequest ( void  ) const

Creates a signon request aggregate, <SIGNONMSGSRQV1> & <SONRQ>, sufficient to log this user into this financial institution.

Returns:
The request aggregate created
OfxAggregate OfxRequest::SignOnRequest ( void  ) const

Creates a signon request aggregate, <SIGNONMSGSRQV1> & <SONRQ>, sufficient to log this user into this financial institution.

Returns:
The request aggregate created

Definition at line 84 of file ofx_request.cpp.

Referenced by OfxAccountInfoRequest::OfxAccountInfoRequest(), OfxPaymentRequest::OfxPaymentRequest(), and OfxStatementRequest::OfxStatementRequest().


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/classtree_1_1fixed__depth__iterator.html0000644000175000017500000003634611553133250021401 00000000000000 LibOFX: tree< T, tree_node_allocator >::fixed_depth_iterator Class Reference

tree< T, tree_node_allocator >::fixed_depth_iterator Class Reference

Iterator which traverses only the nodes at a given depth from the root. More...

Inheritance diagram for tree< T, tree_node_allocator >::fixed_depth_iterator:
tree< T, tree_node_allocator >::iterator_base tree< T, tree_node_allocator >::iterator_base

Public Member Functions

 fixed_depth_iterator (tree_node *)
 fixed_depth_iterator (const iterator_base &)
 fixed_depth_iterator (const sibling_iterator &)
 fixed_depth_iterator (const fixed_depth_iterator &)
bool operator== (const fixed_depth_iterator &) const
bool operator!= (const fixed_depth_iterator &) const
fixed_depth_iteratoroperator++ ()
fixed_depth_iteratoroperator-- ()
fixed_depth_iterator operator++ (int)
fixed_depth_iterator operator-- (int)
fixed_depth_iteratoroperator+= (unsigned int)
fixed_depth_iteratoroperator-= (unsigned int)
 fixed_depth_iterator (tree_node *)
 fixed_depth_iterator (const iterator_base &)
 fixed_depth_iterator (const sibling_iterator &)
 fixed_depth_iterator (const fixed_depth_iterator &)
bool operator== (const fixed_depth_iterator &) const
bool operator!= (const fixed_depth_iterator &) const
fixed_depth_iteratoroperator++ ()
fixed_depth_iteratoroperator-- ()
fixed_depth_iterator operator++ (int)
fixed_depth_iterator operator-- (int)
fixed_depth_iteratoroperator+= (unsigned int)
fixed_depth_iteratoroperator-= (unsigned int)

Data Fields

tree_nodefirst_parent_

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::fixed_depth_iterator

Iterator which traverses only the nodes at a given depth from the root.

Definition at line 205 of file tree.hh.


The documentation for this class was generated from the following files:
libofx-0.9.4/doc/html/ofx__preproc_8hh_source.html0000644000175000017500000001377611553133250017157 00000000000000 LibOFX: ofx_preproc.hh Source File

ofx_preproc.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_preproc.h
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00012 /***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 #ifndef OFX_PREPROC_H
00021 #define OFX_PREPROC_H
00022 
00023 #include "context.hh"
00024 
00025 #define OPENSPDCL_FILENAME "opensp.dcl"
00026 #define OFX160DTD_FILENAME "ofx160.dtd"
00027 #define OFCDTD_FILENAME "ofc.dtd"
00028 
00030 string sanitize_proprietary_tags(string input_string);
00032 string find_dtd(LibofxContextPtr ctx, string dtd_filename);
00039 int ofx_proc_file(LibofxContextPtr libofx_context, const char *);
00040 
00041 #endif
libofx-0.9.4/doc/html/ofx__container__transaction_8cpp.html0000644000175000017500000001042211553133250021017 00000000000000 LibOFX: ofx_container_transaction.cpp File Reference
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__container__security_8cpp.html0000644000175000017500000000751511553133250023031 00000000000000 LibOFX: ofx_container_security.cpp File Reference

ofx_container_security.cpp File Reference

Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc.

Definition in file fx-0.9.4/lib/ofx_container_security.cpp.

libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__utilities_8cpp_source.html0000644000175000017500000006415111553133250022353 00000000000000 LibOFX: ofx_utilities.cpp Source File

ofx_utilities.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_util.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006  ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #include <config.h>
00019 #include <iostream>
00020 #include <assert.h>
00021 
00022 #include "ParserEventGeneratorKit.h"
00023 #include "SGMLApplication.h"
00024 #include <ctime>
00025 #include <cstdlib>
00026 #include <string>
00027 #include <locale.h>
00028 #include "messages.hh"
00029 #include "ofx_utilities.hh"
00030 
00031 #ifdef OS_WIN32
00032 # define DIRSEP "\\"
00033 #else
00034 # define DIRSEP "/"
00035 #endif
00036 
00037 
00038 using namespace std;
00042 /*ostream &operator<<(ostream &os, SGMLApplication::CharString s)
00043   {
00044   for (size_t i = 0; i < s.len; i++)
00045   {
00046   os << ((char *)(s.ptr))[i*sizeof(SGMLApplication::Char)];
00047   }
00048   return os;
00049   }*/
00050 
00051 /*wostream &operator<<(wostream &os, SGMLApplication::CharString s)
00052   {
00053   for (size_t i = 0; i < s.len; i++)
00054   {//cout<<i;
00055   os << wchar_t(s.ptr[i*MULTIPLY4]);
00056   }
00057   return os;
00058   }            */
00059 
00060 /*wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest)
00061   {
00062   size_t i;
00063   for (i = 0; i < source.len; i++)
00064   {
00065   dest[i]+=wchar_t(source.ptr[i*sizeof(SGMLApplication::Char)*(sizeof(char)/sizeof(wchar_t))]);
00066   }
00067   return dest;
00068   }*/
00069 
00070 string CharStringtostring(const SGMLApplication::CharString source, string &dest)
00071 {
00072   size_t i;
00073   dest.assign("");//Empty the provided string
00074   //  cout<<"Length: "<<source.len<<"sizeof(Char)"<<sizeof(SGMLApplication::Char)<<endl;
00075   for (i = 0; i < source.len; i++)
00076   {
00077     dest += (char)(((source.ptr)[i]));
00078     //    cout<<i<<" "<<(char)(((source.ptr)[i]))<<endl;
00079   }
00080   return dest;
00081 }
00082 
00083 string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest)
00084 {
00085   size_t i;
00086   for (i = 0; i < source.len; i++)
00087   {
00088     dest += (char)(((source.ptr)[i]));
00089   }
00090   return dest;
00091 }
00092 
00108 time_t ofxdate_to_time_t(const string ofxdate)
00109 {
00110   struct tm time;
00111   double local_offset; /* in seconds */
00112   float ofx_gmt_offset; /* in fractional hours */
00113   char timezone[4]; /* Original timezone: the library does not expose this value*/
00114   char exact_time_specified = false;
00115   char time_zone_specified = false;
00116   string ofxdate_whole;
00117   time_t temptime;
00118 
00119   time.tm_isdst = daylight; // initialize dst setting
00120   std::time(&temptime);
00121   local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight);
00122 
00123   if (ofxdate.size() != 0)
00124   {
00125         ofxdate_whole = ofxdate.substr(0,ofxdate.find_first_not_of("0123456789"));
00126     if (ofxdate_whole.size()>=8)
00127     {
00128       time.tm_year = atoi(ofxdate_whole.substr(0, 4).c_str()) - 1900;
00129       time.tm_mon = atoi(ofxdate_whole.substr(4, 2).c_str()) - 1;
00130       time.tm_mday = atoi(ofxdate_whole.substr(6, 2).c_str());
00131 
00132       if (ofxdate_whole.size() > 8)
00133       {
00134         if (ofxdate_whole.size() == 14)
00135         {
00136         /* if exact time is specified */
00137         exact_time_specified = true;
00138         time.tm_hour = atoi(ofxdate_whole.substr(8, 2).c_str());
00139         time.tm_min = atoi(ofxdate_whole.substr(10, 2).c_str());
00140         time.tm_sec = atoi(ofxdate_whole.substr(12, 2).c_str());
00141         }
00142         else
00143         {
00144                 message_out(WARNING, "ofxdate_to_time_t():  Successfully parsed date part, but unable to parse time part of string " + ofxdate_whole + ". It is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!");
00145         }
00146       }
00147 
00148     }
00149     else
00150     {
00151           /* Catch invalid string format */
00152           message_out(ERROR, "ofxdate_to_time_t():  Unable to convert time, string " + ofxdate + " is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!");
00153           return mktime(&time);
00154     }
00155 
00156 
00157     /* Check if the timezone has been specified */
00158     string::size_type startidx = ofxdate.find("[");
00159     string::size_type endidx;
00160     if (startidx != string::npos)
00161     {
00162       /* Time zone was specified */
00163       time_zone_specified = true;
00164       startidx++;
00165       endidx = ofxdate.find(":", startidx) - 1;
00166       ofx_gmt_offset = atof(ofxdate.substr(startidx, (endidx - startidx) + 1).c_str());
00167       startidx = endidx + 2;
00168       strncpy(timezone, ofxdate.substr(startidx, 3).c_str(), 4);
00169     }
00170     else
00171     {
00172       /* Time zone was not specified, assume GMT (provisionnaly) in case exact time is specified */
00173       ofx_gmt_offset = 0;
00174       strcpy(timezone, "GMT");
00175     }
00176 
00177     if (time_zone_specified == true)
00178     {
00179       /* If the timezone is specified always correct the timezone */
00180       /* If the timezone is not specified, but the exact time is, correct the timezone, assuming GMT following the spec */
00181       /* Correct the time for the timezone */
00182       time.tm_sec = time.tm_sec + (int)(local_offset - (ofx_gmt_offset * 60 * 60)); //Convert from fractionnal hours to seconds
00183     }
00184     else if (exact_time_specified == false)
00185     {
00186       /*Time zone data missing and exact time not specified, diverge from the OFX spec ans assume 11h59 local time */
00187       time.tm_hour = 11;
00188       time.tm_min = 59;
00189       time.tm_sec = 0;
00190     }
00191     return mktime(&time);
00192   }
00193   else
00194   {
00195     message_out(ERROR, "ofxdate_to_time_t():  Unable to convert time, string is 0 length!");
00196   }
00197   return mktime(&time);
00198 }
00199 
00204 double ofxamount_to_double(const string ofxamount)
00205 {
00206   //Replace commas and decimal points for atof()
00207   string::size_type idx;
00208   string tmp = ofxamount;
00209 
00210   idx = tmp.find(',');
00211   if (idx == string::npos)
00212   {
00213     idx = tmp.find('.');
00214   }
00215 
00216   if (idx != string::npos)
00217   {
00218     tmp.replace(idx, 1, 1, ((localeconv())->decimal_point)[0]);
00219   }
00220 
00221   return atof(tmp.c_str());
00222 }
00223 
00227 string strip_whitespace(const string para_string)
00228 {
00229   size_t index;
00230   size_t i;
00231   string temp_string = para_string;
00232   const char *whitespace = " \b\f\n\r\t\v";
00233   const char *abnormal_whitespace = "\b\f\n\r\t\v";//backspace,formfeed,newline,cariage return, horizontal and vertical tabs
00234   message_out(DEBUG4, "strip_whitespace() Before: |" + temp_string + "|");
00235   for (i = 0; i <= temp_string.size() && temp_string.find_first_of(whitespace, i) == i && temp_string.find_first_of(whitespace, i) != string::npos; i++);
00236   temp_string.erase(0, i); //Strip leading whitespace
00237   for (i = temp_string.size() - 1; (i >= 0) && (temp_string.find_last_of(whitespace, i) == i) && (temp_string.find_last_of(whitespace, i) != string::npos); i--);
00238   temp_string.erase(i + 1, temp_string.size() - (i + 1)); //Strip trailing whitespace
00239 
00240   while ((index = temp_string.find_first_of(abnormal_whitespace)) != string::npos)
00241   {
00242     temp_string.erase(index, 1); //Strip leading whitespace
00243   };
00244 
00245   message_out(DEBUG4, "strip_whitespace() After:  |" + temp_string + "|");
00246 
00247   return temp_string;
00248 }
00249 
00250 
00251 std::string get_tmp_dir()
00252 {
00253   // Tries to mimic the behaviour of
00254   // http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Utility-Functions.html#g-get-tmp-dir
00255   char *var;
00256   var = getenv("TMPDIR");
00257   if (var) return var;
00258   var = getenv("TMP");
00259   if (var) return var;
00260   var = getenv("TEMP");
00261   if (var) return var;
00262 #ifdef OS_WIN32
00263   return "C:\\";
00264 #else
00265   return "/tmp";
00266 #endif
00267 }
00268 
00269 int mkTempFileName(const char *tmpl, char *buffer, unsigned int size)
00270 {
00271 
00272   std::string tmp_dir = get_tmp_dir();
00273 
00274   strncpy(buffer, tmp_dir.c_str(), size);
00275   assert((strlen(buffer) + strlen(tmpl) + 2) < size);
00276   strcat(buffer, DIRSEP);
00277   strcat(buffer, tmpl);
00278   return 0;
00279 }
00280 
00281 
00282 
libofx-0.9.4/doc/html/ofx2qif_8c.html0000644000175000017500000001442011553133250014276 00000000000000 LibOFX: ofx2qif.c File Reference

ofx2qif.c File Reference

Code for ofx2qif utility. C example code. More...

Go to the source code of this file.

Defines

#define QIF_FILE_MAX_SIZE   256000

Functions

int ofx_proc_transaction_cb (const struct OfxTransactionData data, void *transaction_data)
int ofx_proc_statement_cb (const struct OfxStatementData data, void *statement_data)
int ofx_proc_account_cb (const struct OfxAccountData data, void *account_data)
int main (int argc, char *argv[])

Detailed Description

Code for ofx2qif utility. C example code.

ofx2qif is a OFX "file" to QIF (Quicken Interchange Format) converter. It was written as a second code example, and as a way for LibOFX to immediately provide something usefull, and to give people a reason to try the library. It is not recommended that financial software use the output of this utility for OFX support. The QIF file format is very primitive, and much information is lost. The utility curently supports every tansaction tags of the QIF format except the address lines, and supports many of the !Account tags. It should generate QIF files that will import sucesfully in just about every software with QIF support.

I do not plan on improving working this utility much further, however be I would be more than happy to accept contributions. If you are interested in hacking on ofx2qif, links to QIF documentation are available on the LibOFX home page.

ofx2qif is meant to be the C code example and demo of the library. It uses many of the functions and structures of the LibOFX API. Note that unlike ofxdump, all error output is disabled by default.

usage: ofx2qif path_to_ofx_file/ofx_filename > output_filename.qif

Definition in file ofx2qif.c.

libofx-0.9.4/doc/html/nodeparser_8h_source.html0000644000175000017500000001534411553133250016455 00000000000000 LibOFX: nodeparser.h Source File

nodeparser.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                              nodeparser.cpp 
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef NODEPARSER_H
00021 #define NODEPARSER_H
00022 
00023 #include <string>
00024 #include <vector>
00025 #include <libxml++/libxml++.h>
00026 
00027 class NodeParser: public xmlpp::Node::NodeList
00028 {
00029 public:
00030   NodeParser(void) {}
00031   NodeParser(const xmlpp::Node::NodeList&);
00032   NodeParser(const xmlpp::Node*);
00033   NodeParser(const xmlpp::DomParser&);
00034 
00035   NodeParser Path(const std::string& path) const;
00036   NodeParser Select(const std::string& key, const std::string& value) const;
00037   std::vector<std::string> Text(void) const;
00038 
00039 protected:
00040   static NodeParser Path(const xmlpp::Node* node,const std::string& path);
00041 };
00042 
00043 
00044 #endif // NODEPARSER_H
libofx-0.9.4/doc/html/nodeparser_8cpp_source.html0000644000175000017500000003227311553133250017010 00000000000000 LibOFX: nodeparser.cpp Source File

nodeparser.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                              nodeparser.cpp 
00003                              -------------------
00004     copyright            : (C) 2005 by Ace Jones
00005     email                : acejones@users.sourceforge.net
00006 ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #include "nodeparser.h"
00021 
00022 using std::string;
00023 using std::vector;
00024 
00025 NodeParser::NodeParser(const xmlpp::Node::NodeList& list): xmlpp::Node::NodeList(list)
00026 {
00027 }
00028 
00029 NodeParser::NodeParser(const xmlpp::Node* node)
00030 {
00031   push_back(const_cast<xmlpp::Node*>(node));
00032 }
00033 
00034 NodeParser::NodeParser(const xmlpp::DomParser& parser)
00035 {
00036   xmlpp::Node* node = parser.get_document()->get_root_node();
00037   push_back(const_cast<xmlpp::Node*>(node));
00038 }
00039 
00040 NodeParser NodeParser::Path(const xmlpp::Node* node,const std::string& path)
00041 {
00042   //std::cout << __PRETTY_FUNCTION__ << std::endl;
00043 
00044   NodeParser result;
00045   
00046   // split path string into the 1st level, and the rest
00047   std::string key = path;
00048   std::string remainder;
00049   std::string::size_type token_pos = path.find('/');
00050   if ( token_pos != std::string::npos )
00051   {
00052     key = path.substr(0, token_pos );
00053     remainder = path.substr( token_pos + 1 );
00054   }
00055 
00056   // find the first level nodes that match
00057   xmlpp::Node::NodeList list = node->get_children();
00058   for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
00059   {
00060     if ( (*iter)->get_name() == key )
00061     {
00062       // if there is still some path left, ask for the rest of the path from those nodes.
00063       if ( remainder.length() )
00064       {
00065         NodeParser remain_list = NodeParser(*iter).Path(remainder);
00066         result.splice(result.end(),remain_list);
00067       }
00068       
00069       // otherwise add the node to the result list.
00070       else
00071         result.push_back(*iter);
00072     }
00073   }
00074   
00075   return result;
00076 }
00077 
00078 NodeParser NodeParser::Path(const std::string& path) const
00079 {
00080   //std::cout << __PRETTY_FUNCTION__ << std::endl;
00081   NodeParser result;
00082   
00083   for(const_iterator iter = begin(); iter != end(); ++iter)
00084   {
00085     NodeParser iter_list = Path(*iter,path);
00086     result.splice(result.end(),iter_list);
00087   }
00088 
00089   return result;
00090 }
00091 
00092 NodeParser NodeParser::Select(const std::string& key, const std::string& value) const
00093 {
00094   //std::cout << __PRETTY_FUNCTION__ << std::endl;
00095   NodeParser result;
00096   for(const_iterator iter = begin(); iter != end(); ++iter)
00097   {
00098     xmlpp::Node::NodeList list = (*iter)->get_children();
00099     for(xmlpp::Node::NodeList::const_iterator iter3 = list.begin(); iter3 != list.end(); ++iter3)
00100     {
00101       if ( (*iter3)->get_name() == key )
00102       {
00103         xmlpp::Node::NodeList list = (*iter3)->get_children();
00104         for(xmlpp::Node::NodeList::const_iterator iter4 = list.begin(); iter4 != list.end(); ++iter4)
00105         {
00106           const xmlpp::TextNode* nodeText = dynamic_cast<const xmlpp::TextNode*>(*iter4);
00107           if ( nodeText && nodeText->get_content() == value )
00108               result.push_back(*iter);
00109             break;
00110         }
00111       }
00112     }
00113   }
00114   return result;
00115 }
00116 
00117 vector<string> NodeParser::Text(void) const
00118 {
00119   vector<string> result;
00120   
00121   // Go through the list of nodes
00122   for(xmlpp::Node::NodeList::const_iterator iter = begin(); iter != end(); ++iter)
00123   {
00124     // Find the text child node, and print that
00125     xmlpp::Node::NodeList list = (*iter)->get_children();
00126     for(xmlpp::Node::NodeList::const_iterator iter2 = list.begin(); iter2 != list.end(); ++iter2)
00127     {
00128       const xmlpp::TextNode* nodeText = dynamic_cast<const xmlpp::TextNode*>(*iter2);
00129       if ( nodeText )
00130       {
00131         result.push_back(nodeText->get_content());
00132       }
00133     }
00134   }
00135   if ( result.empty() )
00136     result.push_back(string());
00137   return result;
00138 }
00139 
00140 // vim:cin:si:ai:et:ts=2:sw=2:
libofx-0.9.4/doc/html/ftv2node.png0000644000175000017500000000012211553133251013670 00000000000000‰PNG  IHDRɪ|IDATxíÝÁ¡ó§žÆEG–ë›ÂºIEND®B`‚libofx-0.9.4/doc/html/ofx__container__account_8cpp.html0000644000175000017500000000737011553133250020136 00000000000000 LibOFX: ofx_container_account.cpp File Reference

ofx_container_account.cpp File Reference

Implementation of OfxAccountContainer for bank, credit card and investment accounts. More...

Go to the source code of this file.

Variables

OfxMainContainerMainContainer

Detailed Description

Implementation of OfxAccountContainer for bank, credit card and investment accounts.

Definition in file ofx_container_account.cpp.

libofx-0.9.4/doc/html/hierarchy.html0000644000175000017500000001777711553133250014326 00000000000000 LibOFX: Class Hierarchy

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
libofx-0.9.4/doc/html/ofc__sgml_8hh_source.html0000644000175000017500000001212211553133250016402 00000000000000 LibOFX: ofc_sgml.hh Source File

ofc_sgml.hh

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_sgml.h
00003                              -------------------
00004     begin                : Tue Mar 19 2002
00005     copyright            : (C) 2002 by Benoit Gr�goire
00006     email                : benoitg@coeus.ca
00007  ***************************************************************************/
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef OFC_SGML_H
00020 #define OFC_SGML_H
00021 #include "context.hh"
00022 
00024 int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]);
00025 
00026 #endif
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2ofx__containers__misc_8cpp_source.html0000644000175000017500000006150111553133250023653 00000000000000 LibOFX: ofx_containers_misc.cpp Source File

ofx_containers_misc.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ofx_proc_rs.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Grégoire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025 
00026 #include <iostream>
00027 #include <stdlib.h>
00028 #include <string>
00029 #include "messages.hh"
00030 #include "libofx.h"
00031 #include "ofx_error_msg.hh"
00032 #include "ofx_utilities.hh"
00033 #include "ofx_containers.hh"
00034 
00035 extern OfxMainContainer * MainContainer;
00036 
00037 /***************************************************************************
00038  *                         OfxDummyContainer                               *
00039  ***************************************************************************/
00040 
00041 OfxDummyContainer::OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00042   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00043 {
00044   type = "DUMMY";
00045   message_out(INFO, "Created OfxDummyContainer to hold unsupported aggregate " + para_tag_identifier);
00046 }
00047 void OfxDummyContainer::add_attribute(const string identifier, const string value)
00048 {
00049   message_out(DEBUG, "OfxDummyContainer for " + tag_identifier + " ignored a " + identifier + " (" + value + ")");
00050 }
00051 
00052 /***************************************************************************
00053  *                         OfxPushUpContainer                              *
00054  ***************************************************************************/
00055 
00056 OfxPushUpContainer::OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00057   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00058 {
00059   type = "PUSHUP";
00060   message_out(DEBUG, "Created OfxPushUpContainer to hold aggregate " + tag_identifier);
00061 }
00062 void OfxPushUpContainer::add_attribute(const string identifier, const string value)
00063 {
00064   //message_out(DEBUG, "OfxPushUpContainer for "+tag_identifier+" will push up a "+identifier+" ("+value+") to a "+ parentcontainer->type + " container");
00065   parentcontainer->add_attribute(identifier, value);
00066 }
00067 
00068 /***************************************************************************
00069  *                         OfxStatusContainer                              *
00070  ***************************************************************************/
00071 
00072 OfxStatusContainer::OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00073   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00074 {
00075   memset(&data, 0, sizeof(data));
00076   type = "STATUS";
00077   if (parentcontainer != NULL)
00078   {
00079     strncpy(data.ofx_element_name, parentcontainer->tag_identifier.c_str(), OFX_ELEMENT_NAME_LENGTH);
00080     data.ofx_element_name_valid = true;
00081   }
00082 
00083 }
00084 OfxStatusContainer::~OfxStatusContainer()
00085 {
00086   message_out(DEBUG, "Entering the status's container's destructor");
00087 
00088   libofx_context->statusCallback(data);
00089 
00090   if ( data.server_message_valid )
00091     delete [] data.server_message;
00092 }
00093 
00094 void OfxStatusContainer::add_attribute(const string identifier, const string value)
00095 {
00096   ErrorMsg error_msg;
00097 
00098   if ( identifier == "CODE")
00099   {
00100     data.code = atoi(value.c_str());
00101     error_msg = find_error_msg(data.code);
00102     data.name = error_msg.name;//memory is already allocated
00103     data.description = error_msg.description;//memory is already allocated
00104     data.code_valid = true;
00105   }
00106   else if (identifier == "SEVERITY")
00107   {
00108     data.severity_valid = true;
00109     if (value == "INFO")
00110     {
00111       data.severity = OfxStatusData::INFO;
00112     }
00113     else if (value == "WARN")
00114     {
00115       data.severity = OfxStatusData::WARN;
00116     }
00117     else if (value == "ERROR")
00118     {
00119       data.severity = OfxStatusData::ERROR;
00120     }
00121     else
00122     {
00123       message_out(ERROR, "WRITEME: Unknown severity " + value + " inside a " + type + " container");
00124       data.severity_valid = false;
00125     }
00126   }
00127   else if ((identifier == "MESSAGE") || (identifier == "MESSAGE2"))
00128   {
00129     data.server_message = new char[value.length()+1];
00130     strcpy(data.server_message, value.c_str());
00131     data.server_message_valid = true;
00132   }
00133   else
00134   {
00135     /* Redirect unknown identifiers to the base class */
00136     OfxGenericContainer::add_attribute(identifier, value);
00137   }
00138 }
00139 
00140 
00141 
00142 /***************************************************************************
00143  * OfxBalanceContainer  (does not directly abstract a object in libofx.h)  *
00144  ***************************************************************************/
00145 
00146 OfxBalanceContainer::OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier):
00147   OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier)
00148 {
00149   amount_valid = false;
00150   date_valid = false;
00151   type = "BALANCE";
00152 }
00153 
00154 OfxBalanceContainer::~OfxBalanceContainer()
00155 {
00156   if (parentcontainer->type == "STATEMENT")
00157   {
00158     ((OfxStatementContainer*)parentcontainer)->add_balance(this);
00159   }
00160   else
00161   {
00162     message_out (ERROR, "I completed a " + type + " element, but I havent found a suitable parent to save it");
00163   }
00164 }
00165 void OfxBalanceContainer::add_attribute(const string identifier, const string value)
00166 {
00167   if (identifier == "BALAMT")
00168   {
00169     amount = ofxamount_to_double(value);
00170     amount_valid = true;
00171   }
00172   else if (identifier == "DTASOF")
00173   {
00174     date = ofxdate_to_time_t(value);
00175     date_valid = true;
00176   }
00177   else
00178   {
00179     /* Redirect unknown identifiers to the base class */
00180     OfxGenericContainer::add_attribute(identifier, value);
00181   }
00182 }
libofx-0.9.4/doc/html/fx-0_89_84_2lib_2messages_8cpp_source.html0000644000175000017500000005017411553133250021134 00000000000000 LibOFX: messages.cpp Source File

messages.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ofx_messages.cpp
00003                              -------------------
00004     copyright            : (C) 2002 by Benoit Gr�goire
00005     email                : benoitg@coeus.ca
00006 ***************************************************************************/
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 #include <iostream>
00019 #include <stdlib.h>
00020 #include <string>
00021 #include "ParserEventGeneratorKit.h"
00022 #include "ofx_utilities.hh"
00023 #include "messages.hh"
00024 
00025 SGMLApplication::OpenEntityPtr entity_ptr; 
00026 SGMLApplication::Position position; 
00028 volatile int ofx_PARSER_msg = false; 
00029 volatile int ofx_DEBUG_msg = false;
00030 volatile int ofx_DEBUG1_msg = false;
00031 volatile int ofx_DEBUG2_msg = false;
00032 volatile int ofx_DEBUG3_msg = false;
00033 volatile int ofx_DEBUG4_msg = false;
00034 volatile int ofx_DEBUG5_msg = false;
00035 volatile int ofx_STATUS_msg = false;
00036 volatile int ofx_INFO_msg = false;
00037 volatile int ofx_WARNING_msg = false;
00038 volatile int ofx_ERROR_msg = false;
00039 volatile int ofx_show_position = true;
00041 void show_line_number()
00042 {
00043   extern SGMLApplication::OpenEntityPtr entity_ptr;
00044   extern SGMLApplication::Position position;
00045 
00046 
00047   if ((ofx_show_position == true))
00048   {
00049     SGMLApplication::Location *location = new SGMLApplication::Location(entity_ptr, position);
00050     cerr << "(Above message occured on Line " << location->lineNumber << ", Column " << location->columnNumber << ")" << endl;
00051     delete location;
00052   }
00053 }
00054 
00058 int message_out(OfxMsgType error_type, const string message)
00059 {
00060 
00061 
00062   switch  (error_type)
00063   {
00064   case DEBUG :
00065     if (ofx_DEBUG_msg == true)
00066     {
00067       cerr << "LibOFX DEBUG: " << message << "\n";
00068       show_line_number();
00069     }
00070     break;
00071   case DEBUG1 :
00072     if (ofx_DEBUG1_msg == true)
00073     {
00074       cerr << "LibOFX DEBUG1: " << message << "\n";
00075       show_line_number();
00076     }
00077     break;
00078   case DEBUG2 :
00079     if (ofx_DEBUG2_msg == true)
00080     {
00081       cerr << "LibOFX DEBUG2: " << message << "\n";
00082       show_line_number();
00083     }
00084     break;
00085   case DEBUG3 :
00086     if (ofx_DEBUG3_msg == true)
00087     {
00088       cerr << "LibOFX DEBUG3: " << message << "\n";
00089       show_line_number();
00090     }
00091     break;
00092   case DEBUG4 :
00093     if (ofx_DEBUG4_msg == true)
00094     {
00095       cerr << "LibOFX DEBUG4: " << message << "\n";
00096       show_line_number();
00097     }
00098     break;
00099   case DEBUG5 :
00100     if (ofx_DEBUG5_msg == true)
00101     {
00102       cerr << "LibOFX DEBUG5: " << message << "\n";
00103       show_line_number();
00104     }
00105     break;
00106   case STATUS :
00107     if (ofx_STATUS_msg == true)
00108     {
00109       cerr << "LibOFX STATUS: " << message << "\n";
00110       show_line_number();
00111     }
00112     break;
00113   case INFO :
00114     if (ofx_INFO_msg == true)
00115     {
00116       cerr << "LibOFX INFO: " << message << "\n";
00117       show_line_number();
00118     }
00119     break;
00120   case WARNING :
00121     if (ofx_WARNING_msg == true)
00122     {
00123       cerr << "LibOFX WARNING: " << message << "\n";
00124       show_line_number();
00125     }
00126     break;
00127   case ERROR :
00128     if (ofx_ERROR_msg == true)
00129     {
00130       cerr << "LibOFX ERROR: " << message << "\n";
00131       show_line_number();
00132     }
00133     break;
00134   case PARSER :
00135     if (ofx_PARSER_msg == true)
00136     {
00137       cerr << "LibOFX PARSER: " << message << "\n";
00138       show_line_number();
00139     }
00140     break;
00141   default:
00142     cerr << "LibOFX UNKNOWN ERROR CLASS, This is a bug in LibOFX\n";
00143     show_line_number();
00144   }
00145 
00146   return 0;
00147 }
00148 
libofx-0.9.4/doc/ofx_sample_files/0000755000175000017500000000000011544727432014105 500000000000000libofx-0.9.4/doc/ofx_sample_files/ofx_spec201_stmtrs_example.xml0000644000175000017500000001013611544727432021730 00000000000000 0 INFO 19991029101003 ENG 19991029101003 19991029101003 NCH 1001 1001 0 INFO USD 121099999 999988 CHECKING 19991001 19991028 CHECK 19991004 -200.00 00002 1000 ATM 19991020 19991020 -300.00 00003 200.29 199910291120 200.29 199910291120 libofx-0.9.4/doc/ofx_sample_files/ofx_spec160_stmtrs_example.sgml0000755000175000017500000000673711544727432022115 00000000000000 0 INFO 19961029101003 ENG 19961029101003 19961029101003 1001 0 INFO USD 121099999 999988 CHECKING 19961001 19961028 CHECK 19961004 -200.00 00002 1000 ATM 19961020 19961020 -300.00 00003 200.29 199610291120 200.29 199610291120 libofx-0.9.4/doc/Makefile.am0000644000175000017500000000155311544727432012546 00000000000000SUBDIRS = docdir = ${prefix}/share/doc/libofx EXTRA_DIST = \ doxygen.cfg \ ofx_sample_files \ tag_striper_test.txt \ html all: doc: html/ html/: doxygen.cfg echo "doc: " && pwd && echo "distdir: " && echo $(distdir) rm -rf html/ refman.pdf $(DOXYGEN) doxygen.cfg # $(MAKE) -C latex/ # mv latex/refman.pdf ./refman.pdf dist-hook: maintainer-clean-local doc echo "dist-hook: " && pwd clean-local: echo "clean-local: " && pwd rm -rf latex/ rm -f *~ rm -f doxygen.log maintainer-clean-local: clean-local echo "maintainer-clean-local: " && pwd rm -rf html refman.pdf install-data-hook: $(mkinstalldirs) $(DESTDIR)$(docdir) mkdir -p html #Workaround to allow libofx-cvs user to install without doc. cp -rp html $(DESTDIR)$(docdir) uninstall-hook: chmod +w -R $(DESTDIR)${docdir}/html #Why chmod is needed is a mystery rm -rf $(DESTDIR)${docdir}/html libofx-0.9.4/doc/Makefile.in0000644000175000017500000004515211553123277012557 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = ${prefix}/share/doc/libofx dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = EXTRA_DIST = \ doxygen.cfg \ ofx_sample_files \ tag_striper_test.txt \ html 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-data-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-local ctags ctags-recursive dist-hook distclean \ 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-data-hook install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-hook all: doc: html/ html/: doxygen.cfg echo "doc: " && pwd && echo "distdir: " && echo $(distdir) rm -rf html/ refman.pdf $(DOXYGEN) doxygen.cfg # $(MAKE) -C latex/ # mv latex/refman.pdf ./refman.pdf dist-hook: maintainer-clean-local doc echo "dist-hook: " && pwd clean-local: echo "clean-local: " && pwd rm -rf latex/ rm -f *~ rm -f doxygen.log maintainer-clean-local: clean-local echo "maintainer-clean-local: " && pwd rm -rf html refman.pdf install-data-hook: $(mkinstalldirs) $(DESTDIR)$(docdir) mkdir -p html #Workaround to allow libofx-cvs user to install without doc. cp -rp html $(DESTDIR)$(docdir) uninstall-hook: chmod +w -R $(DESTDIR)${docdir}/html #Why chmod is needed is a mystery rm -rf $(DESTDIR)${docdir}/html # 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: libofx-0.9.4/m4/0000755000175000017500000000000011553134313010327 500000000000000libofx-0.9.4/m4/os.m40000644000175000017500000000575311544727432011156 00000000000000# $Id: os.m4,v 1.1 2007-10-27 11:28:08 aquamaniac Exp $ # (c) 2002 Martin Preuss # These functions guess your operation system AC_DEFUN([AQ_CHECK_OS],[ dnl IN: dnl - AC_CANONICAL_SYSTEM muste be called before dnl OUT: dnl Variables: dnl OSYSTEM: Short name of your system (subst) dnl OS_TYPE: either "posix" or "windows" (subst) dnl MAKE_DLL_TARGET: under windows this is set to "dll" (subst) dnl INSTALL_DLL_TARGET: under Windows this is set to "dll-install" (subst) dnl Defines: dnl OS_NAME: full name of your system dnl OS_SHORTNAME: short name of your system dnl Depending on your system one of the following is defined in addition: dnl OS_LINUX, OS_OPENBSD, OS_FREEBSD, OS_BEOS, OS_WIN32 # check for OS AC_MSG_CHECKING([host system type]) OSYSTEM="" OS_TYPE="" MAKE_DLL_TARGET="" INSTALL_DLL_TARGET="" AC_DEFINE_UNQUOTED(OS_NAME,"$host", [host system]) case "$host" in *-linux*) OSYSTEM="linux" AC_DEFINE(OS_LINUX,1,[if linux is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-solaris*) OSYSTEM="solaris" AC_DEFINE(OS_SOLARIS,1,[if Solaris is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-darwin*) OSYSTEM="osx" AC_DEFINE(OS_DARWIN,1,[if Apple Darwin is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-openbsd*) OSYSTEM="openbsd" AC_DEFINE(OS_OPENBSD,1,[if OpenBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-freebsd*) OSYSTEM="freebsd" AC_DEFINE(OS_FREEBSD,1,[if FreeBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-netbsd*) OSYSTEM="netbsd" AC_DEFINE(OS_NETBSD,1,[if NetBSD is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-beos*) OSYSTEM="beos" AC_DEFINE(OS_BEOS,1,[if BeOS is used]) AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) OS_TYPE="posix" ;; *-win32*) OSYSTEM="windows" AC_DEFINE(OS_WIN32,1,[if WIN32 is used]) OS_TYPE="windows" AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built]) MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-mingw32*) OSYSTEM="windows" AC_DEFINE(OS_WIN32,1,[if WIN32 is used]) OS_TYPE="windows" AC_DEFINE_UNQUOTED(BUILDING_DLL,1,[if DLL is to be built]) MAKE_DLL_TARGET="dll" INSTALL_DLL_TARGET="dll-install" ;; *-palmos*) OSYSTEM="palmos" AC_DEFINE(OS_PALMOS,1,[if PalmOS is used]) OS_TYPE="palmos" ;; *) AC_MSG_WARN([Sorry, but host $host is not supported. Please report if it works anyway. We will assume that your system is a posix system and continue.]) OSYSTEM="unknown" OS_TYPE="posix" AC_DEFINE(OS_POSIX,1,[if this is a POSIX system]) ;; esac AC_SUBST(OSYSTEM) AC_DEFINE_UNQUOTED(OS_SHORTNAME,"$OSYSTEM",[host system]) AC_SUBST(OS_TYPE) AC_DEFINE_UNQUOTED(OS_TYPE,"$OS_TYPE",[system type]) AC_SUBST(MAKE_DLL_TARGET) AC_SUBST(INSTALL_DLL_TARGET) AC_MSG_RESULT($OS_TYPE) ]) libofx-0.9.4/m4/Makefile.am0000644000175000017500000000002411544727432012311 00000000000000 EXTRA_DIST= os.m4 libofx-0.9.4/m4/Makefile.in0000644000175000017500000002454411553123277012334 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = os.m4 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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: .MAKE: install-am install-strip .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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am 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 # 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: libofx-0.9.4/config.h.in0000644000175000017500000001051711553123276011764 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* if DLL is to be built */ #undef BUILDING_DLL /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_EVENTGENERATOR_H /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Defined if libxml++ is available */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have a functional curl library. */ #undef HAVE_LIBCURL /* Defined if libxml++ is available */ #undef HAVE_LIBXMLPP /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_PARSEREVENTGENERATORKIT_H /* Define to 1 if you have the header file. */ #undef HAVE_SGMLAPPLICATION_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 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 /* Defined if libcurl supports AsynchDNS */ #undef LIBCURL_FEATURE_ASYNCHDNS /* Defined if libcurl supports IPv6 */ #undef LIBCURL_FEATURE_IPV6 /* Defined if libcurl supports KRB4 */ #undef LIBCURL_FEATURE_KRB4 /* Defined if libcurl supports libz */ #undef LIBCURL_FEATURE_LIBZ /* Defined if libcurl supports SSL */ #undef LIBCURL_FEATURE_SSL /* Defined if libcurl supports DICT */ #undef LIBCURL_PROTOCOL_DICT /* Defined if libcurl supports FILE */ #undef LIBCURL_PROTOCOL_FILE /* Defined if libcurl supports FTP */ #undef LIBCURL_PROTOCOL_FTP /* Defined if libcurl supports FTPS */ #undef LIBCURL_PROTOCOL_FTPS /* Defined if libcurl supports GOPHER */ #undef LIBCURL_PROTOCOL_GOPHER /* Defined if libcurl supports HTTP */ #undef LIBCURL_PROTOCOL_HTTP /* Defined if libcurl supports HTTPS */ #undef LIBCURL_PROTOCOL_HTTPS /* Defined if libcurl supports LDAP */ #undef LIBCURL_PROTOCOL_LDAP /* Defined if libcurl supports TELNET */ #undef LIBCURL_PROTOCOL_TELNET /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* if BeOS is used */ #undef OS_BEOS /* if Apple Darwin is used */ #undef OS_DARWIN /* if FreeBSD is used */ #undef OS_FREEBSD /* if linux is used */ #undef OS_LINUX /* host system */ #undef OS_NAME /* if NetBSD is used */ #undef OS_NETBSD /* if OpenBSD is used */ #undef OS_OPENBSD /* if PalmOS is used */ #undef OS_PALMOS /* if this is a POSIX system */ #undef OS_POSIX /* host system */ #undef OS_SHORTNAME /* if Solaris is used */ #undef OS_SOLARIS /* system type */ #undef OS_TYPE /* if WIN32 is used */ #undef OS_WIN32 /* 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 home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* SP_MULTI_BYTE value from when OpenSP was compiled */ #undef SP_MULTI_BYTE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define curl_free() as free() if our version of curl lacks curl_free. */ #undef curl_free libofx-0.9.4/aclocal.m40000644000175000017500000116640711553123276011614 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, [m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_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. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -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 Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac _LT_PROG_LTMAIN # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -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${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_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. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_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. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_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 <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { 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. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; 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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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 ;; sparc*-*solaris*) # 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 *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$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}\{0,1\} :&$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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # 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* | cegcc*) # 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 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` fi ;; 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 max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_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 <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_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* | cegcc*) 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="-ldld"], [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="-ldld"]) ]) ]) ]) ]) ]) ;; 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" wl=$lt_prog_compiler_wl 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_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 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_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 _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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}\{0,1\} :&$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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $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 .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_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 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_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 _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_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_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) 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" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) 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" 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' ;; aix[[4-9]]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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* | cegcc*) # 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}${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`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 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 ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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' ;; interix[[3-9]]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | 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' ;; 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=qnx 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='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_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="m4_if([$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 <<_LT_EOF 1>&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 _LT_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 _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_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 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_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])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 variants of GNU ld 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 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) 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|DragonFly)/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 ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; 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* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-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=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) 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 ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_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" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [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_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # 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]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; 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 # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $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 <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_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_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 -rf 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_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_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_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_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # 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_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_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_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_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # 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. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_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}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[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 # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&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. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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_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_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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_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_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_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' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_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_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_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* echo "$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_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl 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_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=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]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # 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 $as_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 $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_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_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_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) 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_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_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 "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_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} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_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_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([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. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= 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... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); 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 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=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]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=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]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # 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. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # 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. # m4_defun([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 IFS=$as_save_IFS 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 && continue 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_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_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=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_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=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # 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, 2004, 2005, 2006, 2008 # 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. # serial 9 # 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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # 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. # serial 10 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. 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 " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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. # serial 8 # 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 -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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. # serial 16 # 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. # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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. # serial 2 # 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, 2005, 2009 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. # serial 4 # 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 this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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 ]) # Copyright (C) 2003, 2004, 2005, 2006 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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. # serial 4 # _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], [m4_foreach_w([_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. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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. # serial 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/os.m4]) libofx-0.9.4/libofx.lsm0000644000175000017500000000070211553123351011726 00000000000000Begin3 Title: LibOFX Version: 0.9.4 Entered-date: Description: Keywords: OFX, OFX, Open Financial eXchange, Open Financial Connectivity Author: Benoit Grégoire Maintained-by: Benoit Grégoire Primary-site: Home-page: http://libofx.sourceforge.net/ Original-site: Platforms: Linux and other Unices, Windows Copying-policy: GNU Public License End libofx-0.9.4/dtd/0000755000175000017500000000000011553134313010562 500000000000000libofx-0.9.4/dtd/ofx160.dtd0000644000175000017500000042432411544727432012245 00000000000000 ]> libofx-0.9.4/dtd/opensp.dcl0000644000175000017500000000347211544727432012512 00000000000000 libofx-0.9.4/dtd/ofx201.dtd0000644000175000017500000042240211544727432012234 00000000000000 libofx-0.9.4/dtd/ofc.dtd0000644000175000017500000004625611544727432011775 00000000000000 ]> libofx-0.9.4/dtd/Makefile.am0000644000175000017500000000022011544727432012542 00000000000000docdir = ${LIBOFX_DTD_DIR} doc_DATA = opensp.dcl ofx160.dtd ofx201.dtd ofc.dtd EXTRA_DIST = \ opensp.dcl \ ofx160.dtd \ ofx201.dtd \ ofc.dtdlibofx-0.9.4/dtd/Makefile.in0000644000175000017500000003053311553123277012562 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = dtd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = ${LIBOFX_DTD_DIR} dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ doc_DATA = opensp.dcl ofx160.dtd ofx201.dtd ofc.dtd EXTRA_DIST = \ opensp.dcl \ ofx160.dtd \ ofx201.dtd \ ofc.dtd 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dtd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dtd/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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)$(docdir)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-docDATA .MAKE: install-am install-strip .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-docDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ 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-docDATA # 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: libofx-0.9.4/libofx.lsm.in0000644000175000017500000000073411553065540012345 00000000000000Begin3 Title: LibOFX Version: @LIBOFX_VERSION_RELEASE_STRING@ Entered-date: Description: Keywords: OFX, OFX, Open Financial eXchange, Open Financial Connectivity Author: Benoit Grégoire Maintained-by: Benoit Grégoire Primary-site: Home-page: http://libofx.sourceforge.net/ Original-site: Platforms: Linux and other Unices, Windows Copying-policy: GNU Public License End libofx-0.9.4/INSTALL0000644000175000017500000003633211500011217010754 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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 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. Running `configure' might take a while. 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, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. 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. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. 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=c99 CFLAGS=-g 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 can use 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 `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' 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. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common 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 option `--target=TYPE' 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 causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--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. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libofx-0.9.4/libcurl.m40000644000175000017500000002103011544727432011633 00000000000000# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], # [ACTION-IF-YES], [ACTION-IF-NO]) # ---------------------------------------------------------- # David Shaw Jun-21-2005 # # Checks for libcurl. DEFAULT-ACTION is the string yes or no to # specify whether to default to --with-libcurl or --without-libcurl. # If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the # minimum version of libcurl to accept. Pass the version as a regular # version number like 7.10.1. If not supplied, any version is # accepted. ACTION-IF-YES is a list of shell commands to run if # libcurl was successfully found and passed the various tests. # ACTION-IF-NO is a list of shell commands that are run otherwise. # Note that using --without-libcurl does run ACTION-IF-NO. # # This macro defines HAVE_LIBCURL if a working libcurl setup is found, # and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary values. # Other useful defines are LIBCURL_FEATURE_xxx where xxx are the # various features supported by libcurl, and LIBCURL_PROTOCOL_yyy # where yyy are the various protocols supported by libcurl. Both xxx # and yyy are capitalized. See the list of AH_TEMPLATEs at the top of # the macro for the complete list of possible defines. Shell # variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also # defined to 'yes' for those features and protocols that were found. # Note that xxx and yyy keep the same capitalization as in the # curl-config list (e.g. it's "HTTP" and not "http"). # # Users may override the detected values by doing something like: # LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure # # For the sake of sanity, this macro assumes that any libcurl that is # found is after version 7.7.2, the first version that included the # curl-config script. Note that it is very important for people # packaging binary versions of libcurl to include this script! # Without curl-config, we can only guess what protocols are available. AC_DEFUN([LIBCURL_CHECK_CONFIG], [ AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL]) AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4]) AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6]) AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz]) AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS]) AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP]) AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS]) AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP]) AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS]) AH_TEMPLATE([LIBCURL_PROTOCOL_GOPHER],[Defined if libcurl supports GOPHER]) AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE]) AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET]) AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP]) AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT]) AC_ARG_WITH(libcurl, AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]), [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])]) if test "$_libcurl_with" != "no" ; then AC_PROG_AWK _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'" _libcurl_try_link=yes if test -d "$_libcurl_with" ; then CPPFLAGS="${CPPFLAGS} -I$withval/include" LDFLAGS="${LDFLAGS} -L$withval/lib" fi AC_PATH_PROG([_libcurl_config],[curl-config]) if test x$_libcurl_config != "x" ; then AC_CACHE_CHECK([for the version of libcurl], [libcurl_cv_lib_curl_version], [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`]) _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse` _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse` if test $_libcurl_wanted -gt 0 ; then AC_CACHE_CHECK([for libcurl >= version $2], [libcurl_cv_lib_version_ok], [ if test $_libcurl_version -ge $_libcurl_wanted ; then libcurl_cv_lib_version_ok=yes else libcurl_cv_lib_version_ok=no fi ]) fi if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then if test x"$LIBCURL_CPPFLAGS" = "x" ; then LIBCURL_CPPFLAGS=`$_libcurl_config --cflags` fi if test x"$LIBCURL" = "x" ; then LIBCURL=`$_libcurl_config --libs` # This is so silly, but Apple actually has a bug in their # curl-config script. Fixed in Tiger, but there are still # lots of Panther installs around. case "${host}" in powerpc-apple-darwin7*) LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'` ;; esac fi # All curl-config scripts support --feature _libcurl_features=`$_libcurl_config --feature` # Is it modern enough to have --protocols? (7.12.4) if test $_libcurl_version -ge 461828 ; then _libcurl_protocols=`$_libcurl_config --protocols` fi else _libcurl_try_link=no fi unset _libcurl_wanted fi if test $_libcurl_try_link = yes ; then # we didn't find curl-config, so let's see if the user-supplied # link line (or failing that, "-lcurl") is enough. LIBCURL=${LIBCURL-"-lcurl"} AC_CACHE_CHECK([whether libcurl is usable], [libcurl_cv_lib_curl_usable], [ _libcurl_save_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS" _libcurl_save_libs=$LIBS LIBS="$LIBS $LIBCURL" AC_LINK_IFELSE(AC_LANG_PROGRAM([#include ],[ /* Try and use a few common options to force a failure if we are missing symbols or can't link. */ int x; curl_easy_setopt(NULL,CURLOPT_URL,NULL); x=CURL_ERROR_SIZE; x=CURLOPT_WRITEFUNCTION; x=CURLOPT_FILE; x=CURLOPT_ERRORBUFFER; x=CURLOPT_STDERR; x=CURLOPT_VERBOSE; ]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no) CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs unset _libcurl_save_cppflags unset _libcurl_save_libs ]) if test $libcurl_cv_lib_curl_usable = yes ; then # Does curl_free() exist in this version of libcurl? # If not, fake it with free() _libcurl_save_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS" _libcurl_save_libs=$LIBS LIBS="$LIBS $LIBCURL" AC_CHECK_FUNC(curl_free,, AC_DEFINE(curl_free,free, [Define curl_free() as free() if our version of curl lacks curl_free.])) CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs unset _libcurl_save_cppflags unset _libcurl_save_libs AC_DEFINE(HAVE_LIBCURL,1, [Define to 1 if you have a functional curl library.]) AC_SUBST(LIBCURL_CPPFLAGS) AC_SUBST(LIBCURL) for _libcurl_feature in $_libcurl_features ; do AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1]) eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes done if test "x$_libcurl_protocols" = "x" ; then # We don't have --protocols, so just assume that all # protocols are available _libcurl_protocols="HTTP FTP GOPHER FILE TELNET LDAP DICT" if test x$libcurl_feature_SSL = xyes ; then _libcurl_protocols="$_libcurl_protocols HTTPS" # FTPS wasn't standards-compliant until version # 7.11.0 if test $_libcurl_version -ge 461568; then _libcurl_protocols="$_libcurl_protocols FTPS" fi fi fi for _libcurl_protocol in $_libcurl_protocols ; do AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1]) eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes done fi fi unset _libcurl_try_link unset _libcurl_version_parse unset _libcurl_config unset _libcurl_feature unset _libcurl_features unset _libcurl_protocol unset _libcurl_protocols unset _libcurl_version fi if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then # This is the IF-NO path ifelse([$4],,:,[$4]) else # This is the IF-YES path ifelse([$3],,:,[$3]) fi unset _libcurl_with ])dnl libofx-0.9.4/NEWS0000644000175000017500000002307111553133224010431 00000000000000LibOFX 0.9.4: - Patch to fix segfault on some malformed date formats. Inspired by Zach's patch on launchpad. - Packages-oriented changes: - LibOFX will now look for DTDs in env variable OFX_DTD_PATH (if present). - Better handling of paths (tolerates trailing path separator, or lack thereof) - No longer ignore return value of mkstemp() - Integrate all changes in Ubuntu's package that weren't already upstream - Move to LibXML++ 2.6, as 1.0 is deprecated - Add generated man pages with html2man LibOFX 0.9.3: - Fix segfault on some files containing missing closing tags (bug #2969817) LibOFX 0.9.2: - Win32: Add gnucash patch that looks up the dtd installation directory from the current executable's location. - Apply patch by Geert Janssens to fix a crash on invalid date format - Apply patch by ajseward with some additional fixes to allow wraping the library in python. - Apply patch by Thomas Baumgart which fixes bug #5 (Transaction posting date off by one) - Apply patch by Bill Nottingham with various C++ include fixes for building with recent compilers. LibOFX 0.9.1: - Add more sanity checks on string length. - Fix gnucash crash on OFX files with non-ascii characters and very long lines. See http://bugzilla.gnome.org/show_bug.cgi?id=528306 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493597. Patch by Jerome Vouillon copied from the latter. LibOFX 0.9.0: - this release now exports version information thus allowing depending applications to determine the version of LibOFX to compile against - some fields have been added to OfxFiLogin to allow for modification of some OFX header fields in outgoing requests. Together with the latest AqBanking3 this should fix the problem with servers suddenly rejecting connections from LibOFX applications - the calling application can now tell libofx where the data files reside. This allows for relocatable binaries (most importantly on Windows) - some warnings from recent versions of GCC have been fixed - libOFX can now easily be cross-compiled for Windows on Linux - the OFX header is now scanned for a hint regarding the encoding of the document and convert the data to UTF8 if iconv is available at compile time. - the API for online requests has been cleaned up LibOFX 0.8.3: - Fix problem with string lengths. Fixes Gnucash bug http://bugzilla.gnome.org/show_bug.cgi?id=353986 LibOFX 0.8.2:         - bug fixes for GCC4.x and 64-bit compatibility         - fix to enable OFXDirectConnect in Aqbanking         - improvements to ofxpartner functionality         - minor build system modifications         - new fields for fees, commissions and stock split data - fix a memory leak and a potential crashing bug LibOFX 0.8.0: - New DirectConnect API for statement downloads, thanks to Ace Jones and Martin Preuss - Added ofxconnect sample app to demonstrate & test new API's (try "make check" in the ofxconnect folder). Read README.privateserver first. - Apply Christian Stimming's patch for rpm building. Also adds a make rpm target. LibOFX 0.7.0: - Fix compile with gcc 3.4. This also needs to be applied to the stable branch. - Now uses a proper callback architecture (many thanks to Martin Preuss and Ryan P Bobko who contributed to it). - Now uses gengetopt. You can now set the desired debug output from the command line without recompiling. Check ofxdump --help. - File formet autodetection. - Working (but incomplete) Open Financial Connectivity (OFC) support. - Can now display line number in the debug output - Add file format autodetection architecture, can currently distinguish between OFX and OFC files. LibOFX 0.6.6: -Important code cleanup in the parsing code. The parser should be much more independent of OpenSP default settings. Should get rid of "end tag for "MEMO" omitted, but OMITTAG NO was specified" type messages and many other parser failures. -The very old OpenSP 1.3.1 will probably no longuer work. -Fix an infinite loop in some circumstances while the library was searching for a parent statement for a transaction. Would mostly manifest on complex investments transactions. Thanks to stephen.a.prior A T ntlworld.ie for the catch. -Implement displaying file line numbers in the error output. Note that data won't be valid if the message occurs before the file is opened. LibOFX 0.6.5: -Fix for really broken files that do not have a newline after the ofx header (bug #721732) -Add #include to fix compile error on freebsd and possibly all gcc2 based distro. -Change date handling to fix problems with the majority of banks diverging from the specs. Should fix problems with the day being off by one for some countries. (bug #778615) LibOFX 0.6.4: -Fix critical bug that caused the decimals to be ignored after the decimal separator in some locale (no matter what the decimal separator was in the original file). For example, importing in gnucash with a locale of fr_FR caused an amount of 19,95 to be imported as 19,00. LibOFX 0.6.3: -Fix incompatibilities with big endian machines -Fix compilation on sun -Fix error in the DTD that caused "content model is ambiguous" errors -Fix ofx2qif crash -ofxdump can now report the library version number. LibOFX 0.6.2: -Hopefully fix incompatibilities with BOTH OpenSP 1.3.x and OpenSP >= 1.4 -Building as rpm is now available, thanks to Chris Lyttle. -Doxygen API and internal doc now integrated in the build system. It will be distributed and install with the tarballs, and can be build in libofx-cvs using make doc. LibOFX 0.6.1: -Fix a critical bug in 0.6.0. Parsing of a file would fail and hang for users of OpenSP 1.5pre5 (and possibly others). LibOFX 0.6: -Beta version, released to accompany the new GnuCash 1.7.3 beta release. -Full investment transaction support (ofx2qif not yet updated however). -Now uses an Autoconf/Automake build system. -Proprietary tag striper is now much smarter and read routines have been corrected. Importing a file written on a single line will no longer cause an infinite loop. -Added yet more spagetti code and global variables to improve the work around for OpenSP 1.3 bugs. I beg of you, please convince your distro to make openjade and the OpenSP library independently upgradable. LibOFX 0.5: -Alpha version, released to accompany the new GnuCash 1.7.1 alpha release. -Add an account_name to the OfxAccountData struct. It contains a human readable identifier of the account. -Include file location seems to have changed in recent versions of OpenSP. Included old and new case. -Profiling now possible. It is now posible to use "make static". Statically linked ofxdump and ofx2qif will be created, with profiling enabled. -Basic work for investment account and securities. LibOFX 0.3: -MUCH improved documentation. Full API and internals reference in doc/html/ -Major update to ofx2qif. It will now generate the !Account QIF construct, which should improbe compatibility with other accounting software. -gcc3.2 caused problems with ld, now use gcc to link. Should solve the "undefined symbol:__dso_handle" runtime problem with Mandrake cooker. -There is now a workaround in the code to make it work with the OpenSP version (1.3.4) distributed with OpenJADE. However, this is not guaranteed to work, and it might cause errors in your financial data, and might not be present in future versions. Use at your own risk, you've been warned. -LibOFX can now be installed in "unorthodox" directories, such as ~/experimental, and still find it's dtd. You must modify the prefix in common.m (recommended) or put it in the command line of BOTH make and make install. -LibOFX is now officially in beta. Since one application now uses it (GnuCash), from now on, the library soname will be bumped if binary compatibility is broken. LibOFX 0.24: -Fix include files for gcc2 LibOFX 0.23: -Hacked in runtime detection of OpenSP's SGMLApplication::Char size. This should fix the hairy problems some people were experiencing with garbled Output with some versions of OpenSP. -Installation instruction have been improved. -OpenSP include files are no longer distributed with LibOFX. LibOFX 0.22: -make install will now copy libofx.h in the appropriate include directory. LibOFX 0.21: -Files were still created in current directory. Now force /tmp to be used LibOFX 0.2: -The input OFX file's directory no longer need to be writable, and no stale files are left behind. -Prefixed all enum names with OFX to avoid collision with client software (Gnucash in particular) -Changed all money amounts from float to double -Fixed constructors to avoid some "holdover" data LibOFX 0.122: -Always show two decimals for money in ofxdump. -Fix dates off by two month (Scott Drennan) -Fix ofx2qif account type for CREDITCARD (Scott Drennan) LibOFX 0.121: -Fix makefiles for users who do not have ldconfig in their path to create local links. LibOFX 0.12: -LibOFX can now be transparently used by both C and C++, using the same include file (libofx.h) -ofx2qif rewritten in C, to ensure that C compatibility will be maintained and tested. -Added target uninstall to all makefiles -Various other makefile improvements LibOFX 0.11: -Added ofx sample files extracted from the OFX 1.60 and 2.01 specifications in DOC. -Fix compile problems with G++2.9.6 -Makefiles updated -Require a recent version of OpenSP, doesn't work well the one included in OpenJADE (At least on Mandrake). -Fixed the algorithm for proprietary tag striping. LibOFX 0.1: -Initial public release libofx-0.9.4/Makefile.am0000644000175000017500000000131211553065167011772 00000000000000if BUILD_OFXCONNECT MAYBE_OFXCONNECT = ofxconnect endif DIST_SUBDIRS = m4 inc dtd lib doc . ofx2qif ofxdump ofxconnect SUBDIRS = m4 inc dtd lib doc . ofx2qif ofxdump $(MAYBE_OFXCONNECT) docdir = $(datadir)/doc/libofx doc_DATA = \ AUTHORS \ COPYING \ INSTALL \ NEWS \ README \ ChangeLog \ totest.txt EXTRA_DIST = \ libofx.spec.in \ libofx.spec \ libofx.pc \ totest.txt \ libofx.lsm.in \ libofx.lsm pkgconfigdir=$(libdir)/pkgconfig pkgconfig_DATA=libofx.pc .PHONY: doc doc: $(MAKE) -C doc doc rpm: $(PACKAGE).spec dist rpmbuild="rpm" && \ if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \ $$rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz libofx-0.9.4/ofxconnect/0000755000175000017500000000000011553134316012160 500000000000000libofx-0.9.4/ofxconnect/README0000644000175000017500000000367611544727432013003 00000000000000Ofxconnect is a utility to test OFX Direct Connect. And it's a sample so you can understand how to use it in your own code. Direct Connect consists of two separate steps: First, contacting the partner server to retrieve information about your bank. Second, contacting your bank to retrieve your accounts and statements. The partner server should be contacted when the user sets up his accounts. Common mistakes with the partner server are to contact it EVERY time you contact the bank, and contacting it just once to cache the contact info for all banks. The former is overkill, the latter means users won't have up-to-date bank contact information. Step-by-step guide to using the ofxconnect utility 1. Retrieve the list of banks $ofxconnect -b 2. Find your bank in the list. Retrieve the FI partner ID's (fipid's) for that bank $ofxconnect -f "Wells Fargo" 101458 102078 5571 3. Retrieve the service capabilities of each fipid to find the one which has the services you want. Note that all the 6-digit fipids don't seem to work well with libofx right now. $ofxconnect -v 5571 Statements? Yes Billpay? Yes Investments? No 4. Retrieve and view the list of all your accounts $ofxconnect -a --fipid=5571 --user=myusername --pass=mypassword accounts.ofx $ofxdump accounts.ofx 2>/dev/null Look for entries like this: Account ID: 999888777 00 123456789 Account name: Bank account 1234567890 Account type: CHECKING Bank ID: 999888777 Branch ID: 00 Account #: 1234567890 5. Retrieve a statement for one of the accounts $ofxconnect -s --fipid=5571 --user=myusername --pass=mypassword --bank=xxx --account=xxx --type=x --past=xx statement.ofx $ofxdump statement.ofx 2>/dev/null The --bank and --account parameters should be exactly like the "Bank ID" and "Account #" results from the account request. The --type is: 1=CHECKING, 2=INVESTMENT, 3=CREDITCARD. Other types are not supported The --past is how many days previous from today you want. libofx-0.9.4/ofxconnect/cmdline.h0000644000175000017500000002645511553134316013700 00000000000000/** @file cmdline.h * @brief The header file for the command line option parser * generated by GNU Gengetopt version 2.22.4 * http://www.gnu.org/software/gengetopt. * DO NOT modify this file, since it can be overwritten * @author GNU Gengetopt by Lorenzo Bettini */ #ifndef CMDLINE_H #define CMDLINE_H /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* for FILE */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef CMDLINE_PARSER_PACKAGE /** @brief the program name (used for printing errors) */ #define CMDLINE_PARSER_PACKAGE PACKAGE #endif #ifndef CMDLINE_PARSER_PACKAGE_NAME /** @brief the complete program name (used for help and version) */ #ifdef PACKAGE_NAME #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME #else #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE #endif #endif #ifndef CMDLINE_PARSER_VERSION /** @brief the program version */ #define CMDLINE_PARSER_VERSION VERSION #endif /** @brief Where the command line options are stored */ struct gengetopt_args_info { const char *help_help; /**< @brief Print help and exit help description. */ const char *version_help; /**< @brief Print version and exit help description. */ char * fipid_arg; /**< @brief FI partner identifier (looks up fid, org & url from partner server). */ char * fipid_orig; /**< @brief FI partner identifier (looks up fid, org & url from partner server) original value given at command line. */ const char *fipid_help; /**< @brief FI partner identifier (looks up fid, org & url from partner server) help description. */ char * fid_arg; /**< @brief FI identifier. */ char * fid_orig; /**< @brief FI identifier original value given at command line. */ const char *fid_help; /**< @brief FI identifier help description. */ char * org_arg; /**< @brief FI org tag. */ char * org_orig; /**< @brief FI org tag original value given at command line. */ const char *org_help; /**< @brief FI org tag help description. */ char * bank_arg; /**< @brief IBAN bank identifier. */ char * bank_orig; /**< @brief IBAN bank identifier original value given at command line. */ const char *bank_help; /**< @brief IBAN bank identifier help description. */ char * broker_arg; /**< @brief Broker identifier. */ char * broker_orig; /**< @brief Broker identifier original value given at command line. */ const char *broker_help; /**< @brief Broker identifier help description. */ char * user_arg; /**< @brief User name. */ char * user_orig; /**< @brief User name original value given at command line. */ const char *user_help; /**< @brief User name help description. */ char * pass_arg; /**< @brief Password. */ char * pass_orig; /**< @brief Password original value given at command line. */ const char *pass_help; /**< @brief Password help description. */ char * acct_arg; /**< @brief Account ID. */ char * acct_orig; /**< @brief Account ID original value given at command line. */ const char *acct_help; /**< @brief Account ID help description. */ int type_arg; /**< @brief Account Type 1=checking 2=invest 3=ccard. */ char * type_orig; /**< @brief Account Type 1=checking 2=invest 3=ccard original value given at command line. */ const char *type_help; /**< @brief Account Type 1=checking 2=invest 3=ccard help description. */ long past_arg; /**< @brief How far back to look from today (in days). */ char * past_orig; /**< @brief How far back to look from today (in days) original value given at command line. */ const char *past_help; /**< @brief How far back to look from today (in days) help description. */ char * url_arg; /**< @brief Url to POST the data to (otherwise goes to stdout). */ char * url_orig; /**< @brief Url to POST the data to (otherwise goes to stdout) original value given at command line. */ const char *url_help; /**< @brief Url to POST the data to (otherwise goes to stdout) help description. */ int trid_arg; /**< @brief Transaction id. */ char * trid_orig; /**< @brief Transaction id original value given at command line. */ const char *trid_help; /**< @brief Transaction id help description. */ const char *statement_req_help; /**< @brief Request for a statement help description. */ const char *accountinfo_req_help; /**< @brief Request for a list of accounts help description. */ const char *payment_req_help; /**< @brief Request to make a payment help description. */ const char *paymentinquiry_req_help; /**< @brief Request to inquire about the status of a payment help description. */ const char *bank_list_help; /**< @brief List all known banks help description. */ const char *bank_fipid_help; /**< @brief List all fipids for a given bank help description. */ const char *bank_services_help; /**< @brief List supported services for a given fipid help description. */ const char *allsupport_help; /**< @brief List all banks which support online banking help description. */ unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ unsigned int fipid_given ; /**< @brief Whether fipid was given. */ unsigned int fid_given ; /**< @brief Whether fid was given. */ unsigned int org_given ; /**< @brief Whether org was given. */ unsigned int bank_given ; /**< @brief Whether bank was given. */ unsigned int broker_given ; /**< @brief Whether broker was given. */ unsigned int user_given ; /**< @brief Whether user was given. */ unsigned int pass_given ; /**< @brief Whether pass was given. */ unsigned int acct_given ; /**< @brief Whether acct was given. */ unsigned int type_given ; /**< @brief Whether type was given. */ unsigned int past_given ; /**< @brief Whether past was given. */ unsigned int url_given ; /**< @brief Whether url was given. */ unsigned int trid_given ; /**< @brief Whether trid was given. */ unsigned int statement_req_given ; /**< @brief Whether statement-req was given. */ unsigned int accountinfo_req_given ; /**< @brief Whether accountinfo-req was given. */ unsigned int payment_req_given ; /**< @brief Whether payment-req was given. */ unsigned int paymentinquiry_req_given ; /**< @brief Whether paymentinquiry-req was given. */ unsigned int bank_list_given ; /**< @brief Whether bank-list was given. */ unsigned int bank_fipid_given ; /**< @brief Whether bank-fipid was given. */ unsigned int bank_services_given ; /**< @brief Whether bank-services was given. */ unsigned int allsupport_given ; /**< @brief Whether allsupport was given. */ char **inputs ; /**< @brief unamed options (options without names) */ unsigned inputs_num ; /**< @brief unamed options number */ int command_group_counter; /**< @brief Counter for group command */ } ; /** @brief The additional parameters to pass to parser functions */ struct cmdline_parser_params { int override; /**< @brief whether to override possibly already present options (default 0) */ int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ int check_required; /**< @brief whether to check that all required options were provided (default 1) */ int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ } ; /** @brief the purpose string of the program */ extern const char *gengetopt_args_info_purpose; /** @brief the usage string of the program */ extern const char *gengetopt_args_info_usage; /** @brief all the lines making the help output */ extern const char *gengetopt_args_info_help[]; /** * The command line parser * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info); /** * The command line parser (version with additional parameters - deprecated) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param override whether to override possibly already present options * @param initialize whether to initialize the option structure my_args_info * @param check_required whether to check that all required options were provided * @return 0 if everything went fine, NON 0 if an error took place * @deprecated use cmdline_parser_ext() instead */ int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required); /** * The command line parser (version with additional parameters) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param params additional parameters for the parser * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params); /** * Save the contents of the option struct into an already open FILE stream. * @param outfile the stream where to dump options * @param args_info the option struct to dump * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info); /** * Save the contents of the option struct into a (text) file. * This file can be read by the config file parser (if generated by gengetopt) * @param filename the file where to save * @param args_info the option struct to save * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info); /** * Print the help */ void cmdline_parser_print_help(void); /** * Print the version */ void cmdline_parser_print_version(void); /** * Initializes all the fields a cmdline_parser_params structure * to their default values * @param params the structure to initialize */ void cmdline_parser_params_init(struct cmdline_parser_params *params); /** * Allocates dynamically a cmdline_parser_params structure and initializes * all its fields to their default values * @return the created and initialized cmdline_parser_params structure */ struct cmdline_parser_params *cmdline_parser_params_create(void); /** * Initializes the passed gengetopt_args_info structure's fields * (also set default values for options that have a default) * @param args_info the structure to initialize */ void cmdline_parser_init (struct gengetopt_args_info *args_info); /** * Deallocates the string fields of the gengetopt_args_info structure * (but does not deallocate the structure itself) * @param args_info the structure to deallocate */ void cmdline_parser_free (struct gengetopt_args_info *args_info); /** * Checks that all the required options were specified * @param args_info the structure to check * @param prog_name the name of the program that will be used to print * possible errors * @return */ int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CMDLINE_H */ libofx-0.9.4/ofxconnect/cmdline.c0000644000175000017500000007612211553134316013667 00000000000000/* File autogenerated by gengetopt version 2.22.4 generated with the following command: gengetopt --unamed-opts The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: we make no copyright claims on it. */ /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifndef FIX_UNUSED #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ #endif #include #include "cmdline.h" const char *gengetopt_args_info_purpose = "prints to stdout the created OFX file based on the options you pass it. \ncurrently it will only create a statement request file. you can POST this to \nan OFX server to request a statement from that financial institution for that \naccount."; const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]... [FILES]..."; const char *gengetopt_args_info_description = ""; const char *gengetopt_args_info_help[] = { " -h, --help Print help and exit", " -V, --version Print version and exit", " --fipid=STRING FI partner identifier (looks up fid, org & url from \n partner server)", " --fid=STRING FI identifier", " --org=STRING FI org tag", " --bank=STRING IBAN bank identifier", " --broker=STRING Broker identifier", " --user=STRING User name", " --pass=STRING Password", " --acct=STRING Account ID", " --type=INT Account Type 1=checking 2=invest 3=ccard", " --past=LONG How far back to look from today (in days)", " --url=STRING Url to POST the data to (otherwise goes to stdout)", " --trid=INT Transaction id", "\n Group: command", " -s, --statement-req Request for a statement", " -a, --accountinfo-req Request for a list of accounts", " -p, --payment-req Request to make a payment", " -i, --paymentinquiry-req Request to inquire about the status of a payment", " -b, --bank-list List all known banks", " -f, --bank-fipid List all fipids for a given bank", " -v, --bank-services List supported services for a given fipid", " --allsupport List all banks which support online banking", 0 }; typedef enum {ARG_NO , ARG_STRING , ARG_INT , ARG_LONG } cmdline_parser_arg_type; static void clear_given (struct gengetopt_args_info *args_info); static void clear_args (struct gengetopt_args_info *args_info); static int cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static char * gengetopt_strdup (const char *s); static void clear_given (struct gengetopt_args_info *args_info) { args_info->help_given = 0 ; args_info->version_given = 0 ; args_info->fipid_given = 0 ; args_info->fid_given = 0 ; args_info->org_given = 0 ; args_info->bank_given = 0 ; args_info->broker_given = 0 ; args_info->user_given = 0 ; args_info->pass_given = 0 ; args_info->acct_given = 0 ; args_info->type_given = 0 ; args_info->past_given = 0 ; args_info->url_given = 0 ; args_info->trid_given = 0 ; args_info->statement_req_given = 0 ; args_info->accountinfo_req_given = 0 ; args_info->payment_req_given = 0 ; args_info->paymentinquiry_req_given = 0 ; args_info->bank_list_given = 0 ; args_info->bank_fipid_given = 0 ; args_info->bank_services_given = 0 ; args_info->allsupport_given = 0 ; args_info->command_group_counter = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { FIX_UNUSED (args_info); args_info->fipid_arg = NULL; args_info->fipid_orig = NULL; args_info->fid_arg = NULL; args_info->fid_orig = NULL; args_info->org_arg = NULL; args_info->org_orig = NULL; args_info->bank_arg = NULL; args_info->bank_orig = NULL; args_info->broker_arg = NULL; args_info->broker_orig = NULL; args_info->user_arg = NULL; args_info->user_orig = NULL; args_info->pass_arg = NULL; args_info->pass_orig = NULL; args_info->acct_arg = NULL; args_info->acct_orig = NULL; args_info->type_orig = NULL; args_info->past_orig = NULL; args_info->url_arg = NULL; args_info->url_orig = NULL; args_info->trid_orig = NULL; } static void init_args_info(struct gengetopt_args_info *args_info) { args_info->help_help = gengetopt_args_info_help[0] ; args_info->version_help = gengetopt_args_info_help[1] ; args_info->fipid_help = gengetopt_args_info_help[2] ; args_info->fid_help = gengetopt_args_info_help[3] ; args_info->org_help = gengetopt_args_info_help[4] ; args_info->bank_help = gengetopt_args_info_help[5] ; args_info->broker_help = gengetopt_args_info_help[6] ; args_info->user_help = gengetopt_args_info_help[7] ; args_info->pass_help = gengetopt_args_info_help[8] ; args_info->acct_help = gengetopt_args_info_help[9] ; args_info->type_help = gengetopt_args_info_help[10] ; args_info->past_help = gengetopt_args_info_help[11] ; args_info->url_help = gengetopt_args_info_help[12] ; args_info->trid_help = gengetopt_args_info_help[13] ; args_info->statement_req_help = gengetopt_args_info_help[15] ; args_info->accountinfo_req_help = gengetopt_args_info_help[16] ; args_info->payment_req_help = gengetopt_args_info_help[17] ; args_info->paymentinquiry_req_help = gengetopt_args_info_help[18] ; args_info->bank_list_help = gengetopt_args_info_help[19] ; args_info->bank_fipid_help = gengetopt_args_info_help[20] ; args_info->bank_services_help = gengetopt_args_info_help[21] ; args_info->allsupport_help = gengetopt_args_info_help[22] ; } void cmdline_parser_print_version (void) { printf ("%s %s\n", (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), CMDLINE_PARSER_VERSION); } static void print_help_common(void) { cmdline_parser_print_version (); if (strlen(gengetopt_args_info_purpose) > 0) printf("\n%s\n", gengetopt_args_info_purpose); if (strlen(gengetopt_args_info_usage) > 0) printf("\n%s\n", gengetopt_args_info_usage); printf("\n"); if (strlen(gengetopt_args_info_description) > 0) printf("%s\n\n", gengetopt_args_info_description); } void cmdline_parser_print_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_help[i]) printf("%s\n", gengetopt_args_info_help[i++]); } void cmdline_parser_init (struct gengetopt_args_info *args_info) { clear_given (args_info); clear_args (args_info); init_args_info (args_info); args_info->inputs = 0; args_info->inputs_num = 0; } void cmdline_parser_params_init(struct cmdline_parser_params *params) { if (params) { params->override = 0; params->initialize = 1; params->check_required = 1; params->check_ambiguity = 0; params->print_errors = 1; } } struct cmdline_parser_params * cmdline_parser_params_create(void) { struct cmdline_parser_params *params = (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params)); cmdline_parser_params_init(params); return params; } static void free_string_field (char **s) { if (*s) { free (*s); *s = 0; } } static void cmdline_parser_release (struct gengetopt_args_info *args_info) { unsigned int i; free_string_field (&(args_info->fipid_arg)); free_string_field (&(args_info->fipid_orig)); free_string_field (&(args_info->fid_arg)); free_string_field (&(args_info->fid_orig)); free_string_field (&(args_info->org_arg)); free_string_field (&(args_info->org_orig)); free_string_field (&(args_info->bank_arg)); free_string_field (&(args_info->bank_orig)); free_string_field (&(args_info->broker_arg)); free_string_field (&(args_info->broker_orig)); free_string_field (&(args_info->user_arg)); free_string_field (&(args_info->user_orig)); free_string_field (&(args_info->pass_arg)); free_string_field (&(args_info->pass_orig)); free_string_field (&(args_info->acct_arg)); free_string_field (&(args_info->acct_orig)); free_string_field (&(args_info->type_orig)); free_string_field (&(args_info->past_orig)); free_string_field (&(args_info->url_arg)); free_string_field (&(args_info->url_orig)); free_string_field (&(args_info->trid_orig)); for (i = 0; i < args_info->inputs_num; ++i) free (args_info->inputs [i]); if (args_info->inputs_num) free (args_info->inputs); clear_given (args_info); } static void write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) { FIX_UNUSED (values); if (arg) { fprintf(outfile, "%s=\"%s\"\n", opt, arg); } else { fprintf(outfile, "%s\n", opt); } } int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) { int i = 0; if (!outfile) { fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE); return EXIT_FAILURE; } if (args_info->help_given) write_into_file(outfile, "help", 0, 0 ); if (args_info->version_given) write_into_file(outfile, "version", 0, 0 ); if (args_info->fipid_given) write_into_file(outfile, "fipid", args_info->fipid_orig, 0); if (args_info->fid_given) write_into_file(outfile, "fid", args_info->fid_orig, 0); if (args_info->org_given) write_into_file(outfile, "org", args_info->org_orig, 0); if (args_info->bank_given) write_into_file(outfile, "bank", args_info->bank_orig, 0); if (args_info->broker_given) write_into_file(outfile, "broker", args_info->broker_orig, 0); if (args_info->user_given) write_into_file(outfile, "user", args_info->user_orig, 0); if (args_info->pass_given) write_into_file(outfile, "pass", args_info->pass_orig, 0); if (args_info->acct_given) write_into_file(outfile, "acct", args_info->acct_orig, 0); if (args_info->type_given) write_into_file(outfile, "type", args_info->type_orig, 0); if (args_info->past_given) write_into_file(outfile, "past", args_info->past_orig, 0); if (args_info->url_given) write_into_file(outfile, "url", args_info->url_orig, 0); if (args_info->trid_given) write_into_file(outfile, "trid", args_info->trid_orig, 0); if (args_info->statement_req_given) write_into_file(outfile, "statement-req", 0, 0 ); if (args_info->accountinfo_req_given) write_into_file(outfile, "accountinfo-req", 0, 0 ); if (args_info->payment_req_given) write_into_file(outfile, "payment-req", 0, 0 ); if (args_info->paymentinquiry_req_given) write_into_file(outfile, "paymentinquiry-req", 0, 0 ); if (args_info->bank_list_given) write_into_file(outfile, "bank-list", 0, 0 ); if (args_info->bank_fipid_given) write_into_file(outfile, "bank-fipid", 0, 0 ); if (args_info->bank_services_given) write_into_file(outfile, "bank-services", 0, 0 ); if (args_info->allsupport_given) write_into_file(outfile, "allsupport", 0, 0 ); i = EXIT_SUCCESS; return i; } int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) { FILE *outfile; int i = 0; outfile = fopen(filename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename); return EXIT_FAILURE; } i = cmdline_parser_dump(outfile, args_info); fclose (outfile); return i; } void cmdline_parser_free (struct gengetopt_args_info *args_info) { cmdline_parser_release (args_info); } /** @brief replacement of strdup, which is not standard */ char * gengetopt_strdup (const char *s) { char *result = 0; if (!s) return result; result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) return (char*)0; strcpy(result, s); return result; } static void reset_group_command(struct gengetopt_args_info *args_info) { if (! args_info->command_group_counter) return; args_info->statement_req_given = 0 ; args_info->accountinfo_req_given = 0 ; args_info->payment_req_given = 0 ; args_info->paymentinquiry_req_given = 0 ; args_info->bank_list_given = 0 ; args_info->bank_fipid_given = 0 ; args_info->bank_services_given = 0 ; args_info->allsupport_given = 0 ; args_info->command_group_counter = 0; } int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; result = cmdline_parser_internal (argc, argv, args_info, params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; params.override = override; params.initialize = initialize; params.check_required = check_required; params.check_ambiguity = 0; params.print_errors = 1; result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) { FIX_UNUSED (args_info); FIX_UNUSED (prog_name); return EXIT_SUCCESS; } static char *package_name = 0; /** * @brief updates an option * @param field the generic pointer to the field to update * @param orig_field the pointer to the orig field * @param field_given the pointer to the number of occurrence of this option * @param prev_given the pointer to the number of occurrence already seen * @param value the argument for this option (if null no arg was specified) * @param possible_values the possible values for this option (if specified) * @param default_value the default value (in case the option only accepts fixed values) * @param arg_type the type of this option * @param check_ambiguity @see cmdline_parser_params.check_ambiguity * @param override @see cmdline_parser_params.override * @param no_free whether to free a possible previous value * @param multiple_option whether this is a multiple option * @param long_opt the corresponding long option * @param short_opt the corresponding short option (or '-' if none) * @param additional_error possible further error specification */ static int update_arg(void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, char *value, const char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, const char *long_opt, char short_opt, const char *additional_error) { char *stop_char = 0; const char *val = value; int found; char **string_field; FIX_UNUSED (field); stop_char = 0; found = 0; if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given))) { if (short_opt != '-') fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n", package_name, long_opt, short_opt, (additional_error ? additional_error : "")); else fprintf (stderr, "%s: `--%s' option given more than once%s\n", package_name, long_opt, (additional_error ? additional_error : "")); return 1; /* failure */ } FIX_UNUSED (default_value); if (field_given && *field_given && ! override) return 0; if (prev_given) (*prev_given)++; if (field_given) (*field_given)++; if (possible_values) val = possible_values[found]; switch(arg_type) { case ARG_INT: if (val) *((int *)field) = strtol (val, &stop_char, 0); break; case ARG_LONG: if (val) *((long *)field) = (long)strtol (val, &stop_char, 0); break; case ARG_STRING: if (val) { string_field = (char **)field; if (!no_free && *string_field) free (*string_field); /* free previous string */ *string_field = gengetopt_strdup (val); } break; default: break; }; /* check numeric conversion */ switch(arg_type) { case ARG_INT: case ARG_LONG: if (val && !(stop_char && *stop_char == '\0')) { fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val); return 1; /* failure */ } break; default: ; }; /* store the original value */ switch(arg_type) { case ARG_NO: break; default: if (value && orig_field) { if (no_free) { *orig_field = value; } else { if (*orig_field) free (*orig_field); /* free previous string */ *orig_field = gengetopt_strdup (value); } } }; return 0; /* OK */ } int cmdline_parser_internal ( int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ int error = 0; struct gengetopt_args_info local_args_info; int override; int initialize; int check_required; int check_ambiguity; package_name = argv[0]; override = params->override; initialize = params->initialize; check_required = params->check_required; check_ambiguity = params->check_ambiguity; if (initialize) cmdline_parser_init (args_info); cmdline_parser_init (&local_args_info); optarg = 0; optind = 0; opterr = params->print_errors; optopt = '?'; while (1) { int option_index = 0; static struct option long_options[] = { { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'V' }, { "fipid", 1, NULL, 0 }, { "fid", 1, NULL, 0 }, { "org", 1, NULL, 0 }, { "bank", 1, NULL, 0 }, { "broker", 1, NULL, 0 }, { "user", 1, NULL, 0 }, { "pass", 1, NULL, 0 }, { "acct", 1, NULL, 0 }, { "type", 1, NULL, 0 }, { "past", 1, NULL, 0 }, { "url", 1, NULL, 0 }, { "trid", 1, NULL, 0 }, { "statement-req", 0, NULL, 's' }, { "accountinfo-req", 0, NULL, 'a' }, { "payment-req", 0, NULL, 'p' }, { "paymentinquiry-req", 0, NULL, 'i' }, { "bank-list", 0, NULL, 'b' }, { "bank-fipid", 0, NULL, 'f' }, { "bank-services", 0, NULL, 'v' }, { "allsupport", 0, NULL, 0 }, { 0, 0, 0, 0 } }; c = getopt_long (argc, argv, "hVsapibfv", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ switch (c) { case 'h': /* Print help and exit. */ cmdline_parser_print_help (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ cmdline_parser_print_version (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 's': /* Request for a statement. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->statement_req_given), &(local_args_info.statement_req_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "statement-req", 's', additional_error)) goto failure; break; case 'a': /* Request for a list of accounts. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->accountinfo_req_given), &(local_args_info.accountinfo_req_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "accountinfo-req", 'a', additional_error)) goto failure; break; case 'p': /* Request to make a payment. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->payment_req_given), &(local_args_info.payment_req_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "payment-req", 'p', additional_error)) goto failure; break; case 'i': /* Request to inquire about the status of a payment. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->paymentinquiry_req_given), &(local_args_info.paymentinquiry_req_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "paymentinquiry-req", 'i', additional_error)) goto failure; break; case 'b': /* List all known banks. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->bank_list_given), &(local_args_info.bank_list_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "bank-list", 'b', additional_error)) goto failure; break; case 'f': /* List all fipids for a given bank. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->bank_fipid_given), &(local_args_info.bank_fipid_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "bank-fipid", 'f', additional_error)) goto failure; break; case 'v': /* List supported services for a given fipid. */ if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->bank_services_given), &(local_args_info.bank_services_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "bank-services", 'v', additional_error)) goto failure; break; case 0: /* Long option with no short option */ /* FI partner identifier (looks up fid, org & url from partner server). */ if (strcmp (long_options[option_index].name, "fipid") == 0) { if (update_arg( (void *)&(args_info->fipid_arg), &(args_info->fipid_orig), &(args_info->fipid_given), &(local_args_info.fipid_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "fipid", '-', additional_error)) goto failure; } /* FI identifier. */ else if (strcmp (long_options[option_index].name, "fid") == 0) { if (update_arg( (void *)&(args_info->fid_arg), &(args_info->fid_orig), &(args_info->fid_given), &(local_args_info.fid_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "fid", '-', additional_error)) goto failure; } /* FI org tag. */ else if (strcmp (long_options[option_index].name, "org") == 0) { if (update_arg( (void *)&(args_info->org_arg), &(args_info->org_orig), &(args_info->org_given), &(local_args_info.org_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "org", '-', additional_error)) goto failure; } /* IBAN bank identifier. */ else if (strcmp (long_options[option_index].name, "bank") == 0) { if (update_arg( (void *)&(args_info->bank_arg), &(args_info->bank_orig), &(args_info->bank_given), &(local_args_info.bank_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "bank", '-', additional_error)) goto failure; } /* Broker identifier. */ else if (strcmp (long_options[option_index].name, "broker") == 0) { if (update_arg( (void *)&(args_info->broker_arg), &(args_info->broker_orig), &(args_info->broker_given), &(local_args_info.broker_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "broker", '-', additional_error)) goto failure; } /* User name. */ else if (strcmp (long_options[option_index].name, "user") == 0) { if (update_arg( (void *)&(args_info->user_arg), &(args_info->user_orig), &(args_info->user_given), &(local_args_info.user_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "user", '-', additional_error)) goto failure; } /* Password. */ else if (strcmp (long_options[option_index].name, "pass") == 0) { if (update_arg( (void *)&(args_info->pass_arg), &(args_info->pass_orig), &(args_info->pass_given), &(local_args_info.pass_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "pass", '-', additional_error)) goto failure; } /* Account ID. */ else if (strcmp (long_options[option_index].name, "acct") == 0) { if (update_arg( (void *)&(args_info->acct_arg), &(args_info->acct_orig), &(args_info->acct_given), &(local_args_info.acct_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "acct", '-', additional_error)) goto failure; } /* Account Type 1=checking 2=invest 3=ccard. */ else if (strcmp (long_options[option_index].name, "type") == 0) { if (update_arg( (void *)&(args_info->type_arg), &(args_info->type_orig), &(args_info->type_given), &(local_args_info.type_given), optarg, 0, 0, ARG_INT, check_ambiguity, override, 0, 0, "type", '-', additional_error)) goto failure; } /* How far back to look from today (in days). */ else if (strcmp (long_options[option_index].name, "past") == 0) { if (update_arg( (void *)&(args_info->past_arg), &(args_info->past_orig), &(args_info->past_given), &(local_args_info.past_given), optarg, 0, 0, ARG_LONG, check_ambiguity, override, 0, 0, "past", '-', additional_error)) goto failure; } /* Url to POST the data to (otherwise goes to stdout). */ else if (strcmp (long_options[option_index].name, "url") == 0) { if (update_arg( (void *)&(args_info->url_arg), &(args_info->url_orig), &(args_info->url_given), &(local_args_info.url_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "url", '-', additional_error)) goto failure; } /* Transaction id. */ else if (strcmp (long_options[option_index].name, "trid") == 0) { if (update_arg( (void *)&(args_info->trid_arg), &(args_info->trid_orig), &(args_info->trid_given), &(local_args_info.trid_given), optarg, 0, 0, ARG_INT, check_ambiguity, override, 0, 0, "trid", '-', additional_error)) goto failure; } /* List all banks which support online banking. */ else if (strcmp (long_options[option_index].name, "allsupport") == 0) { if (args_info->command_group_counter && override) reset_group_command (args_info); args_info->command_group_counter += 1; if (update_arg( 0 , 0 , &(args_info->allsupport_given), &(local_args_info.allsupport_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "allsupport", '-', additional_error)) goto failure; } break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ goto failure; default: /* bug: option not considered. */ fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : "")); abort (); } /* switch */ } /* while */ if (args_info->command_group_counter > 1) { fprintf (stderr, "%s: %d options of group command were given. At most one is required%s.\n", argv[0], args_info->command_group_counter, (additional_error ? additional_error : "")); error = 1; } cmdline_parser_release (&local_args_info); if ( error ) return (EXIT_FAILURE); if (optind < argc) { int i = 0 ; int found_prog_name = 0; /* whether program name, i.e., argv[0], is in the remaining args (this may happen with some implementations of getopt, but surely not with the one included by gengetopt) */ i = optind; while (i < argc) if (argv[i++] == argv[0]) { found_prog_name = 1; break; } i = 0; args_info->inputs_num = argc - optind - found_prog_name; args_info->inputs = (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; while (optind < argc) if (argv[optind++] != argv[0]) args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; } return 0; failure: cmdline_parser_release (&local_args_info); return (EXIT_FAILURE); } libofx-0.9.4/ofxconnect/ofxconnect.cpp0000644000175000017500000003140011551426737014761 00000000000000/*************************************************************************** ofx_connect.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Code for ofxconnect utility. C++ example code * * the purpose of the ofxconnect utility is to server as example code for * ALL functions of libOFX that have to do with creating OFX files. * * ofxconnect prints to stdout the created OFX file based on the options * you pass it * * currently it will only create the statement request file. you can POST * this to an OFX server to request a statement from that financial * institution for that account. * * In the hopefully-not-to-distant future, ofxconnect will also make the * connection to the OFX server, post the data, and call ofxdump itself. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include "libofx.h" #include /* Include config constants, e.g., VERSION TF */ #include #include #include #include #include #include #ifdef HAVE_LIBCURL #include #endif #include "cmdline.h" /* Gengetopt generated parser */ #include "nodeparser.h" #include "ofxpartner.h" using namespace std; #ifdef HAVE_LIBCURL bool post(const char* request, const char* url, const char* filename) { CURL *curl = curl_easy_init(); if(! curl) return false; unlink("tmpout"); FILE* file = fopen(filename,"wb"); if (! file ) { curl_easy_cleanup(curl); return false; } curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request); struct curl_slist *headerlist=NULL; headerlist=curl_slist_append(headerlist, "Content-type: application/x-ofx"); headerlist=curl_slist_append(headerlist, "Accept: */*, application/x-ofx"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)file); CURLcode res = curl_easy_perform(curl); curl_easy_cleanup(curl); curl_slist_free_all (headerlist); fclose(file); return true; } #else bool post(const char*, const char*, const char*) { cerr << "ERROR: libox must be configured with libcurl to post this request directly" << endl; return false; } #endif ostream& operator<<(ostream& os,const vector& strvect) { for( vector::const_iterator it=strvect.begin(); it!=strvect.end(); ++it) { os << (*it) << endl; } return os; } int main (int argc, char *argv[]) { gengetopt_args_info args_info; if (cmdline_parser (argc, argv, &args_info) != 0) exit(1) ; if ( argc == 1 ) { cmdline_parser_print_help(); exit(1); } if ( args_info.statement_req_given || args_info.accountinfo_req_given ) { if ( (args_info.inputs_num > 0) ) { cout << "file " << args_info.inputs[0] << endl; } else { cerr << "ERROR: You must specify an output file" << endl; } } else if ( args_info.bank_fipid_given || args_info.bank_services_given ) { if ( (args_info.inputs_num > 0) ) { cout << "bank " << args_info.inputs[0] << endl; } else { cerr << "ERROR: You must specify an bank" << endl; } } OfxFiLogin fi; memset(&fi,0,sizeof(OfxFiLogin)); bool ok = true; string url; if ( args_info.statement_req_given || args_info.accountinfo_req_given || args_info.payment_req_given || args_info.paymentinquiry_req_given ) { // Get the FI Login information // if ( args_info.fipid_given ) { cerr << "fipid " << args_info.fipid_arg << endl; cerr << "contacting partner server..." << endl; OfxFiServiceInfo svcinfo = OfxPartner::ServiceInfo(args_info.fipid_arg); cout << "fid " << svcinfo.fid << endl; strncpy(fi.fid,svcinfo.fid,OFX_FID_LENGTH-1); cout << "org " << svcinfo.org << endl; strncpy(fi.org,svcinfo.org,OFX_ORG_LENGTH-1); cout << "url " << svcinfo.url << endl; url = svcinfo.url; } if ( args_info.fid_given ) { cerr << "fid " << args_info.fid_arg << endl; strncpy(fi.fid,args_info.fid_arg,OFX_FID_LENGTH-1); } else if ( ! args_info.fipid_given ) { cerr << "ERROR: --fid is required" << endl; ok = false; } if ( args_info.org_given ) { cerr << "org " << args_info.org_arg << endl; strncpy(fi.org,args_info.org_arg,OFX_ORG_LENGTH-1); } else if ( ! args_info.fipid_given ) { cerr << "ERROR: --org is required" << endl; ok = false; } if ( args_info.user_given ) { cerr << "user " << args_info.user_arg << endl; strncpy(fi.userid,args_info.user_arg,OFX_USERID_LENGTH-1); } else { cerr << "ERROR: --user is required" << endl; ok = false; } if ( args_info.pass_given ) { cerr << "pass " << args_info.pass_arg << endl; strncpy(fi.userpass,args_info.pass_arg,OFX_USERPASS_LENGTH-1); } else { cerr << "ERROR: --pass is required" << endl; ok = false; } if ( args_info.url_given ) url = args_info.url_arg; } if ( args_info.statement_req_given ) { cerr << "Statement request" << endl; OfxAccountData account; memset(&account,0,sizeof(OfxAccountData)); if ( args_info.bank_given ) { cerr << "bank " << args_info.bank_arg << endl; strncpy(account.bank_id,args_info.bank_arg,OFX_BANKID_LENGTH-1); } else { if ( args_info.type_given && args_info.type_arg == 1 ) { cerr << "ERROR: --bank is required for a bank request" << endl; ok = false; } } if ( args_info.broker_given ) { cerr << "broker " << args_info.broker_arg << endl; strncpy(account.broker_id,args_info.broker_arg,OFX_BROKERID_LENGTH-1); } else { if ( args_info.type_given && args_info.type_arg == 2 ) { cerr << "ERROR: --broker is required for an investment statement request" << endl; ok = false; } } if ( args_info.acct_given ) { cerr << "acct " << args_info.acct_arg << endl; strncpy(account.account_number,args_info.acct_arg,OFX_ACCTID_LENGTH-1); } else { cerr << "ERROR: --acct is required for a statement request" << endl; ok = false; } if ( args_info.type_given ) { cerr << "type " << args_info.type_arg << endl; switch (args_info.type_arg) { case 1: account.account_type = account.OFX_CHECKING; break; case 2: account.account_type = account.OFX_INVESTMENT; break; case 3: account.account_type = account.OFX_CREDITCARD ; break; default: cerr << "ERROR: --type is not valid. Must be between 1 and 3" << endl; ok = false; } } else { cerr << "ERROR: --type is required for a statement request" << endl; ok = false; } if ( args_info.past_given ) { cerr << "past " << args_info.past_arg << endl; } else { cerr << "ERROR: --past is required for a statement request" << endl; ok = false; } if ( ok ) { char* request = libofx_request_statement( &fi, &account, time(NULL) - args_info.past_arg * 86400L ); if ( url.length() ) post(request,url.c_str(),args_info.inputs[0]); else cout << request; free(request); } } if ( args_info.paymentinquiry_req_given ) { char tridstr[33]; memset(tridstr,0,33); bool ok = true; if ( args_info.trid_given ) { cerr << "trid " << args_info.trid_arg << endl; snprintf(tridstr,32,"%i",args_info.trid_arg); } else { cerr << "ERROR: --trid is required for a payment inquiry request" << endl; ok = false; } if ( ok ) { char* request = libofx_request_payment_status( &fi, tridstr ); filebuf fb; fb.open ("query",ios::out); ostream os(&fb); os << request; fb.close(); if ( url.length() ) post(request,url.c_str(),args_info.inputs[0]); else cout << request; free(request); } } if ( args_info.payment_req_given ) { OfxAccountData account; memset(&account,0,sizeof(OfxAccountData)); OfxPayee payee; memset(&payee,0,sizeof(OfxPayee)); OfxPayment payment; memset(&payment,0,sizeof(OfxPayment)); strcpy(payee.name,"MARTIN PREUSS"); strcpy(payee.address1,"1 LAUREL ST"); strcpy(payee.city,"SAN CARLOS"); strcpy(payee.state,"CA"); strcpy(payee.postalcode,"94070"); strcpy(payee.phone,"866-555-1212"); strcpy(payment.amount,"200.00"); strcpy(payment.account,"1234"); strcpy(payment.datedue,"20060301"); strcpy(payment.memo,"This is a test"); bool ok = true; if ( args_info.bank_given ) { cerr << "bank " << args_info.bank_arg << endl; strncpy(account.bank_id,args_info.bank_arg,OFX_BANKID_LENGTH-1); } else { if ( args_info.type_given && args_info.type_arg == 1 ) { cerr << "ERROR: --bank is required for a bank request" << endl; ok = false; } } if ( args_info.broker_given ) { cerr << "broker " << args_info.broker_arg << endl; strncpy(account.broker_id,args_info.broker_arg,OFX_BROKERID_LENGTH-1); } else { if ( args_info.type_given && args_info.type_arg == 2 ) { cerr << "ERROR: --broker is required for an investment statement request" << endl; ok = false; } } if ( args_info.acct_given ) { cerr << "acct " << args_info.acct_arg << endl; strncpy(account.account_number,args_info.acct_arg,OFX_ACCTID_LENGTH-1); } else { cerr << "ERROR: --acct is required for a statement request" << endl; ok = false; } if ( args_info.type_given ) { cerr << "type " << args_info.type_arg << endl; switch (args_info.type_arg) { case 1: account.account_type = account.OFX_CHECKING; break; case 2: account.account_type = account.OFX_INVESTMENT; break; case 3: account.account_type = account.OFX_CREDITCARD ; break; default: cerr << "ERROR: --type is not valid. Must be between 1 and 3" << endl; ok = false; } } else { cerr << "ERROR: --type is required for a statement request" << endl; ok = false; } if ( ok ) { char* request = libofx_request_payment( &fi, &account, &payee, &payment ); filebuf fb; fb.open ("query",ios::out); ostream os(&fb); os << request; fb.close(); if ( url.length() ) post(request,url.c_str(),args_info.inputs[0]); else cout << request; free(request); } } if ( args_info.accountinfo_req_given ) { if ( ok ) { char* request = libofx_request_accountinfo( &fi ); if ( url.length() ) post(request,url.c_str(),args_info.inputs[0]); else cout << request; free(request); } } if ( args_info.bank_list_given ) { cout << OfxPartner::BankNames(); } if ( args_info.bank_fipid_given ) { cout << OfxPartner::FipidForBank(args_info.inputs[0]); } if ( args_info.bank_services_given ) { OfxFiServiceInfo svcinfo = OfxPartner::ServiceInfo(args_info.inputs[0]); cout << "Account List? " << (svcinfo.accountlist?"Yes":"No") << endl; cout << "Statements? " << (svcinfo.statements?"Yes":"No") << endl; cout << "Billpay? " << (svcinfo.billpay?"Yes":"No") << endl; cout << "Investments? " << (svcinfo.investments?"Yes":"No") << endl; } if ( args_info.allsupport_given ) { vector banks = OfxPartner::BankNames(); vector::const_iterator it_bank = banks.begin(); while ( it_bank != banks.end() ) { vector fipids = OfxPartner::FipidForBank(*it_bank); vector::const_iterator it_fipid = fipids.begin(); while ( it_fipid != fipids.end() ) { if ( OfxPartner::ServiceInfo(*it_fipid).accountlist ) cout << *it_bank << endl; ++it_fipid; } ++it_bank; } } return 0; } // vim:cin:si:ai:et:ts=2:sw=2: libofx-0.9.4/ofxconnect/test-privateserver.sh0000755000175000017500000000413211544727432016324 00000000000000#/bin/sh # # End-to-end test using the private server # # # Extract the login information from the encrypted file # # $serverlogin will include the --user --pass and --url options for the # private ofx server export serverlogin="`gpg -d login-privateserver.asc` --org=ReferenceFI --fid=00000 --bank=000000000 --broker=brokerdomain.com" # # Test a payment # #./ofxconnect -p $serverlogin --acct=10001010 --type=1 tmpfilex && cat tmpfilex # # Test a payment status inquiry # #./ofxconnect -i $serverlogin --trid=21384 tmpfilex && cat tmpfilex #exit # # Test the list of accounts # #./ofxconnect -a $serverlogin tmpfilex && ../ofxdump/ofxdump tmpfilex # # Test checking accounts # ./ofxconnect -s $serverlogin --acct=10001010 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex exit ./ofxconnect -s $serverlogin --acct=10001001 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10001002 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10003001 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex # # Test investment accounts # ./ofxconnect -s $serverlogin --acct=20001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10001010 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10001401 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=10001000 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex ./ofxconnect -s $serverlogin --acct=20001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex # # These don't work yet because I mistakenly put "CHECKING" in for all "BANK" statments as the account type :-( # # --acct=10001003 --type=1 --past=90 # --acct=10001004 --type=1 --past=90 # --acct=10001005 --type=1 --past=90 # # This one throws an ofx.ValidationException. However, the other investment accounts work fine!! # # --acct=10002000 --type=2 --past=90 libofx-0.9.4/ofxconnect/ofxpartner.h0000644000175000017500000000262711544727432014457 00000000000000/*************************************************************************** ofx_partner.h ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Methods for connecting to the OFX partner server to retrieve * OFX server information */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFXPARTNER_H #define OFXPARTNER_H #include #include #include namespace OfxPartner { void ValidateIndexCache(void); OfxFiServiceInfo ServiceInfo(const std::string& fipid); std::vector BankNames(void); std::vector FipidForBank(const std::string& bank); } #endif // OFXPARTNER_H libofx-0.9.4/ofxconnect/ofxconnect.10000644000175000017500000000412511553124272014332 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LIBOFX "1" "April 2011" "libofx 0.9.4" "User Commands" .SH NAME libofx \- manual page for libofx 0.9.4 .SH SYNOPSIS .B libofx [\fIOPTIONS\fR]... [\fIFILES\fR]... .SH DESCRIPTION libofx 0.9.4 .PP prints to stdout the created OFX file based on the options you pass it. currently it will only create a statement request file. you can POST this to an OFX server to request a statement from that financial institution for that account. .TP \fB\-h\fR, \fB\-\-help\fR Print help and exit .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit .TP \fB\-\-fipid\fR=\fISTRING\fR FI partner identifier (looks up fid, org & url from partner server) .TP \fB\-\-fid\fR=\fISTRING\fR FI identifier .TP \fB\-\-org\fR=\fISTRING\fR FI org tag .TP \fB\-\-bank\fR=\fISTRING\fR IBAN bank identifier .TP \fB\-\-broker\fR=\fISTRING\fR Broker identifier .TP \fB\-\-user\fR=\fISTRING\fR User name .TP \fB\-\-pass\fR=\fISTRING\fR Password .TP \fB\-\-acct\fR=\fISTRING\fR Account ID .TP \fB\-\-type\fR=\fIINT\fR Account Type 1=checking 2=invest 3=ccard .TP \fB\-\-past\fR=\fILONG\fR How far back to look from today (in days) .TP \fB\-\-url\fR=\fISTRING\fR Url to POST the data to (otherwise goes to stdout) .TP \fB\-\-trid\fR=\fIINT\fR Transaction id .IP Group: command .TP \fB\-s\fR, \fB\-\-statement\-req\fR Request for a statement .TP \fB\-a\fR, \fB\-\-accountinfo\-req\fR Request for a list of accounts .TP \fB\-p\fR, \fB\-\-payment\-req\fR Request to make a payment .TP \fB\-i\fR, \fB\-\-paymentinquiry\-req\fR Request to inquire about the status of a payment .TP \fB\-b\fR, \fB\-\-bank\-list\fR List all known banks .TP \fB\-f\fR, \fB\-\-bank\-fipid\fR List all fipids for a given bank .TP \fB\-v\fR, \fB\-\-bank\-services\fR List supported services for a given fipid .TP \fB\-\-allsupport\fR List all banks which support online banking .SH "SEE ALSO" The full documentation for .B libofx is maintained as a Texinfo manual. If the .B info and .B libofx programs are properly installed at your site, the command .IP .B info libofx .PP should give you access to the complete manual. libofx-0.9.4/ofxconnect/cmdline.ggo0000644000175000017500000000363311544727432014225 00000000000000# Name of your program #package "ofxconnect" # Version of your program # don't use version if you're using automake purpose "prints to stdout the created OFX file based on the options you pass it. currently it will only create a statement request file. you can POST this to an OFX server to request a statement from that financial institution for that account." # Options # option {argtype} {typestr=""} {default=""} {required} {argoptional} {multiple} #section "Parameters" option "fipid" - "FI partner identifier (looks up fid, org & url from partner server)" string no option "fid" - "FI identifier" string no option "org" - "FI org tag" string no option "bank" - "IBAN bank identifier" string no option "broker" - "Broker identifier" string no option "user" - "User name" string no option "pass" - "Password" string no option "acct" - "Account ID" string no option "type" - "Account Type 1=checking 2=invest 3=ccard" int no option "past" - "How far back to look from today (in days)" long no option "url" - "Url to POST the data to (otherwise goes to stdout)" string no option "trid" - "Transaction id" int no #section "Commands" defgroup "command" # groupdesc="command to exectute" (Does not work properly with gengetopt 2.10) groupoption "statement-req" s "Request for a statement" group="command" groupoption "accountinfo-req" a "Request for a list of accounts" group="command" groupoption "payment-req" p "Request to make a payment" group="command" groupoption "paymentinquiry-req" i "Request to inquire about the status of a payment" group="command" groupoption "bank-list" b "List all known banks" group="command" groupoption "bank-fipid" f "List all fipids for a given bank" group="command" groupoption "bank-services" v "List supported services for a given fipid" group="command" groupoption "allsupport" - "List all banks which support online banking" group="command" libofx-0.9.4/ofxconnect/nodeparser.h0000644000175000017500000000326511544727432014430 00000000000000/*************************************************************************** nodeparser.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Declaration of nodeparser object, which facilitiates searching * for nodes in an XML file using a notation similiar to XPath. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef NODEPARSER_H #define NODEPARSER_H #include #include #include class NodeParser: public xmlpp::Node::NodeList { public: NodeParser(void) {} NodeParser(const xmlpp::Node::NodeList&); NodeParser(const xmlpp::Node*); NodeParser(const xmlpp::DomParser&); NodeParser Path(const std::string& path) const; NodeParser Select(const std::string& key, const std::string& value) const; std::vector Text(void) const; protected: static NodeParser Path(const xmlpp::Node* node,const std::string& path); }; #endif // NODEPARSER_H libofx-0.9.4/ofxconnect/Makefile.am0000644000175000017500000000151111553134256014135 00000000000000bin_PROGRAMS = ofxconnect ofxconnect_LDADD = $(top_builddir)/lib/libofx.la @LIBCURL@ @LIBXMLPP_LIBS@ ofxconnect_SOURCES = cmdline.h cmdline.c nodeparser.cpp nodeparser.h ofxpartner.cpp ofxpartner.h ofxconnect.cpp dist_man_MANS = ofxconnect.1 AM_CPPFLAGS = \ -I${top_srcdir}/inc \ @LIBCURL_CPPFLAGS@ \ @LIBXMLPP_CFLAGS@ if USE_GENGETOPT CLEANFILES = cmdline.c cmdline.h cmdline.c cmdline.h: cmdline.ggo Makefile gengetopt --unamed-opts < $< endif MAINTAINERCLEANFILES = cmdline.c cmdline.h EXTRA_DIST = cmdline.ggo test-privateserver.sh # See README.privateserver for details on this server and how to get # the key needed to run this test. TESTS = test-privateserver.sh ofxconnect.1: ofxconnect.cpp $(top_srcdir)/configure.in $(MAKE) $(AM_MAKEFLAGS) ofxconnect$(EXEEXT) help2man --output=ofxconnect.1 ./ofxconnect$(EXEEXT) libofx-0.9.4/ofxconnect/ofxpartner.cpp0000644000175000017500000001706211544727432015011 00000000000000/*************************************************************************** ofx_partner.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Methods for connecting to the OFX partner server to retrieve * OFX server information */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include //#ifdef HAVE_LIBCURL #include //#endif #include "ofxpartner.h" #include "nodeparser.h" #include #include #include #include #include #include using std::string; using std::vector; using std::cout; using std::endl; namespace OfxPartner { bool post(const string& request, const string& url, const string& filename); const string kBankFilename = "ofx-bank-index.xml"; const string kCcFilename = "ofx-cc-index.xml"; const string kInvFilename = "ofx-inv-index.xml"; void ValidateIndexCache(void) { // TODO Check whether these files exist and are recent enough before getting them again struct stat filestats; if ( stat( kBankFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 ) post("T=1&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kBankFilename); if ( stat( kCcFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 ) post("T=2&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kCcFilename); if ( stat( kInvFilename.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 ) post("T=3&S=*&R=1&O=0&TEST=0","http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=6",kInvFilename); } vector BankNames(void) { vector result; // Make sure the index files are up to date ValidateIndexCache(); xmlpp::DomParser parser; parser.set_substitute_entities(); parser.parse_file(kBankFilename); if ( parser ) { vector names = NodeParser(parser).Path("fi/prov/name").Text(); result.insert(result.end(),names.begin(),names.end()); } parser.parse_file(kCcFilename); if ( parser ) { vector names = NodeParser(parser).Path("fi/prov/name").Text(); result.insert(result.end(),names.begin(),names.end()); } parser.parse_file(kInvFilename); if ( parser ) { vector names = NodeParser(parser).Path("fi/prov/name").Text(); result.insert(result.end(),names.begin(),names.end()); } // Add Innovision result.push_back("Innovision"); // sort the list and remove duplicates, to return one unified list of all supported banks sort(result.begin(),result.end()); result.erase(unique(result.begin(),result.end()),result.end()); return result; } vector FipidForBank(const string& bank) { vector result; xmlpp::DomParser parser; parser.set_substitute_entities(); parser.parse_file(kBankFilename); if ( parser ) { vector fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text(); if ( ! fipids.back().empty() ) result.insert(result.end(),fipids.begin(),fipids.end()); } parser.parse_file(kCcFilename); if ( parser ) { vector fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text(); if ( ! fipids.back().empty() ) result.insert(result.end(),fipids.begin(),fipids.end()); } parser.parse_file(kInvFilename); if ( parser ) { vector fipids = NodeParser(parser).Path("fi/prov").Select("name",bank).Path("guid").Text(); if ( ! fipids.back().empty() ) result.insert(result.end(),fipids.begin(),fipids.end()); } // the fipid for Innovision is 1. if ( bank == "Innovision" ) result.push_back("1"); sort(result.begin(),result.end()); result.erase(unique(result.begin(),result.end()),result.end()); return result; } OfxFiServiceInfo ServiceInfo(const std::string& fipid) { OfxFiServiceInfo result; memset(&result,0,sizeof(OfxFiServiceInfo)); // Hard-coded values for Innovision test server if ( fipid == "1" ) { strncpy(result.fid,"00000",OFX_FID_LENGTH-1); strncpy(result.org,"ReferenceFI",OFX_ORG_LENGTH-1); strncpy(result.url,"http://ofx.innovision.com",OFX_URL_LENGTH-1); result.accountlist = 1; result.statements = 1; result.billpay = 1; result.investments = 1; return result; } string url = "http://moneycentral.msn.com/money/2005/mnynet/service/olsvcupd/OnlSvcBrandInfo.aspx?MSNGUID=&GUID=%1&SKU=3&VER=6"; url.replace(url.find("%1"),2,fipid); // TODO: Check whether this file exists and is recent enough before getting it again string guidfile = "fipid-%1.xml"; guidfile.replace(guidfile.find("%1"),2,fipid); struct stat filestats; if ( stat( guidfile.c_str(), &filestats ) || difftime(time(0),filestats.st_mtime) > 7.0*24.0*60.0*60.0 ) post("",url.c_str(),guidfile.c_str()); // Print the FI details xmlpp::DomParser parser; parser.set_substitute_entities(); parser.parse_file(guidfile); if ( parser ) { NodeParser nodes(parser); strncpy(result.fid,nodes.Path("ProviderSettings/FID").Text().back().c_str(),OFX_FID_LENGTH-1); strncpy(result.org,nodes.Path("ProviderSettings/Org").Text().back().c_str(),OFX_ORG_LENGTH-1); strncpy(result.url,nodes.Path("ProviderSettings/ProviderURL").Text().back().c_str(),OFX_URL_LENGTH-1); result.accountlist = (nodes.Path("ProviderSettings/AcctListAvail").Text().back() == "1"); result.statements = (nodes.Path("BankingCapabilities/Bank").Text().back() == "1"); result.billpay = (nodes.Path("BillPayCapabilities/Pay").Text().back() == "1"); result.investments = (nodes.Path("InvestmentCapabilities/BrkStmt").Text().back() == "1"); } return result; } bool post(const string& request, const string& url, const string& filename) { #if 1 //#ifdef HAVE_LIBCURL CURL *curl = curl_easy_init(); if(! curl) return false; unlink(filename.c_str()); FILE* file = fopen(filename.c_str(),"wb"); if (! file ) { curl_easy_cleanup(curl); return false; } curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); if ( request.length() ) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)file); /*CURLcode res =*/ curl_easy_perform(curl); curl_easy_cleanup(curl); fclose(file); return true; #else request; url; filename; cerr << "ERROR: libox must be configured with libcurl to post this request" << endl; return false; #endif } } // namespace OfxPartner // vim:cin:si:ai:et:ts=2:sw=2: libofx-0.9.4/ofxconnect/Makefile.in0000644000175000017500000006322011553134315014147 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ofxconnect$(EXEEXT) subdir = ofxconnect DIST_COMMON = README $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_ofxconnect_OBJECTS = cmdline.$(OBJEXT) nodeparser.$(OBJEXT) \ ofxpartner.$(OBJEXT) ofxconnect.$(OBJEXT) ofxconnect_OBJECTS = $(am_ofxconnect_OBJECTS) ofxconnect_DEPENDENCIES = $(top_builddir)/lib/libofx.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(ofxconnect_SOURCES) DIST_SOURCES = $(ofxconnect_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ofxconnect_LDADD = $(top_builddir)/lib/libofx.la @LIBCURL@ @LIBXMLPP_LIBS@ ofxconnect_SOURCES = cmdline.h cmdline.c nodeparser.cpp nodeparser.h ofxpartner.cpp ofxpartner.h ofxconnect.cpp dist_man_MANS = ofxconnect.1 AM_CPPFLAGS = \ -I${top_srcdir}/inc \ @LIBCURL_CPPFLAGS@ \ @LIBXMLPP_CFLAGS@ @USE_GENGETOPT_TRUE@CLEANFILES = cmdline.c cmdline.h MAINTAINERCLEANFILES = cmdline.c cmdline.h EXTRA_DIST = cmdline.ggo test-privateserver.sh # See README.privateserver for details on this server and how to get # the key needed to run this test. TESTS = test-privateserver.sh all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ofxconnect/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ofxconnect/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ofxconnect$(EXEEXT): $(ofxconnect_OBJECTS) $(ofxconnect_DEPENDENCIES) @rm -f ofxconnect$(EXEEXT) $(CXXLINK) $(ofxconnect_OBJECTS) $(ofxconnect_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nodeparser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofxconnect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofxpartner.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(MAKE) $(AM_MAKEFLAGS) check-TESTS 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 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-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-man uninstall-man: uninstall-man1 .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am 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-man uninstall-man1 @USE_GENGETOPT_TRUE@cmdline.c cmdline.h: cmdline.ggo Makefile @USE_GENGETOPT_TRUE@ gengetopt --unamed-opts < $< ofxconnect.1: ofxconnect.cpp $(top_srcdir)/configure.in $(MAKE) $(AM_MAKEFLAGS) ofxconnect$(EXEEXT) help2man --output=ofxconnect.1 ./ofxconnect$(EXEEXT) # 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: libofx-0.9.4/ofxconnect/nodeparser.cpp0000644000175000017500000001061611544727432014761 00000000000000/*************************************************************************** nodeparser.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Implementation of nodeparser object, which facilitiates searching * for nodes in an XML file using a notation similiar to XPath. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include "nodeparser.h" using std::string; using std::vector; NodeParser::NodeParser(const xmlpp::Node::NodeList& list): xmlpp::Node::NodeList(list) { } NodeParser::NodeParser(const xmlpp::Node* node) { push_back(const_cast(node)); } NodeParser::NodeParser(const xmlpp::DomParser& parser) { xmlpp::Node* node = parser.get_document()->get_root_node(); push_back(const_cast(node)); } NodeParser NodeParser::Path(const xmlpp::Node* node,const std::string& path) { //std::cout << __PRETTY_FUNCTION__ << std::endl; NodeParser result; // split path string into the 1st level, and the rest std::string key = path; std::string remainder; std::string::size_type token_pos = path.find('/'); if ( token_pos != std::string::npos ) { key = path.substr(0, token_pos ); remainder = path.substr( token_pos + 1 ); } // find the first level nodes that match xmlpp::Node::NodeList list = node->get_children(); for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) { if ( (*iter)->get_name() == key ) { // if there is still some path left, ask for the rest of the path from those nodes. if ( remainder.length() ) { NodeParser remain_list = NodeParser(*iter).Path(remainder); result.splice(result.end(),remain_list); } // otherwise add the node to the result list. else result.push_back(*iter); } } return result; } NodeParser NodeParser::Path(const std::string& path) const { //std::cout << __PRETTY_FUNCTION__ << std::endl; NodeParser result; for(const_iterator iter = begin(); iter != end(); ++iter) { NodeParser iter_list = Path(*iter,path); result.splice(result.end(),iter_list); } return result; } NodeParser NodeParser::Select(const std::string& key, const std::string& value) const { //std::cout << __PRETTY_FUNCTION__ << std::endl; NodeParser result; for(const_iterator iter = begin(); iter != end(); ++iter) { xmlpp::Node::NodeList list = (*iter)->get_children(); for(xmlpp::Node::NodeList::const_iterator iter3 = list.begin(); iter3 != list.end(); ++iter3) { if ( (*iter3)->get_name() == key ) { xmlpp::Node::NodeList list = (*iter3)->get_children(); for(xmlpp::Node::NodeList::const_iterator iter4 = list.begin(); iter4 != list.end(); ++iter4) { const xmlpp::TextNode* nodeText = dynamic_cast(*iter4); if ( nodeText && nodeText->get_content() == value ) result.push_back(*iter); break; } } } } return result; } vector NodeParser::Text(void) const { vector result; // Go through the list of nodes for(xmlpp::Node::NodeList::const_iterator iter = begin(); iter != end(); ++iter) { // Find the text child node, and print that xmlpp::Node::NodeList list = (*iter)->get_children(); for(xmlpp::Node::NodeList::const_iterator iter2 = list.begin(); iter2 != list.end(); ++iter2) { const xmlpp::TextNode* nodeText = dynamic_cast(*iter2); if ( nodeText ) { result.push_back(nodeText->get_content()); } } } if ( result.empty() ) result.push_back(string()); return result; } // vim:cin:si:ai:et:ts=2:sw=2: libofx-0.9.4/lib/0000755000175000017500000000000011553134313010555 500000000000000libofx-0.9.4/lib/ofx_preproc.hh0000644000175000017500000000345211544727432013362 00000000000000/*************************************************************************** ofx_preproc.h ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Preprocessing of the OFX files before parsing * Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_PREPROC_H #define OFX_PREPROC_H #include "context.hh" #define OPENSPDCL_FILENAME "opensp.dcl" #define OFX160DTD_FILENAME "ofx160.dtd" #define OFCDTD_FILENAME "ofc.dtd" ///Removes proprietary tags and comments. string sanitize_proprietary_tags(string input_string); ///Find the appropriate DTD for the file version. string find_dtd(LibofxContextPtr ctx, string dtd_filename); /** * \brief ofx_proc_file process an ofx or ofc file. * * libofx_proc_file must be called with a list of 1 or more OFX files to be parsed in command line format. */ int ofx_proc_file(LibofxContextPtr libofx_context, const char *); #endif libofx-0.9.4/lib/ofx_sgml.hh0000644000175000017500000000232111544727432012644 00000000000000/*************************************************************************** ofx_sgml.h ------------------- begin : Tue Mar 19 2002 copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /** @file * \brief OFX/SGML parsing functionnality. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_SGML_H #define OFX_SGML_H #include "context.hh" ///Parses a DTD and OFX file(s) int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]); #endif libofx-0.9.4/lib/tree.hh0000644000175000017500000017540411544727432012002 00000000000000/* $Id: tree.hh,v 1.6 2006-07-20 04:41:16 benoitg Exp $ STL-like templated tree class. Copyright (C) 2001-2005 Kasper Peeters . */ /** \mainpage tree.hh \author Kasper Peeters \version 2.02 \date 12-Oct-2005 \see http://www.aei.mpg.de/~peekas/tree/ \see http://www.aei.mpg.de/~peekas/tree/ChangeLog The tree.hh library for C++ provides an STL-like container class for n-ary trees, templated over the data stored at the nodes. Various types of iterators are provided (post-order, pre-order, and others). Where possible the access methods are compatible with the STL or alternative algorithms are available. */ /* 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; version 2. 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 */ /** \todo - New-style move members are not completely finished yet. - Fixed depth iterators do not iterate over the entire range if there are 'holes' in the tree. - If a range uses const iter_base& as end iterator, things will inevitably go wrong, because upcast from iter_base to a non-sibling_iter is incorrect. This upcast should be removed (and then all illegal uses as previously in 'equal' will be flagged by the compiler). This requires new copy constructors though. - There's a bug in replace(sibling_iterator, ...) when the ranges sit next to each other. Turned up in append_child(iter,iter) but has been avoided now. - "std::operator<" does not work correctly on our iterators, and for some reason a globally defined template operator< did not get picked up. Using a comparison class now, but this should be investigated. */ #ifndef tree_hh_ #define tree_hh_ #include #include #include #include #include // HP-style construct/destroy have gone from the standard, // so here is a copy. namespace kp { template void constructor(T1* p, T2& val) { new ((void *) p) T1(val); } template void constructor(T1* p) { new ((void *) p) T1; } template void destructor(T1* p) { p->~T1(); } }; /// A node in the tree, combining links to other nodes as well as the actual data. template class tree_node_ // size: 5*4=20 bytes (on 32 bit arch), can be reduced by 8. { public: tree_node_ *parent; tree_node_ *first_child, *last_child; tree_node_ *prev_sibling, *next_sibling; T data; }; // __attribute__((packed)); template < class T, class tree_node_allocator = std::allocator > > class tree { protected: typedef tree_node_ tree_node; public: /// Value of the data stored at a node. typedef T value_type; class iterator_base; class pre_order_iterator; class post_order_iterator; class sibling_iterator; tree(); tree(const T&); tree(const iterator_base&); tree(const tree&); ~tree(); void operator=(const tree&); /// Base class for iterators, only pointers stored, no traversal logic. #ifdef __SGI_STL_PORT class iterator_base : public stlport::bidirectional_iterator { #else class iterator_base { #endif public: typedef T value_type; typedef T* pointer; typedef T& reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; iterator_base(); iterator_base(tree_node *); T& operator*() const; T* operator->() const; /// When called, the next increment/decrement skips children of this node. void skip_children(); /// Number of children of the node pointed to by the iterator. unsigned int number_of_children() const; sibling_iterator begin() const; sibling_iterator end() const; tree_node *node; protected: bool skip_current_children_; }; /// Depth-first iterator, first accessing the node, then its children. class pre_order_iterator : public iterator_base { public: pre_order_iterator(); pre_order_iterator(tree_node *); pre_order_iterator(const iterator_base&); pre_order_iterator(const sibling_iterator&); bool operator==(const pre_order_iterator&) const; bool operator!=(const pre_order_iterator&) const; pre_order_iterator& operator++(); pre_order_iterator& operator--(); pre_order_iterator operator++(int); pre_order_iterator operator--(int); pre_order_iterator& operator+=(unsigned int); pre_order_iterator& operator-=(unsigned int); }; /// Depth-first iterator, first accessing the children, then the node itself. class post_order_iterator : public iterator_base { public: post_order_iterator(); post_order_iterator(tree_node *); post_order_iterator(const iterator_base&); post_order_iterator(const sibling_iterator&); bool operator==(const post_order_iterator&) const; bool operator!=(const post_order_iterator&) const; post_order_iterator& operator++(); post_order_iterator& operator--(); post_order_iterator operator++(int); post_order_iterator operator--(int); post_order_iterator& operator+=(unsigned int); post_order_iterator& operator-=(unsigned int); /// Set iterator to the first child as deep as possible down the tree. void descend_all(); }; /// The default iterator type throughout the tree class. typedef pre_order_iterator iterator; /// Iterator which traverses only the nodes at a given depth from the root. class fixed_depth_iterator : public iterator_base { public: fixed_depth_iterator(); fixed_depth_iterator(tree_node *); fixed_depth_iterator(const iterator_base&); fixed_depth_iterator(const sibling_iterator&); fixed_depth_iterator(const fixed_depth_iterator&); bool operator==(const fixed_depth_iterator&) const; bool operator!=(const fixed_depth_iterator&) const; fixed_depth_iterator& operator++(); fixed_depth_iterator& operator--(); fixed_depth_iterator operator++(int); fixed_depth_iterator operator--(int); fixed_depth_iterator& operator+=(unsigned int); fixed_depth_iterator& operator-=(unsigned int); tree_node *first_parent_; private: void set_first_parent_(); void find_leftmost_parent_(); }; /// Iterator which traverses only the nodes which are siblings of each other. class sibling_iterator : public iterator_base { public: sibling_iterator(); sibling_iterator(tree_node *); sibling_iterator(const sibling_iterator&); sibling_iterator(const iterator_base&); bool operator==(const sibling_iterator&) const; bool operator!=(const sibling_iterator&) const; sibling_iterator& operator++(); sibling_iterator& operator--(); sibling_iterator operator++(int); sibling_iterator operator--(int); sibling_iterator& operator+=(unsigned int); sibling_iterator& operator-=(unsigned int); tree_node *range_first() const; tree_node *range_last() const; tree_node *parent_; private: void set_parent_(); }; /// Return iterator to the beginning of the tree. inline pre_order_iterator begin() const; /// Return iterator to the end of the tree. inline pre_order_iterator end() const; /// Return post-order iterator to the beginning of the tree. post_order_iterator begin_post() const; /// Return post-order iterator to the end of the tree. post_order_iterator end_post() const; /// Return fixed-depth iterator to the first node at a given depth. fixed_depth_iterator begin_fixed(const iterator_base&, unsigned int) const; /// Return fixed-depth iterator to end of the nodes at given depth. fixed_depth_iterator end_fixed(const iterator_base&, unsigned int) const; /// Return sibling iterator to the first child of given node. sibling_iterator begin(const iterator_base&) const; /// Return sibling iterator to the end of the children of a given node. sibling_iterator end(const iterator_base&) const; /// Return iterator to the parent of a node. template iter parent(iter) const; /// Return iterator to the previous sibling of a node. template iter previous_sibling(iter) const; /// Return iterator to the next sibling of a node. template iter next_sibling(iter) const; /// Return iterator to the next node at a given depth. template iter next_at_same_depth(iter) const; /// Erase all nodes of the tree. void clear(); /// Erase element at position pointed to by iterator, return incremented iterator. template iter erase(iter); /// Erase all children of the node pointed to by iterator. void erase_children(const iterator_base&); /// Insert empty node as last child of node pointed to by position. template iter append_child(iter position); /// Insert node as last child of node pointed to by position. template iter append_child(iter position, const T& x); /// Append the node (plus its children) at other_position as a child of position. template iter append_child(iter position, iter other_position); /// Append the nodes in the from-to range (plus their children) as children of position. template iter append_children(iter position, sibling_iterator from, sibling_iterator to); /// Short-hand to insert topmost node in otherwise empty tree. pre_order_iterator set_head(const T& x); /// Insert node as previous sibling of node pointed to by position. template iter insert(iter position, const T& x); /// Specialisation of previous member. sibling_iterator insert(sibling_iterator position, const T& x); /// Insert node (with children) pointed to by subtree as previous sibling of node pointed to by position. template iter insert_subtree(iter position, const iterator_base& subtree); /// Insert node as next sibling of node pointed to by position. template iter insert_after(iter position, const T& x); /// Replace node at 'position' with other node (keeping same children); 'position' becomes invalid. template iter replace(iter position, const T& x); /// Replace node at 'position' with subtree starting at 'from' (do not erase subtree at 'from'); see above. template iter replace(iter position, const iterator_base& from); /// Replace string of siblings (plus their children) with copy of a new string (with children); see above sibling_iterator replace(sibling_iterator orig_begin, sibling_iterator orig_end, sibling_iterator new_begin, sibling_iterator new_end); /// Move all children of node at 'position' to be siblings, returns position. template iter flatten(iter position); /// Move nodes in range to be children of 'position'. template iter reparent(iter position, sibling_iterator begin, sibling_iterator end); /// Move all child nodes of 'from' to be children of 'position'. template iter reparent(iter position, iter from); /// Move 'source' node (plus its children) to become the next sibling of 'target'. template iter move_after(iter target, iter source); /// Move 'source' node (plus its children) to become the previous sibling of 'target'. template iter move_before(iter target, iter source); /// Move 'source' node (plus its children) to become the node at 'target' (erasing the node at 'target'). template iter move_ontop(iter target, iter source); /// Merge with other tree, creating new branches and leaves only if they are not already present. void merge(sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator, bool duplicate_leaves = false); /// Sort (std::sort only moves values of nodes, this one moves children as well). void sort(sibling_iterator from, sibling_iterator to, bool deep = false); template void sort(sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep = false); /// Compare two ranges of nodes (compares nodes as well as tree structure). template bool equal(const iter& one, const iter& two, const iter& three) const; template bool equal(const iter& one, const iter& two, const iter& three, BinaryPredicate) const; template bool equal_subtree(const iter& one, const iter& two) const; template bool equal_subtree(const iter& one, const iter& two, BinaryPredicate) const; /// Extract a new tree formed by the range of siblings plus all their children. tree subtree(sibling_iterator from, sibling_iterator to) const; void subtree(tree&, sibling_iterator from, sibling_iterator to) const; /// Exchange the node (plus subtree) with its sibling node (do nothing if no sibling present). void swap(sibling_iterator it); /// Count the total number of nodes. int size() const; /// Check if tree is empty. bool empty() const; /// Compute the depth to the root. int depth(const iterator_base&) const; /// Count the number of children of node at position. unsigned int number_of_children(const iterator_base&) const; /// Count the number of 'next' siblings of node at iterator. unsigned int number_of_siblings(const iterator_base&) const; /// Determine whether node at position is in the subtrees with root in the range. bool is_in_subtree(const iterator_base& position, const iterator_base& begin, const iterator_base& end) const; /// Determine whether the iterator is an 'end' iterator and thus not actually pointing to a node. bool is_valid(const iterator_base&) const; /// Determine the index of a node in the range of siblings to which it belongs. unsigned int index(sibling_iterator it) const; /// Inverse of 'index': return the n-th child of the node at position. sibling_iterator child(const iterator_base& position, unsigned int) const; /// Comparator class for iterators (compares the actual node content, not pointer values). class iterator_base_less { public: bool operator()(const typename tree::iterator_base& one, const typename tree::iterator_base& two) const { return one.node < two.node; } }; tree_node *head, *feet; // head/feet are always dummy; if an iterator points to them it is invalid private: tree_node_allocator alloc_; void head_initialise_(); void copy_(const tree& other); /// Comparator class for two nodes of a tree (used for sorting and searching). template class compare_nodes { public: compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}; bool operator()(const tree_node *a, const tree_node *b) { static StrictWeakOrdering comp; return comp(a->data, b->data); } private: StrictWeakOrdering comp_; }; }; //template //class iterator_base_less { // public: // bool operator()(const typename tree::iterator_base& one, // const typename tree::iterator_base& two) const // { // txtout << "operatorclass<" << one.node < two.node << std::endl; // return one.node < two.node; // } //}; //template //bool operator<(const typename tree::iterator& one, // const typename tree::iterator& two) // { // txtout << "operator< " << one.node < two.node << std::endl; // if(one.node < two.node) return true; // return false; // } template bool operator>(const typename tree::iterator_base& one, const typename tree::iterator_base& two) { if (one.node > two.node) return true; return false; } // Tree template tree::tree() { head_initialise_(); } template tree::tree(const T& x) { head_initialise_(); set_head(x); } template tree::tree(const iterator_base& other) { head_initialise_(); set_head((*other)); replace(begin(), other); } template tree::~tree() { clear(); alloc_.deallocate(head, 1); alloc_.deallocate(feet, 1); } template void tree::head_initialise_() { head = alloc_.allocate(1, 0); // MSVC does not have default second argument feet = alloc_.allocate(1, 0); head->parent = 0; head->first_child = 0; head->last_child = 0; head->prev_sibling = 0; //head; head->next_sibling = feet; //head; feet->parent = 0; feet->first_child = 0; feet->last_child = 0; feet->prev_sibling = head; feet->next_sibling = 0; } template void tree::operator=(const tree& other) { copy_(other); } template tree::tree(const tree& other) { head_initialise_(); copy_(other); } template void tree::copy_(const tree& other) { clear(); pre_order_iterator it = other.begin(), to = begin(); while (it != other.end()) { to = insert(to, (*it)); it.skip_children(); ++it; } to = begin(); it = other.begin(); while (it != other.end()) { to = replace(to, it); to.skip_children(); it.skip_children(); ++to; ++it; } } template void tree::clear() { if (head) while (head->next_sibling != feet) erase(pre_order_iterator(head->next_sibling)); } template void tree::erase_children(const iterator_base& it) { tree_node *cur = it.node->first_child; tree_node *prev = 0; while (cur != 0) { prev = cur; cur = cur->next_sibling; erase_children(pre_order_iterator(prev)); kp::destructor(&prev->data); alloc_.deallocate(prev, 1); } it.node->first_child = 0; it.node->last_child = 0; } template template iter tree::erase(iter it) { tree_node *cur = it.node; assert(cur != head); iter ret = it; ret.skip_children(); ++ret; erase_children(it); if (cur->prev_sibling == 0) { cur->parent->first_child = cur->next_sibling; } else { cur->prev_sibling->next_sibling = cur->next_sibling; } if (cur->next_sibling == 0) { cur->parent->last_child = cur->prev_sibling; } else { cur->next_sibling->prev_sibling = cur->prev_sibling; } kp::destructor(&cur->data); alloc_.deallocate(cur, 1); return ret; } template typename tree::pre_order_iterator tree::begin() const { return pre_order_iterator(head->next_sibling); } template typename tree::pre_order_iterator tree::end() const { return pre_order_iterator(feet); } template typename tree::post_order_iterator tree::begin_post() const { tree_node *tmp = head->next_sibling; if (tmp != feet) { while (tmp->first_child) tmp = tmp->first_child; } return post_order_iterator(tmp); } template typename tree::post_order_iterator tree::end_post() const { return post_order_iterator(feet); } template typename tree::fixed_depth_iterator tree::begin_fixed(const iterator_base& pos, unsigned int dp) const { tree_node *tmp = pos.node; unsigned int curdepth = 0; while (curdepth < dp) // go down one level { while (tmp->first_child == 0) { tmp = tmp->next_sibling; if (tmp == 0) throw std::range_error("tree: begin_fixed out of range"); } tmp = tmp->first_child; ++curdepth; } return tmp; } template typename tree::fixed_depth_iterator tree::end_fixed(const iterator_base& pos, unsigned int dp) const { assert(1 == 0); // FIXME: not correct yet tree_node *tmp = pos.node; unsigned int curdepth = 1; while (curdepth < dp) // go down one level { while (tmp->first_child == 0) { tmp = tmp->next_sibling; if (tmp == 0) throw std::range_error("tree: end_fixed out of range"); } tmp = tmp->first_child; ++curdepth; } return tmp; } template typename tree::sibling_iterator tree::begin(const iterator_base& pos) const { if (pos.node->first_child == 0) { return end(pos); } return pos.node->first_child; } template typename tree::sibling_iterator tree::end(const iterator_base& pos) const { sibling_iterator ret(0); ret.parent_ = pos.node; return ret; } template template iter tree::parent(iter position) const { assert(position.node != 0); return iter(position.node->parent); } template template iter tree::previous_sibling(iter position) const { assert(position.node != 0); iter ret(position); ret.node = position.node->prev_sibling; return ret; } template template iter tree::next_sibling(iter position) const { assert(position.node != 0); iter ret(position); ret.node = position.node->next_sibling; return ret; } template template iter tree::next_at_same_depth(iter position) const { assert(position.node != 0); iter ret(position); if (position.node->next_sibling) { ret.node = position.node->next_sibling; } else { int relative_depth = 0; upper: do { ret.node = ret.node->parent; if (ret.node == 0) return ret; --relative_depth; } while (ret.node->next_sibling == 0); lower: ret.node = ret.node->next_sibling; while (ret.node->first_child == 0) { if (ret.node->next_sibling == 0) goto upper; ret.node = ret.node->next_sibling; if (ret.node == 0) return ret; } while (relative_depth < 0 && ret.node->first_child != 0) { ret.node = ret.node->first_child; ++relative_depth; } if (relative_depth < 0) { if (ret.node->next_sibling == 0) goto upper; else goto lower; } } return ret; } template template iter tree::append_child(iter position) { assert(position.node != head); tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data); tmp->first_child = 0; tmp->last_child = 0; tmp->parent = position.node; if (position.node->last_child != 0) { position.node->last_child->next_sibling = tmp; } else { position.node->first_child = tmp; } tmp->prev_sibling = position.node->last_child; position.node->last_child = tmp; tmp->next_sibling = 0; return tmp; } template template iter tree::append_child(iter position, const T& x) { // If your program fails here you probably used 'append_child' to add the top // node to an empty tree. From version 1.45 the top element should be added // using 'insert'. See the documentation for further information, and sorry about // the API change. assert(position.node != head); tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; tmp->parent = position.node; if (position.node->last_child != 0) { position.node->last_child->next_sibling = tmp; } else { position.node->first_child = tmp; } tmp->prev_sibling = position.node->last_child; position.node->last_child = tmp; tmp->next_sibling = 0; return tmp; } template template iter tree::append_child(iter position, iter other) { assert(position.node != head); sibling_iterator aargh = append_child(position, value_type()); return replace(aargh, other); } template template iter tree::append_children(iter position, sibling_iterator from, sibling_iterator to) { iter ret = from; while (from != to) { insert_subtree(position.end(), from); ++from; } return ret; } template typename tree::pre_order_iterator tree::set_head(const T& x) { assert(head->next_sibling == feet); return insert(iterator(feet), x); } template template iter tree::insert(iter position, const T& x) { if (position.node == 0) { position.node = feet; // Backward compatibility: when calling insert on a null node, // insert before the feet. } tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; tmp->parent = position.node->parent; tmp->next_sibling = position.node; tmp->prev_sibling = position.node->prev_sibling; position.node->prev_sibling = tmp; if (tmp->prev_sibling == 0) { if (tmp->parent) // when inserting nodes at the head, there is no parent tmp->parent->first_child = tmp; } else tmp->prev_sibling->next_sibling = tmp; return tmp; } template typename tree::sibling_iterator tree::insert(sibling_iterator position, const T& x) { tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; tmp->next_sibling = position.node; if (position.node == 0) // iterator points to end of a subtree { tmp->parent = position.parent_; tmp->prev_sibling = position.range_last(); tmp->parent->last_child = tmp; } else { tmp->parent = position.node->parent; tmp->prev_sibling = position.node->prev_sibling; position.node->prev_sibling = tmp; } if (tmp->prev_sibling == 0) { if (tmp->parent) // when inserting nodes at the head, there is no parent tmp->parent->first_child = tmp; } else tmp->prev_sibling->next_sibling = tmp; return tmp; } template template iter tree::insert_after(iter position, const T& x) { tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; tmp->parent = position.node->parent; tmp->prev_sibling = position.node; tmp->next_sibling = position.node->next_sibling; position.node->next_sibling = tmp; if (tmp->next_sibling == 0) { if (tmp->parent) // when inserting nodes at the head, there is no parent tmp->parent->last_child = tmp; } else { tmp->next_sibling->prev_sibling = tmp; } return tmp; } template template iter tree::insert_subtree(iter position, const iterator_base& subtree) { // insert dummy iter it = insert(position, value_type()); // replace dummy with subtree return replace(it, subtree); } // template // template // iter tree::insert_subtree(sibling_iterator position, iter subtree) // { // // insert dummy // iter it(insert(position, value_type())); // // replace dummy with subtree // return replace(it, subtree); // } template template iter tree::replace(iter position, const T& x) { kp::destructor(&position.node->data); kp::constructor(&position.node->data, x); return position; } template template iter tree::replace(iter position, const iterator_base& from) { assert(position.node != head); tree_node *current_from = from.node; tree_node *start_from = from.node; tree_node *current_to = position.node; // replace the node at position with head of the replacement tree at from erase_children(position); tree_node* tmp = alloc_.allocate(1, 0); kp::constructor(&tmp->data, (*from)); tmp->first_child = 0; tmp->last_child = 0; if (current_to->prev_sibling == 0) { current_to->parent->first_child = tmp; } else { current_to->prev_sibling->next_sibling = tmp; } tmp->prev_sibling = current_to->prev_sibling; if (current_to->next_sibling == 0) { current_to->parent->last_child = tmp; } else { current_to->next_sibling->prev_sibling = tmp; } tmp->next_sibling = current_to->next_sibling; tmp->parent = current_to->parent; kp::destructor(¤t_to->data); alloc_.deallocate(current_to, 1); current_to = tmp; // only at this stage can we fix 'last' tree_node *last = from.node->next_sibling; pre_order_iterator toit = tmp; // copy all children do { assert(current_from != 0); if (current_from->first_child != 0) { current_from = current_from->first_child; toit = append_child(toit, current_from->data); } else { while (current_from->next_sibling == 0 && current_from != start_from) { current_from = current_from->parent; toit = parent(toit); assert(current_from != 0); } current_from = current_from->next_sibling; if (current_from != last) { toit = append_child(parent(toit), current_from->data); } } } while (current_from != last); return current_to; } template typename tree::sibling_iterator tree::replace( sibling_iterator orig_begin, sibling_iterator orig_end, sibling_iterator new_begin, sibling_iterator new_end) { tree_node *orig_first = orig_begin.node; tree_node *new_first = new_begin.node; tree_node *orig_last = orig_first; while ((++orig_begin) != orig_end) orig_last = orig_last->next_sibling; tree_node *new_last = new_first; while ((++new_begin) != new_end) new_last = new_last->next_sibling; // insert all siblings in new_first..new_last before orig_first bool first = true; pre_order_iterator ret; while (1 == 1) { pre_order_iterator tt = insert_subtree(pre_order_iterator(orig_first), pre_order_iterator(new_first)); if (first) { ret = tt; first = false; } if (new_first == new_last) break; new_first = new_first->next_sibling; } // erase old range of siblings bool last = false; tree_node *next = orig_first; while (1 == 1) { if (next == orig_last) last = true; next = next->next_sibling; erase((pre_order_iterator)orig_first); if (last) break; orig_first = next; } return ret; } template template iter tree::flatten(iter position) { if (position.node->first_child == 0) return position; tree_node *tmp = position.node->first_child; while (tmp) { tmp->parent = position.node->parent; tmp = tmp->next_sibling; } if (position.node->next_sibling) { position.node->last_child->next_sibling = position.node->next_sibling; position.node->next_sibling->prev_sibling = position.node->last_child; } else { position.node->parent->last_child = position.node->last_child; } position.node->next_sibling = position.node->first_child; position.node->next_sibling->prev_sibling = position.node; position.node->first_child = 0; position.node->last_child = 0; return position; } template template iter tree::reparent(iter position, sibling_iterator begin, sibling_iterator end) { tree_node *first = begin.node; tree_node *last = first; if (begin == end) return begin; // determine last node while ((++begin) != end) { last = last->next_sibling; } // move subtree if (first->prev_sibling == 0) { first->parent->first_child = last->next_sibling; } else { first->prev_sibling->next_sibling = last->next_sibling; } if (last->next_sibling == 0) { last->parent->last_child = first->prev_sibling; } else { last->next_sibling->prev_sibling = first->prev_sibling; } if (position.node->first_child == 0) { position.node->first_child = first; position.node->last_child = last; first->prev_sibling = 0; } else { position.node->last_child->next_sibling = first; first->prev_sibling = position.node->last_child; position.node->last_child = last; } last->next_sibling = 0; tree_node *pos = first; while (1 == 1) { pos->parent = position.node; if (pos == last) break; pos = pos->next_sibling; } return first; } template template iter tree::reparent(iter position, iter from) { if (from.node->first_child == 0) return position; return reparent(position, from.node->first_child, end(from)); } template template iter tree::move_after(iter target, iter source) { tree_node *dst = target.node; tree_node *src = source.node; assert(dst); assert(src); if (dst == src) return source; // take src out of the tree if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling; else src->parent->first_child = src->next_sibling; if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling; else src->parent->last_child = src->prev_sibling; // connect it to the new point if (dst->next_sibling != 0) dst->next_sibling->prev_sibling = src; else dst->parent->last_child = src; src->next_sibling = dst->next_sibling; dst->next_sibling = src; src->prev_sibling = dst; src->parent = dst->parent; return src; } template template iter tree::move_before(iter target, iter source) { tree_node *dst = target.node; tree_node *src = source.node; assert(dst); assert(src); if (dst == src) return source; // take src out of the tree if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling; else src->parent->first_child = src->next_sibling; if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling; else src->parent->last_child = src->prev_sibling; // connect it to the new point if (dst->prev_sibling != 0) dst->prev_sibling->next_sibling = src; else dst->parent->first_child = src; src->prev_sibling = dst->prev_sibling; dst->prev_sibling = src; src->next_sibling = dst; src->parent = dst->parent; return src; } template template iter tree::move_ontop(iter target, iter source) { tree_node *dst = target.node; tree_node *src = source.node; assert(dst); assert(src); if (dst == src) return source; // remember connection points tree_node *b_prev_sibling = dst->prev_sibling; tree_node *b_next_sibling = dst->next_sibling; tree_node *b_parent = dst->parent; // remove target erase(target); // take src out of the tree if (src->prev_sibling != 0) src->prev_sibling->next_sibling = src->next_sibling; else src->parent->first_child = src->next_sibling; if (src->next_sibling != 0) src->next_sibling->prev_sibling = src->prev_sibling; else src->parent->last_child = src->prev_sibling; // connect it to the new point if (b_prev_sibling != 0) b_prev_sibling->next_sibling = src; else b_parent->first_child = src; if (b_next_sibling != 0) b_next_sibling->prev_sibling = src; else b_parent->last_child = src; src->prev_sibling = b_prev_sibling; src->next_sibling = b_next_sibling; src->parent = b_parent; return src; } template void tree::merge(sibling_iterator to1, sibling_iterator to2, sibling_iterator from1, sibling_iterator from2, bool duplicate_leaves) { sibling_iterator fnd; while (from1 != from2) { if ((fnd = std::find(to1, to2, (*from1))) != to2) // element found { if (from1.begin() == from1.end()) // full depth reached { if (duplicate_leaves) append_child(parent(to1), (*from1)); } else // descend further { merge(fnd.begin(), fnd.end(), from1.begin(), from1.end(), duplicate_leaves); } } else // element missing { insert_subtree(to2, from1); } ++from1; } } template void tree::sort(sibling_iterator from, sibling_iterator to, bool deep) { std::less comp; sort(from, to, comp, deep); } template template void tree::sort(sibling_iterator from, sibling_iterator to, StrictWeakOrdering comp, bool deep) { if (from == to) return; // make list of sorted nodes // CHECK: if multiset stores equivalent nodes in the order in which they // are inserted, then this routine should be called 'stable_sort'. std::multiset > nodes(comp); sibling_iterator it = from, it2 = to; while (it != to) { nodes.insert(it.node); ++it; } // reassemble --it2; // prev and next are the nodes before and after the sorted range tree_node *prev = from.node->prev_sibling; tree_node *next = it2.node->next_sibling; typename std::multiset >::iterator nit = nodes.begin(), eit = nodes.end(); if (prev == 0) { if ((*nit)->parent != 0) // to catch "sorting the head" situations, when there is no parent (*nit)->parent->first_child = (*nit); } else prev->next_sibling = (*nit); --eit; while (nit != eit) { (*nit)->prev_sibling = prev; if (prev) prev->next_sibling = (*nit); prev = (*nit); ++nit; } // prev now points to the last-but-one node in the sorted range if (prev) prev->next_sibling = (*eit); // eit points to the last node in the sorted range. (*eit)->next_sibling = next; (*eit)->prev_sibling = prev; // missed in the loop above if (next == 0) { if ((*eit)->parent != 0) // to catch "sorting the head" situations, when there is no parent (*eit)->parent->last_child = (*eit); } else next->prev_sibling = (*eit); if (deep) // sort the children of each node too { sibling_iterator bcs(*nodes.begin()); sibling_iterator ecs(*eit); ++ecs; while (bcs != ecs) { sort(begin(bcs), end(bcs), comp, deep); ++bcs; } } } template template bool tree::equal(const iter& one_, const iter& two, const iter& three_) const { std::equal_to comp; return equal(one_, two, three_, comp); } template template bool tree::equal_subtree(const iter& one_, const iter& two_) const { std::equal_to comp; return equal_subtree(one_, two_, comp); } template template bool tree::equal(const iter& one_, const iter& two, const iter& three_, BinaryPredicate fun) const { pre_order_iterator one(one_), three(three_); // if(one==two && is_valid(three) && three.number_of_children()!=0) // return false; while (one != two && is_valid(three)) { if (!fun(*one, *three)) return false; if (one.number_of_children() != three.number_of_children()) return false; ++one; ++three; } return true; } template template bool tree::equal_subtree(const iter& one_, const iter& two_, BinaryPredicate fun) const { pre_order_iterator one(one_), two(two_); if (!fun(*one, *two)) return false; if (number_of_children(one) != number_of_children(two)) return false; return equal(begin(one), end(one), begin(two), fun); } template tree tree::subtree(sibling_iterator from, sibling_iterator to) const { tree tmp; tmp.set_head(value_type()); tmp.replace(tmp.begin(), tmp.end(), from, to); return tmp; } template void tree::subtree(tree& tmp, sibling_iterator from, sibling_iterator to) const { tmp.set_head(value_type()); tmp.replace(tmp.begin(), tmp.end(), from, to); } template int tree::size() const { int i = 0; pre_order_iterator it = begin(), eit = end(); while (it != eit) { ++i; ++it; } return i; } template bool tree::empty() const { pre_order_iterator it = begin(), eit = end(); return (it == eit); } template int tree::depth(const iterator_base& it) const { tree_node* pos = it.node; assert(pos != 0); int ret = 0; while (pos->parent != 0) { pos = pos->parent; ++ret; } return ret; } template unsigned int tree::number_of_children(const iterator_base& it) const { tree_node *pos = it.node->first_child; if (pos == 0) return 0; unsigned int ret = 1; // while(pos!=it.node->last_child) { // ++ret; // pos=pos->next_sibling; // } while ((pos = pos->next_sibling)) ++ret; return ret; } template unsigned int tree::number_of_siblings(const iterator_base& it) const { tree_node *pos = it.node; unsigned int ret = 0; while (pos->next_sibling && pos->next_sibling != head && pos->next_sibling != feet) { ++ret; pos = pos->next_sibling; } return ret; } template void tree::swap(sibling_iterator it) { tree_node *nxt = it.node->next_sibling; if (nxt) { if (it.node->prev_sibling) it.node->prev_sibling->next_sibling = nxt; else it.node->parent->first_child = nxt; nxt->prev_sibling = it.node->prev_sibling; tree_node *nxtnxt = nxt->next_sibling; if (nxtnxt) nxtnxt->prev_sibling = it.node; else it.node->parent->last_child = it.node; nxt->next_sibling = it.node; it.node->prev_sibling = nxt; it.node->next_sibling = nxtnxt; } } // template // tree::iterator tree::find_subtree( // sibling_iterator subfrom, sibling_iterator subto, iterator from, iterator to, // BinaryPredicate fun) const // { // assert(1==0); // this routine is not finished yet. // while(from!=to) { // if(fun(*subfrom, *from)) { // // } // } // return to; // } template bool tree::is_in_subtree(const iterator_base& it, const iterator_base& begin, const iterator_base& end) const { // FIXME: this should be optimised. pre_order_iterator tmp = begin; while (tmp != end) { if (tmp == it) return true; ++tmp; } return false; } template bool tree::is_valid(const iterator_base& it) const { if (it.node == 0 || it.node == feet) return false; else return true; } template unsigned int tree::index(sibling_iterator it) const { unsigned int ind = 0; if (it.node->parent == 0) { while (it.node->prev_sibling != head) { it.node = it.node->prev_sibling; ++ind; } } else { while (it.node->prev_sibling != 0) { it.node = it.node->prev_sibling; ++ind; } } return ind; } template typename tree::sibling_iterator tree::child(const iterator_base& it, unsigned int num) const { tree_node *tmp = it.node->first_child; while (num--) { assert(tmp != 0); tmp = tmp->next_sibling; } return tmp; } // Iterator base template tree::iterator_base::iterator_base() : node(0), skip_current_children_(false) { } template tree::iterator_base::iterator_base(tree_node *tn) : node(tn), skip_current_children_(false) { } template T& tree::iterator_base::operator*() const { return node->data; } template T* tree::iterator_base::operator->() const { return &(node->data); } template bool tree::post_order_iterator::operator!=(const post_order_iterator& other) const { if (other.node != this->node) return true; else return false; } template bool tree::post_order_iterator::operator==(const post_order_iterator& other) const { if (other.node == this->node) return true; else return false; } template bool tree::pre_order_iterator::operator!=(const pre_order_iterator& other) const { if (other.node != this->node) return true; else return false; } template bool tree::pre_order_iterator::operator==(const pre_order_iterator& other) const { if (other.node == this->node) return true; else return false; } template bool tree::sibling_iterator::operator!=(const sibling_iterator& other) const { if (other.node != this->node) return true; else return false; } template bool tree::sibling_iterator::operator==(const sibling_iterator& other) const { if (other.node == this->node) return true; else return false; } template typename tree::sibling_iterator tree::iterator_base::begin() const { sibling_iterator ret(node->first_child); ret.parent_ = this->node; return ret; } template typename tree::sibling_iterator tree::iterator_base::end() const { sibling_iterator ret(0); ret.parent_ = node; return ret; } template void tree::iterator_base::skip_children() { skip_current_children_ = true; } template unsigned int tree::iterator_base::number_of_children() const { tree_node *pos = node->first_child; if (pos == 0) return 0; unsigned int ret = 1; while (pos != node->last_child) { ++ret; pos = pos->next_sibling; } return ret; } // Pre-order iterator template tree::pre_order_iterator::pre_order_iterator() : iterator_base(0) { } template tree::pre_order_iterator::pre_order_iterator(tree_node *tn) : iterator_base(tn) { } template tree::pre_order_iterator::pre_order_iterator(const iterator_base &other) : iterator_base(other.node) { } template tree::pre_order_iterator::pre_order_iterator(const sibling_iterator& other) : iterator_base(other.node) { if (this->node == 0) { if (other.range_last() != 0) this->node = other.range_last(); else this->node = other.parent_; this->skip_children(); ++(*this); } } template typename tree::pre_order_iterator& tree::pre_order_iterator::operator++() { assert(this->node != 0); if (!this->skip_current_children_ && this->node->first_child != 0) { this->node = this->node->first_child; } else { this->skip_current_children_ = false; while (this->node->next_sibling == 0) { this->node = this->node->parent; if (this->node == 0) return *this; } this->node = this->node->next_sibling; } return *this; } template typename tree::pre_order_iterator& tree::pre_order_iterator::operator--() { assert(this->node != 0); if (this->node->prev_sibling) { this->node = this->node->prev_sibling; while (this->node->last_child) this->node = this->node->last_child; } else { this->node = this->node->parent; if (this->node == 0) return *this; } return *this; } template typename tree::pre_order_iterator tree::pre_order_iterator::operator++(int n) { pre_order_iterator copy = *this; ++(*this); return copy; } template typename tree::pre_order_iterator tree::pre_order_iterator::operator--(int n) { pre_order_iterator copy = *this; --(*this); return copy; } template typename tree::pre_order_iterator& tree::pre_order_iterator::operator+=(unsigned int num) { while (num > 0) { ++(*this); --num; } return (*this); } template typename tree::pre_order_iterator& tree::pre_order_iterator::operator-=(unsigned int num) { while (num > 0) { --(*this); --num; } return (*this); } // Post-order iterator template tree::post_order_iterator::post_order_iterator() : iterator_base(0) { } template tree::post_order_iterator::post_order_iterator(tree_node *tn) : iterator_base(tn) { } template tree::post_order_iterator::post_order_iterator(const iterator_base &other) : iterator_base(other.node) { } template tree::post_order_iterator::post_order_iterator(const sibling_iterator& other) : iterator_base(other.node) { if (this->node == 0) { if (other.range_last() != 0) this->node = other.range_last(); else this->node = other.parent_; this->skip_children(); ++(*this); } } template typename tree::post_order_iterator& tree::post_order_iterator::operator++() { assert(this->node != 0); if (this->node->next_sibling == 0) { this->node = this->node->parent; this->skip_current_children_ = false; } else { this->node = this->node->next_sibling; if (this->skip_current_children_) { this->skip_current_children_ = false; } else { while (this->node->first_child) this->node = this->node->first_child; } } return *this; } template typename tree::post_order_iterator& tree::post_order_iterator::operator--() { assert(this->node != 0); if (this->skip_current_children_ || this->node->last_child == 0) { this->skip_current_children_ = false; while (this->node->prev_sibling == 0) this->node = this->node->parent; this->node = this->node->prev_sibling; } else { this->node = this->node->last_child; } return *this; } template typename tree::post_order_iterator tree::post_order_iterator::operator++(int) { post_order_iterator copy = *this; ++(*this); return copy; } template typename tree::post_order_iterator tree::post_order_iterator::operator--(int) { post_order_iterator copy = *this; --(*this); return copy; } template typename tree::post_order_iterator& tree::post_order_iterator::operator+=(unsigned int num) { while (num > 0) { ++(*this); --num; } return (*this); } template typename tree::post_order_iterator& tree::post_order_iterator::operator-=(unsigned int num) { while (num > 0) { --(*this); --num; } return (*this); } template void tree::post_order_iterator::descend_all() { assert(this->node != 0); while (this->node->first_child) this->node = this->node->first_child; } // Fixed depth iterator template tree::fixed_depth_iterator::fixed_depth_iterator() : iterator_base() { set_first_parent_(); } template tree::fixed_depth_iterator::fixed_depth_iterator(tree_node *tn) : iterator_base(tn) { set_first_parent_(); } template tree::fixed_depth_iterator::fixed_depth_iterator(const iterator_base& other) : iterator_base(other.node) { set_first_parent_(); } template tree::fixed_depth_iterator::fixed_depth_iterator(const sibling_iterator& other) : iterator_base(other.node), first_parent_(other.parent_) { find_leftmost_parent_(); } template tree::fixed_depth_iterator::fixed_depth_iterator(const fixed_depth_iterator& other) : iterator_base(other.node), first_parent_(other.first_parent_) { } template void tree::fixed_depth_iterator::set_first_parent_() { return; // FIXME: we do not use first_parent_ yet, and it actually needs some serious reworking if // it is ever to work at the 'head' level. first_parent_ = 0; if (this->node == 0) return; if (this->node->parent != 0) first_parent_ = this->node->parent; if (first_parent_) find_leftmost_parent_(); } template void tree::fixed_depth_iterator::find_leftmost_parent_() { return; // FIXME: see 'set_first_parent()' tree_node *tmppar = first_parent_; while (tmppar->prev_sibling) { tmppar = tmppar->prev_sibling; if (tmppar->first_child) first_parent_ = tmppar; } } template typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator++() { assert(this->node != 0); if (this->node->next_sibling) { this->node = this->node->next_sibling; } else { int relative_depth = 0; upper: do { this->node = this->node->parent; if (this->node == 0) return *this; --relative_depth; } while (this->node->next_sibling == 0); lower: this->node = this->node->next_sibling; while (this->node->first_child == 0) { if (this->node->next_sibling == 0) goto upper; this->node = this->node->next_sibling; if (this->node == 0) return *this; } while (relative_depth < 0 && this->node->first_child != 0) { this->node = this->node->first_child; ++relative_depth; } if (relative_depth < 0) { if (this->node->next_sibling == 0) goto upper; else goto lower; } } return *this; // if(this->node->next_sibling!=0) { // this->node=this->node->next_sibling; // assert(this->node!=0); // if(this->node->parent==0 && this->node->next_sibling==0) // feet element // this->node=0; // } // else { // tree_node *par=this->node->parent; // do { // par=par->next_sibling; // if(par==0) { // FIXME: need to keep track of this! // this->node=0; // return *this; // } // } while(par->first_child==0); // this->node=par->first_child; // } return *this; } template typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator--() { assert(this->node != 0); if (this->node->prev_sibling != 0) { this->node = this->node->prev_sibling; assert(this->node != 0); if (this->node->parent == 0 && this->node->prev_sibling == 0) // head element this->node = 0; } else { tree_node *par = this->node->parent; do { par = par->prev_sibling; if (par == 0) // FIXME: need to keep track of this! { this->node = 0; return *this; } } while (par->last_child == 0); this->node = par->last_child; } return *this; } template typename tree::fixed_depth_iterator tree::fixed_depth_iterator::operator++(int) { fixed_depth_iterator copy = *this; ++(*this); return copy; } template typename tree::fixed_depth_iterator tree::fixed_depth_iterator::operator--(int) { fixed_depth_iterator copy = *this; --(*this); return copy; } template typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator-=(unsigned int num) { while (num > 0) { --(*this); --(num); } return (*this); } template typename tree::fixed_depth_iterator& tree::fixed_depth_iterator::operator+=(unsigned int num) { while (num > 0) { ++(*this); --(num); } return *this; } // FIXME: add the other members of fixed_depth_iterator. // Sibling iterator template tree::sibling_iterator::sibling_iterator() : iterator_base() { set_parent_(); } template tree::sibling_iterator::sibling_iterator(tree_node *tn) : iterator_base(tn) { set_parent_(); } template tree::sibling_iterator::sibling_iterator(const iterator_base& other) : iterator_base(other.node) { set_parent_(); } template tree::sibling_iterator::sibling_iterator(const sibling_iterator& other) : iterator_base(other), parent_(other.parent_) { } template void tree::sibling_iterator::set_parent_() { parent_ = 0; if (this->node == 0) return; if (this->node->parent != 0) parent_ = this->node->parent; } template typename tree::sibling_iterator& tree::sibling_iterator::operator++() { if (this->node) this->node = this->node->next_sibling; return *this; } template typename tree::sibling_iterator& tree::sibling_iterator::operator--() { if (this->node) this->node = this->node->prev_sibling; else { assert(parent_); this->node = parent_->last_child; } return *this; } template typename tree::sibling_iterator tree::sibling_iterator::operator++(int) { sibling_iterator copy = *this; ++(*this); return copy; } template typename tree::sibling_iterator tree::sibling_iterator::operator--(int) { sibling_iterator copy = *this; --(*this); return copy; } template typename tree::sibling_iterator& tree::sibling_iterator::operator+=(unsigned int num) { while (num > 0) { ++(*this); --num; } return (*this); } template typename tree::sibling_iterator& tree::sibling_iterator::operator-=(unsigned int num) { while (num > 0) { --(*this); --num; } return (*this); } template typename tree::tree_node *tree::sibling_iterator::range_first() const { tree_node *tmp = parent_->first_child; return tmp; } template typename tree::tree_node *tree::sibling_iterator::range_last() const { return parent_->last_child; } #endif // Local variables: // default-tab-width: 3 // End: libofx-0.9.4/lib/ofc_sgml.cpp0000644000175000017500000003405711544727432013015 00000000000000/*************************************************************************** ofx_sgml.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file \brief OFX/SGML parsing functionnality. * Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/ */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "ParserEventGeneratorKit.h" #include "libofx.h" #include "ofx_utilities.hh" #include "messages.hh" #include "ofx_containers.hh" #include "ofc_sgml.hh" using namespace std; extern SGMLApplication::OpenEntityPtr entity_ptr; extern SGMLApplication::Position position; extern OfxMainContainer * MainContainer; /** \brief This object is driven by OpenSP as it parses the SGML from the ofx file(s) */ class OFCApplication : public SGMLApplication { private: OfxGenericContainer *curr_container_element; /**< The currently open object from ofx_proc_rs.cpp */ OfxGenericContainer *tmp_container_element; bool is_data_element; /**< If the SGML element contains data, this flag is raised */ string incoming_data; /**< The raw data from the SGML data element */ LibofxContext * libofx_context; public: OFCApplication (LibofxContext * p_libofx_context) { MainContainer = NULL; curr_container_element = NULL; is_data_element = false; libofx_context = p_libofx_context; } /** \brief Callback: Start of an OFX element * An OpenSP callback, get's called when the opening tag of an OFX element appears in the file */ void startElement (const StartElementEvent & event) { string identifier; CharStringtostring (event.gi, identifier); message_out(PARSER, "startElement event received from OpenSP for element " + identifier); position = event.pos; switch (event.contentType) { case StartElementEvent::empty: message_out(ERROR, "StartElementEvent::empty\n"); break; case StartElementEvent::cdata: message_out(ERROR, "StartElementEvent::cdata\n"); break; case StartElementEvent::rcdata: message_out(ERROR, "StartElementEvent::rcdata\n"); break; case StartElementEvent::mixed: message_out(PARSER, "StartElementEvent::mixed"); is_data_element = true; break; case StartElementEvent::element: message_out(PARSER, "StartElementEvent::element"); is_data_element = false; break; default: message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?"); } if (is_data_element == false) { /*------- The following are OFC entities ---------------*/ if (identifier == "OFC") { message_out (PARSER, "Element " + identifier + " found"); MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier); curr_container_element = MainContainer; } else if (identifier == "STATUS") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "ACCTSTMT") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "STMTRS") { message_out (PARSER, "Element " + identifier + " found"); //STMTRS ignored, we will process it's attributes directly inside the STATEMENT, if (curr_container_element->type != "STATEMENT") { message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container"); } else { curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier); } } else if (identifier == "GENTRN" || identifier == "STMTTRN") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "BUYDEBT" || identifier == "BUYMF" || identifier == "BUYOPT" || identifier == "BUYOTHER" || identifier == "BUYSTOCK" || identifier == "CLOSUREOPT" || identifier == "INCOME" || identifier == "INVEXPENSE" || identifier == "JRNLFUND" || identifier == "JRNLSEC" || identifier == "MARGININTEREST" || identifier == "REINVEST" || identifier == "RETOFCAP" || identifier == "SELLDEBT" || identifier == "SELLMF" || identifier == "SELLOPT" || identifier == "SELLOTHER" || identifier == "SELLSTOCK" || identifier == "SPLIT" || identifier == "TRANSFER" ) { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier); } /*The following is a list of OFX elements whose attributes will be processed by the parent container*/ else if (identifier == "INVBUY" || identifier == "INVSELL" || identifier == "INVTRAN" || identifier == "SECID") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier); } /* The different types of accounts */ else if (identifier == "ACCOUNT" || identifier == "ACCTFROM" ) { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "SECINFO") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier); } /* The different types of balances */ else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier); } else { /* We dont know this OFX element, so we create a dummy container */ curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier); } } else { /* The element was a data element. OpenSP will call one or several data() callback with the data */ message_out (PARSER, "Data element " + identifier + " found"); /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here". Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */ if (incoming_data != "") { message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4. The folowing data was lost: " + incoming_data ); incoming_data.assign (""); } } } /** \brief Callback: End of an OFX element * An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file. */ void endElement (const EndElementEvent & event) { string identifier; bool end_element_for_data_element; CharStringtostring (event.gi, identifier); end_element_for_data_element = is_data_element; message_out(PARSER, "endElement event received from OpenSP for element " + identifier); position = event.pos; if (curr_container_element == NULL) { message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)"); incoming_data.assign (""); } else //curr_container_element != NULL { if (end_element_for_data_element == true) { incoming_data = strip_whitespace(incoming_data); curr_container_element->add_attribute (identifier, incoming_data); message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element"); incoming_data.assign (""); is_data_element = false; } else { if (identifier == curr_container_element->tag_identifier) { if (incoming_data != "") { message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!"); } if (identifier == "OFX") { /* The main container is a special case */ tmp_container_element = curr_container_element; curr_container_element = curr_container_element->getparent (); MainContainer->gen_event(); delete MainContainer; MainContainer = NULL; message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed"); } else { tmp_container_element = curr_container_element; curr_container_element = curr_container_element->getparent (); if (MainContainer != NULL) { tmp_container_element->add_to_main_tree(); message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer"); } else { message_out (ERROR, "MainContainer is NULL trying to add element " + identifier); } } } else { message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open."); } } } } /** \brief Callback: Data from an OFX element * An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data. */ void data (const DataEvent & event) { string tmp; position = event.pos; AppendCharStringtostring (event.data, incoming_data); message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data); } /** \brief Callback: SGML parse error * An OpenSP callback, get's called when a parser error has occured. */ void error (const ErrorEvent & event) { string message; string string_buf; OfxMsgType error_type = ERROR; position = event.pos; message = message + "OpenSP parser: "; switch (event.type) { case SGMLApplication::ErrorEvent::quantity: message = message + "quantity (Exceeding a quantity limit):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::idref: message = message + "idref (An IDREF to a non-existent ID):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::capacity: message = message + "capacity (Exceeding a capacity limit):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::otherError: message = message + "otherError (misc parse error):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::warning: message = message + "warning (Not actually an error.):"; error_type = WARNING; break; case SGMLApplication::ErrorEvent::info: message = message + "info (An informationnal message. Not actually an error):"; error_type = INFO; break; default: message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):"; } message = message + "\n" + CharStringtostring (event.message, string_buf); message_out (error_type, message); } /** \brief Callback: Receive internal OpenSP state * An Internal OpenSP callback, used to be able to generate line number. */ void openEntityChange (const OpenEntityPtr & para_entity_ptr) { message_out(DEBUG, "openEntityChange()\n"); entity_ptr = para_entity_ptr; }; private: }; /** ofc_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files. */ int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]) { message_out(DEBUG, "Begin ofx_proc_sgml()"); message_out(DEBUG, argv[0]); message_out(DEBUG, argv[1]); message_out(DEBUG, argv[2]); ParserEventGeneratorKit parserKit; parserKit.setOption (ParserEventGeneratorKit::showOpenEntities); EventGenerator *egp = parserKit.makeEventGenerator (argc, argv); egp->inhibitMessages (true); /* Error output is handled by libofx not OpenSP */ OFCApplication *app = new OFCApplication(libofx_context); unsigned nErrors = egp->run (*app); /* Begin parsing */ delete egp; return nErrors > 0; } libofx-0.9.4/lib/context.hh0000644000175000017500000000452111544727432012516 00000000000000/**@file libofx_context.hh @brief Main state object passed everywhere in the library @author (C) 2004 by Benoit Grégoire */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef CONTEXT_H #define CONTEXT_H #include #include // for time_t #include "libofx.h" #include "ParserEventGeneratorKit.h" #include using namespace std; class LibofxContext { private: LibofxFileFormat _current_file_type; LibofxProcStatusCallback _statusCallback; LibofxProcAccountCallback _accountCallback; LibofxProcSecurityCallback _securityCallback; LibofxProcTransactionCallback _transactionCallback; LibofxProcStatementCallback _statementCallback; void * _statementData; void * _accountData; void * _transactionData; void * _securityData; void * _statusData; std::string _dtdDir; public: LibofxContext(); ~LibofxContext(); LibofxFileFormat currentFileType() const; void setCurrentFileType(LibofxFileFormat t); const std::string &dtdDir() const { return _dtdDir; }; void setDtdDir(const std::string &s) { _dtdDir = s; }; int statementCallback(const struct OfxStatementData data); int accountCallback(const struct OfxAccountData data); int transactionCallback(const struct OfxTransactionData data); int securityCallback(const struct OfxSecurityData data); int statusCallback(const struct OfxStatusData data); void setStatusCallback(LibofxProcStatusCallback cb, void *user_data); void setAccountCallback(LibofxProcAccountCallback cb, void *user_data); void setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data); void setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data); void setStatementCallback(LibofxProcStatementCallback cb, void *user_data); };//End class LibofxContext #endif libofx-0.9.4/lib/ofx_containers_misc.cpp0000644000175000017500000001454011544727432015253 00000000000000/*************************************************************************** ofx_proc_rs.cpp ------------------- copyright : (C) 2002 by Benoit Grégoire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief LibOFX internal object code. * * These objects will process the elements returned by ofx_sgml.cpp and add them to their data members. * \warning Object documentation is not yet done. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "messages.hh" #include "libofx.h" #include "ofx_error_msg.hh" #include "ofx_utilities.hh" #include "ofx_containers.hh" extern OfxMainContainer * MainContainer; /*************************************************************************** * OfxDummyContainer * ***************************************************************************/ OfxDummyContainer::OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { type = "DUMMY"; message_out(INFO, "Created OfxDummyContainer to hold unsupported aggregate " + para_tag_identifier); } void OfxDummyContainer::add_attribute(const string identifier, const string value) { message_out(DEBUG, "OfxDummyContainer for " + tag_identifier + " ignored a " + identifier + " (" + value + ")"); } /*************************************************************************** * OfxPushUpContainer * ***************************************************************************/ OfxPushUpContainer::OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { type = "PUSHUP"; message_out(DEBUG, "Created OfxPushUpContainer to hold aggregate " + tag_identifier); } void OfxPushUpContainer::add_attribute(const string identifier, const string value) { //message_out(DEBUG, "OfxPushUpContainer for "+tag_identifier+" will push up a "+identifier+" ("+value+") to a "+ parentcontainer->type + " container"); parentcontainer->add_attribute(identifier, value); } /*************************************************************************** * OfxStatusContainer * ***************************************************************************/ OfxStatusContainer::OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { memset(&data, 0, sizeof(data)); type = "STATUS"; if (parentcontainer != NULL) { strncpy(data.ofx_element_name, parentcontainer->tag_identifier.c_str(), OFX_ELEMENT_NAME_LENGTH); data.ofx_element_name_valid = true; } } OfxStatusContainer::~OfxStatusContainer() { message_out(DEBUG, "Entering the status's container's destructor"); libofx_context->statusCallback(data); if ( data.server_message_valid ) delete [] data.server_message; } void OfxStatusContainer::add_attribute(const string identifier, const string value) { ErrorMsg error_msg; if ( identifier == "CODE") { data.code = atoi(value.c_str()); error_msg = find_error_msg(data.code); data.name = error_msg.name;//memory is already allocated data.description = error_msg.description;//memory is already allocated data.code_valid = true; } else if (identifier == "SEVERITY") { data.severity_valid = true; if (value == "INFO") { data.severity = OfxStatusData::INFO; } else if (value == "WARN") { data.severity = OfxStatusData::WARN; } else if (value == "ERROR") { data.severity = OfxStatusData::ERROR; } else { message_out(ERROR, "WRITEME: Unknown severity " + value + " inside a " + type + " container"); data.severity_valid = false; } } else if ((identifier == "MESSAGE") || (identifier == "MESSAGE2")) { data.server_message = new char[value.length()+1]; strcpy(data.server_message, value.c_str()); data.server_message_valid = true; } else { /* Redirect unknown identifiers to the base class */ OfxGenericContainer::add_attribute(identifier, value); } } /*************************************************************************** * OfxBalanceContainer (does not directly abstract a object in libofx.h) * ***************************************************************************/ OfxBalanceContainer::OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { amount_valid = false; date_valid = false; type = "BALANCE"; } OfxBalanceContainer::~OfxBalanceContainer() { if (parentcontainer->type == "STATEMENT") { ((OfxStatementContainer*)parentcontainer)->add_balance(this); } else { message_out (ERROR, "I completed a " + type + " element, but I havent found a suitable parent to save it"); } } void OfxBalanceContainer::add_attribute(const string identifier, const string value) { if (identifier == "BALAMT") { amount = ofxamount_to_double(value); amount_valid = true; } else if (identifier == "DTASOF") { date = ofxdate_to_time_t(value); date_valid = true; } else { /* Redirect unknown identifiers to the base class */ OfxGenericContainer::add_attribute(identifier, value); } } libofx-0.9.4/lib/ofx_sgml.cpp0000644000175000017500000003526311546117743013042 00000000000000/*************************************************************************** ofx_sgml.cpp ------------------- copyright : (C) 2002 by Benoit Grégoire email : benoitg@coeus.ca ***************************************************************************/ /**@file \brief OFX/SGML parsing functionnality. * Almost all of the SGML parser specific code is contained in this file (some is in messages.cpp and ofx_utilities.cpp). To understand this file you must read the documentation of OpenSP's generic interface: see http://openjade.sourceforge.net/ */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "ParserEventGeneratorKit.h" #include "libofx.h" #include "ofx_utilities.hh" #include "messages.hh" #include "ofx_containers.hh" #include "ofx_sgml.hh" using namespace std; OfxMainContainer * MainContainer = NULL; extern SGMLApplication::OpenEntityPtr entity_ptr; extern SGMLApplication::Position position; /** \brief This object is driven by OpenSP as it parses the SGML from the ofx file(s) */ class OFXApplication : public SGMLApplication { private: OfxGenericContainer *curr_container_element; /**< The currently open object from ofx_proc_rs.cpp */ OfxGenericContainer *tmp_container_element; bool is_data_element; /**< If the SGML element contains data, this flag is raised */ string incoming_data; /**< The raw data from the SGML data element */ LibofxContext * libofx_context; public: OFXApplication (LibofxContext * p_libofx_context) { MainContainer = NULL; curr_container_element = NULL; is_data_element = false; libofx_context = p_libofx_context; } ~OFXApplication() { message_out(DEBUG, "Entering the OFXApplication's destructor"); } /** \brief Callback: Start of an OFX element * An OpenSP callback, get's called when the opening tag of an OFX element appears in the file */ void startElement (const StartElementEvent & event) { string identifier; CharStringtostring (event.gi, identifier); message_out(PARSER, "startElement event received from OpenSP for element " + identifier); position = event.pos; switch (event.contentType) { case StartElementEvent::empty: message_out(ERROR, "StartElementEvent::empty\n"); break; case StartElementEvent::cdata: message_out(ERROR, "StartElementEvent::cdata\n"); break; case StartElementEvent::rcdata: message_out(ERROR, "StartElementEvent::rcdata\n"); break; case StartElementEvent::mixed: message_out(PARSER, "StartElementEvent::mixed"); is_data_element = true; break; case StartElementEvent::element: message_out(PARSER, "StartElementEvent::element"); is_data_element = false; break; default: message_out(ERROR, "Unknow SGML content type?!?!?!? OpenSP interface changed?"); } if (is_data_element == false) { /*------- The following are OFX entities ---------------*/ if (identifier == "OFX") { message_out (PARSER, "Element " + identifier + " found"); MainContainer = new OfxMainContainer (libofx_context, curr_container_element, identifier); curr_container_element = MainContainer; } else if (identifier == "STATUS") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxStatusContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "STMTRS" || identifier == "CCSTMTRS" || identifier == "INVSTMTRS") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxStatementContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "BANKTRANLIST") { message_out (PARSER, "Element " + identifier + " found"); //BANKTRANLIST ignored, we will process it's attributes directly inside the STATEMENT, if (curr_container_element->type != "STATEMENT") { message_out(ERROR, "Element " + identifier + " found while not inside a STATEMENT container"); } else { curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier); } } else if (identifier == "STMTTRN") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxBankTransactionContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "BUYDEBT" || identifier == "BUYMF" || identifier == "BUYOPT" || identifier == "BUYOTHER" || identifier == "BUYSTOCK" || identifier == "CLOSUREOPT" || identifier == "INCOME" || identifier == "INVEXPENSE" || identifier == "JRNLFUND" || identifier == "JRNLSEC" || identifier == "MARGININTEREST" || identifier == "REINVEST" || identifier == "RETOFCAP" || identifier == "SELLDEBT" || identifier == "SELLMF" || identifier == "SELLOPT" || identifier == "SELLOTHER" || identifier == "SELLSTOCK" || identifier == "SPLIT" || identifier == "TRANSFER" ) { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxInvestmentTransactionContainer (libofx_context, curr_container_element, identifier); } /*The following is a list of OFX elements whose attributes will be processed by the parent container*/ else if (identifier == "INVBUY" || identifier == "INVSELL" || identifier == "INVTRAN" || identifier == "SECID") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxPushUpContainer (libofx_context, curr_container_element, identifier); } /* The different types of accounts */ else if (identifier == "BANKACCTFROM" || identifier == "CCACCTFROM" || identifier == "INVACCTFROM") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxAccountContainer (libofx_context, curr_container_element, identifier); } else if (identifier == "SECINFO") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxSecurityContainer (libofx_context, curr_container_element, identifier); } /* The different types of balances */ else if (identifier == "LEDGERBAL" || identifier == "AVAILBAL") { message_out (PARSER, "Element " + identifier + " found"); curr_container_element = new OfxBalanceContainer (libofx_context, curr_container_element, identifier); } else { /* We dont know this OFX element, so we create a dummy container */ curr_container_element = new OfxDummyContainer(libofx_context, curr_container_element, identifier); } } else { /* The element was a data element. OpenSP will call one or several data() callback with the data */ message_out (PARSER, "Data element " + identifier + " found"); /* There is a bug in OpenSP 1.3.4, which won't send endElement Event for some elements, and will instead send an error like "document type does not allow element "MESSAGE" here". Incoming_data should be empty in such a case, but it will not be if the endElement event was skiped. So we empty it, so at least the last element has a chance of having valid data */ if (incoming_data != "") { message_out (ERROR, "startElement: incoming_data should be empty! You are probably using OpenSP <= 1.3.4. The folowing data was lost: " + incoming_data ); incoming_data.assign (""); } } } /** \brief Callback: End of an OFX element * An OpenSP callback, get's called at the end of an OFX element (the closing tags are not always present in OFX) in the file. */ void endElement (const EndElementEvent & event) { string identifier; bool end_element_for_data_element; CharStringtostring (event.gi, identifier); end_element_for_data_element = is_data_element; message_out(PARSER, "endElement event received from OpenSP for element " + identifier); position = event.pos; if (curr_container_element == NULL) { message_out (ERROR, "Tried to close a " + identifier + " without a open element (NULL pointer)"); incoming_data.assign (""); } else //curr_container_element != NULL { if (end_element_for_data_element == true) { incoming_data = strip_whitespace(incoming_data); curr_container_element->add_attribute (identifier, incoming_data); message_out (PARSER, "endElement: Added data '" + incoming_data + "' from " + identifier + " to " + curr_container_element->type + " container_element"); incoming_data.assign (""); is_data_element = false; } else { if (identifier == curr_container_element->tag_identifier) { if (incoming_data != "") { message_out(ERROR, "End tag for non data element " + identifier + ", incoming data should be empty but contains: " + incoming_data + " DATA HAS BEEN LOST SOMEWHERE!"); } if (identifier == "OFX") { /* The main container is a special case */ tmp_container_element = curr_container_element; curr_container_element = curr_container_element->getparent (); if(curr_container_element==NULL) { //Defensive coding, this isn't supposed to happen curr_container_element=tmp_container_element; } if(MainContainer!=NULL){ MainContainer->gen_event(); delete MainContainer; MainContainer = NULL; message_out (DEBUG, "Element " + identifier + " closed, MainContainer destroyed"); } else { message_out (DEBUG, "Element " + identifier + " closed, but there was no MainContainer to destroy (probably a malformed file)!"); } } else { tmp_container_element = curr_container_element; curr_container_element = curr_container_element->getparent (); if (MainContainer != NULL) { tmp_container_element->add_to_main_tree(); message_out (PARSER, "Element " + identifier + " closed, object added to MainContainer"); } else { message_out (ERROR, "MainContainer is NULL trying to add element " + identifier); } } } else { message_out (ERROR, "Tried to close a " + identifier + " but a " + curr_container_element->type + " is currently open."); } } } } /** \brief Callback: Data from an OFX element * An OpenSP callback, get's called when the raw data of an OFX element appears in the file. Is usually called more than once for a single element, so we must concatenate the data. */ void data (const DataEvent & event) { string tmp; position = event.pos; AppendCharStringtostring (event.data, incoming_data); message_out(PARSER, "data event received from OpenSP, incoming_data is now: " + incoming_data); } /** \brief Callback: SGML parse error * An OpenSP callback, get's called when a parser error has occured. */ void error (const ErrorEvent & event) { string message; string string_buf; OfxMsgType error_type = ERROR; position = event.pos; message = message + "OpenSP parser: "; switch (event.type) { case SGMLApplication::ErrorEvent::quantity: message = message + "quantity (Exceeding a quantity limit):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::idref: message = message + "idref (An IDREF to a non-existent ID):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::capacity: message = message + "capacity (Exceeding a capacity limit):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::otherError: message = message + "otherError (misc parse error):"; error_type = ERROR; break; case SGMLApplication::ErrorEvent::warning: message = message + "warning (Not actually an error.):"; error_type = WARNING; break; case SGMLApplication::ErrorEvent::info: message = message + "info (An informationnal message. Not actually an error):"; error_type = INFO; break; default: message = message + "OpenSP sent an unknown error to LibOFX (You probably have a newer version of OpenSP):"; } message = message + "\n" + CharStringtostring (event.message, string_buf); message_out (error_type, message); } /** \brief Callback: Receive internal OpenSP state * An Internal OpenSP callback, used to be able to generate line number. */ void openEntityChange (const OpenEntityPtr & para_entity_ptr) { message_out(DEBUG, "openEntityChange()\n"); entity_ptr = para_entity_ptr; }; private: }; /** ofx_proc_sgml will take a list of files in command line format. The first file must be the DTD, and then any number of OFX files. */ int ofx_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]) { message_out(DEBUG, "Begin ofx_proc_sgml()"); message_out(DEBUG, argv[0]); message_out(DEBUG, argv[1]); message_out(DEBUG, argv[2]); ParserEventGeneratorKit parserKit; parserKit.setOption (ParserEventGeneratorKit::showOpenEntities); EventGenerator *egp = parserKit.makeEventGenerator (argc, argv); egp->inhibitMessages (true); /* Error output is handled by libofx not OpenSP */ OFXApplication *app = new OFXApplication(libofx_context); unsigned nErrors = egp->run (*app); /* Begin parsing */ delete egp; //Note that this is where bug is triggered return nErrors > 0; } libofx-0.9.4/lib/messages.hh0000644000175000017500000000342011544727432012636 00000000000000/*************************************************************************** ofx_messages.h ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Message IO functionality */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_MESSAGES_H #define OFX_MESSAGES_H /** The OfxMsgType enum describe's the type of message being sent, so the application/user/library can decide if it will be printed to stdout */ enum OfxMsgType { DEBUG, /**< General debug messages */ DEBUG1, /**< Debug level 1 */ DEBUG2, /**< Debug level 2 */ DEBUG3, /**< Debug level 3 */ DEBUG4, /**< Debug level 4 */ DEBUG5, /**< Debug level 5 */ STATUS = 10, /**< For major processing event (End of parsing, etc.) */ INFO, /**< For minor processing event */ WARNING, /**< Warning message */ ERROR, /**< Error message */ PARSER /**< Parser events */ }; using namespace std; /// Message output function int message_out(OfxMsgType type, const string message); #endif libofx-0.9.4/lib/ofx_aggregate.hh0000644000175000017500000000551611544727432013641 00000000000000/*************************************************************************** ofx_aggregate.hh ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Declaration of OfxAggregate which allows you to construct a single * OFX aggregate. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_AGGREGATE_H #define OFX_AGGREGATE_H #include using namespace std; /** * \brief A single aggregate as described in the OFX 1.02 specification * * This aggregate has a tag, and optionally a number of subordinate elements and aggregates. * * An example is: * * * 1234 * * Y * ACTIVE * */ class OfxAggregate { public: /** * Creates a new aggregate, using this tag * * @param tag The tag of this aggregate */ OfxAggregate( const string& tag ): m_tag( tag ) {} /** * Adds an element to this aggregate * * @param tag The tag of the element to be added * @param data The data of the element to be added */ void Add( const string& tag, const string& data ) { m_contents += string("<") + tag + string(">") + data + string("\r\n"); } /** * Adds a subordinate aggregate to this aggregate * * @param sub The aggregate to be added */ void Add( const OfxAggregate& sub ) { m_contents += sub.Output(); } /** * Composes this aggregate into a string * * @return string form of this aggregate */ string Output( void ) const { return string("<") + m_tag + string(">\r\n") + m_contents + string("\r\n"); } private: string m_tag; string m_contents; }; #endif // OFX_AGGREGATE_H libofx-0.9.4/lib/ofx_request.cpp0000644000175000017500000000736411544727432013571 00000000000000/*************************************************************************** ofx_request.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Implementation of an OfxRequests to create an OFX file * containing a generic request . */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "messages.hh" #include "libofx.h" #include "ofx_request.hh" using namespace std; string time_t_to_ofxdatetime( time_t time ) { static char buffer[51]; strftime( buffer, 50, "%Y%m%d%H%M%S.000", localtime(&time) ); buffer[50] = 0; return string(buffer); } string time_t_to_ofxdate( time_t time ) { static char buffer[51]; strftime( buffer, 50, "%Y%m%d", localtime(&time) ); buffer[50] = 0; return string(buffer); } string OfxHeader(const char *hver) { if (hver == NULL || hver[0] == 0) hver = "102"; if (strcmp(hver, "103") == 0) /* TODO: check for differences in version 102 and 103 */ return string("OFXHEADER:100\r\n" "DATA:OFXSGML\r\n" "VERSION:103\r\n" "SECURITY:NONE\r\n" "ENCODING:USASCII\r\n" "CHARSET:1252\r\n" "COMPRESSION:NONE\r\n" "OLDFILEUID:NONE\r\n" "NEWFILEUID:") + time_t_to_ofxdatetime( time(NULL) ) + string("\r\n\r\n"); else return string("OFXHEADER:100\r\n" "DATA:OFXSGML\r\n" "VERSION:102\r\n" "SECURITY:NONE\r\n" "ENCODING:USASCII\r\n" "CHARSET:1252\r\n" "COMPRESSION:NONE\r\n" "OLDFILEUID:NONE\r\n" "NEWFILEUID:") + time_t_to_ofxdatetime( time(NULL) ) + string("\r\n\r\n"); } OfxAggregate OfxRequest::SignOnRequest(void) const { OfxAggregate fiTag("FI"); fiTag.Add( "ORG", m_login.org ); if ( strlen(m_login.fid) > 0 ) fiTag.Add( "FID", m_login.fid ); OfxAggregate sonrqTag("SONRQ"); sonrqTag.Add( "DTCLIENT", time_t_to_ofxdatetime( time(NULL) ) ); sonrqTag.Add( "USERID", m_login.userid); sonrqTag.Add( "USERPASS", m_login.userpass); sonrqTag.Add( "LANGUAGE", "ENG"); sonrqTag.Add( fiTag ); if ( strlen(m_login.appid) > 0 ) sonrqTag.Add( "APPID", m_login.appid); else sonrqTag.Add( "APPID", "QWIN"); if ( strlen(m_login.appver) > 0 ) sonrqTag.Add( "APPVER", m_login.appver); else sonrqTag.Add( "APPVER", "1400"); OfxAggregate signonmsgTag("SIGNONMSGSRQV1"); signonmsgTag.Add( sonrqTag ); return signonmsgTag; } OfxAggregate OfxRequest::RequestMessage(const string& _msgType, const string& _trnType, const OfxAggregate& _request) const { OfxAggregate trnrqTag( _trnType + "TRNRQ" ); trnrqTag.Add( "TRNUID", time_t_to_ofxdatetime( time(NULL) ) ); trnrqTag.Add( "CLTCOOKIE", "1" ); trnrqTag.Add( _request ); OfxAggregate result( _msgType + "MSGSRQV1" ); result.Add( trnrqTag ); return result; } libofx-0.9.4/lib/file_preproc.cpp0000644000175000017500000001275511544727432013676 00000000000000/*************************************************************************** file_preproc.cpp ------------------- copyright : (C) 2004 by Benoit Grégoire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief File type detection, etc. * * Implements AutoDetection of file type, and handoff to specific parsers. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include #include #include "libofx.h" #include "messages.hh" #include "ofx_preproc.hh" #include "context.hh" #include "file_preproc.hh" using namespace std; const unsigned int READ_BUFFER_SIZE = 1024; /* get_file_type_description returns a string description of a LibofxFileType * suitable for debugging output or user communication. */ const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format) { const char * retval = "UNKNOWN (File format couldn't be sucessfully identified)"; for (int i = 0; LibofxImportFormatList[i].format != LAST; i++) { if (LibofxImportFormatList[i].format == file_format) { retval = LibofxImportFormatList[i].description; } } return retval; }; /* libofx_get_file_type returns a proper enum from a file type string. */ enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string) { enum LibofxFileFormat retval = UNKNOWN; for (int i = 0; LibofxImportFormatList[i].format != LAST; i++) { if (strcmp(LibofxImportFormatList[i].format_name, file_type_string) == 0) { retval = LibofxImportFormatList[i].format; } } return retval; } int libofx_proc_file(LibofxContextPtr p_libofx_context, const char * p_filename, LibofxFileFormat p_file_type) { LibofxContext * libofx_context = (LibofxContext *) p_libofx_context; if (p_file_type == AUTODETECT) { message_out(INFO, string("libofx_proc_file(): File format not specified, autodecting...")); libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename)); message_out(INFO, string("libofx_proc_file(): Detected file format: ") + libofx_get_file_format_description(LibofxImportFormatList, libofx_context->currentFileType() )); } else { libofx_context->setCurrentFileType(libofx_detect_file_type(p_filename)); message_out(INFO, string("libofx_proc_file(): File format forced to: ") + libofx_get_file_format_description(LibofxImportFormatList, libofx_context->currentFileType() )); } switch (libofx_context->currentFileType()) { case OFX: ofx_proc_file(libofx_context, p_filename); break; case OFC: ofx_proc_file(libofx_context, p_filename); break; default: message_out(ERROR, string("libofx_proc_file(): Detected file format not yet supported ou couldn't detect file format; aborting.")); } return 0; } enum LibofxFileFormat libofx_detect_file_type(const char * p_filename) { enum LibofxFileFormat retval = UNKNOWN; ifstream input_file; char buffer[READ_BUFFER_SIZE]; string s_buffer; bool type_found = false; if (p_filename != NULL && strcmp(p_filename, "") != 0) { message_out(DEBUG, string("libofx_detect_file_type():Opening file: ") + p_filename); input_file.open(p_filename); if (!input_file) { message_out(ERROR, "libofx_detect_file_type():Unable to open the input file " + string(p_filename)); return retval; } else { do { input_file.getline(buffer, sizeof(buffer), '\n'); //cout<") != string::npos || s_buffer.find("") != string::npos) { message_out(DEBUG, "libofx_detect_file_type(): tag has been found"); retval = OFX; type_found = true; } else if (s_buffer.find("") != string::npos || s_buffer.find("") != string::npos) { message_out(DEBUG, "libofx_detect_file_type(): tag has been found"); retval = OFC; type_found = true; } } while (type_found == false && !input_file.eof() && !input_file.bad()); } input_file.close(); } else { message_out(ERROR, "libofx_detect_file_type(): No input file specified"); } if (retval == UNKNOWN) message_out(ERROR, "libofx_detect_file_type(): Failed to identify input file format"); return retval; } libofx-0.9.4/lib/ofx_container_main.cpp0000644000175000017500000001507411544727432015064 00000000000000/*************************************************************************** ofx_container_main.cpp ------------------- copyright : (C) 2002 by Benoit Grégoire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxMainContainer */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "ParserEventGeneratorKit.h" #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" OfxMainContainer::OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { //statement_tree_top=statement_tree.insert(statement_tree_top, NULL); //security_tree_top=security_tree.insert(security_tree_top, NULL); } OfxMainContainer::~OfxMainContainer() { message_out(DEBUG, "Entering the main container's destructor"); tree::iterator tmp = security_tree.begin(); while (tmp != security_tree.end()) { message_out(DEBUG, "Deleting " + (*tmp)->type); delete (*tmp); ++tmp; } tmp = account_tree.begin(); while (tmp != account_tree.end()) { message_out(DEBUG, "Deleting " + (*tmp)->type); delete (*tmp); ++tmp; } } int OfxMainContainer::add_container(OfxGenericContainer * container) { message_out(DEBUG, "OfxMainContainer::add_container for element " + container->tag_identifier + "; destroying the generic container"); /* Call gen_event anyway, it could be a status container or similar */ container->gen_event(); delete container; return 0; } int OfxMainContainer::add_container(OfxSecurityContainer * container) { message_out(DEBUG, "OfxMainContainer::add_container, adding a security"); security_tree.insert(security_tree.begin(), container); return true; } int OfxMainContainer::add_container(OfxAccountContainer * container) { message_out(DEBUG, "OfxMainContainer::add_container, adding an account"); if ( account_tree.size() == 0) { message_out(DEBUG, "OfxMainContainer::add_container, account is the first account"); account_tree.insert(account_tree.begin(), container); } else { message_out(DEBUG, "OfxMainContainer::add_container, account is not the first account"); tree::sibling_iterator tmp = account_tree.begin(); tmp += (account_tree.number_of_siblings(tmp)); //Find last account account_tree.insert_after(tmp, container); } return true; } int OfxMainContainer::add_container(OfxStatementContainer * container) { message_out(DEBUG, "OfxMainContainer::add_container, adding a statement"); tree::sibling_iterator tmp = account_tree.begin(); //cerr<< "size="<::iterator child = account_tree.begin(tmp); if (account_tree.number_of_children(tmp) != 0) { message_out(DEBUG, "There are already children for this account"); account_tree.insert(tmp.begin(), container); } else { message_out(DEBUG, "There are no children for this account"); account_tree.append_child(tmp, container); } container->add_account(&( ((OfxAccountContainer *)(*tmp))->data)); return true; } else { message_out(ERROR, "OfxMainContainer::add_container, no accounts are present (tmp is invalid)"); return false; } } int OfxMainContainer::add_container(OfxTransactionContainer * container) { message_out(DEBUG, "OfxMainContainer::add_container, adding a transaction"); if ( account_tree.size() != 0) { tree::sibling_iterator tmp = account_tree.begin(); //cerr<< "size="<add_account(&(((OfxAccountContainer *)(*tmp))->data)); return true; } else { message_out(ERROR, "OfxMainContainer::add_container: tmp is invalid!"); return false; } } else { message_out(ERROR, "OfxMainContainer::add_container: the tree is empty!"); return false; } } int OfxMainContainer::gen_event() { message_out(DEBUG, "Begin walking the trees of the main container to generate events"); tree::iterator tmp = security_tree.begin(); //cerr<<"security_tree.size(): "<gen_event(); ++tmp; } tmp = account_tree.begin(); //cerr<::sibling_iterator tmp = security_tree.begin(); OfxSecurityData * retval = NULL; while (tmp != security_tree.end() && retval == NULL) { if (((OfxSecurityContainer*)(*tmp))->data.unique_id == unique_id) { message_out(DEBUG, (string)"Security " + ((OfxSecurityContainer*)(*tmp))->data.unique_id + " found."); retval = &((OfxSecurityContainer*)(*tmp))->data; } ++tmp; } return retval; } libofx-0.9.4/lib/ofx_container_transaction.cpp0000644000175000017500000003142311544727432016461 00000000000000/*************************************************************************** ofx_container_account.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxTransactionContainer, OfxBankTransactionContainer and OfxInvestmentTransactionContainer. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" #include "ofx_utilities.hh" extern OfxMainContainer * MainContainer; /*************************************************************************** * OfxTransactionContainer * ***************************************************************************/ OfxTransactionContainer::OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { OfxGenericContainer * tmp_parentcontainer = parentcontainer; memset(&data, 0, sizeof(data)); type = "TRANSACTION"; /* Find the parent statement container*/ while (tmp_parentcontainer != NULL && tmp_parentcontainer->type != "STATEMENT") { tmp_parentcontainer = tmp_parentcontainer->parentcontainer; } if (tmp_parentcontainer != NULL) { parent_statement = (OfxStatementContainer*)tmp_parentcontainer; } else { parent_statement = NULL; message_out(ERROR, "Unable to find the enclosing statement container this transaction"); } if (parent_statement != NULL && parent_statement->data.account_id_valid == true) { strncpy(data.account_id, parent_statement->data.account_id, OFX_ACCOUNT_ID_LENGTH); data.account_id_valid = true; } } OfxTransactionContainer::~OfxTransactionContainer() { } int OfxTransactionContainer::gen_event() { if (data.unique_id_valid == true && MainContainer != NULL) { data.security_data_ptr = MainContainer->find_security(data.unique_id); if (data.security_data_ptr != NULL) { data.security_data_valid = true; } } libofx_context->transactionCallback(data); return true; } int OfxTransactionContainer::add_to_main_tree() { if (MainContainer != NULL) { return MainContainer->add_container(this); } else { return false; } } void OfxTransactionContainer::add_attribute(const string identifier, const string value) { if (identifier == "DTPOSTED") { data.date_posted = ofxdate_to_time_t(value); data.date_posted_valid = true; } else if (identifier == "DTUSER") { data.date_initiated = ofxdate_to_time_t(value); data.date_initiated_valid = true; } else if (identifier == "DTAVAIL") { data.date_funds_available = ofxdate_to_time_t(value); data.date_funds_available_valid = true; } else if (identifier == "FITID") { strncpy(data.fi_id, value.c_str(), sizeof(data.fi_id)); data.fi_id_valid = true; } else if (identifier == "CORRECTFITID") { strncpy(data.fi_id_corrected, value.c_str(), sizeof(data.fi_id)); data.fi_id_corrected_valid = true; } else if (identifier == "CORRECTACTION") { data.fi_id_correction_action_valid = true; if (value == "REPLACE") { data.fi_id_correction_action = REPLACE; } else if (value == "DELETE") { data.fi_id_correction_action = DELETE; } else { data.fi_id_correction_action_valid = false; } } else if ((identifier == "SRVRTID") || (identifier == "SRVRTID2")) { strncpy(data.server_transaction_id, value.c_str(), sizeof(data.server_transaction_id)); data.server_transaction_id_valid = true; } else if (identifier == "MEMO" || identifier == "MEMO2") { strncpy(data.memo, value.c_str(), sizeof(data.memo)); data.memo_valid = true; } else { /* Redirect unknown identifiers to the base class */ OfxGenericContainer::add_attribute(identifier, value); } }// end OfxTransactionContainer::add_attribute() void OfxTransactionContainer::add_account(OfxAccountData * account_data) { if (account_data->account_id_valid == true) { data.account_ptr = account_data; strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH); data.account_id_valid = true; } } /*************************************************************************** * OfxBankTransactionContainer * ***************************************************************************/ OfxBankTransactionContainer::OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { ; } void OfxBankTransactionContainer::add_attribute(const string identifier, const string value) { if ( identifier == "TRNTYPE") { data.transactiontype_valid = true; if (value == "CREDIT") { data.transactiontype = OFX_CREDIT; } else if (value == "DEBIT") { data.transactiontype = OFX_DEBIT; } else if (value == "INT") { data.transactiontype = OFX_INT; } else if (value == "DIV") { data.transactiontype = OFX_DIV; } else if (value == "FEE") { data.transactiontype = OFX_FEE; } else if (value == "SRVCHG") { data.transactiontype = OFX_SRVCHG; } else if (value == "DEP") { data.transactiontype = OFX_DEP; } else if (value == "ATM") { data.transactiontype = OFX_ATM; } else if (value == "POS") { data.transactiontype = OFX_POS; } else if (value == "XFER") { data.transactiontype = OFX_XFER; } else if (value == "CHECK") { data.transactiontype = OFX_CHECK; } else if (value == "PAYMENT") { data.transactiontype = OFX_PAYMENT; } else if (value == "CASH") { data.transactiontype = OFX_CASH; } else if (value == "DIRECTDEP") { data.transactiontype = OFX_DIRECTDEP; } else if (value == "DIRECTDEBIT") { data.transactiontype = OFX_DIRECTDEBIT; } else if (value == "REPEATPMT") { data.transactiontype = OFX_REPEATPMT; } else if (value == "OTHER") { data.transactiontype = OFX_OTHER; } else { data.transactiontype_valid = false; } }//end TRANSTYPE else if (identifier == "TRNAMT") { data.amount = ofxamount_to_double(value); data.amount_valid = true; data.units = -data.amount; data.units_valid = true; data.unitprice = 1.00; data.unitprice_valid = true; } else if (identifier == "CHECKNUM") { strncpy(data.check_number, value.c_str(), sizeof(data.check_number)); data.check_number_valid = true; } else if (identifier == "REFNUM") { strncpy(data.reference_number, value.c_str(), sizeof(data.reference_number)); data.reference_number_valid = true; } else if (identifier == "SIC") { data.standard_industrial_code = atoi(value.c_str()); data.standard_industrial_code_valid = true; } else if ((identifier == "PAYEEID") || (identifier == "PAYEEID2")) { strncpy(data.payee_id, value.c_str(), sizeof(data.payee_id)); data.payee_id_valid = true; } else if (identifier == "NAME") { strncpy(data.name, value.c_str(), sizeof(data.name)); data.name_valid = true; } else { /* Redirect unknown identifiers to base class */ OfxTransactionContainer::add_attribute(identifier, value); } }//end OfxBankTransactionContainer::add_attribute /*************************************************************************** * OfxInvestmentTransactionContainer * ***************************************************************************/ OfxInvestmentTransactionContainer::OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxTransactionContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { type = "INVESTMENT"; data.transactiontype = OFX_OTHER; data.transactiontype_valid = true; data.invtransactiontype_valid = true; if (para_tag_identifier == "BUYDEBT") { data.invtransactiontype = OFX_BUYDEBT; } else if (para_tag_identifier == "BUYMF") { data.invtransactiontype = OFX_BUYMF; } else if (para_tag_identifier == "BUYOPT") { data.invtransactiontype = OFX_BUYOPT; } else if (para_tag_identifier == "BUYOTHER") { data.invtransactiontype = OFX_BUYOTHER; } else if (para_tag_identifier == "BUYSTOCK") { data.invtransactiontype = OFX_BUYSTOCK; } else if (para_tag_identifier == "CLOSUREOPT") { data.invtransactiontype = OFX_CLOSUREOPT; } else if (para_tag_identifier == "INCOME") { data.invtransactiontype = OFX_INCOME; } else if (para_tag_identifier == "INVEXPENSE") { data.invtransactiontype = OFX_INVEXPENSE; } else if (para_tag_identifier == "JRNLFUND") { data.invtransactiontype = OFX_JRNLFUND; } else if (para_tag_identifier == "JRNLSEC") { data.invtransactiontype = OFX_JRNLSEC; } else if (para_tag_identifier == "MARGININTEREST") { data.invtransactiontype = OFX_MARGININTEREST; } else if (para_tag_identifier == "REINVEST") { data.invtransactiontype = OFX_REINVEST; } else if (para_tag_identifier == "RETOFCAP") { data.invtransactiontype = OFX_RETOFCAP; } else if (para_tag_identifier == "SELLDEBT") { data.invtransactiontype = OFX_SELLDEBT; } else if (para_tag_identifier == "SELLMF") { data.invtransactiontype = OFX_SELLMF; } else if (para_tag_identifier == "SELLOPT") { data.invtransactiontype = OFX_SELLOPT; } else if (para_tag_identifier == "SELLOTHER") { data.invtransactiontype = OFX_SELLOTHER; } else if (para_tag_identifier == "SELLSTOCK") { data.invtransactiontype = OFX_SELLSTOCK; } else if (para_tag_identifier == "SPLIT") { data.invtransactiontype = OFX_SPLIT; } else if (para_tag_identifier == "TRANSFER") { data.invtransactiontype = OFX_TRANSFER; } else { message_out(ERROR, "This should not happen, " + para_tag_identifier + " is an unknown investment transaction type"); data.invtransactiontype_valid = false; } } void OfxInvestmentTransactionContainer::add_attribute(const string identifier, const string value) { if (identifier == "UNIQUEID") { strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id)); data.unique_id_valid = true; } else if (identifier == "UNIQUEIDTYPE") { strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type)); data.unique_id_type_valid = true; } else if (identifier == "UNITS") { data.units = ofxamount_to_double(value); data.units_valid = true; } else if (identifier == "UNITPRICE") { data.unitprice = ofxamount_to_double(value); data.unitprice_valid = true; } else if (identifier == "MKTVAL") { message_out(DEBUG, "MKTVAL of " + value + " ignored since MKTVAL should always be UNITS*UNITPRICE"); } else if (identifier == "TOTAL") { data.amount = ofxamount_to_double(value); data.amount_valid = true; } else if (identifier == "DTSETTLE") { data.date_posted = ofxdate_to_time_t(value); data.date_posted_valid = true; } else if (identifier == "DTTRADE") { data.date_initiated = ofxdate_to_time_t(value); data.date_initiated_valid = true; } else if (identifier == "COMMISSION") { data.commission = ofxamount_to_double(value); data.commission_valid = true; } else if (identifier == "FEES") { data.fees = ofxamount_to_double(value); data.fees_valid = true; } else if (identifier == "OLDUNITS") { data.oldunits = ofxamount_to_double(value); data.oldunits_valid = true; } else if (identifier == "NEWUNITS") { data.newunits = ofxamount_to_double(value); data.newunits_valid = true; } else { /* Redirect unknown identifiers to the base class */ OfxTransactionContainer::add_attribute(identifier, value); } }//end OfxInvestmentTransactionContainer::add_attribute libofx-0.9.4/lib/ofx_container_security.cpp0000644000175000017500000000660711544727432016011 00000000000000/*************************************************************************** ofx_container_security.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxSecurityContainer for stocks, bonds, mutual funds, etc. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" #include "ofx_utilities.hh" extern OfxMainContainer * MainContainer; /*************************************************************************** * OfxSecurityContainer * ***************************************************************************/ OfxSecurityContainer::OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { memset(&data, 0, sizeof(data)); type = "SECURITY"; } OfxSecurityContainer::~OfxSecurityContainer() { } void OfxSecurityContainer::add_attribute(const string identifier, const string value) { if (identifier == "UNIQUEID") { strncpy(data.unique_id, value.c_str(), sizeof(data.unique_id)); data.unique_id_valid = true; } else if (identifier == "UNIQUEIDTYPE") { strncpy(data.unique_id_type, value.c_str(), sizeof(data.unique_id_type)); data.unique_id_type_valid = true; } else if (identifier == "SECNAME") { strncpy(data.secname, value.c_str(), sizeof(data.secname)); data.secname_valid = true; } else if (identifier == "TICKER") { strncpy(data.ticker, value.c_str(), sizeof(data.ticker)); data.ticker_valid = true; } else if (identifier == "UNITPRICE") { data.unitprice = ofxamount_to_double(value); data.unitprice_valid = true; } else if (identifier == "DTASOF") { data.date_unitprice = ofxdate_to_time_t(value); data.date_unitprice_valid = true; } else if (identifier == "CURDEF") { strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH); data.currency_valid = true; } else if (identifier == "MEMO" || identifier == "MEMO2") { strncpy(data.memo, value.c_str(), sizeof(data.memo)); data.memo_valid = true; } else { /* Redirect unknown identifiers to the base class */ OfxGenericContainer::add_attribute(identifier, value); } } int OfxSecurityContainer::gen_event() { libofx_context->securityCallback(data); return true; } int OfxSecurityContainer::add_to_main_tree() { if (MainContainer != NULL) { return MainContainer->add_container(this); } else { return false; } } libofx-0.9.4/lib/ofx_request_statement.cpp0000644000175000017500000001754711544727432015661 00000000000000/*************************************************************************** ofx_request_statement.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Implementation of libofx_request_statement to create an OFX file * containing a request for a statement. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "libofx.h" #include "ofx_utilities.hh" #include "ofx_request_statement.hh" using namespace std; char* libofx_request_statement( const OfxFiLogin* login, const OfxAccountData* account, time_t date_from ) { OfxStatementRequest strq( *login, *account, date_from ); string request = OfxHeader(login->header_version) + strq.Output(); unsigned size = request.size(); char* result = (char*)malloc(size + 1); request.copy(result, size); result[size] = 0; return result; } OfxStatementRequest::OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from ): OfxRequest(fi), m_account(account), m_date_from(from) { Add( SignOnRequest() ); if ( account.account_type == account.OFX_CREDITCARD ) Add(CreditCardStatementRequest()); else if ( account.account_type == account.OFX_INVESTMENT ) Add(InvestmentStatementRequest()); else Add(BankStatementRequest()); } OfxAggregate OfxStatementRequest::BankStatementRequest(void) const { OfxAggregate bankacctfromTag("BANKACCTFROM"); bankacctfromTag.Add( "BANKID", m_account.bank_id ); bankacctfromTag.Add( "ACCTID", m_account.account_number ); if ( m_account.account_type == m_account.OFX_CHECKING ) bankacctfromTag.Add( "ACCTTYPE", "CHECKING" ); else if ( m_account.account_type == m_account.OFX_SAVINGS ) bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" ); else if ( m_account.account_type == m_account.OFX_MONEYMRKT ) bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" ); else if ( m_account.account_type == m_account.OFX_CREDITLINE ) bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" ); else if ( m_account.account_type == m_account.OFX_CMA ) bankacctfromTag.Add( "ACCTTYPE", "CMA" ); OfxAggregate inctranTag("INCTRAN"); inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) ); inctranTag.Add( "INCLUDE", "Y" ); OfxAggregate stmtrqTag("STMTRQ"); stmtrqTag.Add( bankacctfromTag ); stmtrqTag.Add( inctranTag ); return RequestMessage("BANK", "STMT", stmtrqTag); } OfxAggregate OfxStatementRequest::CreditCardStatementRequest(void) const { /* QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ") .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum())) .subtag(Tag("INCTRAN").element("DTSTART",dtstart_string).element("INCLUDE","Y"))); } */ OfxAggregate ccacctfromTag("CCACCTFROM"); ccacctfromTag.Add( "ACCTID", m_account.account_number ); OfxAggregate inctranTag("INCTRAN"); inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) ); inctranTag.Add( "INCLUDE", "Y" ); OfxAggregate ccstmtrqTag("CCSTMTRQ"); ccstmtrqTag.Add( ccacctfromTag ); ccstmtrqTag.Add( inctranTag ); return RequestMessage("CREDITCARD", "CCSTMT", ccstmtrqTag); } OfxAggregate OfxStatementRequest::InvestmentStatementRequest(void) const { OfxAggregate invacctfromTag("INVACCTFROM"); invacctfromTag.Add( "BROKERID", m_account.broker_id ); invacctfromTag.Add( "ACCTID", m_account.account_number ); OfxAggregate inctranTag("INCTRAN"); inctranTag.Add( "DTSTART", time_t_to_ofxdate( m_date_from ) ); inctranTag.Add( "INCLUDE", "Y" ); OfxAggregate incposTag("INCPOS"); incposTag.Add( "DTASOF", time_t_to_ofxdatetime( time(NULL) ) ); incposTag.Add( "INCLUDE", "Y" ); OfxAggregate invstmtrqTag("INVSTMTRQ"); invstmtrqTag.Add( invacctfromTag ); invstmtrqTag.Add( inctranTag ); invstmtrqTag.Add( "INCOO", "Y" ); invstmtrqTag.Add( incposTag ); invstmtrqTag.Add( "INCBAL", "Y" ); return RequestMessage("INVSTMT", "INVSTMT", invstmtrqTag); } char* libofx_request_payment( const OfxFiLogin* login, const OfxAccountData* account, const OfxPayee* payee, const OfxPayment* payment ) { OfxPaymentRequest strq( *login, *account, *payee, *payment ); string request = OfxHeader(login->header_version) + strq.Output(); unsigned size = request.size(); char* result = (char*)malloc(size + 1); request.copy(result, size); result[size] = 0; return result; } OfxPaymentRequest::OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment ): OfxRequest(fi), m_account(account), m_payee(payee), m_payment(payment) { Add( SignOnRequest() ); OfxAggregate bankacctfromTag("BANKACCTFROM"); bankacctfromTag.Add( "BANKID", m_account.bank_id ); bankacctfromTag.Add( "ACCTID", m_account.account_number ); if ( m_account.account_type == m_account.OFX_CHECKING) bankacctfromTag.Add( "ACCTTYPE", "CHECKING" ); else if ( m_account.account_type == m_account.OFX_SAVINGS ) bankacctfromTag.Add( "ACCTTYPE", "SAVINGS" ); else if ( m_account.account_type == m_account.OFX_MONEYMRKT ) bankacctfromTag.Add( "ACCTTYPE", "MONEYMRKT" ); else if ( m_account.account_type == m_account.OFX_CREDITLINE ) bankacctfromTag.Add( "ACCTTYPE", "CREDITLINE" ); else if ( m_account.account_type == m_account.OFX_CMA ) bankacctfromTag.Add( "ACCTTYPE", "CMA" ); OfxAggregate payeeTag("PAYEE"); payeeTag.Add( "NAME", m_payee.name ); payeeTag.Add( "ADDR1", m_payee.address1 ); payeeTag.Add( "CITY", m_payee.city ); payeeTag.Add( "STATE", m_payee.state ); payeeTag.Add( "POSTALCODE", m_payee.postalcode ); payeeTag.Add( "PHONE", m_payee.phone ); OfxAggregate pmtinfoTag("PMTINFO"); pmtinfoTag.Add( bankacctfromTag ); pmtinfoTag.Add( "TRNAMT", m_payment.amount ); pmtinfoTag.Add( payeeTag ); pmtinfoTag.Add( "PAYACCT", m_payment.account ); pmtinfoTag.Add( "DTDUE", m_payment.datedue ); pmtinfoTag.Add( "MEMO", m_payment.memo ); OfxAggregate pmtrqTag("PMTRQ"); pmtrqTag.Add( pmtinfoTag ); Add( RequestMessage("BILLPAY", "PMT", pmtrqTag) ); } char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid ) { #if 0 OfxAggregate pmtinqrqTag( "PMTINQRQ" ); pmtinqrqTag.Add( "SRVRTID", transactionid ); OfxRequest ofx(*login); ofx.Add( ofx.SignOnRequest() ); ofx.Add( ofx.RequestMessage("BILLPAY", "PMTINQ", pmtinqrqTag) ); string request = OfxHeader() + ofx.Output(); unsigned size = request.size(); char* result = (char*)malloc(size + 1); request.copy(result, size); result[size] = 0; #else OfxAggregate payeesyncrq( "PAYEESYNCRQ" ); payeesyncrq.Add( "TOKEN", "0" ); payeesyncrq.Add( "TOKENONLY", "N" ); payeesyncrq.Add( "REFRESH", "Y" ); payeesyncrq.Add( "REJECTIFMISSING", "N" ); OfxAggregate message( "BILLPAYMSGSRQV1" ); message.Add( payeesyncrq ); OfxRequest ofx(*login); ofx.Add( ofx.SignOnRequest() ); ofx.Add( message ); string request = OfxHeader(login->header_version) + ofx.Output(); unsigned size = request.size(); char* result = (char*)malloc(size + 1); request.copy(result, size); result[size] = 0; #endif return result; } // vim:cin:si:ai:et:ts=2:sw=2: libofx-0.9.4/lib/ofx_request_accountinfo.hh0000644000175000017500000000347511544727432015775 00000000000000/*************************************************************************** ofx_request_accountinfo.hh ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Declaration of OfxRequestAccountInfo create an OFX file * containing a request for all account info at this FI for this user. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_REQ_ACCOUNTINFO_H #define OFX_REQ_ACCOUNTINFO_H #include #include "libofx.h" #include "ofx_request.hh" using namespace std; /** * \brief An account information request * * This is an entire OFX aggregate, with all subordinate aggregates needed to log onto * the OFX server of a single financial institution and download a list of all accounts * for this user. */ class OfxAccountInfoRequest: public OfxRequest { public: /** * Creates the request aggregate to obtain an account list from this @p fi. * * @param fi The information needed to log on user into one financial * institution */ OfxAccountInfoRequest( const OfxFiLogin& fi ); }; #endif // OFX_REQ_ACCOUNTINFO_H libofx-0.9.4/lib/ofx_utilities.cpp0000644000175000017500000002600311553056771014104 00000000000000/*************************************************************************** ofx_util.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Various simple functions for type conversion & al */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include "ParserEventGeneratorKit.h" #include "SGMLApplication.h" #include #include #include #include #include "messages.hh" #include "ofx_utilities.hh" #ifdef OS_WIN32 # define DIRSEP "\\" #else # define DIRSEP "/" #endif using namespace std; /** Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging. */ /*ostream &operator<<(ostream &os, SGMLApplication::CharString s) { for (size_t i = 0; i < s.len; i++) { os << ((char *)(s.ptr))[i*sizeof(SGMLApplication::Char)]; } return os; }*/ /*wostream &operator<<(wostream &os, SGMLApplication::CharString s) { for (size_t i = 0; i < s.len; i++) {//cout<
* To solve this problem (since usually a time error is relatively unimportant, but date error is), and to avoid problems in Australia caused by the behaviour in libofx up to 0.6.4, it was decided starting with 0.6.5 to use the following behavior:

* -No specific time is given in the file (date only): Considering that most banks seem to be sending dates in this format represented as local time (not compliant with the specs), the transaction is assumed to have occurred 11h59 (just before noon) LOCAL TIME. This way, we should never change the date, since you'd have to travel in a timezone at least 11 hours backwards or 13 hours forward from your own to introduce mistakes. However, if you are in timezone +13 or +14, and your bank meant the data to be interpreted by the spec, you will get the wrong date. We hope that banks in those timezone will either represent in local time like most, or specify the timezone properly.

* -No timezone is specified, but exact time is, the same behavior is mostly used, as many banks just append zeros instead of using the short notation. However, the time specified is used, even if 0 (midnight).

* -When a timezone is specified, it is always used to properly convert in local time, following the spec. * */ time_t ofxdate_to_time_t(const string ofxdate) { struct tm time; double local_offset; /* in seconds */ float ofx_gmt_offset; /* in fractional hours */ char timezone[4]; /* Original timezone: the library does not expose this value*/ char exact_time_specified = false; char time_zone_specified = false; string ofxdate_whole; time_t temptime; time.tm_isdst = daylight; // initialize dst setting std::time(&temptime); local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight); if (ofxdate.size() != 0) { ofxdate_whole = ofxdate.substr(0,ofxdate.find_first_not_of("0123456789")); if (ofxdate_whole.size()>=8) { time.tm_year = atoi(ofxdate_whole.substr(0, 4).c_str()) - 1900; time.tm_mon = atoi(ofxdate_whole.substr(4, 2).c_str()) - 1; time.tm_mday = atoi(ofxdate_whole.substr(6, 2).c_str()); if (ofxdate_whole.size() > 8) { if (ofxdate_whole.size() == 14) { /* if exact time is specified */ exact_time_specified = true; time.tm_hour = atoi(ofxdate_whole.substr(8, 2).c_str()); time.tm_min = atoi(ofxdate_whole.substr(10, 2).c_str()); time.tm_sec = atoi(ofxdate_whole.substr(12, 2).c_str()); } else { message_out(WARNING, "ofxdate_to_time_t(): Successfully parsed date part, but unable to parse time part of string " + ofxdate_whole + ". It is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!"); } } } else { /* Catch invalid string format */ message_out(ERROR, "ofxdate_to_time_t(): Unable to convert time, string " + ofxdate + " is not in proper YYYYMMDDHHMMSS.XXX[gmt offset:tz name] format!"); return mktime(&time); } /* Check if the timezone has been specified */ string::size_type startidx = ofxdate.find("["); string::size_type endidx; if (startidx != string::npos) { /* Time zone was specified */ time_zone_specified = true; startidx++; endidx = ofxdate.find(":", startidx) - 1; ofx_gmt_offset = atof(ofxdate.substr(startidx, (endidx - startidx) + 1).c_str()); startidx = endidx + 2; strncpy(timezone, ofxdate.substr(startidx, 3).c_str(), 4); } else { /* Time zone was not specified, assume GMT (provisionnaly) in case exact time is specified */ ofx_gmt_offset = 0; strcpy(timezone, "GMT"); } if (time_zone_specified == true) { /* If the timezone is specified always correct the timezone */ /* If the timezone is not specified, but the exact time is, correct the timezone, assuming GMT following the spec */ /* Correct the time for the timezone */ time.tm_sec = time.tm_sec + (int)(local_offset - (ofx_gmt_offset * 60 * 60)); //Convert from fractionnal hours to seconds } else if (exact_time_specified == false) { /*Time zone data missing and exact time not specified, diverge from the OFX spec ans assume 11h59 local time */ time.tm_hour = 11; time.tm_min = 59; time.tm_sec = 0; } return mktime(&time); } else { message_out(ERROR, "ofxdate_to_time_t(): Unable to convert time, string is 0 length!"); } return mktime(&time); } /** * Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float. *\note The ofx number format is the following: "." or "," as decimal separator, NO thousands separator. */ double ofxamount_to_double(const string ofxamount) { //Replace commas and decimal points for atof() string::size_type idx; string tmp = ofxamount; idx = tmp.find(','); if (idx == string::npos) { idx = tmp.find('.'); } if (idx != string::npos) { tmp.replace(idx, 1, 1, ((localeconv())->decimal_point)[0]); } return atof(tmp.c_str()); } /** Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching. */ string strip_whitespace(const string para_string) { size_t index; size_t i; string temp_string = para_string; const char *whitespace = " \b\f\n\r\t\v"; const char *abnormal_whitespace = "\b\f\n\r\t\v";//backspace,formfeed,newline,cariage return, horizontal and vertical tabs message_out(DEBUG4, "strip_whitespace() Before: |" + temp_string + "|"); for (i = 0; i <= temp_string.size() && temp_string.find_first_of(whitespace, i) == i && temp_string.find_first_of(whitespace, i) != string::npos; i++); temp_string.erase(0, i); //Strip leading whitespace for (i = temp_string.size() - 1; (i >= 0) && (temp_string.find_last_of(whitespace, i) == i) && (temp_string.find_last_of(whitespace, i) != string::npos); i--); temp_string.erase(i + 1, temp_string.size() - (i + 1)); //Strip trailing whitespace while ((index = temp_string.find_first_of(abnormal_whitespace)) != string::npos) { temp_string.erase(index, 1); //Strip leading whitespace }; message_out(DEBUG4, "strip_whitespace() After: |" + temp_string + "|"); return temp_string; } std::string get_tmp_dir() { // Tries to mimic the behaviour of // http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Utility-Functions.html#g-get-tmp-dir char *var; var = getenv("TMPDIR"); if (var) return var; var = getenv("TMP"); if (var) return var; var = getenv("TEMP"); if (var) return var; #ifdef OS_WIN32 return "C:\\"; #else return "/tmp"; #endif } int mkTempFileName(const char *tmpl, char *buffer, unsigned int size) { std::string tmp_dir = get_tmp_dir(); strncpy(buffer, tmp_dir.c_str(), size); assert((strlen(buffer) + strlen(tmpl) + 2) < size); strcat(buffer, DIRSEP); strcat(buffer, tmpl); return 0; } libofx-0.9.4/lib/win32.cpp0000644000175000017500000000300411544727432012152 00000000000000/*************************************************************************** $RCSfile: win32.cpp,v $ ------------------- cvs : $Id: win32.cpp,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $ begin : Sat Oct 27 2007 copyright : (C) 2007 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * This file is part of the project "LibOfx". * * Please see toplevel file COPYING of that project for license details. * ***************************************************************************/ #include "win32.hh" #include #include #include #include #include #include #include #include #ifdef OS_WIN32 int mkstemp(char *tmpl) { int fd = -1; int len; char *nf; int i; len = strlen(tmpl); if (len < 6) { /* bad template */ errno = EINVAL; return -1; } if (strcasecmp(tmpl + (len - 7), "XXXXXX")) { /* bad template, last 6 chars must be "X" */ errno = EINVAL; return -1; } nf = strdup(tmpl); for (i = 0; i < 10; i++) { int rnd; char numbuf[16]; rnd = rand(); snprintf(numbuf, sizeof(numbuf) - 1, "%06x", rnd); memmove(nf + (len - 7), numbuf, 6); fd = open(nf, O_RDWR | O_BINARY | O_CREAT, 0444); if (fd >= 0) { memmove(tmpl, nf, len); free(nf); return fd; } } free(nf); errno = EEXIST; return -1; } #endif libofx-0.9.4/lib/ofx_request_accountinfo.cpp0000644000175000017500000000435511544727432016156 00000000000000/*************************************************************************** ofx_request_accountinfo.cpp ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Implementation of libofx_request_accountinfo to create an OFX file * containing a request for all account info at this FI for this user. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "libofx.h" #include "ofx_request_accountinfo.hh" using namespace std; char* libofx_request_accountinfo( const OfxFiLogin* login ) { OfxAccountInfoRequest strq( *login ); string request = OfxHeader(login->header_version) + strq.Output(); unsigned size = request.size(); char* result = (char*)malloc(size + 1); request.copy(result, size); result[size] = 0; return result; } /* 20050417210306 GnuCash gcash ENG ReferenceFI 00000 QWIN 1100 FFAAA4AA-A9B1-47F4-98E9-DE635EB41E77 4 19700101000000 */ OfxAccountInfoRequest::OfxAccountInfoRequest( const OfxFiLogin& fi ): OfxRequest(fi) { Add( SignOnRequest() ); OfxAggregate acctinforqTag("ACCTINFORQ"); acctinforqTag.Add( "DTACCTUP", time_t_to_ofxdate( 0 ) ); Add ( RequestMessage("SIGNUP", "ACCTINFO", acctinforqTag) ); } libofx-0.9.4/lib/ofc_sgml.hh0000644000175000017500000000232211544727432012620 00000000000000/*************************************************************************** ofx_sgml.h ------------------- begin : Tue Mar 19 2002 copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /** @file * \brief OFX/SGML parsing functionnality. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFC_SGML_H #define OFC_SGML_H #include "context.hh" ///Parses a DTD and OFX file(s) int ofc_proc_sgml(LibofxContext * libofx_context, int argc, char *argv[]); #endif libofx-0.9.4/lib/context.cpp0000644000175000017500000001102411544727432012675 00000000000000/**@file libofx_context.hh @brief Main state object passed everywhere in the library @author (C) 2004 by Benoit Gr�goire */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include "context.hh" using namespace std; LibofxContext::LibofxContext() : _current_file_type(OFX) , _statusCallback(0) , _accountCallback(0) , _securityCallback(0) , _transactionCallback(0) , _statementCallback(0) , _statementData(0) , _accountData(0) , _transactionData(0) , _securityData(0) , _statusData(0) { } LibofxContext::~LibofxContext() { } LibofxFileFormat LibofxContext::currentFileType() const { return _current_file_type; } void LibofxContext::setCurrentFileType(LibofxFileFormat t) { _current_file_type = t; } int LibofxContext::statementCallback(const struct OfxStatementData data) { if (_statementCallback) return _statementCallback(data, _statementData); return 0; } int LibofxContext::accountCallback(const struct OfxAccountData data) { if (_accountCallback) return _accountCallback(data, _accountData); return 0; } int LibofxContext::transactionCallback(const struct OfxTransactionData data) { if (_transactionCallback) return _transactionCallback(data, _transactionData); return 0; } int LibofxContext::securityCallback(const struct OfxSecurityData data) { if (_securityCallback) return _securityCallback(data, _securityData); return 0; } int LibofxContext::statusCallback(const struct OfxStatusData data) { if (_statusCallback) return _statusCallback(data, _statusData); return 0; } void LibofxContext::setStatusCallback(LibofxProcStatusCallback cb, void *user_data) { _statusCallback = cb; _statusData = user_data; } void LibofxContext::setAccountCallback(LibofxProcAccountCallback cb, void *user_data) { _accountCallback = cb; _accountData = user_data; } void LibofxContext::setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data) { _securityCallback = cb; _securityData = user_data; } void LibofxContext::setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data) { _transactionCallback = cb; _transactionData = user_data; } void LibofxContext::setStatementCallback(LibofxProcStatementCallback cb, void *user_data) { _statementCallback = cb; _statementData = user_data; } /** @note: Actual object returned is LibofxContext * */ LibofxContextPtr libofx_get_new_context() { return new LibofxContext(); } int libofx_free_context( LibofxContextPtr libofx_context_param) { delete (LibofxContext *)libofx_context_param; return 0; } void libofx_set_dtd_dir(LibofxContextPtr libofx_context, const char *s) { ((LibofxContext*)libofx_context)->setDtdDir(s); } extern "C" { void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data) { ((LibofxContext*)ctx)->setStatusCallback(cb, user_data); } void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data) { ((LibofxContext*)ctx)->setAccountCallback(cb, user_data); } void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data) { ((LibofxContext*)ctx)->setSecurityCallback(cb, user_data); } void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data) { ((LibofxContext*)ctx)->setTransactionCallback(cb, user_data); } void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data) { ((LibofxContext*)ctx)->setStatementCallback(cb, user_data); } } libofx-0.9.4/lib/ofx_container_account.cpp0000644000175000017500000001576311544727432015601 00000000000000/*************************************************************************** ofx_container_account.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxAccountContainer for bank, credit card and investment accounts. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" #include "ofx_utilities.hh" extern OfxMainContainer * MainContainer; /*************************************************************************** * OfxAccountContainer * ***************************************************************************/ OfxAccountContainer::OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { memset(&data, 0, sizeof(data)); type = "ACCOUNT"; strcpy(bankid, ""); strcpy(branchid, ""); strcpy(acctid, ""); strcpy(acctkey, ""); strcpy(brokerid, ""); if (para_tag_identifier == "CCACCTFROM") { /*Set the type for a creditcard account. Bank account specific OFX elements will set this attribute elsewhere */ data.account_type = data.OFX_CREDITCARD; data.account_type_valid = true; } if (para_tag_identifier == "INVACCTFROM") { /*Set the type for an investment account. Bank account specific OFX elements will set this attribute elsewhere */ data.account_type = data.OFX_INVESTMENT; data.account_type_valid = true; } if (parentcontainer != NULL && ((OfxStatementContainer*)parentcontainer)->data.currency_valid == true) { strncpy(data.currency, ((OfxStatementContainer*)parentcontainer)->data.currency, OFX_CURRENCY_LENGTH); /* In ISO-4217 format */ data.currency_valid = true; } } OfxAccountContainer::~OfxAccountContainer() { /* if (parentcontainer->type == "STATEMENT") { ((OfxStatementContainer*)parentcontainer)->add_account(data); } ofx_proc_account_cb (data);*/ } void OfxAccountContainer::add_attribute(const string identifier, const string value) { if ( identifier == "BANKID") { strncpy(bankid, value.c_str(), OFX_BANKID_LENGTH); data.bank_id_valid = true; strncpy(data.bank_id, value.c_str(), OFX_BANKID_LENGTH); } else if ( identifier == "BRANCHID") { strncpy(branchid, value.c_str(), OFX_BRANCHID_LENGTH); data.branch_id_valid = true; strncpy(data.branch_id, value.c_str(), OFX_BRANCHID_LENGTH); } else if ( identifier == "ACCTID") { strncpy(acctid, value.c_str(), OFX_ACCTID_LENGTH); data.account_number_valid = true; strncpy(data.account_number, value.c_str(), OFX_ACCTID_LENGTH); } else if ( identifier == "ACCTKEY") { strncpy(acctkey, value.c_str(), OFX_ACCTKEY_LENGTH); } else if ( identifier == "BROKERID") /* For investment accounts */ { strncpy(brokerid, value.c_str(), OFX_BROKERID_LENGTH); data.broker_id_valid = true; strncpy(data.broker_id, value.c_str(), OFX_BROKERID_LENGTH); } else if ((identifier == "ACCTTYPE") || (identifier == "ACCTTYPE2")) { data.account_type_valid = true; if (value == "CHECKING") { data.account_type = data.OFX_CHECKING; } else if (value == "SAVINGS") { data.account_type = data.OFX_SAVINGS; } else if (value == "MONEYMRKT") { data.account_type = data.OFX_MONEYMRKT; } else if (value == "CREDITLINE") { data.account_type = data.OFX_CREDITLINE; } else if (value == "CMA") { data.account_type = data.OFX_CMA; } /* AccountType CREDITCARD is set at object creation, if appropriate */ else { data.account_type_valid = false; } } else { /* Redirect unknown identifiers to the base class */ OfxGenericContainer::add_attribute(identifier, value); } }//end OfxAccountContainer::add_attribute() int OfxAccountContainer::gen_event() { libofx_context->accountCallback(data); return true; } int OfxAccountContainer::add_to_main_tree() { gen_account_id (); if (MainContainer != NULL) { return MainContainer->add_container(this); } else { return false; } } void OfxAccountContainer::gen_account_id(void) { if (data.account_type == OfxAccountData::OFX_CREDITCARD) { strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, acctkey, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_name, "Credit card ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); } else if (data.account_type == OfxAccountData::OFX_INVESTMENT) { strncat(data.account_id, brokerid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_name, "Investment account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); strncat(data.account_name, " at broker ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); strncat(data.account_name, brokerid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); } else { strncat(data.account_id, bankid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, branchid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, " ", OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_id, acctid, OFX_ACCOUNT_ID_LENGTH - strlen(data.account_id)); strncat(data.account_name, "Bank account ", OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); strncat(data.account_name, acctid, OFX_ACCOUNT_NAME_LENGTH - strlen(data.account_name)); } if (strlen(data.account_id) >= 0) { data.account_id_valid = true; } }//end OfxAccountContainer::gen_account_id() libofx-0.9.4/lib/getopt.c0000644000175000017500000007270311544727432012166 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,98,99,2000,2001 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 Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; 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. */ # if defined HAVE_LIBINTL_H || defined _LIBC # include # ifndef _ # define _(msgid) gettext (msgid) # endif # 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 /* Stored original parameters. 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). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; # endif # ifdef USE_NONOPTION_FLAGS # 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 # define SWAP_FLAGS(ch1, ch2) # endif #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. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* 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; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (posixly_correct == NULL && argc == __libc_argc && argv == __libc_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; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; 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. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # 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 if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) 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 (print_errors) { 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 (print_errors) 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 (print_errors) { 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 (print_errors) { 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 (print_errors) { /* 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 (print_errors) 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 (print_errors) 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 (print_errors) 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 (print_errors) { /* 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 */ libofx-0.9.4/lib/ofx_containers.hh0000644000175000017500000002535011544727432014056 00000000000000/*************************************************************************** ofx_proc_rs.h ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief LibOFX internal object code. * * These objects will process the elements returned by ofx_sgml.cpp and add them to their data members. * \warning Object documentation is not yet complete. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_PROC_H #define OFX_PROC_H #include "libofx.h" #include "tree.hh" #include "context.hh" using namespace std; /** \brief A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer. * A hierarchy of containers is built as the file is parsed. The supported OFX elements all have a matching container. The others are assigned a OfxDummyContainer, so every OFX element creates a container as the file is par Note however that containers are destroyed as soon as the corresponding SGML element is closed. */ class OfxGenericContainer { public: string type;/**< The type of the object, often == tag_identifier */ string tag_identifier; /**< The identifer of the creating tag */ OfxGenericContainer *parentcontainer; LibofxContext *libofx_context; OfxGenericContainer(LibofxContext *p_libofx_context); OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer); OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); virtual ~OfxGenericContainer() {}; /** \brief Add data to a container object. * Must be called once completed parsing an OFX SGML data element. The parent container should know what to do with it. \param identifier The name of the data element \param value The concatenated string of the data */ virtual void add_attribute(const string identifier, const string value); /** \brief Generate libofx.h events. * gen_event will call the appropriate ofx_proc_XXX_cb defined in libofx.h if one is available. \return true if a callback function vas called, false otherwise. */ virtual int gen_event(); /** \brief Add this container to the main tree. * add_to_main_treegen_event will add the container to the main trees stored int the OfxMainContainer. \return true if successfull, false otherwise. */ virtual int add_to_main_tree(); /// Returns the parent container object (the one representing the containing OFX SGML element) OfxGenericContainer* getparent(); };//End class OfxGenericObject /** \brief A container to holds OFX SGML elements that LibOFX knows nothing about * The OfxDummyContainer is used for elements (not data elements) that are not recognised. Note that recognised objects may very well be a children of an OfxDummyContainer. */ class OfxDummyContainer: public OfxGenericContainer { public: OfxDummyContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); void add_attribute(const string identifier, const string value); }; /** \brief A container to hold a OFX SGML element for which you want the parent to process it's data elements * When you use add_attribute on an OfxPushUpContainer, the add_attribute is redirected to the parent container. */ class OfxPushUpContainer: public OfxGenericContainer { public: OfxPushUpContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); void add_attribute(const string identifier, const string value); }; /** \brief Represents the OFX SGML entity */ class OfxStatusContainer: public OfxGenericContainer { public: OfxStatusData data; OfxStatusContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxStatusContainer(); void add_attribute(const string identifier, const string value); }; /** \brief Represents the OFX SGML entity * OfxBalanceContainer is an auxiliary container (there is no matching data object in libofx.h) */ class OfxBalanceContainer: public OfxGenericContainer { public: /* Not yet complete see spec 1.6 p.63 */ //char name[OFX_BALANCE_NAME_LENGTH]; //char description[OFX_BALANCE_DESCRIPTION_LENGTH]; //enum BalanceType{DOLLAR, PERCENT, NUMBER} balance_type; double amount; /**< Interpretation depends on balance_type */ int amount_valid; time_t date; /**< Effective date of the given balance */ int date_valid; OfxBalanceContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxBalanceContainer(); void add_attribute(const string identifier, const string value); }; /*************************************************************************** * OfxStatementContainer * ***************************************************************************/ /** \brief Represents a statement for either a bank account or a credit card account. * Can be built from either a or a OFX SGML entity */ class OfxStatementContainer: public OfxGenericContainer { public: OfxStatementData data; OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxStatementContainer(); void add_attribute(const string identifier, const string value); virtual int add_to_main_tree(); virtual int gen_event(); void add_account(OfxAccountData * account_data); void add_balance(OfxBalanceContainer* ptr_balance_container); // void add_transaction(const OfxTransactionData transaction_data); }; /*************************************************************************** * OfxAccountContaine r * ***************************************************************************/ /** \brief Represents a bank account or a credit card account. * Can be built from either a or OFX SGML entity */ class OfxAccountContainer: public OfxGenericContainer { public: OfxAccountData data; OfxAccountContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxAccountContainer(); void add_attribute(const string identifier, const string value); int add_to_main_tree(); virtual int gen_event(); private: void gen_account_id(void); char bankid[OFX_BANKID_LENGTH]; char branchid[OFX_BRANCHID_LENGTH]; char acctid[OFX_ACCTID_LENGTH];/**< This field is used by both and */ char acctkey[OFX_ACCTKEY_LENGTH]; char brokerid[OFX_BROKERID_LENGTH]; }; /*************************************************************************** * OfxSecurityContainer * ***************************************************************************/ /** \brief Represents a security, such as a stock or bond. */ class OfxSecurityContainer: public OfxGenericContainer { public: OfxSecurityData data; OfxSecurityContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxSecurityContainer(); void add_attribute(const string identifier, const string value); virtual int gen_event(); virtual int add_to_main_tree(); private: OfxStatementContainer * parent_statement; }; /*************************************************************************** * OfxTransactionContainer * ***************************************************************************/ /** \brief Represents a generic transaction. */ class OfxTransactionContainer: public OfxGenericContainer { public: OfxTransactionData data; OfxTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxTransactionContainer(); virtual void add_attribute(const string identifier, const string value); void add_account(OfxAccountData * account_data); virtual int gen_event(); virtual int add_to_main_tree(); private: OfxStatementContainer * parent_statement; }; /** \brief Represents a bank or credid card transaction. * Built from OFX SGML entity */ class OfxBankTransactionContainer: public OfxTransactionContainer { public: OfxBankTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); void add_attribute(const string identifier, const string value); }; /** \brief Represents a bank or credid card transaction. * Built from the diferent investment transaction OFX entity */ class OfxInvestmentTransactionContainer: public OfxTransactionContainer { public: OfxInvestmentTransactionContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); void add_attribute(const string identifier, const string value); }; /*************************************************************************** * OfxMainContainer * ***************************************************************************/ /** \brief The root container. Created by the OFX element or by the export functions. * The OfxMainContainer maintains trees of processed ofx data structures which can be used to generate events in the right order, and eventually export in OFX and QIF formats and even generate matching OFX querys. */ class OfxMainContainer: public OfxGenericContainer { public: OfxMainContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier); ~OfxMainContainer(); int add_container(OfxGenericContainer * container); int add_container(OfxStatementContainer * container); int add_container(OfxAccountContainer * container); int add_container(OfxTransactionContainer * container); int add_container(OfxSecurityContainer * container); int gen_event(); OfxSecurityData * find_security(string unique_id); private: tree security_tree; tree account_tree; }; #endif libofx-0.9.4/lib/win32.hh0000644000175000017500000000141111544727432011767 00000000000000/*************************************************************************** $RCSfile: win32.hh,v $ ------------------- cvs : $Id: win32.hh,v 1.3 2007-10-27 12:15:58 aquamaniac Exp $ begin : Sat Oct 27 2007 copyright : (C) 2007 by Martin Preuss email : martin@libchipcard.de *************************************************************************** * This file is part of the project "LibOfx". * * Please see toplevel file COPYING of that project for license details. * ***************************************************************************/ #ifndef LIBOFX_WIN32_HH #define LIBOFX_WIN32_HH #ifdef HAVE_CONFIG_H # include #endif #ifdef OS_WIN32 int mkstemp(char *tmpl); #endif #endif libofx-0.9.4/lib/Makefile.am0000644000175000017500000000226011552346574012546 00000000000000lib_LTLIBRARIES = libofx.la EXTRA_DIST = gnugetopt.h getopt.c getopt1.c libofx_la_SOURCES = messages.cpp \ ofx_utilities.cpp \ file_preproc.cpp \ context.cpp \ ofx_preproc.cpp \ ofx_container_generic.cpp \ ofx_container_main.cpp \ ofx_container_security.cpp \ ofx_container_statement.cpp \ ofx_container_account.cpp \ ofx_container_transaction.cpp \ ofx_containers_misc.cpp \ ofx_request.cpp \ ofx_request_accountinfo.cpp \ ofx_request_statement.cpp \ ofx_sgml.cpp \ ofc_sgml.cpp \ win32.cpp noinst_HEADERS = ${top_builddir}/inc/libofx.h \ messages.hh \ ofx_preproc.hh \ file_preproc.hh \ context.hh \ ofx_sgml.hh \ ofc_sgml.hh \ ofx_aggregate.hh \ ofx_error_msg.hh \ ofx_containers.hh \ ofx_request.hh \ ofx_request_accountinfo.hh \ ofx_request_statement.hh \ ofx_utilities.hh \ tree.hh \ win32.hh AM_CPPFLAGS = \ -I. \ -I${top_builddir}/inc \ -I${OPENSPINCLUDES} \ -DMAKEFILE_DTD_PATH=\"${LIBOFX_DTD_DIR}\" #libofx_la_LIBADD = @LIBOBJS@ ${OPENSPLIBS} -lstdc++ libofx_la_LIBADD = $(OPENSPLIBS) $(ICONV_LIBS) -lstdc++ libofx_la_LDFLAGS = -no-undefined -version-info @LIBOFX_SO_CURRENT@:@LIBOFX_SO_REVISION@:@LIBOFX_SO_AGE@ libofx-0.9.4/lib/ofx_request.hh0000644000175000017500000000550311544727432013377 00000000000000/*************************************************************************** ofx_request.hh ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Declaration of an OfxRequests to create an OFX file * containing a generic request . */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_REQUEST_H #define OFX_REQUEST_H #include #include "libofx.h" #include "ofx_aggregate.hh" using namespace std; /** * \brief A generic request * * This is an entire OFX aggregate, with all subordinate aggregates needed to log onto * the OFX server of a single financial institution and process a request. The details * of the particular request are up to subclasses of this one. */ class OfxRequest: public OfxAggregate { public: /** * Creates the generic request aggregate. * * @param fi The information needed to log on user into one financial * institution */ OfxRequest(const OfxFiLogin& fi): OfxAggregate("OFX"), m_login(fi) {} //protected: public: /** * Creates a signon request aggregate, & , sufficient * to log this user into this financial institution. * * @return The request aggregate created */ OfxAggregate SignOnRequest(void) const; /** * Creates a message aggregate * * @param msgtype The type of message. This will be prepended to "MSGSRQV1" * to become the tagname of the overall aggregate * @param trntype The type of transactions being requested. This will be * prepended to "TRNRQ" to become the tagname of the subordinate aggregate. * @param aggregate The actual contents of the message, which will be a sub * aggregate of the xxxTRNRQ aggregate. * @return The message aggregate created */ OfxAggregate RequestMessage(const string& msgtype, const string& trntype, const OfxAggregate& aggregate ) const; protected: OfxFiLogin m_login; }; /** * @name Some general helper functions */ //@{ string time_t_to_ofxdatetime( time_t time ); string time_t_to_ofxdate( time_t time ); string OfxHeader(const char *hver); //@} #endif // OFX_REQUEST_H libofx-0.9.4/lib/getopt1.c0000644000175000017500000001065011544727432012240 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 Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; 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 */ libofx-0.9.4/lib/messages.cpp0000644000175000017500000001167711544727432013036 00000000000000/*************************************************************************** ofx_messages.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Message IO functionality */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include "ParserEventGeneratorKit.h" #include "ofx_utilities.hh" #include "messages.hh" SGMLApplication::OpenEntityPtr entity_ptr; /**< Global for determining the line number in OpenSP */ SGMLApplication::Position position; /**< Global for determining the line number in OpenSP */ volatile int ofx_PARSER_msg = false; /**< If set to true, parser events will be printed to the console */ volatile int ofx_DEBUG_msg = false;/**< If set to true, general debug messages will be printed to the console */ volatile int ofx_DEBUG1_msg = false;/**< If set to true, debug level 1 messages will be printed to the console */ volatile int ofx_DEBUG2_msg = false;/**< If set to true, debug level 2 messages will be printed to the console */ volatile int ofx_DEBUG3_msg = false;/**< If set to true, debug level 3 messages will be printed to the console */ volatile int ofx_DEBUG4_msg = false;/**< If set to true, debug level 4 messages will be printed to the console */ volatile int ofx_DEBUG5_msg = false;/**< If set to true, debug level 5 messages will be printed to the console */ volatile int ofx_STATUS_msg = false;/**< If set to true, status messages will be printed to the console */ volatile int ofx_INFO_msg = false;/**< If set to true, information messages will be printed to the console */ volatile int ofx_WARNING_msg = false;/**< If set to true, warning messages will be printed to the console */ volatile int ofx_ERROR_msg = false;/**< If set to true, error messages will be printed to the console */ volatile int ofx_show_position = true;/**< If set to true, the line number will be shown after any error */ void show_line_number() { extern SGMLApplication::OpenEntityPtr entity_ptr; extern SGMLApplication::Position position; if ((ofx_show_position == true)) { SGMLApplication::Location *location = new SGMLApplication::Location(entity_ptr, position); cerr << "(Above message occured on Line " << location->lineNumber << ", Column " << location->columnNumber << ")" << endl; delete location; } } /** Prints a message to stdout, if the corresponding message OfxMsgType given in the parameters is enabled */ int message_out(OfxMsgType error_type, const string message) { switch (error_type) { case DEBUG : if (ofx_DEBUG_msg == true) { cerr << "LibOFX DEBUG: " << message << "\n"; show_line_number(); } break; case DEBUG1 : if (ofx_DEBUG1_msg == true) { cerr << "LibOFX DEBUG1: " << message << "\n"; show_line_number(); } break; case DEBUG2 : if (ofx_DEBUG2_msg == true) { cerr << "LibOFX DEBUG2: " << message << "\n"; show_line_number(); } break; case DEBUG3 : if (ofx_DEBUG3_msg == true) { cerr << "LibOFX DEBUG3: " << message << "\n"; show_line_number(); } break; case DEBUG4 : if (ofx_DEBUG4_msg == true) { cerr << "LibOFX DEBUG4: " << message << "\n"; show_line_number(); } break; case DEBUG5 : if (ofx_DEBUG5_msg == true) { cerr << "LibOFX DEBUG5: " << message << "\n"; show_line_number(); } break; case STATUS : if (ofx_STATUS_msg == true) { cerr << "LibOFX STATUS: " << message << "\n"; show_line_number(); } break; case INFO : if (ofx_INFO_msg == true) { cerr << "LibOFX INFO: " << message << "\n"; show_line_number(); } break; case WARNING : if (ofx_WARNING_msg == true) { cerr << "LibOFX WARNING: " << message << "\n"; show_line_number(); } break; case ERROR : if (ofx_ERROR_msg == true) { cerr << "LibOFX ERROR: " << message << "\n"; show_line_number(); } break; case PARSER : if (ofx_PARSER_msg == true) { cerr << "LibOFX PARSER: " << message << "\n"; show_line_number(); } break; default: cerr << "LibOFX UNKNOWN ERROR CLASS, This is a bug in LibOFX\n"; show_line_number(); } return 0; } libofx-0.9.4/lib/ofx_container_statement.cpp0000644000175000017500000001001011544727432016125 00000000000000/*************************************************************************** ofx_container_statement.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxStatementContainer for bank statements, credit cart statements, etc. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" #include "ofx_utilities.hh" extern OfxMainContainer * MainContainer; /*************************************************************************** * OfxStatementContainer * ***************************************************************************/ OfxStatementContainer::OfxStatementContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier): OfxGenericContainer(p_libofx_context, para_parentcontainer, para_tag_identifier) { memset(&data, 0, sizeof(data)); type = "STATEMENT"; } OfxStatementContainer::~OfxStatementContainer() { /* while(transaction_queue.empty()!=true) { ofx_proc_transaction_cb(transaction_queue.front()); transaction_queue.pop(); }*/ } void OfxStatementContainer::add_attribute(const string identifier, const string value) { if (identifier == "CURDEF") { strncpy(data.currency, value.c_str(), OFX_CURRENCY_LENGTH); data.currency_valid = true; } else if (identifier == "MKTGINFO") { strncpy(data.marketing_info, value.c_str(), OFX_MARKETING_INFO_LENGTH); data.marketing_info_valid = true; } else if (identifier == "DTSTART") { data.date_start = ofxdate_to_time_t(value); data.date_start_valid = true; } else if (identifier == "DTEND") { data.date_end = ofxdate_to_time_t(value); data.date_end_valid = true; } else { OfxGenericContainer::add_attribute(identifier, value); } }//end OfxStatementContainer::add_attribute() void OfxStatementContainer::add_balance(OfxBalanceContainer* ptr_balance_container) { if (ptr_balance_container->tag_identifier == "LEDGERBAL") { data.ledger_balance = ptr_balance_container->amount; data.ledger_balance_valid = ptr_balance_container->amount_valid; } else if (ptr_balance_container->tag_identifier == "AVAILBAL") { data.available_balance = ptr_balance_container->amount; data.available_balance_valid = ptr_balance_container->amount_valid; } else { message_out(ERROR, "OfxStatementContainer::add_balance(): the balance has unknown tag_identifier: " + ptr_balance_container->tag_identifier); } } int OfxStatementContainer::add_to_main_tree() { if (MainContainer != NULL) { return MainContainer->add_container(this); } else { return false; } } int OfxStatementContainer::gen_event() { libofx_context->statementCallback(data); return true; } void OfxStatementContainer::add_account(OfxAccountData * account_data) { if (account_data->account_id_valid == true) { data.account_ptr = account_data; strncpy(data.account_id, account_data->account_id, OFX_ACCOUNT_ID_LENGTH); data.account_id_valid = true; } } /*void OfxStatementContainer::add_transaction(const OfxTransactionData transaction_data) { transaction_queue.push(transaction_data); }*/ libofx-0.9.4/lib/ofx_container_generic.cpp0000644000175000017500000000557311544727432015557 00000000000000/*************************************************************************** ofx_container_generic.cpp ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Implementation of OfxGenericContainer */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include "ParserEventGeneratorKit.h" #include "messages.hh" #include "libofx.h" #include "ofx_containers.hh" extern OfxMainContainer * MainContainer; OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context) { parentcontainer = NULL; type = ""; tag_identifier = ""; libofx_context = p_libofx_context; } OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer) { libofx_context = p_libofx_context; parentcontainer = para_parentcontainer; if (parentcontainer != NULL && parentcontainer->type == "DUMMY") { message_out(DEBUG, "OfxGenericContainer(): The parent is a DummyContainer!"); } } OfxGenericContainer::OfxGenericContainer(LibofxContext *p_libofx_context, OfxGenericContainer *para_parentcontainer, string para_tag_identifier) { libofx_context = p_libofx_context; parentcontainer = para_parentcontainer; tag_identifier = para_tag_identifier; if (parentcontainer != NULL && parentcontainer->type == "DUMMY") { message_out(DEBUG, "OfxGenericContainer(): The parent for this " + tag_identifier + " is a DummyContainer!"); } } void OfxGenericContainer::add_attribute(const string identifier, const string value) { /*If an attribute has made it all the way up to the Generic Container's add_attribute, we don't know what to do with it! */ message_out(ERROR, "WRITEME: " + identifier + " (" + value + ") is not supported by the " + type + " container"); } OfxGenericContainer* OfxGenericContainer::getparent() { return parentcontainer; } int OfxGenericContainer::gen_event() { /* No callback is ever generated for pure virtual containers */ return false; } int OfxGenericContainer::add_to_main_tree() { if (MainContainer != NULL) { return MainContainer->add_container(this); } else { return false; } } libofx-0.9.4/lib/ofx_preproc.cpp0000644000175000017500000005156111552346574013554 00000000000000/*************************************************************************** ofx_preproc.cpp ------------------- copyright : (C) 2002 by Benoit Gr�oir email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Preprocessing of the OFX files before parsing * Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include "../config.h" #include #include #include #include #include #include "ParserEventGeneratorKit.h" #include "libofx.h" #include "messages.hh" #include "ofx_sgml.hh" #include "ofc_sgml.hh" #include "ofx_preproc.hh" #include "ofx_utilities.hh" #ifdef HAVE_ICONV #include #endif #ifdef OS_WIN32 # define DIRSEP "\\" #else # define DIRSEP "/" #endif #ifdef OS_WIN32 # include "win32.hh" # include // for GetModuleFileName() # undef ERROR # undef DELETE #endif #define LIBOFX_DEFAULT_INPUT_ENCODING "CP1252" #define LIBOFX_DEFAULT_OUTPUT_ENCODING "UTF-8" using namespace std; /** \brief The number of different paths to search for DTDs. */ #ifdef MAKEFILE_DTD_PATH const int DTD_SEARCH_PATH_NUM = 4; #else const int DTD_SEARCH_PATH_NUM = 3; #endif /** \brief The list of paths to search for the DTDs. */ const char *DTD_SEARCH_PATH[DTD_SEARCH_PATH_NUM] = { #ifdef MAKEFILE_DTD_PATH MAKEFILE_DTD_PATH , #endif "/usr/local/share/libofx/dtd", "/usr/share/libofx/dtd", "~" }; const unsigned int READ_BUFFER_SIZE = 1024; /** @brief File pre-processing of OFX AND for OFC files * * Takes care of comment striping, dtd locating, etc. */ int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename) { LibofxContext *libofx_context; bool ofx_start = false; bool ofx_end = false; ifstream input_file; ofstream tmp_file; char buffer[READ_BUFFER_SIZE]; char iconv_buffer[READ_BUFFER_SIZE * 2]; string s_buffer; char *filenames[3]; char tmp_filename[256]; int tmp_file_fd; #ifdef HAVE_ICONV iconv_t conversion_descriptor; #endif libofx_context = (LibofxContext*)ctx; if (p_filename != NULL && strcmp(p_filename, "") != 0) { message_out(DEBUG, string("ofx_proc_file():Opening file: ") + p_filename); input_file.open(p_filename); if (!input_file) { message_out(ERROR, "ofx_proc_file():Unable to open the input file " + string(p_filename)); } mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename)); message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename)); tmp_file_fd = mkstemp(tmp_filename); if(tmp_file_fd) { tmp_file.open(tmp_filename); if (!tmp_file) { message_out(ERROR, "ofx_proc_file():Unable to open the created temp file " + string(tmp_filename)); return -1; } } else { message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename)); return -1; } if (input_file && tmp_file) { int header_separator_idx; string header_name; string header_value; string ofx_encoding; string ofx_charset; do { input_file.getline(buffer, sizeof(buffer), '\n'); //cout<currentFileType() == OFX && ((ofx_start_idx = s_buffer.find("")) != string::npos || (ofx_start_idx = s_buffer.find("")) != string::npos)) || (libofx_context->currentFileType() == OFC && ((ofx_start_idx = s_buffer.find("")) != string::npos || (ofx_start_idx = s_buffer.find("")) != string::npos)) ) ) { ofx_start = true; s_buffer.erase(0, ofx_start_idx); //Fix for really broken files that don't have a newline after the header. message_out(DEBUG, "ofx_proc_file(): or has been found"); #ifdef HAVE_ICONV string fromcode; string tocode; if (ofx_encoding.compare("USASCII") == 0) { if (ofx_charset.compare("ISO-8859-1") == 0 || ofx_charset.compare("8859-1") == 0) { fromcode = "ISO-8859-1"; } else if (ofx_charset.compare("1252") == 0) { fromcode = "CP1252"; } else if (ofx_charset.compare("NONE") == 0) { fromcode = LIBOFX_DEFAULT_INPUT_ENCODING; } else { fromcode = LIBOFX_DEFAULT_INPUT_ENCODING; } } else if (ofx_encoding.compare("UTF-8") == 0) { fromcode = "UTF-8"; } else { fromcode = LIBOFX_DEFAULT_INPUT_ENCODING; } tocode = LIBOFX_DEFAULT_OUTPUT_ENCODING; message_out(DEBUG, "ofx_proc_file(): Setting up iconv for fromcode: " + fromcode + ", tocode: " + tocode); conversion_descriptor = iconv_open (tocode.c_str(), fromcode.c_str()); #endif } else { //We are still in the headers if ((header_separator_idx = s_buffer.find(':')) != string::npos) { //Header processing header_name.assign(s_buffer.substr(0, header_separator_idx)); header_value.assign(s_buffer.substr(header_separator_idx + 1)); while ( header_value[header_value.length() -1 ] == '\n' || header_value[header_value.length() -1 ] == '\r' ) header_value.erase(header_value.length() - 1); message_out(DEBUG, "ofx_proc_file():Header: " + header_name + " with value: " + header_value + " has been found"); if (header_name.compare("ENCODING") == 0) { ofx_encoding.assign(header_value); } if (header_name.compare("CHARSET") == 0) { ofx_charset.assign(header_value); } } } if (ofx_start == true && ofx_end == false) { s_buffer = sanitize_proprietary_tags(s_buffer); //cout<< s_buffer<<"\n"; #ifdef HAVE_ICONV memset(iconv_buffer, 0, READ_BUFFER_SIZE * 2); size_t inbytesleft = strlen(s_buffer.c_str()); size_t outbytesleft = READ_BUFFER_SIZE * 2 - 1; #ifdef OS_WIN32 const char * inchar = (const char *)s_buffer.c_str(); #else char * inchar = (char *)s_buffer.c_str(); #endif char * outchar = iconv_buffer; int iconv_retval = iconv (conversion_descriptor, &inchar, &inbytesleft, &outchar, &outbytesleft); if (iconv_retval == -1) { message_out(ERROR, "ofx_proc_file(): Conversion error"); } s_buffer = iconv_buffer; #endif tmp_file.write(s_buffer.c_str(), s_buffer.length()); } if (ofx_start == true && ( (libofx_context->currentFileType() == OFX && ((ofx_start_idx = s_buffer.find("")) != string::npos || (ofx_start_idx = s_buffer.find("")) != string::npos)) || (libofx_context->currentFileType() == OFC && ((ofx_start_idx = s_buffer.find("
")) != string::npos || (ofx_start_idx = s_buffer.find("
")) != string::npos)) ) ) { ofx_end = true; message_out(DEBUG, "ofx_proc_file():
or has been found"); } } while (!input_file.eof() && !input_file.bad()); } input_file.close(); tmp_file.close(); #ifdef HAVE_ICONV iconv_close(conversion_descriptor); #endif char filename_openspdtd[255]; char filename_dtd[255]; char filename_ofx[255]; strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file if (libofx_context->currentFileType() == OFX) { strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file } else if (libofx_context->currentFileType() == OFC) { strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file } else { message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser")); } if ((string)filename_dtd != "" && (string)filename_openspdtd != "") { strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file filenames[0] = filename_openspdtd; filenames[1] = filename_dtd; filenames[2] = filename_ofx; if (libofx_context->currentFileType() == OFX) { ofx_proc_sgml(libofx_context, 3, filenames); } else if (libofx_context->currentFileType() == OFC) { ofc_proc_sgml(libofx_context, 3, filenames); } else { message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser")); } if (remove(tmp_filename) != 0) { message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename)); } } else { message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting"); } } else { message_out(ERROR, "ofx_proc_file():No input file specified"); } return 0; } int libofx_proc_buffer(LibofxContextPtr ctx, const char *s, unsigned int size) { ofstream tmp_file; string s_buffer; char *filenames[3]; char tmp_filename[256]; int tmp_file_fd; ssize_t pos; LibofxContext *libofx_context; libofx_context = (LibofxContext*)ctx; if (size == 0) { message_out(ERROR, "ofx_proc_file(): bad size"); return -1; } s_buffer = string(s, size); mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename)); message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename)); tmp_file_fd = mkstemp(tmp_filename); if(tmp_file_fd) { tmp_file.open(tmp_filename); if (!tmp_file) { message_out(ERROR, "ofx_proc_file():Unable to open the created output file " + string(tmp_filename)); return -1; } } else { message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + string(tmp_filename)); return -1; } if (libofx_context->currentFileType() == OFX) { pos = s_buffer.find(""); if (pos == string::npos) pos = s_buffer.find(""); } else if (libofx_context->currentFileType() == OFC) { pos = s_buffer.find(""); if (pos == string::npos) pos = s_buffer.find(""); } else { message_out(ERROR, "ofx_proc(): unknown file type"); return -1; } if (pos == string::npos || pos > s_buffer.size()) { message_out(ERROR, "ofx_proc(): has not been found"); return -1; } else { // erase everything before the OFX tag s_buffer.erase(0, pos); message_out(DEBUG, "ofx_proc_file(): has been found"); } if (libofx_context->currentFileType() == OFX) { pos = s_buffer.find(""); if (pos == string::npos) pos = s_buffer.find(""); } else if (libofx_context->currentFileType() == OFC) { pos = s_buffer.find(""); if (pos == string::npos) pos = s_buffer.find(""); } else { message_out(ERROR, "ofx_proc(): unknown file type"); return -1; } if (pos == string::npos || pos > s_buffer.size()) { message_out(ERROR, "ofx_proc(): has not been found"); return -1; } else { // erase everything after the /OFX tag if (s_buffer.size() > pos + 6) s_buffer.erase(pos + 6); message_out(DEBUG, "ofx_proc_file(): has been found"); } s_buffer = sanitize_proprietary_tags(s_buffer); tmp_file.write(s_buffer.c_str(), s_buffer.length()); tmp_file.close(); char filename_openspdtd[255]; char filename_dtd[255]; char filename_ofx[255]; strncpy(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME).c_str(), 255); //The opensp sgml dtd file if (libofx_context->currentFileType() == OFX) { strncpy(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME).c_str(), 255); //The ofx dtd file } else if (libofx_context->currentFileType() == OFC) { strncpy(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME).c_str(), 255); //The ofc dtd file } else { message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser")); } if ((string)filename_dtd != "" && (string)filename_openspdtd != "") { strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file filenames[0] = filename_openspdtd; filenames[1] = filename_dtd; filenames[2] = filename_ofx; if (libofx_context->currentFileType() == OFX) { ofx_proc_sgml(libofx_context, 3, filenames); } else if (libofx_context->currentFileType() == OFC) { ofc_proc_sgml(libofx_context, 3, filenames); } else { message_out(ERROR, string("ofx_proc_file(): Error unknown file format for the OFX parser")); } if (remove(tmp_filename) != 0) { message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + string(tmp_filename)); } } else { message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting"); } return 0; } /** This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it */ string sanitize_proprietary_tags(string input_string) { unsigned int i; size_t input_string_size; bool strip = false; bool tag_open = false; int tag_open_idx = 0; //Are we within < > ? bool closing_tag_open = false; //Are we within ? int orig_tag_open_idx = 0; bool proprietary_tag = false; //Are we within a proprietary element? bool proprietary_closing_tag = false; int crop_end_idx = 0; char buffer[READ_BUFFER_SIZE] = ""; char tagname[READ_BUFFER_SIZE] = ""; int tagname_idx = 0; char close_tagname[READ_BUFFER_SIZE] = ""; for (i = 0; i < READ_BUFFER_SIZE; i++) { buffer[i] = 0; tagname[i] = 0; close_tagname[i] = 0; } input_string_size = input_string.size(); for (i = 0; i <= input_string_size; i++) { if (input_string.c_str()[i] == '<') { tag_open = true; tag_open_idx = i; if (proprietary_tag == true && input_string.c_str()[i+1] == '/') { //We are now in a closing tag closing_tag_open = true; //cout<<"Comparaison: "<') { tag_open = false; closing_tag_open = false; tagname[tagname_idx] = 0; tagname_idx = 0; if (proprietary_closing_tag == true) { crop_end_idx = i; strip = true; } } else if (tag_open == true && closing_tag_open == false) { if (input_string.c_str()[i] == '.') { if (proprietary_tag != true) { orig_tag_open_idx = tag_open_idx; proprietary_tag = true; } } tagname[tagname_idx] = input_string.c_str()[i]; tagname_idx++; } //cerr <(ctx)->dtdDir(); if (!dtd_path_filename.empty()) { dtd_path_filename.append(dtd_filename); ifstream dtd_file(dtd_path_filename.c_str()); if (dtd_file) { message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename); return dtd_path_filename; } } #ifdef OS_WIN32 dtd_path_filename = get_dtd_installation_directory(); if (!dtd_path_filename.empty()) { dtd_path_filename.append(DIRSEP); dtd_path_filename.append(dtd_filename); ifstream dtd_file(dtd_path_filename.c_str()); if (dtd_file) { message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename); return dtd_path_filename; } } #endif /* Search in environement variable OFX_DTD_PATH */ env_dtd_path = getenv("OFX_DTD_PATH"); if (env_dtd_path) { dtd_path_filename.append(env_dtd_path); dtd_path_filename.append(DIRSEP); dtd_path_filename.append(dtd_filename); ifstream dtd_file(dtd_path_filename.c_str()); if (!dtd_file) { message_out(STATUS, "find_dtd():OFX_DTD_PATH env variable was was present, but unable to open the file " + dtd_path_filename); } else { message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename); return dtd_path_filename; } } for (int i = 0; i < DTD_SEARCH_PATH_NUM; i++) { dtd_path_filename = DTD_SEARCH_PATH[i]; dtd_path_filename.append(DIRSEP); dtd_path_filename.append(dtd_filename); ifstream dtd_file(dtd_path_filename.c_str()); if (!dtd_file) { message_out(DEBUG, "find_dtd():Unable to open the file " + dtd_path_filename); } else { message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename); return dtd_path_filename; } } message_out(ERROR, "find_dtd():Unable to find the DTD named " + dtd_filename); return ""; } libofx-0.9.4/lib/ofx_request_statement.hh0000644000175000017500000000721411544727432015464 00000000000000/*************************************************************************** ofx_request_statement.hh ------------------- copyright : (C) 2005 by Ace Jones email : acejones@users.sourceforge.net ***************************************************************************/ /**@file * \brief Declaration of libofx_request_statement to create an OFX file * containing a request for a statement. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_REQ_STATEMENT_H #define OFX_REQ_STATEMENT_H #include #include "libofx.h" #include "ofx_request.hh" using namespace std; /** * \brief A statement request * * This is an entire OFX aggregate, with all subordinate aggregates needed to log onto * the OFX server of a single financial institution and download a statement for * a single account. */ class OfxStatementRequest: public OfxRequest { public: /** * Creates the request aggregate to obtain a statement from this @p fi for * this @p account, starting on this @p start date, ending today. * * @param fi The information needed to log on user into one financial * institution * @param account The account for which a statement is desired * @param start The beginning time of the statement period desired */ OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from ); protected: /** * Creates a bank statement request aggregate, , * & for this account. Should only be used if this account is a * BANK account. * * @return The request aggregate created */ OfxAggregate BankStatementRequest(void) const; /** * Creates a credit card statement request aggregate, , * & for this account. Should only be used if this * account is a CREDIT CARD account. * * @return The request aggregate created */ OfxAggregate CreditCardStatementRequest(void) const; /** * Creates an investment statement request aggregate, , * & for this account. Should only be used if this * account is an INVESTMENT account. * * @return The request aggregate created */ OfxAggregate InvestmentStatementRequest(void) const; private: OfxAccountData m_account; time_t m_date_from; }; class OfxPaymentRequest: public OfxRequest { public: /** * Creates the request aggregate to submit a payment to this @p fi on * this @p account, to this @p payee as described by this @payment. * * @param fi The information needed to log on user into one financial * institution * @param account The account from which the payment should be made * @param payee The payee who should receive the payment * @param payment The details of the payment */ OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment ); protected: private: OfxAccountData m_account; OfxPayee m_payee; OfxPayment m_payment; }; #endif // OFX_REQ_STATEMENT_H libofx-0.9.4/lib/gnugetopt.h0000644000175000017500000001445711544727432012707 00000000000000/* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001 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 Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; 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 /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #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__) || defined __cplusplus 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__) || defined __cplusplus # 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 */ libofx-0.9.4/lib/Makefile.in0000644000175000017500000005013611553123277012556 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gnugetopt.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = getopt.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libofx_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libofx_la_OBJECTS = messages.lo ofx_utilities.lo file_preproc.lo \ context.lo ofx_preproc.lo ofx_container_generic.lo \ ofx_container_main.lo ofx_container_security.lo \ ofx_container_statement.lo ofx_container_account.lo \ ofx_container_transaction.lo ofx_containers_misc.lo \ ofx_request.lo ofx_request_accountinfo.lo \ ofx_request_statement.lo ofx_sgml.lo ofc_sgml.lo win32.lo libofx_la_OBJECTS = $(am_libofx_la_OBJECTS) libofx_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libofx_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libofx_la_SOURCES) DIST_SOURCES = $(libofx_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libofx.la EXTRA_DIST = gnugetopt.h getopt.c getopt1.c libofx_la_SOURCES = messages.cpp \ ofx_utilities.cpp \ file_preproc.cpp \ context.cpp \ ofx_preproc.cpp \ ofx_container_generic.cpp \ ofx_container_main.cpp \ ofx_container_security.cpp \ ofx_container_statement.cpp \ ofx_container_account.cpp \ ofx_container_transaction.cpp \ ofx_containers_misc.cpp \ ofx_request.cpp \ ofx_request_accountinfo.cpp \ ofx_request_statement.cpp \ ofx_sgml.cpp \ ofc_sgml.cpp \ win32.cpp noinst_HEADERS = ${top_builddir}/inc/libofx.h \ messages.hh \ ofx_preproc.hh \ file_preproc.hh \ context.hh \ ofx_sgml.hh \ ofc_sgml.hh \ ofx_aggregate.hh \ ofx_error_msg.hh \ ofx_containers.hh \ ofx_request.hh \ ofx_request_accountinfo.hh \ ofx_request_statement.hh \ ofx_utilities.hh \ tree.hh \ win32.hh AM_CPPFLAGS = \ -I. \ -I${top_builddir}/inc \ -I${OPENSPINCLUDES} \ -DMAKEFILE_DTD_PATH=\"${LIBOFX_DTD_DIR}\" #libofx_la_LIBADD = @LIBOBJS@ ${OPENSPLIBS} -lstdc++ libofx_la_LIBADD = $(OPENSPLIBS) $(ICONV_LIBS) -lstdc++ libofx_la_LDFLAGS = -no-undefined -version-info @LIBOFX_SO_CURRENT@:@LIBOFX_SO_REVISION@:@LIBOFX_SO_AGE@ all: all-am .SUFFIXES: .SUFFIXES: .cpp .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__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 $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ 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 libofx.la: $(libofx_la_OBJECTS) $(libofx_la_DEPENDENCIES) $(libofx_la_LINK) -rpath $(libdir) $(libofx_la_OBJECTS) $(libofx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_preproc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messages.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofc_sgml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_account.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_security.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_container_transaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_containers_misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_preproc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_request.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_request_accountinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_request_statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_sgml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofx_utilities.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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)"; 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libLTLIBRARIES .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am 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-libLTLIBRARIES # 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: libofx-0.9.4/lib/ofx_utilities.hh0000644000175000017500000000433611544727432013725 00000000000000/*************************************************************************** ofx_util.h ------------------- copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Various simple functions for type conversion & al */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_UTIL_H #define OFX_UTIL_H #include #include // for time_t #include "ParserEventGeneratorKit.h" using namespace std; /* This file contains various simple functions for type conversion & al */ /*wostream &operator<<(wostream &os, SGMLApplication::CharString s); */ ///Convert OpenSP CharString to a C++ stream ostream &operator<<(ostream &os, SGMLApplication::CharString s); ///Convert OpenSP CharString and put it in the C wchar_t string provided wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest); ///Convert OpenSP CharString to a C++ STL string string CharStringtostring(const SGMLApplication::CharString source, string &dest); ///Append an OpenSP CharString to an existing C++ STL string string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest); ///Convert a C++ string containing a time in OFX format to a C time_t time_t ofxdate_to_time_t(const string ofxdate); ///Convert OFX amount of money to double float double ofxamount_to_double(const string ofxamount); ///Sanitize a string coming from OpenSP string strip_whitespace(const string para_string); int mkTempFileName(const char *tmpl, char *buffer, unsigned int size); #endif libofx-0.9.4/lib/ofx_error_msg.hh0000644000175000017500000003224211544727432013706 00000000000000/*************************************************************************** ofx_data_struct.h - description ------------------- begin : Tue Mar 19 2002 copyright : (C) 2002 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief OFX error code management functionnality. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef OFX_DATA_STRUCT_H #define OFX_DATA_STRUCT_H ///An abstraction of an OFX error code sent by an OFX server. struct ErrorMsg { int code; /**< The error's code */ const char * name; /**< The error's name */ const char * description; /**< The long description of the error */ }; /// List known error codes. /** The error_msgs_list table contains all past and present OFX error codes up to the OFX 2.01 specification */ const ErrorMsg error_msgs_list[] = { {0, "Success", "The server successfully processed the request."}, {1, "Client is up-to-date", "Based on the client timestamp, the client has the latest information. The response does not supply any additional information."}, {2000, "General error", "Error other than those specified by the remaining error codes. (Note: Servers should provide a more specific error whenever possible. Error code 2000 should be reserved for cases in which a more specific code is not available.)"}, {2001, "Invalid account", ""}, {2002, "General account error", "Account error not specified by the remaining error codes."}, {2003, "Account not found", "The specified account number does not correspond to one of the user's accounts."}, {2004, "Account closed", "The specified account number corresponds to an account that has been closed."}, {2005, "Account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."}, {2006, "Source account not found", "The specified account number does not correspond to one of the user's accounts."}, {2007, "Source account closed", "The specified account number corresponds to an account that has been closed."}, {2008, "Source account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."}, {2009, "Destination account not found", "The specified account number does not correspond to one of the user's accounts."}, {2010, "Destination account closed", "The specified account number corresponds to an account that has been closed."}, {2011, "Destination account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."}, {2012, "Invalid amount", "The specified amount is not valid for this action; for example, the user specified a negative payment amount."}, {2014, "Date too soon", "The server cannot process the requested action by the date specified by the user."}, {2015, "Date too far in future", "The server cannot accept requests for an action that far in the future."}, {2016, "Transaction already committed", "Transaction has entered the processing loop and cannot be modified/cancelled using OFX. The transaction may still be cancelled or modified using other means (for example, a phone call to Customer Service)."}, {2017, "Already canceled", "The transaction cannot be canceled or modified because it has already been canceled."}, {2018, "Unknown server ID", "The specified server ID does not exist or no longer exists."}, {2019, "Duplicate request", "A request with this has already been received and processed."}, {2020, "Invalid date", "The specified datetime stamp cannot be parsed; for instance, the datetime stamp specifies 25:00 hours."}, {2021, "Unsupported version", "The server does not support the requested version. The version of the message set specified by the client is not supported by this server."}, {2022, "Invalid TAN", "The server was unable to validate the TAN sent in the request."}, {2023, "Unknown FITID", "The specified FITID/BILLID does not exist or no longer exists. [BILLID not found in the billing message sets]"}, {2025, "Branch ID missing", "A value must be provided in the aggregate for this country system, but this field is missing."}, {2026, "Bank name doesn't match bank ID", "The value of in the aggregate is inconsistent with the value of in the aggregate."}, {2027, "Invalid date range", "Response for non-overlapping dates, date ranges in the future, et cetera."}, {2028, "Requested element unknown", "One or more elements of the request were not recognized by the server or the server (as noted in the FI Profile) does not support the elements. The server executed the element transactions it understood and supported. For example, the request file included private tags in a but the server was able to execute the rest of the request."}, {6500, "Y invalid without ", "This error code may appear element of an wrapper (in and V2 message set responses) or the contained in any embedded transaction wrappers within a sync response. The corresponding sync request wrapper included Y with Y or Y, which is illegal."}, {6501, "Embedded transactions in request failed to process: Out of date", "Y and embedded transactions appeared in the request sync wrapper and the provided was out of date. This code should be used in the of the response sync wrapper."}, {6502, "Unable to process embedded transaction due to out-of-date ", "Used in response transaction wrapper for embedded transactions when 6501 appears in the surrounding sync wrapper."}, {10000, "Stop check in process", "Stop check is already in process."}, {10500, "Too many checks to process", "The stop-payment request specifies too many checks."}, {10501, "Invalid payee", "Payee error not specified by the remainingerror codes."}, {10502, "Invalid payee address", "Some portion of the payee's address is incorrect or unknown."}, {10503, "Invalid payee account number", "The account number of the requested payee is invalid."}, {10504, "Insufficient funds", "The server cannot process the request because the specified account does not have enough funds."}, {10505, "Cannot modify element", "The server does not allow modifications to one or more values in a modification request."}, {10506, "Cannot modify source account", "Reserved for future use."}, {10507, "Cannot modify destination account", "Reserved for future use."}, {10508, "Invalid frequency", "The specified frequency does not match one of the accepted frequencies for recurring transactions."}, {10509, "Model already canceled", "The server has already canceled the specified recurring model."}, {10510, "Invalid payee ID", "The specified payee ID does not exist or no longer exists."}, {10511, "Invalid payee city", "The specified city is incorrect or unknown."}, {10512, "Invalid payee state", "The specified state is incorrect or unknown."}, {10513, "Invalid payee postal code", "The specified postal code is incorrect or unknown."}, {10514, "Transaction already processed", "Transaction has already been sent or date due is past"}, {10515, "Payee not modifiable by client", "The server does not allow clients to change payee information."}, {10516, "Wire beneficiary invalid", "The specified wire beneficiary does not exist or no longer exists."}, {10517, "Invalid payee name", "The server does not recognize the specified payee name."}, {10518, "Unknown model ID", "The specified model ID does not exist or no longer exists."}, {10519, "Invalid payee list ID", "The specified payee list ID does not exist or no longer exists."}, {10600, "Table type not found", "The specified table type is not recognized or does not exist."}, {12250, "Investment transaction download not supported (WARN)", "The server does not support investment transaction download."}, {12251, "Investment position download not supported (WARN)", "The server does not support investment position download."}, {12252, "Investment positions for specified date not available", "The server does not support investment positions for the specified date."}, {12253, "Investment open order download not supported (WARN)", "The server does not support open order download."}, {12254, "Investment balances download not supported (WARN)", "The server does not support investment balances download."}, {12255, "401(k) not available for this account", "401(k) information requested from a non-401(k) account."}, {12500, "One or more securities not found", "The server could not find the requested securities."}, {13000, "User ID & password will be sent out-of-band (INFO)", "The server will send the user ID and password via postal mail, e-mail, or another means. The accompanying message will provide details."}, {13500, "Unable to enroll user", "The server could not enroll the user."}, {13501, "User already enrolled", "The server has already enrolled the user."}, {13502, "Invalid service", "The server does not support the service specified in the service-activation request."}, {13503, "Cannot change user information", "The server does not support the request."}, {13504, " Missing or Invalid in ", "The FI requires the client to provide the aggregate in the request, but either none was provided, or the one provided was invalid."}, {14500, "1099 forms not available", "1099 forms are not yet available for the tax year requested."}, {14501, "1099 forms not available for user ID", "This user does not have any 1099 forms available."}, {14600, "W2 forms not available", "W2 forms are not yet available for the tax year requested."}, {14601, "W2 forms not available for user ID", "The user does not have any W2 forms available."}, {14700, "1098 forms not available", "1098 forms are not yet available for the tax year requested."}, {14701, "1098 forms not available for user ID", "The user does not have any 1098 forms available."}, {15000, "Must change USERPASS", "The user must change his or her number as part of the next OFX request."}, {15500, "Signon invalid", "The user cannot signon because he or she entered an invalid user ID or password."}, {15501, "Customer account already in use", "The server allows only one connection at a time, and another user is already signed on. Please try again later."}, {15502, "USERPASS lockout", "The server has received too many failed signon attempts for this user. Please call the FI's technical support number."}, {15503, "Could not change USERPASS", "The server does not support the request."}, {15504, "Could not provide random data", "The server could not generate random data as requested by the ."}, {15505, "Country system not supported", "The server does not support the country specified in the field of the aggregate."}, {15506, "Empty signon not supported", "The server does not support signons not accompanied by some other transaction."}, {15507, "Signon invalid without supporting pin change request", "The OFX block associated with the signon does not contain a pin change request and should."}, {15508, "Transaction not authorized", "Current user is not authorized to perform this action on behalf of the ."}, {16500, "HTML not allowed", "The server does not accept HTML formatting in the request."}, {16501, "Unknown mail To:", "The server was unable to send mail to the specified Internet address."}, {16502, "Invalid URL", "The server could not parse the URL."}, {16503, "Unable to get URL", "The server was unable to retrieve the information at this URL (e.g., an HTTP 400 or 500 series error)."}, { -1, "Unknown code", "The description of this code is unknown to libOfx"} }; ///Retreive error code descriptions /** The find_error_msg function will take an ofx error number, and return an ErrorMsg structure with detailled information about the error, including the error name and long description */ const ErrorMsg find_error_msg(int param_code) { ErrorMsg return_val; int i; bool code_found = false; for (i = 0; i < 2000 && (code_found == false); i++) { if ((error_msgs_list[i].code == param_code) || (error_msgs_list[i].code == -1)) { return_val = error_msgs_list[i]; code_found = true; } } return return_val; }; #endif libofx-0.9.4/lib/file_preproc.hh0000644000175000017500000000277211544727432013511 00000000000000/*************************************************************************** file_preproc.hh ------------------- copyright : (C) 2004 by Benoit Gr�goire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Preprocessing of the OFX files before parsing * Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD. */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef FILE_PREPROC_H #define FILE_PREPROC_H /** * \brief libofx_detect_file_type tries to analyze a file to determine it's format. * @param p_filename File name of the file to process @return Detected file format, UNKNOWN if unsuccessfull. */ enum LibofxFileFormat libofx_detect_file_type(const char * p_filename); #endif libofx-0.9.4/ofxdump/0000755000175000017500000000000011553134315011473 500000000000000libofx-0.9.4/ofxdump/ofxdump.cpp0000644000175000017500000004456511544727432013627 00000000000000/*************************************************************************** ofxdump.cpp ------------------- copyright : (C) 2002 by Benoit Grégoire email : benoitg@coeus.ca ***************************************************************************/ /**@file * \brief Code for ofxdump utility. C++ example code * * ofxdump prints to stdout, in human readable form, everything the library understands about a particular ofx response file, and sends errors to stderr. To know exactly what the library understands about of a particular ofx response file, just call ofxdump on that file. * * ofxdump is meant as both a C++ code example and a developper/debuging tool. It uses every function and every structure of the LibOFX API. By default, WARNING, INFO, ERROR and STATUS messages are enabled. You can change these defaults at the top of ofxdump.cpp * * usage: ofxdump path_to_ofx_file/ofx_filename */ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include #include #include #include #include #include "libofx.h" #include /* for printf() */ #include /* Include config constants, e.g., VERSION TF */ #include #include "cmdline.h" /* Gengetopt generated parser */ using namespace std; int ofx_proc_security_cb(struct OfxSecurityData data, void * security_data) { char dest_string[255]; cout<<"ofx_proc_security():\n"; if(data.unique_id_valid==true){ cout<<" Unique ID of the security being traded: "< 0) { const char* filename = args_info.inputs[0]; ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0); ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0); ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0); ofx_set_security_cb(libofx_context, ofx_proc_security_cb, 0); ofx_set_status_cb(libofx_context, ofx_proc_status_cb, 0); enum LibofxFileFormat file_format = libofx_get_file_format_from_str(LibofxImportFormatList, args_info.import_format_arg); /** @todo currently, only the first file is processed as the library can't deal with more right now.*/ if(args_info.inputs_num > 1) { cout << "Sorry, currently, only the first file is processed as the library can't deal with more right now. The following files were ignored:"< /* for FILE */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef CMDLINE_PARSER_PACKAGE /** @brief the program name (used for printing errors) */ #define CMDLINE_PARSER_PACKAGE PACKAGE #endif #ifndef CMDLINE_PARSER_PACKAGE_NAME /** @brief the complete program name (used for help and version) */ #ifdef PACKAGE_NAME #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME #else #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE #endif #endif #ifndef CMDLINE_PARSER_VERSION /** @brief the program version */ #define CMDLINE_PARSER_VERSION VERSION #endif /** @brief Where the command line options are stored */ struct gengetopt_args_info { const char *help_help; /**< @brief Print help and exit help description. */ const char *version_help; /**< @brief Print version and exit help description. */ char * import_format_arg; /**< @brief Force the file format of the file(s) specified (default='AUTODETECT'). */ char * import_format_orig; /**< @brief Force the file format of the file(s) specified original value given at command line. */ const char *import_format_help; /**< @brief Force the file format of the file(s) specified help description. */ const char *list_import_formats_help; /**< @brief List available import file formats 'import-format' command help description. */ int msg_parser_flag; /**< @brief Output file parsing messages (default=off). */ const char *msg_parser_help; /**< @brief Output file parsing messages help description. */ int msg_debug_flag; /**< @brief Output messages meant for debuging (default=off). */ const char *msg_debug_help; /**< @brief Output messages meant for debuging help description. */ int msg_warning_flag; /**< @brief Output warning messages about abnormal conditions and unknown constructs (default=on). */ const char *msg_warning_help; /**< @brief Output warning messages about abnormal conditions and unknown constructs help description. */ int msg_error_flag; /**< @brief Output error messages (default=on). */ const char *msg_error_help; /**< @brief Output error messages help description. */ int msg_info_flag; /**< @brief Output informational messages about the progress of the library (default=on). */ const char *msg_info_help; /**< @brief Output informational messages about the progress of the library help description. */ int msg_status_flag; /**< @brief Output status messages (default=on). */ const char *msg_status_help; /**< @brief Output status messages help description. */ unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ unsigned int import_format_given ; /**< @brief Whether import-format was given. */ unsigned int list_import_formats_given ; /**< @brief Whether list-import-formats was given. */ unsigned int msg_parser_given ; /**< @brief Whether msg_parser was given. */ unsigned int msg_debug_given ; /**< @brief Whether msg_debug was given. */ unsigned int msg_warning_given ; /**< @brief Whether msg_warning was given. */ unsigned int msg_error_given ; /**< @brief Whether msg_error was given. */ unsigned int msg_info_given ; /**< @brief Whether msg_info was given. */ unsigned int msg_status_given ; /**< @brief Whether msg_status was given. */ char **inputs ; /**< @brief unamed options (options without names) */ unsigned inputs_num ; /**< @brief unamed options number */ } ; /** @brief The additional parameters to pass to parser functions */ struct cmdline_parser_params { int override; /**< @brief whether to override possibly already present options (default 0) */ int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ int check_required; /**< @brief whether to check that all required options were provided (default 1) */ int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ } ; /** @brief the purpose string of the program */ extern const char *gengetopt_args_info_purpose; /** @brief the usage string of the program */ extern const char *gengetopt_args_info_usage; /** @brief all the lines making the help output */ extern const char *gengetopt_args_info_help[]; /** * The command line parser * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info); /** * The command line parser (version with additional parameters - deprecated) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param override whether to override possibly already present options * @param initialize whether to initialize the option structure my_args_info * @param check_required whether to check that all required options were provided * @return 0 if everything went fine, NON 0 if an error took place * @deprecated use cmdline_parser_ext() instead */ int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required); /** * The command line parser (version with additional parameters) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param params additional parameters for the parser * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params); /** * Save the contents of the option struct into an already open FILE stream. * @param outfile the stream where to dump options * @param args_info the option struct to dump * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info); /** * Save the contents of the option struct into a (text) file. * This file can be read by the config file parser (if generated by gengetopt) * @param filename the file where to save * @param args_info the option struct to save * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info); /** * Print the help */ void cmdline_parser_print_help(void); /** * Print the version */ void cmdline_parser_print_version(void); /** * Initializes all the fields a cmdline_parser_params structure * to their default values * @param params the structure to initialize */ void cmdline_parser_params_init(struct cmdline_parser_params *params); /** * Allocates dynamically a cmdline_parser_params structure and initializes * all its fields to their default values * @return the created and initialized cmdline_parser_params structure */ struct cmdline_parser_params *cmdline_parser_params_create(void); /** * Initializes the passed gengetopt_args_info structure's fields * (also set default values for options that have a default) * @param args_info the structure to initialize */ void cmdline_parser_init (struct gengetopt_args_info *args_info); /** * Deallocates the string fields of the gengetopt_args_info structure * (but does not deallocate the structure itself) * @param args_info the structure to deallocate */ void cmdline_parser_free (struct gengetopt_args_info *args_info); /** * Checks that all the required options were specified * @param args_info the structure to check * @param prog_name the name of the program that will be used to print * possible errors * @return */ int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CMDLINE_H */ libofx-0.9.4/ofxdump/cmdline.c0000644000175000017500000004652411553123644013210 00000000000000/* File autogenerated by gengetopt version 2.22.4 generated with the following command: gengetopt --unamed-opts The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: we make no copyright claims on it. */ /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifndef FIX_UNUSED #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ #endif #include #include "cmdline.h" const char *gengetopt_args_info_purpose = "ofxdump prints to stdout, in human readable form, everything the library \n understands about a particular file or response, and sends errors to \n stderr. To know exactly what the library understands about of a particular\n ofx response file, just call ofxdump on that file."; const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]... [FILES]..."; const char *gengetopt_args_info_description = ""; const char *gengetopt_args_info_help[] = { " -h, --help Print help and exit", " -V, --version Print version and exit", " -f, --import-format=STRING Force the file format of the file(s) specified \n (default=`AUTODETECT')", " --list-import-formats List available import file formats \n 'import-format' command", " --msg_parser Output file parsing messages (default=off)", " --msg_debug Output messages meant for debuging (default=off)", " --msg_warning Output warning messages about abnormal conditions \n and unknown constructs (default=on)", " --msg_error Output error messages (default=on)", " --msg_info Output informational messages about the progress \n of the library (default=on)", " --msg_status Output status messages (default=on)", 0 }; typedef enum {ARG_NO , ARG_FLAG , ARG_STRING } cmdline_parser_arg_type; static void clear_given (struct gengetopt_args_info *args_info); static void clear_args (struct gengetopt_args_info *args_info); static int cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static char * gengetopt_strdup (const char *s); static void clear_given (struct gengetopt_args_info *args_info) { args_info->help_given = 0 ; args_info->version_given = 0 ; args_info->import_format_given = 0 ; args_info->list_import_formats_given = 0 ; args_info->msg_parser_given = 0 ; args_info->msg_debug_given = 0 ; args_info->msg_warning_given = 0 ; args_info->msg_error_given = 0 ; args_info->msg_info_given = 0 ; args_info->msg_status_given = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { FIX_UNUSED (args_info); args_info->import_format_arg = gengetopt_strdup ("AUTODETECT"); args_info->import_format_orig = NULL; args_info->msg_parser_flag = 0; args_info->msg_debug_flag = 0; args_info->msg_warning_flag = 1; args_info->msg_error_flag = 1; args_info->msg_info_flag = 1; args_info->msg_status_flag = 1; } static void init_args_info(struct gengetopt_args_info *args_info) { args_info->help_help = gengetopt_args_info_help[0] ; args_info->version_help = gengetopt_args_info_help[1] ; args_info->import_format_help = gengetopt_args_info_help[2] ; args_info->list_import_formats_help = gengetopt_args_info_help[3] ; args_info->msg_parser_help = gengetopt_args_info_help[4] ; args_info->msg_debug_help = gengetopt_args_info_help[5] ; args_info->msg_warning_help = gengetopt_args_info_help[6] ; args_info->msg_error_help = gengetopt_args_info_help[7] ; args_info->msg_info_help = gengetopt_args_info_help[8] ; args_info->msg_status_help = gengetopt_args_info_help[9] ; } void cmdline_parser_print_version (void) { printf ("%s %s\n", (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), CMDLINE_PARSER_VERSION); } static void print_help_common(void) { cmdline_parser_print_version (); if (strlen(gengetopt_args_info_purpose) > 0) printf("\n%s\n", gengetopt_args_info_purpose); if (strlen(gengetopt_args_info_usage) > 0) printf("\n%s\n", gengetopt_args_info_usage); printf("\n"); if (strlen(gengetopt_args_info_description) > 0) printf("%s\n\n", gengetopt_args_info_description); } void cmdline_parser_print_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_help[i]) printf("%s\n", gengetopt_args_info_help[i++]); } void cmdline_parser_init (struct gengetopt_args_info *args_info) { clear_given (args_info); clear_args (args_info); init_args_info (args_info); args_info->inputs = 0; args_info->inputs_num = 0; } void cmdline_parser_params_init(struct cmdline_parser_params *params) { if (params) { params->override = 0; params->initialize = 1; params->check_required = 1; params->check_ambiguity = 0; params->print_errors = 1; } } struct cmdline_parser_params * cmdline_parser_params_create(void) { struct cmdline_parser_params *params = (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params)); cmdline_parser_params_init(params); return params; } static void free_string_field (char **s) { if (*s) { free (*s); *s = 0; } } static void cmdline_parser_release (struct gengetopt_args_info *args_info) { unsigned int i; free_string_field (&(args_info->import_format_arg)); free_string_field (&(args_info->import_format_orig)); for (i = 0; i < args_info->inputs_num; ++i) free (args_info->inputs [i]); if (args_info->inputs_num) free (args_info->inputs); clear_given (args_info); } static void write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) { FIX_UNUSED (values); if (arg) { fprintf(outfile, "%s=\"%s\"\n", opt, arg); } else { fprintf(outfile, "%s\n", opt); } } int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) { int i = 0; if (!outfile) { fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE); return EXIT_FAILURE; } if (args_info->help_given) write_into_file(outfile, "help", 0, 0 ); if (args_info->version_given) write_into_file(outfile, "version", 0, 0 ); if (args_info->import_format_given) write_into_file(outfile, "import-format", args_info->import_format_orig, 0); if (args_info->list_import_formats_given) write_into_file(outfile, "list-import-formats", 0, 0 ); if (args_info->msg_parser_given) write_into_file(outfile, "msg_parser", 0, 0 ); if (args_info->msg_debug_given) write_into_file(outfile, "msg_debug", 0, 0 ); if (args_info->msg_warning_given) write_into_file(outfile, "msg_warning", 0, 0 ); if (args_info->msg_error_given) write_into_file(outfile, "msg_error", 0, 0 ); if (args_info->msg_info_given) write_into_file(outfile, "msg_info", 0, 0 ); if (args_info->msg_status_given) write_into_file(outfile, "msg_status", 0, 0 ); i = EXIT_SUCCESS; return i; } int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) { FILE *outfile; int i = 0; outfile = fopen(filename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename); return EXIT_FAILURE; } i = cmdline_parser_dump(outfile, args_info); fclose (outfile); return i; } void cmdline_parser_free (struct gengetopt_args_info *args_info) { cmdline_parser_release (args_info); } /** @brief replacement of strdup, which is not standard */ char * gengetopt_strdup (const char *s) { char *result = 0; if (!s) return result; result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) return (char*)0; strcpy(result, s); return result; } int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; result = cmdline_parser_internal (argc, argv, args_info, params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; params.override = override; params.initialize = initialize; params.check_required = check_required; params.check_ambiguity = 0; params.print_errors = 1; result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) { FIX_UNUSED (args_info); FIX_UNUSED (prog_name); return EXIT_SUCCESS; } static char *package_name = 0; /** * @brief updates an option * @param field the generic pointer to the field to update * @param orig_field the pointer to the orig field * @param field_given the pointer to the number of occurrence of this option * @param prev_given the pointer to the number of occurrence already seen * @param value the argument for this option (if null no arg was specified) * @param possible_values the possible values for this option (if specified) * @param default_value the default value (in case the option only accepts fixed values) * @param arg_type the type of this option * @param check_ambiguity @see cmdline_parser_params.check_ambiguity * @param override @see cmdline_parser_params.override * @param no_free whether to free a possible previous value * @param multiple_option whether this is a multiple option * @param long_opt the corresponding long option * @param short_opt the corresponding short option (or '-' if none) * @param additional_error possible further error specification */ static int update_arg(void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, char *value, const char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, const char *long_opt, char short_opt, const char *additional_error) { char *stop_char = 0; const char *val = value; int found; char **string_field; FIX_UNUSED (field); stop_char = 0; found = 0; if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given))) { if (short_opt != '-') fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n", package_name, long_opt, short_opt, (additional_error ? additional_error : "")); else fprintf (stderr, "%s: `--%s' option given more than once%s\n", package_name, long_opt, (additional_error ? additional_error : "")); return 1; /* failure */ } FIX_UNUSED (default_value); if (field_given && *field_given && ! override) return 0; if (prev_given) (*prev_given)++; if (field_given) (*field_given)++; if (possible_values) val = possible_values[found]; switch(arg_type) { case ARG_FLAG: *((int *)field) = !*((int *)field); break; case ARG_STRING: if (val) { string_field = (char **)field; if (!no_free && *string_field) free (*string_field); /* free previous string */ *string_field = gengetopt_strdup (val); } break; default: break; }; /* store the original value */ switch(arg_type) { case ARG_NO: case ARG_FLAG: break; default: if (value && orig_field) { if (no_free) { *orig_field = value; } else { if (*orig_field) free (*orig_field); /* free previous string */ *orig_field = gengetopt_strdup (value); } } }; return 0; /* OK */ } int cmdline_parser_internal ( int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ int error = 0; struct gengetopt_args_info local_args_info; int override; int initialize; int check_required; int check_ambiguity; package_name = argv[0]; override = params->override; initialize = params->initialize; check_required = params->check_required; check_ambiguity = params->check_ambiguity; if (initialize) cmdline_parser_init (args_info); cmdline_parser_init (&local_args_info); optarg = 0; optind = 0; opterr = params->print_errors; optopt = '?'; while (1) { int option_index = 0; static struct option long_options[] = { { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'V' }, { "import-format", 1, NULL, 'f' }, { "list-import-formats", 0, NULL, 0 }, { "msg_parser", 0, NULL, 0 }, { "msg_debug", 0, NULL, 0 }, { "msg_warning", 0, NULL, 0 }, { "msg_error", 0, NULL, 0 }, { "msg_info", 0, NULL, 0 }, { "msg_status", 0, NULL, 0 }, { 0, 0, 0, 0 } }; c = getopt_long (argc, argv, "hVf:", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ switch (c) { case 'h': /* Print help and exit. */ cmdline_parser_print_help (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ cmdline_parser_print_version (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'f': /* Force the file format of the file(s) specified. */ if (update_arg( (void *)&(args_info->import_format_arg), &(args_info->import_format_orig), &(args_info->import_format_given), &(local_args_info.import_format_given), optarg, 0, "AUTODETECT", ARG_STRING, check_ambiguity, override, 0, 0, "import-format", 'f', additional_error)) goto failure; break; case 0: /* Long option with no short option */ /* List available import file formats 'import-format' command. */ if (strcmp (long_options[option_index].name, "list-import-formats") == 0) { if (update_arg( 0 , 0 , &(args_info->list_import_formats_given), &(local_args_info.list_import_formats_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "list-import-formats", '-', additional_error)) goto failure; } /* Output file parsing messages. */ else if (strcmp (long_options[option_index].name, "msg_parser") == 0) { if (update_arg((void *)&(args_info->msg_parser_flag), 0, &(args_info->msg_parser_given), &(local_args_info.msg_parser_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_parser", '-', additional_error)) goto failure; } /* Output messages meant for debuging. */ else if (strcmp (long_options[option_index].name, "msg_debug") == 0) { if (update_arg((void *)&(args_info->msg_debug_flag), 0, &(args_info->msg_debug_given), &(local_args_info.msg_debug_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_debug", '-', additional_error)) goto failure; } /* Output warning messages about abnormal conditions and unknown constructs. */ else if (strcmp (long_options[option_index].name, "msg_warning") == 0) { if (update_arg((void *)&(args_info->msg_warning_flag), 0, &(args_info->msg_warning_given), &(local_args_info.msg_warning_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_warning", '-', additional_error)) goto failure; } /* Output error messages. */ else if (strcmp (long_options[option_index].name, "msg_error") == 0) { if (update_arg((void *)&(args_info->msg_error_flag), 0, &(args_info->msg_error_given), &(local_args_info.msg_error_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_error", '-', additional_error)) goto failure; } /* Output informational messages about the progress of the library. */ else if (strcmp (long_options[option_index].name, "msg_info") == 0) { if (update_arg((void *)&(args_info->msg_info_flag), 0, &(args_info->msg_info_given), &(local_args_info.msg_info_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_info", '-', additional_error)) goto failure; } /* Output status messages. */ else if (strcmp (long_options[option_index].name, "msg_status") == 0) { if (update_arg((void *)&(args_info->msg_status_flag), 0, &(args_info->msg_status_given), &(local_args_info.msg_status_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "msg_status", '-', additional_error)) goto failure; } break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ goto failure; default: /* bug: option not considered. */ fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : "")); abort (); } /* switch */ } /* while */ cmdline_parser_release (&local_args_info); if ( error ) return (EXIT_FAILURE); if (optind < argc) { int i = 0 ; int found_prog_name = 0; /* whether program name, i.e., argv[0], is in the remaining args (this may happen with some implementations of getopt, but surely not with the one included by gengetopt) */ i = optind; while (i < argc) if (argv[i++] == argv[0]) { found_prog_name = 1; break; } i = 0; args_info->inputs_num = argc - optind - found_prog_name; args_info->inputs = (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; while (optind < argc) if (argv[optind++] != argv[0]) args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; } return 0; failure: cmdline_parser_release (&local_args_info); return (EXIT_FAILURE); } libofx-0.9.4/ofxdump/cmdline.ggo0000644000175000017500000000235411544727432013540 00000000000000# Name of your program # don't use package if you're using automake # Version of your program # don't use version if you're using automake purpose "ofxdump prints to stdout, in human readable form, everything the library understands about a particular file or response, and sends errors to stderr. To know exactly what the library understands about of a particular ofx response file, just call ofxdump on that file." # Options # option {argtype} {typestr=""} {default=""} {required} {argoptional} {multiple} #section "File options" option "import-format" f "Force the file format of the file(s) specified" string default="AUTODETECT" no option "list-import-formats" - "List available import file formats 'import-format' command" no #section "Debug output options" option "msg_parser" - "Output file parsing messages" flag off option "msg_debug" - "Output messages meant for debuging" flag off option "msg_warning" - "Output warning messages about abnormal conditions and unknown constructs" flag on option "msg_error" - "Output error messages" flag on option "msg_info" - "Output informational messages about the progress of the library" flag on option "msg_status" - "Output status messages" flag on libofx-0.9.4/ofxdump/Makefile.am0000644000175000017500000000102111553123617013444 00000000000000bin_PROGRAMS = ofxdump ofxdump_LDADD = $(top_builddir)/lib/libofx.la ofxdump_SOURCES = cmdline.h cmdline.c ofxdump.cpp dist_man_MANS = ofxdump.1 AM_CPPFLAGS = \ -I${top_builddir}/inc if USE_GENGETOPT CLEANFILES = cmdline.c cmdline.h cmdline.c cmdline.h: cmdline.ggo Makefile gengetopt --unamed-opts < $< endif ofxdump.1: ofxdump.cpp $(top_srcdir)/configure.in $(MAKE) $(AM_MAKEFLAGS) ofxdump$(EXEEXT) help2man --output=ofxdump.1 ./ofxdump$(EXEEXT) MAINTAINERCLEANFILES = cmdline.c cmdline.h EXTRA_DIST = cmdline.ggo libofx-0.9.4/ofxdump/ofxdump.10000644000175000017500000000306611553123733013166 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LIBOFX "1" "April 2011" "libofx 0.9.4" "User Commands" .SH NAME libofx \- manual page for libofx 0.9.4 .SH SYNOPSIS .B libofx [\fIOPTIONS\fR]... [\fIFILES\fR]... .SH DESCRIPTION libofx 0.9.4 .PP ofxdump prints to stdout, in human readable form, everything the library .IP understands about a particular file or response, and sends errors to stderr. To know exactly what the library understands about of a particular ofx response file, just call ofxdump on that file. .TP \fB\-h\fR, \fB\-\-help\fR Print help and exit .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit .TP \fB\-f\fR, \fB\-\-import\-format\fR=\fISTRING\fR Force the file format of the file(s) specified (default=`AUTODETECT') .TP \fB\-\-list\-import\-formats\fR List available import file formats \&'import\-format' command .TP \fB\-\-msg_parser\fR Output file parsing messages (default=off) .TP \fB\-\-msg_debug\fR Output messages meant for debuging (default=off) .TP \fB\-\-msg_warning\fR Output warning messages about abnormal conditions and unknown constructs (default=on) .TP \fB\-\-msg_error\fR Output error messages (default=on) .TP \fB\-\-msg_info\fR Output informational messages about the progress of the library (default=on) .TP \fB\-\-msg_status\fR Output status messages (default=on) .SH "SEE ALSO" The full documentation for .B libofx is maintained as a Texinfo manual. If the .B info and .B libofx programs are properly installed at your site, the command .IP .B info libofx .PP should give you access to the complete manual. libofx-0.9.4/ofxdump/Makefile.in0000644000175000017500000005447711553123644013504 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ofxdump$(EXEEXT) subdir = ofxdump DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_ofxdump_OBJECTS = cmdline.$(OBJEXT) ofxdump.$(OBJEXT) ofxdump_OBJECTS = $(am_ofxdump_OBJECTS) ofxdump_DEPENDENCIES = $(top_builddir)/lib/libofx.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(ofxdump_SOURCES) DIST_SOURCES = $(ofxdump_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ofxdump_LDADD = $(top_builddir)/lib/libofx.la ofxdump_SOURCES = cmdline.h cmdline.c ofxdump.cpp dist_man_MANS = ofxdump.1 AM_CPPFLAGS = \ -I${top_builddir}/inc @USE_GENGETOPT_TRUE@CLEANFILES = cmdline.c cmdline.h MAINTAINERCLEANFILES = cmdline.c cmdline.h EXTRA_DIST = cmdline.ggo all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ofxdump/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ofxdump/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ofxdump$(EXEEXT): $(ofxdump_OBJECTS) $(ofxdump_DEPENDENCIES) @rm -f ofxdump$(EXEEXT) $(CXXLINK) $(ofxdump_OBJECTS) $(ofxdump_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ofxdump.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 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-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am 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-man \ uninstall-man1 @USE_GENGETOPT_TRUE@cmdline.c cmdline.h: cmdline.ggo Makefile @USE_GENGETOPT_TRUE@ gengetopt --unamed-opts < $< ofxdump.1: ofxdump.cpp $(top_srcdir)/configure.in $(MAKE) $(AM_MAKEFLAGS) ofxdump$(EXEEXT) help2man --output=ofxdump.1 ./ofxdump$(EXEEXT) # 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: libofx-0.9.4/COPYING0000644000175000017500000003543311544727432011004 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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 libofx-0.9.4/libofx.spec.in0000644000175000017500000000422011544727432012503 00000000000000%define name libofx %define version @VERSION@ %define release 1 %define prefix /usr Summary: The LibOFX library is designed to allow applications to very easily support OFX command responses Name: %{name} Version: %{version} Release: %{release} Source: http://download.sourceforge.net/libofx/%{name}-%{version}.tar.gz Requires: openjade >= 1.3.1 Group: Libraries/System License: GPL Packager: Chris Lyttle BuildRoot: %{_tmppath}/%{name}-%{version}-root Prereq: /sbin/ldconfig %description This is the LibOFX library. It is a API designed to allow applications to very easily support OFX command responses, usually provided by financial institutions. See http://www.ofx.net/ofx/default.asp for details and specification. LibOFX is based on the excellent OpenSP library written by James Clark, and now part of the OpenJADE http://openjade.sourceforge.net/ project. OpenSP by itself is not widely distributed. OpenJADE 1.3.1 includes a version on OpenSP that will link, however, it has some major problems with LibOFX and isn't recommended. Since LibOFX uses the generic interface to OpenSP, it should be compatible with all recent versions of OpenSP (It has been developed with OpenSP-1.5pre5). LibOFX is written in C++, but provides a C style interface usable transparently from both C and C++ using a single include file. %prep %setup -q %build ./configure --prefix=%{_prefix} \ --libdir=%{_libdir} --datadir=%{_datadir} \ --includedir=%{_includedir} make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{prefix} LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} make prefix=$RPM_BUILD_ROOT%{_prefix} \ libdir=$RPM_BUILD_ROOT%{_libdir} \ datadir=$RPM_BUILD_ROOT%{_datadir} \ includedir=$RPM_BUILD_ROOT%{_includedir} install %makeinstall %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so* %{_libdir}/pkgconfig/libofx.pc %{_includedir}/* %{_datadir}/%{name}/dtd/* %{_datadir}/doc/%{name} %changelog * Sat Nov 23 2002 Chris Lyttle - Created spec file libofx-0.9.4/libofx.pc0000644000175000017500000000061711553123351011542 00000000000000# libofx pkg-config source file prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libofx Description: libofx is a library for processing Open Financial eXchange (OFX) data Version: 0.9.4 Requires: Conflicts: #Libs: -L${libdir} -L/usr/lib -losp -lofx #Cflags: -I${includedir} -I/usr/include/OpenSP Libs: -L${libdir} -lofx Cflags: -I${includedir} libofx-0.9.4/Makefile.in0000644000175000017500000006573011553123277012016 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libofx.lsm.in $(srcdir)/libofx.pc.in \ $(srcdir)/libofx.spec.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS config/config.guess \ config/config.sub config/depcomp config/install-sh \ config/ltmain.sh config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/os.m4 $(top_srcdir)/libcurl.m4 \ $(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 config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = libofx.spec libofx.pc libofx.lsm CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" DATA = $(doc_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ 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@ DLLTOOL = @DLLTOOL@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DLL_TARGET = @INSTALL_DLL_TARGET@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL = @LIBCURL@ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ LIBOBJS = @LIBOBJS@ LIBOFX_BUILD_VERSION = @LIBOFX_BUILD_VERSION@ LIBOFX_DTD_DIR = @LIBOFX_DTD_DIR@ LIBOFX_MAJOR_VERSION = @LIBOFX_MAJOR_VERSION@ LIBOFX_MICRO_VERSION = @LIBOFX_MICRO_VERSION@ LIBOFX_MINOR_VERSION = @LIBOFX_MINOR_VERSION@ LIBOFX_SO_AGE = @LIBOFX_SO_AGE@ LIBOFX_SO_CURRENT = @LIBOFX_SO_CURRENT@ LIBOFX_SO_REVISION = @LIBOFX_SO_REVISION@ LIBOFX_VERSION = @LIBOFX_VERSION@ LIBOFX_VERSION_RELEASE_STRING = @LIBOFX_VERSION_RELEASE_STRING@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXMLPP_CFLAGS = @LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS = @LIBXMLPP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_DLL_TARGET = @MAKE_DLL_TARGET@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSPINCLUDES = @OPENSPINCLUDES@ OPENSPLIBS = @OPENSPLIBS@ OSYSTEM = @OSYSTEM@ OS_TYPE = @OS_TYPE@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ QT_CFLAGS = @QT_CFLAGS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WITH_ICONV = @WITH_ICONV@ _libcurl_config = @_libcurl_config@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/libofx dvidir = @dvidir@ enable_dot = @enable_dot@ enable_html_docs = @enable_html_docs@ enable_latex_docs = @enable_latex_docs@ exec_prefix = @exec_prefix@ have_gengetopt = @have_gengetopt@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ofxconnect = @ofxconnect@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_OFXCONNECT_TRUE@MAYBE_OFXCONNECT = ofxconnect DIST_SUBDIRS = m4 inc dtd lib doc . ofx2qif ofxdump ofxconnect SUBDIRS = m4 inc dtd lib doc . ofx2qif ofxdump $(MAYBE_OFXCONNECT) doc_DATA = \ AUTHORS \ COPYING \ INSTALL \ NEWS \ README \ ChangeLog \ totest.txt EXTRA_DIST = \ libofx.spec.in \ libofx.spec \ libofx.pc \ totest.txt \ libofx.lsm.in \ libofx.lsm pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libofx.pc 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'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) 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) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 libofx.spec: $(top_builddir)/config.status $(srcdir)/libofx.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ libofx.pc: $(top_builddir)/config.status $(srcdir)/libofx.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libofx.lsm: $(top_builddir)/config.status $(srcdir)/libofx.lsm.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | 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 tardir=$(distdir) && $(am__tar) | 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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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 $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-recursive info-am: install-data-am: install-docDATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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-docDATA uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-docDATA \ uninstall-pkgconfigDATA .PHONY: doc doc: $(MAKE) -C doc doc rpm: $(PACKAGE).spec dist rpmbuild="rpm" && \ if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \ $$rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz # 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: