spatialite_gui-2.1.0-beta1/ 0000775 0001750 0001750 00000000000 13711576732 012526 5 0000000 0000000 spatialite_gui-2.1.0-beta1/Wfs.cpp 0000664 0001750 0001750 00000140271 13711576502 013711 0000000 0000000 /*
/ Wfs.cpp
/ WFS load data
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include "Classdef.h"
#if defined(_WIN32) && !defined(__MINGW32__)
#include
#include
#include
#else
#include
#include
#endif
#ifdef __MINGW32__
#include
#include
#endif
#include "wx/clipbrd.h"
bool WfsDialog::Create(MyFrame * parent, wxString & wfs_url, wxString & proxy)
{
//
// creating the dialog
//
MainFrame = parent;
if (wxDialog::Create(parent, wxID_ANY, wxT("Load data from WFS datasource"))
== false)
return false;
CurrentEvtRow = -1;
CurrentEvtColumn = -1;
WfsGetCapabilitiesURL = wfs_url;
if (WfsGetCapabilitiesURL.Len() == 0)
WfsGetCapabilitiesURL = wxT("http://");
HttpProxy = proxy;
if (HttpProxy.Len() == 0)
ProxyEnabled = false;
else
ProxyEnabled = true;
// populates individual controls
CreateControls();
// sets dialog sizer
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
// centers the dialog window
Centre();
ProgressTimer = new wxTimer(this, ID_WFS_TIMER);
ProgressTimer->Stop();
return true;
}
void WfsDialog::CreateControls()
{
//
// creating individual control and setting initial values
//
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
// HTTP Proxy
wxStaticBox *proxyBox = new wxStaticBox(this, wxID_STATIC,
wxT("HTTP Proxy"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *proxyBoxSizer = new wxStaticBoxSizer(proxyBox, wxHORIZONTAL);
boxSizer->Add(proxyBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
wxCheckBox *enableProxyCtrl = new wxCheckBox(this, ID_WFS_ENABLE_PROXY,
wxT("Enable"),
wxDefaultPosition,
wxDefaultSize);
enableProxyCtrl->SetValue(ProxyEnabled);
proxyBoxSizer->Add(enableProxyCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *proxyCtrl = new wxTextCtrl(this, ID_WFS_PROXY, HttpProxy,
wxDefaultPosition, wxSize(600, 22));
proxyBoxSizer->Add(proxyCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
proxyCtrl->Enable(ProxyEnabled);
// URL group box
wxStaticBox *urlBox = new wxStaticBox(this, wxID_STATIC,
wxT("WFS URL - GetCapabilities"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *urlBoxSizer = new wxStaticBoxSizer(urlBox, wxVERTICAL);
boxSizer->Add(urlBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// First row: GetCapabilities URL
wxBoxSizer *urlSizer = new wxBoxSizer(wxVERTICAL);
urlBoxSizer->Add(urlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *urlCtrl = new wxTextCtrl(this, ID_WFS_URL, WfsGetCapabilitiesURL,
wxDefaultPosition, wxSize(680, 22));
urlSizer->Add(urlCtrl, 0, wxALIGN_RIGHT | wxALL, 5);
// command buttons
wxBoxSizer *url2Sizer = new wxBoxSizer(wxHORIZONTAL);
urlSizer->Add(url2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *catBox = new wxStaticBox(this, wxID_STATIC,
wxT("WFS Catalog"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *catBoxSizer = new wxStaticBoxSizer(catBox, wxVERTICAL);
url2Sizer->Add(catBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL);
catBoxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *query = new wxButton(this, ID_WFS_CATALOG, wxT("&Load"));
okCancelBox->Add(query, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *reset = new wxButton(this, ID_WFS_RESET, wxT("&Reset"));
reset->Enable(false);
okCancelBox->Add(reset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *quit = new wxButton(this, wxID_CANCEL, wxT("&Quit"));
okCancelBox->Add(quit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
// Keywords group box
wxStaticBox *keyBox = new wxStaticBox(this, wxID_STATIC,
wxT("Filter WFS Layers by Keyword"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *keyBoxSizer = new wxStaticBoxSizer(keyBox, wxVERTICAL);
url2Sizer->Add(keyBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *keySizer = new wxBoxSizer(wxHORIZONTAL);
keyBoxSizer->Add(keySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxComboBox *keyList =
new wxComboBox(this, ID_WFS_KEYWORD, wxT(""), wxDefaultPosition,
wxSize(200, 21), 0, NULL,
wxCB_DROPDOWN);
keyList->Enable(false);
keySizer->Add(keyList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *filter = new wxButton(this, ID_WFS_KEYFILTER, wxT("&Apply"));
filter->Enable(false);
keySizer->Add(filter, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *keyReset = new wxButton(this, ID_WFS_KEYRESET, wxT("&Reset"));
keyReset->Enable(false);
keySizer->Add(keyReset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
// the Catalog Grid
wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
WfsView = new wxGrid(this, wxID_ANY, wxPoint(5, 5), wxSize(700, 250));
WfsView->CreateGrid(1, 3);
WfsView->EnableEditing(false);
WfsView->SetColLabelValue(0, wxT("Name"));
WfsView->SetColLabelValue(1, wxT("Title"));
WfsView->SetColLabelValue(2, wxT("Abstract"));
gridSizer->Add(WfsView, 0, wxALIGN_RIGHT | wxALL, 5);
// seleted Layer group box
wxStaticBox *lyrBox = new wxStaticBox(this, wxID_STATIC,
wxT("Selected WFS Layer"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *lyrBoxSizer = new wxStaticBoxSizer(lyrBox, wxVERTICAL);
boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// First row: WFS options
wxBoxSizer *wfsSizer = new wxBoxSizer(wxHORIZONTAL);
lyrBoxSizer->Add(wfsSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxString ver[4];
ver[0] = wxT("&1.0.0");
ver[1] = wxT("&1.1.0");
ver[2] = wxT("&2.0.0");
ver[3] = wxT("&2.0.2");
wxRadioBox *versionBox = new wxRadioBox(this, ID_WFS_VERSION,
wxT("WFS &Version"),
wxDefaultPosition,
wxDefaultSize, 4,
ver, 2,
wxRA_SPECIFY_ROWS);
versionBox->Enable(false);
versionBox->SetSelection(1);
wfsSizer->Add(versionBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString mode[2];
mode[0] = wxT("&single WFS request");
mode[1] = wxT("&using WFS paging");
wxRadioBox *pagingBox = new wxRadioBox(this, ID_WFS_PAGING,
wxT("WFS &request"),
wxDefaultPosition,
wxDefaultSize, 2,
mode, 2,
wxRA_SPECIFY_ROWS);
pagingBox->Enable(false);
pagingBox->SetSelection(0);
wfsSizer->Add(pagingBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *pageBox = new wxStaticBox(this, ID_WFS_PAGE,
wxT("Monolithic WFS Request"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *pageBoxSizer = new wxStaticBoxSizer(pageBox, wxHORIZONTAL);
wfsSizer->Add(pageBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticText *maxLabel =
new wxStaticText(this, ID_WFS_LABEL, wxT("Max &Features limit:"),
wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
pageBoxSizer->Add(maxLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *maxCtrl = new wxTextCtrl(this, ID_WFS_MAX, wxT("-1"),
wxDefaultPosition, wxSize(60, 22),
wxTE_RIGHT);
maxCtrl->Enable(false);
pageBoxSizer->Add(maxCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *swapBox = new wxStaticBox(this, wxID_ANY,
wxT("Swap Axes"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *swapBoxSizer = new wxStaticBoxSizer(swapBox, wxHORIZONTAL);
wfsSizer->Add(swapBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *swapCtrl = new wxCheckBox(this, ID_WFS_SWAP,
wxT("Swap Y,X"),
wxDefaultPosition, wxDefaultSize);
swapCtrl->SetValue(false);
swapCtrl->Enable(false);
swapBoxSizer->Add(swapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Second row: Layer and Srid
wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL);
lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *nameLabel =
new wxStaticText(this, wxID_STATIC, wxT("WFS &Name:"));
nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_WFS_NAME, wxT(""),
wxDefaultPosition, wxSize(400, 22),
wxTE_READONLY);
nameSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:"));
nameSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxComboBox *sridList =
new wxComboBox(this, ID_WFS_SRID, wxT(""), wxDefaultPosition,
wxSize(100, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
sridList->Enable(false);
nameSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row: extra URL args
wxBoxSizer *extraSizer = new wxBoxSizer(wxHORIZONTAL);
lyrBoxSizer->Add(extraSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxStaticText *extraLabel =
new wxStaticText(this, wxID_STATIC, wxT("&URL extra options:"));
extraSizer->Add(extraLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *extraCtrl = new wxTextCtrl(this, ID_WFS_EXTRA, wxT(""),
wxDefaultPosition, wxSize(550, 22));
extraCtrl->Enable(false);
extraSizer->Add(extraCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// fourth row: DB Table [target]
wxBoxSizer *dbSizer = new wxBoxSizer(wxHORIZONTAL);
lyrBoxSizer->Add(dbSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *tableLabel =
new wxStaticText(this, wxID_STATIC, wxT("&Table:"));
dbSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_WFS_TABLE, wxT(""),
wxDefaultPosition, wxSize(150, 22));
tableCtrl->Enable(false);
dbSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticText *pkLabel =
new wxStaticText(this, wxID_STATIC, wxT("Primary &Key:"));
dbSizer->Add(pkLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxComboBox *pkList =
new wxComboBox(this, ID_WFS_PK, wxT(""), wxDefaultPosition,
wxSize(250, 21), 0, NULL, wxCB_DROPDOWN);
pkList->Enable(false);
dbSizer->Add(pkList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *rtreeCtrl = new wxCheckBox(this, ID_WFS_RTREE,
wxT("Spatial Index"),
wxDefaultPosition, wxDefaultSize);
rtreeCtrl->SetValue(false);
rtreeCtrl->Enable(false);
dbSizer->Add(rtreeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// fifth row: status and start button
wxBoxSizer *statusSizer = new wxBoxSizer(wxHORIZONTAL);
lyrBoxSizer->Add(statusSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxButton *load = new wxButton(this, ID_WFS_LOAD, wxT("&Load data"));
load->Enable(false);
statusSizer->Add(load, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
Progress =
new wxGauge(this, wxID_ANY, 20, wxDefaultPosition, wxSize(200, 21));
statusSizer->Add(Progress, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticText *statusLabel = new wxStaticText(this, ID_WFS_STATUS, wxT(""),
wxDefaultPosition, wxSize(300,
21));
statusSizer->Add(statusLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// appends event handlers
Connect(wxID_ANY, wxEVT_GRID_CELL_LEFT_CLICK,
(wxObjectEventFunction) & WfsDialog::OnLeftClick);
Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK,
(wxObjectEventFunction) & WfsDialog::OnRightClick);
Connect(ID_WFS_ENABLE_PROXY, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnProxy);
Connect(ID_WFS_PAGING, wxEVT_COMMAND_RADIOBOX_SELECTED,
(wxObjectEventFunction) & WfsDialog::OnPagingChanged);
Connect(ID_WFS_CATALOG, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnCatalog);
Connect(ID_WFS_RESET, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnReset);
Connect(ID_WFS_KEYFILTER, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnKeyFilter);
Connect(ID_WFS_KEYRESET, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnKeyReset);
Connect(ID_WFS_LOAD, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnLoadFromWfs);
Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnQuit);
Connect(Wfs_Copy, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) & WfsDialog::OnCmdCopy);
Connect(Wfs_Layer, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) & WfsDialog::OnCmdSelectLayer);
Connect(ID_WFS_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & WfsDialog::OnThreadFinished);
//
// setting up a Timer event handler for Refresh
//
Connect(ID_WFS_TIMER, wxEVT_TIMER,
wxTimerEventHandler(WfsDialog::OnRefreshTimer), NULL, this);
}
void WfsDialog::OnRefreshTimer(wxTimerEvent & WXUNUSED(event))
{
//
// Refreshing the Progress status
//
if (Params.GetProgressCount() > Params.GetLastProgressCount())
{
Params.SetLastProgressCount();
ProgressUpdate(Params.GetProgressCount());
}
Progress->Show(true);
Progress->Pulse();
//
// restarting the timer
//
ProgressTimer->Start(500, wxTIMER_ONE_SHOT);
}
void WfsDialog::OnCmdCopy(wxCommandEvent & WXUNUSED(event))
{
//
// copying all WFS Layer definitions into the clipboard
//
wxString copyData;
int row;
int col;
for (row = 0; row < WfsView->GetNumberRows(); row++)
{
for (col = 0; col < WfsView->GetNumberCols(); col++)
{
if (col != 0)
copyData += wxT("\t");
copyData += WfsView->GetCellValue(row, col);
}
copyData += wxT("\n");
}
if (wxTheClipboard->Open())
{
wxTheClipboard->SetData(new wxTextDataObject(copyData));
wxTheClipboard->Close();
}
}
void WfsDialog::OnCmdSelectLayer(wxCommandEvent & WXUNUSED(event))
{
//
// setting the currently selected WFS Layer
//
SelectLayer();
}
void WfsDialog::SelectLayer()
{
//
// setting the currently selected WFS Layer
//
WfsView->Show(false);
WfsView->ClearSelection();
WfsView->SelectRow(CurrentEvtRow);
WfsView->Show(true);
wxString name = WfsView->GetCellValue(CurrentEvtRow, 0);
gaiaWFSitemPtr layer = FindLayerByName(name);
if (layer == NULL)
return;
wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME);
wxString lyr_name;
const char *x_name = get_wfs_item_name(layer);
lyr_name = wxString::FromUTF8(x_name);
nameCtrl->SetValue(lyr_name);
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID);
comboCtrl->Clear();
int maxSrid = get_wfs_layer_srid_count(layer);
for (int s = 0; s < maxSrid; s++)
{
wxString str;
str.Printf(wxT("%d"), get_wfs_layer_srid(layer, s));
comboCtrl->Append(str);
}
comboCtrl->SetSelection(0);
comboCtrl->Enable(true);
wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION);
const char *version = get_wfs_version(Catalog);
versionBox->Enable(true);
if (version == NULL)
versionBox->SetSelection(1);
else
{
if (strcmp(version, "1.0.0") == 0)
versionBox->SetSelection(0);
else if (strcmp(version, "2.0.0") == 0)
versionBox->SetSelection(2);
else if (strcmp(version, "2.0.2") == 0)
versionBox->SetSelection(3);
else
versionBox->SetSelection(1);
}
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX);
maxCtrl->SetValue(wxT("100"));
maxCtrl->Enable(true);
wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL);
maxLabel->SetLabel(wxT("FeaturesPerPage"));
wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE);
pageBox->SetLabel(wxT("Multiple WFS Paged Requests"));
wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING);
pagingCtrl->SetSelection(1);
pagingCtrl->Enable(true);
wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE);
tableCtrl->SetValue(wxT(""));
tableCtrl->Enable(true);
wxTextCtrl *extraCtrl = (wxTextCtrl *) FindWindow(ID_WFS_EXTRA);
extraCtrl->SetValue(wxT(""));
extraCtrl->Enable(true);
wxComboBox *pkList = (wxComboBox *) FindWindow(ID_WFS_PK);
pkList->Clear();
pkList->Append(wxT(""));
char *url = get_wfs_describe_url(Catalog, x_name, NULL);
if (url != NULL)
{
gaiaWFSschemaPtr schema = create_wfs_schema(url, (char *) x_name, NULL);
if (schema != NULL)
{
int maxCol = get_wfs_schema_column_count(schema);
for (int c = 0; c < maxCol; c++)
{
gaiaWFScolumnPtr column = get_wfs_schema_column(schema, c);
if (column != NULL)
{
const char *name;
int type;
int nillable;
if (get_wfs_schema_column_info
(column, &name, &type, &nillable) != 0)
{
wxString str = wxString::FromUTF8(name);
pkList->Append(str);
}
}
}
destroy_wfs_schema(schema);
}
free(url);
}
pkList->SetSelection(0);
pkList->Enable(true);
wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE);
rtreeCtrl->SetValue(true);
rtreeCtrl->Enable(true);
wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP);
long srid = -1;
comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID);
int idSel = comboCtrl->GetSelection();
if (idSel != wxNOT_FOUND)
{
if (comboCtrl->GetString(idSel).ToLong(&srid) == false)
srid = -1;
}
if (srid > 0)
{
int flipped = 0;
if (!srid_has_flipped_axes(MainFrame->GetSqlite(), srid, &flipped))
swapCtrl->SetValue(false);
else
{
if (flipped)
swapCtrl->SetValue(true);
else
swapCtrl->SetValue(false);
}
} else
swapCtrl->SetValue(false);
swapCtrl->Enable(true);
wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD);
load->Enable(true);
}
gaiaWFSitemPtr WfsDialog::FindLayerByName(wxString & name)
{
//
// retrieving a WFS Layer from the Catalog by its name
//
int nLayers = get_wfs_catalog_count(Catalog);
for (int i = 0; i < nLayers; i++)
{
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
wxString lyr_name;
const char *x_name = get_wfs_item_name(layer);
lyr_name = wxString::FromUTF8(x_name);
if (name.Cmp(lyr_name) == 0)
return layer;
}
return NULL;
}
void WfsDialog::OnLeftClick(wxGridEvent & event)
{
//
// left click on some cell [mouse action]
//
int previous = CurrentEvtRow;
CurrentEvtRow = event.GetRow();
CurrentEvtColumn = event.GetCol();
if (CurrentEvtRow != previous)
SelectLayer();
}
void WfsDialog::OnRightClick(wxGridEvent & event)
{
//
// right click on some cell [mouse action]
//
wxMenu menu;
wxMenuItem *menuItem;
wxPoint pt = event.GetPosition();
CurrentEvtRow = event.GetRow();
CurrentEvtColumn = event.GetCol();
menuItem =
new wxMenuItem(&menu, Wfs_Layer, wxT("Select as the current WFS &Layer"));
menu.Append(menuItem);
menu.AppendSeparator();
menuItem =
new wxMenuItem(&menu, Wfs_Copy, wxT("&Copy the whole WFS Catalog"));
menu.Append(menuItem);
WfsView->PopupMenu(&menu, pt);
}
void WfsDialog::OnPagingChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Monolithic / Paged selection changed
//
wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING);
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX);
wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL);
wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE);
switch (pagingCtrl->GetSelection())
{
case 0:
maxCtrl->SetValue(wxT("-1"));
maxLabel->SetLabel(wxT("Max &Features limit:"));
pageBox->SetLabel(wxT("Monolithic WFS Request"));
break;
case 1:
maxCtrl->SetValue(wxT("100"));
maxLabel->SetLabel(wxT("FeaturesPerPage:"));
pageBox->SetLabel(wxT("Multiple WFS Paged Requests"));
break;
};
}
void WfsDialog::ResetProgress()
{
// resetting the Progress label
wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS);
status->SetLabel(wxT(""));
status->Refresh();
status->Update();
}
void WfsDialog::ProgressWait()
{
// monolithic download
wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS);
status->SetLabel(wxT(" Please wait ... WFS download in progress"));
status->Refresh();
status->Update();
}
void WfsDialog::ProgressUpdate(int rows)
{
// updating the current status (WFS paging)
wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS);
wxString msg;
msg.Printf(wxT(" WFS Features loaded since now: %d"), rows);
status->SetLabel(msg);
status->Refresh();
status->Update();
}
void WfsCallback(int rows, void *ptr)
{
// progress callback supporting WFS Paging
int *p = (int *) ptr;
*p = rows;
}
#if defined(_WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteWfs(void *arg)
#else
void *DoExecuteWfs(void *arg)
#endif
{
//
// threaded function: processing a WFS download
//
WfsParams *params = (WfsParams *) arg;
char *err_msg = NULL;
int rows;
char wfs_version[128];
char url[8196];
char alt_describe[4192];
char layer_name[1024];
char table[1024];
char pk[1024];
char *pk_ref = pk;
wxString wUrl = params->GetUrl();
wxString altDescribe = params->GetAltDescribeUri();
#ifndef _WIN32
pthread_t th_id = pthread_self();
int policy;
struct sched_param sched;
if (pthread_getschedparam(th_id, &policy, &sched) == 0)
{
if (policy == SCHED_OTHER && sched.sched_priority == 0)
{
// setting a lower priority
nice(10);
}
}
#endif
if (params->GetExtra().Len() > 0)
{
// appending extra arguments to URL */
if (wUrl.EndsWith(wxT("&")) == true
|| params->GetExtra().StartsWith(wxT("&")) == true)
wUrl += params->GetExtra();
else
wUrl += wxT("&") + params->GetExtra();
}
strcpy(wfs_version, params->GetWfsVersion().ToUTF8());
strcpy(url, wUrl.ToUTF8());
strcpy(alt_describe, altDescribe.ToUTF8());
strcpy(layer_name, params->GetLayerName().ToUTF8());
strcpy(table, params->GetTable().ToUTF8());
wxString pkey = params->GetPrimaryKey();
if (pkey.Len() == 0)
pk_ref = NULL;
else
strcpy(pk, pkey.ToUTF8());
int ret =
load_from_wfs_paged_ex(params->GetSqlite(), wfs_version, url, alt_describe,
layer_name,
params->GetSwapAxes(), table,
pk_ref, params->GetSpatialIndex(),
params->GetPageSize(), &rows, &err_msg,
params->GetCallback(),
params->GetProgressCountPtr());
params->SetRet(ret);
params->SetErrMsg(err_msg);
params->SetRows(rows);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_WFS_THREAD_FINISHED);
params->GetMother()->GetEventHandler()->AddPendingEvent(event);
#if defined(_WIN32) && !defined(__MINGW32__)
return 0;
#else
pthread_exit(NULL);
return NULL;
#endif
}
void WfsDialog::OnLoadFromWfs(wxCommandEvent & WXUNUSED(event))
{
//
// attempting to load data from WFS
//
#if defined(_WIN32) && !defined(__MINGW32__)
HANDLE thread_handle;
DWORD dwThreadId;
#else
pthread_t thread_id;
#endif
wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME);
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX);
wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE);
wxString name = nameCtrl->GetValue();
wxTextCtrl *extraCtrl = (wxTextCtrl *) FindWindow(ID_WFS_EXTRA);
wxString extra = extraCtrl->GetValue();
wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING);
long max = -1;
long page = 100;
if (pagingCtrl->GetSelection() == 1)
{
max = -1;
if (maxCtrl->GetValue().ToLong(&page) == false)
page = 100;
} else
{
page = -1;
if (maxCtrl->GetValue().ToLong(&max) == false)
max = -1;
}
long srid = -1;
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID);
int idSel = comboCtrl->GetSelection();
if (idSel != wxNOT_FOUND)
{
if (comboCtrl->GetString(idSel).ToLong(&srid) == false)
srid = -1;
}
wxRadioBox *versionCtrl = (wxRadioBox *) FindWindow(ID_WFS_VERSION);
const char *version = "1.1.0";
if (versionCtrl->GetSelection() == 0)
version = "1.0.0";
else if (versionCtrl->GetSelection() == 2)
version = "2.0.0";
else if (versionCtrl->GetSelection() == 3)
version = "2.0.2";
wxString ver = wxString::FromUTF8(version);
wxString table = tableCtrl->GetValue();
if (table.Len() < 1)
{
wxMessageBox(wxT
("You must specify some DB Table name [destination target] !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return;
}
wxComboBox *pkList = (wxComboBox *) FindWindow(ID_WFS_PK);
wxString pk = pkList->GetValue();
char xname[1024];
strcpy(xname, name.ToUTF8());
int rtree = 0;
wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE);
if (rtreeCtrl->GetValue())
rtree = 1;
int swap_axes = 0;
wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP);
if (swapCtrl->GetValue())
swap_axes = 1;
char *xurl = get_wfs_request_url(Catalog, xname, version, srid, max);
wxString url = wxString::FromUTF8(xurl);
free(xurl);
char *xalt_describe = get_wfs_describe_url(Catalog, xname, version);
wxString alt_describe = wxString::FromUTF8(xalt_describe);
free(xalt_describe);
::wxBeginBusyCursor();
ProgressWait();
Params.Initialize(this, MainFrame->GetSqlite(), ver, url, alt_describe, name,
swap_axes, table, pk, rtree, page, extra, WfsCallback);
ProgressTimer->Start(500, wxTIMER_ONE_SHOT);
Enable(false);
if (ProxyEnabled == true && HttpProxy.Len() > 0)
{
// setting up the HTTP Proxy
#ifdef _WIN32
char *p = new char[HttpProxy.Len() + 1];
strcpy(p, HttpProxy.ToUTF8());
char *proxy_str = sqlite3_mprintf("http_proxy=%s", p);
delete[]p;
PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy"));
_putenv(proxy_str);
sqlite3_free(proxy_str);
#else // not Windows
char *proxy_str = new char[HttpProxy.Len() + 1];
strcpy(proxy_str, HttpProxy.ToUTF8());
PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy"));
setenv("http_proxy", proxy_str, 1);
delete[]proxy_str;
#endif
}
#if defined(_WIN32) && !defined(__MINGW32__)
thread_handle = CreateThread(NULL, 0, DoExecuteWfs, &Params, 0, &dwThreadId);
SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE);
#else
int ok_prior = 0;
int policy;
int min_prio;
pthread_attr_t attr;
struct sched_param sp;
pthread_attr_init(&attr);
if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0)
{
// attempting to set the lowest priority
if (pthread_attr_getschedpolicy(&attr, &policy) == 0)
{
min_prio = sched_get_priority_min(policy);
sp.sched_priority = min_prio;
if (pthread_attr_setschedparam(&attr, &sp) == 0)
{
// ok, setting the lowest priority
ok_prior = 1;
pthread_create(&thread_id, &attr, DoExecuteWfs, &Params);
pthread_detach(thread_id);
}
}
}
#ifdef __MINGW32__
if (!ok_prior)
{
// attempting to set the lowest priority on Windows
if (pthread_attr_getschedpolicy(&attr, &policy) == 0)
{
if (policy == SCHED_OTHER)
{
min_prio = sched_get_priority_min(policy);
sp.sched_priority = min_prio;
if (pthread_attr_setschedparam(&attr, &sp) == 0)
{
// ok, setting the lowest priority
ok_prior = 1;
pthread_create(&thread_id, &attr, DoExecuteWfs, &Params);
pthread_detach(thread_id);
}
}
}
}
#endif
if (!ok_prior)
{
// failure: using standard priority
pthread_create(&thread_id, NULL, DoExecuteWfs, &Params);
pthread_detach(thread_id);
}
#endif
}
void WfsDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event))
{
// resuming execution when WFS thread quits
char url[1024];
char xtable[1024];
int ret = Params.GetRet();
char *err_msg = Params.GetErrMsg();
int rows = Params.GetRows();
strcpy(url, Params.GetUrl().ToUTF8());
strcpy(xtable, Params.GetTable().ToUTF8());
Enable(true);
ProgressTimer->Stop();
Progress->SetValue(0);
Progress->Hide();
ResetProgress();
::wxEndBusyCursor();
if (ret == 0)
{
char *xmsg;
if (err_msg == NULL)
xmsg = sqlite3_mprintf("Unable to load data from WFS:\nUnkwnon cause");
else
xmsg = sqlite3_mprintf("Unable to load data from WFS:\n%s", err_msg);
wxString msg = wxString::FromUTF8(xmsg);
sqlite3_free(xmsg);
wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
} else
{
MainFrame->InitTableTree();
char *xmsg =
sqlite3_mprintf("inserted %d rows from WFS into table \"%s\"", rows,
xtable);
wxString msg = wxString::FromUTF8(xmsg);
sqlite3_free(xmsg);
wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this);
}
if (err_msg)
free(err_msg);
if (ProxyEnabled == true)
{
#ifdef _WIN32
_putenv("http_proxy=");
#else // not Windows
unsetenv("http_proxy");
#endif
if (PreviousHttpProxy.Len() > 0)
{
#ifdef _WIN32
char *p = new char[PreviousHttpProxy.Len() + 1];
strcpy(p, PreviousHttpProxy.ToUTF8());
char *proxy_str = sqlite3_mprintf("http_proxy=%s", p);
delete[]p;
_putenv(proxy_str);
sqlite3_free(proxy_str);
#else // not Windows
char *proxy_str = new char[PreviousHttpProxy.Len() + 1];
strcpy(proxy_str, PreviousHttpProxy.ToUTF8());
setenv("http_proxy", proxy_str, 1);
delete[]proxy_str;
#endif
}
}
}
void WfsDialog::OnCatalog(wxCommandEvent & WXUNUSED(event))
{
//
// attempting to create a WFS Catalog from GetCapabilities
//
wxCheckBox *enableProxyCtrl = (wxCheckBox *) FindWindow(ID_WFS_ENABLE_PROXY);
wxTextCtrl *proxyCtrl = (wxTextCtrl *) FindWindow(ID_WFS_PROXY);
if (ProxyEnabled == true)
{
HttpProxy = proxyCtrl->GetValue();
if (HttpProxy.Len() == 0)
{
wxMessageBox(wxT("You must specify some HTTP Proxy URL !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return;
}
}
wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WFS_URL);
wxButton *catalogBtn = (wxButton *) FindWindow(ID_WFS_CATALOG);
wxButton *resetBtn = (wxButton *) FindWindow(ID_WFS_RESET);
WfsGetCapabilitiesURL = urlCtrl->GetValue();
if (WfsGetCapabilitiesURL.Len() < 1)
{
wxMessageBox(wxT("You must specify some WFS GetCapabilities URL !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return;
}
if (WfsGetCapabilitiesURL.EndsWith(wxT("?")))
{
// auto-completing the GetCapabilities URL
WfsGetCapabilitiesURL += wxT("SERVICE=WFS&REQUEST=GetCapabilities");
urlCtrl->SetValue(WfsGetCapabilitiesURL);
}
char xurl[1024];
char *err_msg;
if (ProxyEnabled == true && HttpProxy.Len() > 0)
{
// setting up the HTTP Proxy
#ifdef _WIN32
char *p = new char[HttpProxy.Len() + 1];
strcpy(p, HttpProxy.ToUTF8());
char *proxy_str = sqlite3_mprintf("http_proxy=%s", p);
delete[]p;
PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy"));
_putenv(proxy_str);
sqlite3_free(proxy_str);
#else // not Windows
char *proxy_str = new char[HttpProxy.Len() + 1];
strcpy(proxy_str, HttpProxy.ToUTF8());
PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy"));
setenv("http_proxy", proxy_str, 1);
delete[]proxy_str;
#endif
}
strcpy(xurl, WfsGetCapabilitiesURL.ToUTF8());
Catalog = create_wfs_catalog(xurl, &err_msg);
if (Catalog == NULL)
{
wxString msg = wxString::FromUTF8(err_msg);
wxMessageBox(wxT("unable to get a WFS Catalog\n\n") + msg,
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
} else
{
enableProxyCtrl->Enable(false);
proxyCtrl->Enable(false);
int nLayers = get_wfs_catalog_count(Catalog);
WfsView->Show(false);
WfsView->ClearSelection();
CurrentEvtRow = -1;
CurrentEvtColumn = -1;
if (nLayers > 1)
WfsView->AppendRows(nLayers - 1);
for (int i = 0; i < nLayers; i++)
{
// populating the WFS Catalog
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
wxString name;
wxString title;
wxString abstract;
const char *x_name = get_wfs_item_name(layer);
const char *x_title = get_wfs_item_title(layer);
const char *x_abstract = get_wfs_item_abstract(layer);
name = wxString::FromUTF8(x_name);
if (x_title != NULL)
title = wxString::FromUTF8(x_title);
if (x_abstract != NULL)
abstract = wxString::FromUTF8(x_abstract);
WfsView->SetCellValue(i, 0, name);
WfsView->SetCellValue(i, 1, title);
WfsView->SetCellValue(i, 2, abstract);
}
WfsView->SetRowLabelSize(wxGRID_AUTOSIZE);
WfsView->AutoSize();
WfsView->SetSize(690, 240);
WfsView->Show(true);
urlCtrl->Enable(false);
catalogBtn->Enable(false);
resetBtn->Enable(true);
Keywords = new WfsKeywords();
for (int i = 0; i < nLayers; i++)
{
// populating the Keywords dictionary
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
int kw = get_wfs_keyword_count(layer);
for (int k = 0; k < kw; k++)
Keywords->Add(get_wfs_keyword(layer, k));
}
Keywords->Sort();
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD);
comboCtrl->Clear();
comboCtrl->Append(wxT(""));
int maxKey = Keywords->GetMaxSorted();
for (int i = 0; i < maxKey; i++)
{
WfsKey *key = Keywords->GetKey(i);
if (key != NULL)
{
// populating the Keywords ComboBox
comboCtrl->Append(key->GetKeyword());
}
}
comboCtrl->Enable(true);
wxButton *filterBtn = (wxButton *) FindWindow(ID_WFS_KEYFILTER);
filterBtn->Enable(true);
wxButton *keyResetBtn = (wxButton *) FindWindow(ID_WFS_KEYRESET);
keyResetBtn->Enable(true);
}
if (err_msg != NULL)
free(err_msg);
if (ProxyEnabled == true)
{
#ifdef _WIN32
_putenv("http_proxy=");
#else // not Windows
unsetenv("http_proxy");
#endif
if (PreviousHttpProxy.Len() > 0)
{
#ifdef _WIN32
char *p = new char[PreviousHttpProxy.Len() + 1];
strcpy(p, PreviousHttpProxy.ToUTF8());
char *proxy_str = sqlite3_mprintf("http_proxy=%s", p);
delete[]p;
_putenv(proxy_str);
sqlite3_free(proxy_str);
#else // not Windows
char *proxy_str = new char[PreviousHttpProxy.Len() + 1];
strcpy(proxy_str, PreviousHttpProxy.ToUTF8());
setenv("http_proxy", proxy_str, 1);
delete[]proxy_str;
#endif
}
}
MainFrame->SetHttpProxy(HttpProxy);
MainFrame->SetWfsGetCapabilitiesURL(WfsGetCapabilitiesURL);
}
void WfsDialog::OnReset(wxCommandEvent & WXUNUSED(event))
{
//
// resetting to initial empty state
//
wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WFS_URL);
wxButton *catalogBtn = (wxButton *) FindWindow(ID_WFS_CATALOG);
wxButton *resetBtn = (wxButton *) FindWindow(ID_WFS_RESET);
wxCheckBox *enableProxyCtrl = (wxCheckBox *) FindWindow(ID_WFS_ENABLE_PROXY);
wxTextCtrl *proxyCtrl = (wxTextCtrl *) FindWindow(ID_WFS_PROXY);
enableProxyCtrl->Enable(true);
if (ProxyEnabled == true)
proxyCtrl->Enable(true);
if (Catalog != NULL)
destroy_wfs_catalog(Catalog);
Catalog = NULL;
urlCtrl->Enable(true);
catalogBtn->Enable(true);
resetBtn->Enable(false);
WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1);
WfsView->Show(false);
WfsView->ClearSelection();
WfsView->SetCellValue(0, 0, wxT(""));
WfsView->SetCellValue(0, 1, wxT(""));
WfsView->SetCellValue(0, 2, wxT(""));
WfsView->SetRowLabelSize(wxGRID_AUTOSIZE);
WfsView->AutoSize();
WfsView->SetSize(690, 240);
WfsView->Show(true);
CurrentEvtRow = -1;
CurrentEvtColumn = -1;
if (Keywords != NULL)
delete Keywords;
Keywords = NULL;
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD);
comboCtrl->Enable(false);
wxButton *filterBtn = (wxButton *) FindWindow(ID_WFS_KEYFILTER);
filterBtn->Enable(false);
wxButton *keyResetBtn = (wxButton *) FindWindow(ID_WFS_KEYRESET);
keyResetBtn->Enable(false);
wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME);
nameCtrl->SetValue(wxT(""));
comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID);
comboCtrl->Clear();
comboCtrl->SetSelection(wxNOT_FOUND);
comboCtrl->Enable(false);
wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION);
versionBox->Enable(false);
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX);
maxCtrl->SetValue(wxT("-1"));
maxCtrl->Enable(false);
wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL);
maxLabel->SetLabel(wxT("Max &Features limit:"));
wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE);
pageBox->SetLabel(wxT("Monolithic WFS Request"));
wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING);
pagingCtrl->SetSelection(0);
pagingCtrl->Enable(false);
wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE);
tableCtrl->SetValue(wxT(""));
tableCtrl->Enable(false);
comboCtrl = (wxComboBox *) FindWindow(ID_WFS_PK);
comboCtrl->Clear();
comboCtrl->SetSelection(wxNOT_FOUND);
comboCtrl->Enable(false);
wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE);
rtreeCtrl->SetValue(false);
rtreeCtrl->Enable(false);
wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP);
swapCtrl->SetValue(false);
swapCtrl->Enable(false);
wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD);
load->Enable(false);
ResetProgress();
}
void WfsDialog::OnKeyFilter(wxCommandEvent & WXUNUSED(event))
{
//
// filtering by Keywords
//
wxString key;
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD);
key = comboCtrl->GetValue();
if (key.Len() == 0)
{
wxMessageBox(wxT("You must specify some Keyword to be searched !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return;
}
// resetting the Grid
WfsView->Show(false);
WfsView->ClearSelection();
WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1);
WfsView->SetCellValue(0, 0, wxT(""));
WfsView->SetCellValue(0, 1, wxT(""));
WfsView->SetCellValue(0, 2, wxT(""));
WfsView->Show(true);
CurrentEvtRow = -1;
CurrentEvtColumn = -1;
int filtered_rows = 0;
int nLayers = get_wfs_catalog_count(Catalog);
for (int i = 0; i < nLayers; i++)
{
// searching matching Keywords - pass #1
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
bool match = false;
int kw = get_wfs_keyword_count(layer);
for (int k = 0; k < kw; k++)
{
wxString str = wxString::FromUTF8(get_wfs_keyword(layer, k));
if (key.Len() > 0 && str.Cmp(key) == 0)
match = true;
}
if (match)
filtered_rows++;
}
if (filtered_rows > 1)
WfsView->AppendRows(filtered_rows - 1);
int irow = 0;
for (int i = 0; i < nLayers; i++)
{
// searching matching Keywords - pass #2
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
bool match = false;
int kw = get_wfs_keyword_count(layer);
for (int k = 0; k < kw; k++)
{
wxString str = wxString::FromUTF8(get_wfs_keyword(layer, k));
if (key.Len() > 0 && str.Cmp(key) == 0)
match = true;
}
if (match)
{
// inserting a filterd layer
wxString name;
wxString title;
wxString abstract;
const char *x_name = get_wfs_item_name(layer);
const char *x_title = get_wfs_item_title(layer);
const char *x_abstract = get_wfs_item_abstract(layer);
name = wxString::FromUTF8(x_name);
if (x_title != NULL)
title = wxString::FromUTF8(x_title);
if (x_abstract != NULL)
abstract = wxString::FromUTF8(x_abstract);
WfsView->SetCellValue(irow, 0, name);
WfsView->SetCellValue(irow, 1, title);
WfsView->SetCellValue(irow, 2, abstract);
irow++;
}
}
WfsView->SetRowLabelSize(wxGRID_AUTOSIZE);
WfsView->AutoSize();
WfsView->SetSize(690, 240);
WfsView->Show(true);
}
void WfsDialog::OnKeyReset(wxCommandEvent & WXUNUSED(event))
{
//
// resetting any filter by Keywords
//
WfsView->Show(false);
WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1);
WfsView->SetCellValue(0, 0, wxT(""));
WfsView->SetCellValue(0, 1, wxT(""));
WfsView->SetCellValue(0, 2, wxT(""));
int nLayers = get_wfs_catalog_count(Catalog);
WfsView->Show(false);
CurrentEvtRow = -1;
CurrentEvtColumn = -1;
if (nLayers > 1)
WfsView->AppendRows(nLayers - 1);
for (int i = 0; i < nLayers; i++)
{
// populating the WFS Catalog
gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i);
wxString name;
wxString title;
wxString abstract;
const char *x_name = get_wfs_item_name(layer);
const char *x_title = get_wfs_item_title(layer);
const char *x_abstract = get_wfs_item_abstract(layer);
name = wxString::FromUTF8(x_name);
if (x_title != NULL)
title = wxString::FromUTF8(x_title);
if (x_abstract != NULL)
abstract = wxString::FromUTF8(x_abstract);
WfsView->SetCellValue(i, 0, name);
WfsView->SetCellValue(i, 1, title);
WfsView->SetCellValue(i, 2, abstract);
}
WfsView->SetRowLabelSize(wxGRID_AUTOSIZE);
WfsView->AutoSize();
WfsView->SetSize(690, 240);
WfsView->Show(true);
wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD);
comboCtrl->SetSelection(wxNOT_FOUND);
wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME);
nameCtrl->SetValue(wxT(""));
comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID);
comboCtrl->Clear();
comboCtrl->SetSelection(wxNOT_FOUND);
comboCtrl->Enable(false);
wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION);
versionBox->Enable(false);
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX);
maxCtrl->SetValue(wxT("-1"));
maxCtrl->Enable(false);
wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL);
maxLabel->SetLabel(wxT("Max &Features limit:"));
wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE);
pageBox->SetLabel(wxT("Monolithic WFS Request"));
wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING);
pagingCtrl->SetSelection(0);
pagingCtrl->Enable(false);
wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE);
tableCtrl->SetValue(wxT(""));
tableCtrl->Enable(false);
comboCtrl = (wxComboBox *) FindWindow(ID_WFS_PK);
comboCtrl->Clear();
comboCtrl->SetSelection(wxNOT_FOUND);
comboCtrl->Enable(false);
wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE);
rtreeCtrl->SetValue(false);
rtreeCtrl->Enable(false);
wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP);
swapCtrl->SetValue(false);
swapCtrl->Enable(false);
wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD);
load->Enable(false);
ResetProgress();
}
void WfsDialog::OnProxy(wxCommandEvent & WXUNUSED(event))
{
//
// enabling/disabling HTTP Proxy
//
wxTextCtrl *proxy = (wxTextCtrl *) FindWindow(ID_WFS_PROXY);
if (ProxyEnabled == false)
ProxyEnabled = true;
else
ProxyEnabled = false;
proxy->Enable(ProxyEnabled);
if (ProxyEnabled == false)
{
HttpProxy = wxT("");
proxy->SetValue(wxT(""));
}
// resetting the libxml2 "nano HTTP" before changing HTTP_PROXY
reset_wfs_http_connection();
}
void WfsDialog::OnQuit(wxCommandEvent & WXUNUSED(event))
{
//
// all done:
//
wxDialog::EndModal(wxID_CANCEL);
}
WfsKeywords::~WfsKeywords()
{
// destructor
WfsKey *key;
WfsKey *n_key;
if (SortedArray != NULL)
delete[]SortedArray;
key = First;
while (key != NULL)
{
n_key = key->GetNext();
delete key;
key = n_key;
}
}
void WfsKeywords::Add(const char *key)
{
// adding a new Keyword into the dictionary (if not already defined)
if (key == NULL)
return;
wxString keyword = wxString::FromUTF8(key);
WfsKey *pKey = First;
while (pKey != NULL)
{
if (keyword.CmpNoCase(pKey->GetKeyword()) == 0)
return;
pKey = pKey->GetNext();
}
// inserting a new Keyword
pKey = new WfsKey(keyword);
if (First == NULL)
First = pKey;
if (Last != NULL)
Last->SetNext(pKey);
Last = pKey;
}
void WfsKeywords::Sort()
{
// creating the sorted array of Keywords
int count = 0;
WfsKey *key;
WfsKey *key_prev;
bool ok = true;
if (SortedArray != NULL)
delete[]SortedArray;
SortedArray = NULL;
key = First;
while (key != NULL)
{
// counting how many Keywords are there
count++;
key = key->GetNext();
}
MaxSorted = count;
if (MaxSorted == 0)
return;
SortedArray = new WfsKey *[MaxSorted];
count = 0;
key = First;
while (key != NULL)
{
// inserting pointers into the Array
*(SortedArray + count++) = key;
key = key->GetNext();
}
while (ok)
{
// bubble sorting
ok = false;
for (count = 1; count < MaxSorted; count++)
{
key_prev = *(SortedArray + count - 1);
key = *(SortedArray + count);
if (key_prev->GetKeyword().CmpNoCase(key->GetKeyword()) > 0)
{
// swapping pointers
*(SortedArray + count) = key_prev;
*(SortedArray + count - 1) = key;
ok = true;
}
}
}
}
WfsKey *WfsKeywords::GetKey(int index)
{
// returning the Nth sorted Keyword
if (SortedArray == NULL)
return NULL;
if (index >= 0 && index < MaxSorted)
return *(SortedArray + index);
return NULL;
}
spatialite_gui-2.1.0-beta1/AuxCurl.h 0000664 0001750 0001750 00000002204 13711576502 014173 0000000 0000000 /*
/ AuxCurl.h
/ checking and notifying updated versions
/
/ version 2.1, 2018 August 1
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2018 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
extern char *GetUpdateVersion();
extern bool DoDownloadUpdatedPackage(const char *download_url,
unsigned char **data, int *data_len);
extern bool DoDownloadUpdatedPackage(const char *download_url,
unsigned char **data, int *data_len);
spatialite_gui-2.1.0-beta1/config.sub 0000775 0001750 0001750 00000103167 13711576502 014434 0000000 0000000 #! /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
# Free Software Foundation, Inc.
timestamp='2009-11-20'
# 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 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-* \
| 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
;;
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
;;
-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:
spatialite_gui-2.1.0-beta1/TextCsv.cpp 0000664 0001750 0001750 00000024103 13711576502 014545 0000000 0000000 /*
/ TextCsv.cpp
/ methods related to CSV/TXT loading
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include "Classdef.h"
#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp _stricmp
#endif
static void text_clean_integer(char *value)
{
// cleaning an integer value
char last;
char buffer[35536];
int len = strlen(value);
last = value[len - 1];
if (last == '-' || last == '+')
{
// trailing sign; transforming into a leading sign
*buffer = last;
strcpy(buffer + 1, value);
buffer[len - 1] = '\0';
strcpy(value, buffer);
}
}
static void text_clean_double(char *value)
{
// cleaning an integer value
char *p;
char last;
char buffer[35536];
int len = strlen(value);
last = value[len - 1];
if (last == '-' || last == '+')
{
// trailing sign; transforming into a leading sign
*buffer = last;
strcpy(buffer + 1, value);
buffer[len - 1] = '\0';
strcpy(value, buffer);
}
p = value;
while (*p != '\0')
{
// transforming COMMAs into POINTs
if (*p == ',')
*p = '.';
p++;
}
}
void
MyFrame::LoadText(wxString & path, wxString & table, wxString & charset,
bool first_titles, const char decimal_separator,
const char separator, const char text_separator)
{
//
// loading a CSV/TXT as a new DB table
//
gaiaTextReaderPtr text = NULL;
int seed;
int dup;
int idup;
char **col_name = NULL;
int i;
char *sql;
char *prevsql;
int len;
int ret;
int rows = 0;
char *errMsg = NULL;
bool sqlError = false;
char *xname;
char *xname2;
int current_row;
wxString msg;
char buf[4096];
char dummy[4096];
int type;
const char *value;
//
// performing some checks before starting
//
if (TableAlreadyExists(table) == true)
{
wxMessageBox(wxT("a table named '") + table + wxT("' already exists"),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
return;
}
text = gaiaTextReaderAlloc(path.ToUTF8(), separator,
text_separator, decimal_separator,
first_titles, charset.ToUTF8());
if (text)
{
if (gaiaTextReaderParse(text) == 0)
{
gaiaTextReaderDestroy(text);
text = NULL;
}
}
if (!text)
return;
::wxBeginBusyCursor();
//
// checking for duplicate / illegal column names and antialising them
//
col_name = (char **) malloc(sizeof(char *) * text->max_fields);
seed = 0;
for (i = 0; i < text->max_fields; i++)
{
xname = (char *) sqlite3_malloc(strlen(text->columns[i].name) + 1);
strcpy(xname, text->columns[i].name);
dup = 0;
for (idup = 0; idup < i; idup++)
{
if (strcasecmp(xname, *(col_name + idup)) == 0)
dup = 1;
}
if (strcasecmp(xname, "PK_UID") == 0)
dup = 1;
if (dup)
{
sqlite3_free(xname);
xname = sqlite3_mprintf("DUPCOL_%d", seed++);
}
len = strlen(xname);
*(col_name + i) = (char *) malloc(len + 1);
strcpy(*(col_name + i), xname);
sqlite3_free(xname);
}
//
// starting a transaction
//
ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, 0, &errMsg);
if (ret != SQLITE_OK)
{
wxMessageBox(wxT("load CSV/TXT error:") + wxString::FromUTF8(errMsg),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
sqlite3_free(errMsg);
sqlError = true;
goto clean_up;
}
//
// creating the Table
//
xname = (char *) malloc((table.Len() * 4) + 1);
strcpy(xname, table.ToUTF8());
xname2 = gaiaDoubleQuotedSql(xname);
free(xname);
sql = sqlite3_mprintf("CREATE TABLE \"%s\"", xname2);
free(xname2);
prevsql = sql;
sql =
sqlite3_mprintf("%s (\nPK_UID INTEGER PRIMARY KEY AUTOINCREMENT", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
for (i = 0; i < text->max_fields; i++)
{
sql = sqlite3_mprintf("%s,\n", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
xname = (char *) malloc(strlen(*(col_name + i)) + 1);
strcpy(xname, *(col_name + i));
xname2 = gaiaDoubleQuotedSql(xname);
free(xname);
sql = sqlite3_mprintf("%s\"%s\"", prevsql, xname2);
free(xname2);
sqlite3_free(prevsql);
prevsql = sql;
if (text->columns[i].type == VRTTXT_INTEGER)
sql = sqlite3_mprintf("%s INTEGER", prevsql);
else if (text->columns[i].type == VRTTXT_DOUBLE)
sql = sqlite3_mprintf("%s DOUBLE", prevsql);
else
sql = sqlite3_mprintf("%s TEXT", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
}
sql = sqlite3_mprintf("%s)", prevsql);
sqlite3_free(prevsql);
ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg);
sqlite3_free(sql);
if (ret != SQLITE_OK)
{
wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
sqlite3_free(errMsg);
sqlError = true;
goto clean_up;
}
current_row = 0;
while (current_row < text->num_rows)
{
//
// inserting rows from CSV/TXT
//
if (!gaiaTextReaderGetRow(text, current_row))
break;
xname = (char *) malloc((table.Len() * 4) + 1);
strcpy(xname, table.ToUTF8());
xname2 = gaiaDoubleQuotedSql(xname);
free(xname);
sql = sqlite3_mprintf("INSERT INTO \"%s\" (\nPK_UID", xname2);
free(xname2);
prevsql = sql;
for (i = 0; i < text->max_fields; i++)
{
// columns corresponding to some CSV/TXT column
sql = sqlite3_mprintf("%s,", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
xname = (char *) malloc(strlen(*(col_name + i)) + 1);
strcpy(xname, *(col_name + i));
xname2 = gaiaDoubleQuotedSql(xname);
free(xname);
sql = sqlite3_mprintf("%s\"%s\"", prevsql, xname2);
free(xname2);
sqlite3_free(prevsql);
prevsql = sql;
}
sql = sqlite3_mprintf("%s)\nVALUES (%d", prevsql, current_row);
sqlite3_free(prevsql);
prevsql = sql;
for (i = 0; i < text->max_fields; i++)
{
// column values
sql = sqlite3_mprintf("%s,", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
if (!gaiaTextReaderFetchField(text, i, &type, &value))
{
sql = sqlite3_mprintf("%sNULL", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
} else
{
if (type == VRTTXT_INTEGER)
{
strcpy(buf, value);
text_clean_integer(buf);
#if defined(_WIN32) || defined(__MINGW32__)
// CAVEAT - M$ runtime has non-standard functions for 64 bits
sprintf(dummy, "%I64d", _atoi64(buf));
#else
sprintf(dummy, "%lld", atoll(buf));
#endif
sql = sqlite3_mprintf("%s%s", prevsql, dummy);
} else if (type == VRTTXT_DOUBLE)
{
strcpy(buf, value);
text_clean_double(buf);
sprintf(dummy, "%1.6f", atof(buf));
sql = sqlite3_mprintf("%s%s", prevsql, dummy);
} else if (type == VRTTXT_TEXT)
{
sql = sqlite3_mprintf("%s%Q", prevsql, value);
free((void *) value);
} else
sql = sqlite3_mprintf("%sNULL", prevsql);
sqlite3_free(prevsql);
prevsql = sql;
}
}
sql = sqlite3_mprintf("%s)", prevsql);
sqlite3_free(prevsql);
ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg);
sqlite3_free(sql);
if (ret != SQLITE_OK)
{
wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
sqlite3_free(errMsg);
sqlError = true;
goto clean_up;
}
rows++;
current_row++;
}
clean_up:
if (col_name)
{
// releasing memory allocation for column names
for (i = 0; i < text->max_fields; i++)
free(*(col_name + i));
free(col_name);
}
gaiaTextReaderDestroy(text);
if (sqlError == true)
{
// some error occurred - ROLLBACK
ret = sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, 0, &errMsg);
if (ret != SQLITE_OK)
{
wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
sqlite3_free(errMsg);
}
::wxEndBusyCursor();
msg =
wxT("CSV/TXT not loaded\n\n\na ROLLBACK was automatically performed");
wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
} else
{
// ok - confirming pending transaction - COMMIT
ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, 0, &errMsg);
if (ret != SQLITE_OK)
{
wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
sqlite3_free(errMsg);
return;
}
::wxEndBusyCursor();
sprintf(dummy, "CSV/TXT loaded\n\n%d inserted rows", rows);
msg = wxString::FromUTF8(dummy);
wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this);
InitTableTree();
}
}
spatialite_gui-2.1.0-beta1/compile 0000775 0001750 0001750 00000016245 13711576502 014027 0000000 0000000 #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, 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.
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# 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:
spatialite_gui-2.1.0-beta1/AUTHORS 0000664 0001750 0001750 00000000106 13711576502 013506 0000000 0000000 Original Author:
Alessandro Furieri
Contributors:
spatialite_gui-2.1.0-beta1/QueryView.cpp 0000664 0001750 0001750 00000324325 13711576502 015116 0000000 0000000 /*
/ QueryView.cpp
/ a panel to set SQL queries
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include "Classdef.h"
#include "wx/clipbrd.h"
#include "wx/filename.h"
//
// ICONs in XPM format [universally portable]
//
#include "icons/sql_go.xpm"
#include "icons/filter.xpm"
#include "icons/sql_erase.xpm"
#include "icons/sql_abort.xpm"
#include "icons/sql_abort_no.xpm"
#include "icons/hs_back.xpm"
#include "icons/hs_back_no.xpm"
#include "icons/hs_forward.xpm"
#include "icons/hs_forward_no.xpm"
MyQueryView::MyQueryView(MyFrame * parent, wxWindowID id):
wxPanel(parent, id, wxDefaultPosition, wxSize(440, 120), wxBORDER_SUNKEN)
{
//
// constructor: a frame for SQL Queries
//
MainFrame = parent;
BracketStart = -1;
BracketEnd = -1;
IgnoreEvent = false;
MainFrame->DoResetSqlFilters();
// SQL statement
SqlCtrl =
new MySqlControl(this, ID_SQL, wxT(""), wxPoint(40, 5),
wxSize(20, 20),
wxTE_MULTILINE | wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB |
wxHSCROLL | wxTE_RICH);
BtnSqlGo =
new wxBitmapButton(this, ID_SQL_GO, wxBitmap(sql_go_xpm), wxPoint(340, 5),
wxSize(32, 32));
BtnSqlGo->SetToolTip(wxT("Execute SQL statement"));
BtnSqlFilter =
new wxBitmapButton(this, ID_SQL_FILTER, wxBitmap(filter_xpm),
wxPoint(340, 38), wxSize(32, 32));
BtnSqlFilter->SetToolTip(wxT("Apply/Remove SQL filters"));
BtnSqlFilter->Enable(false);
BtnSqlErase =
new wxBitmapButton(this, ID_SQL_ERASE, wxBitmap(sql_erase_xpm),
wxPoint(340, 70), wxSize(32, 32));
BtnSqlErase->SetToolTip(wxT("Clear SQL query"));
BtnSqlErase->Enable(true);
BtnSqlAbort =
new wxBitmapButton(this, ID_SQL_ABORT, wxBitmap(sql_abort_xpm),
wxPoint(340, 102), wxSize(32, 32));
BtnSqlAbort->SetBitmapDisabled(wxBitmap(sql_abort_no_xpm));
BtnSqlAbort->SetToolTip(wxT("Abort SQL query"));
BtnHistoryBack =
new wxBitmapButton(this, ID_HISTORY_BACK, wxBitmap(hs_back_xpm),
wxPoint(5, 5), wxSize(32, 32));
BtnHistoryBack->SetBitmapDisabled(wxBitmap(hs_back_no_xpm));
BtnHistoryBack->SetToolTip(wxT("History: previous SQL statement"));
BtnHistoryForward =
new wxBitmapButton(this, ID_HISTORY_FORWARD, wxBitmap(hs_forward_xpm),
wxPoint(5, 40), wxSize(32, 32));
BtnHistoryForward->SetBitmapDisabled(wxBitmap(hs_forward_no_xpm));
BtnHistoryForward->SetToolTip(wxT("History: next SQL statement"));
SetHistoryStates();
BtnSqlAbort->Enable(false);
// setting up Keyboard Shortcuts
wxAcceleratorEntry entries[3];
entries[0].Set(wxACCEL_NORMAL, WXK_F5, ID_SQL_GO);
entries[1].Set(wxACCEL_NORMAL, WXK_PAGEUP, ID_HISTORY_BACK);
entries[2].Set(wxACCEL_NORMAL, WXK_PAGEDOWN, ID_HISTORY_FORWARD);
wxAcceleratorTable accel(3, entries);
SetAcceleratorTable(accel);
// setting up event handlers
Connect(ID_SQL_GO, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnSqlGo);
Connect(ID_SQL_FILTER, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnSqlFilter);
Connect(ID_SQL_ERASE, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnSqlErase);
Connect(ID_SQL_ABORT, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnSqlAbort);
Connect(ID_HISTORY_BACK, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnHistoryBack);
Connect(ID_HISTORY_FORWARD, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & MyQueryView::OnHistoryForward);
Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & MyQueryView::OnSize);
Connect(wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) & MyQueryView::OnSqlSyntaxColor);
}
void MyQueryView::ShowControls()
{
//
// making all SQL controls to be visible
//
SqlCtrl->Show(true);
BtnSqlGo->Show(true);
BtnSqlFilter->Show(true);
BtnSqlErase->Show(true);
BtnSqlAbort->Show(true);
BtnHistoryBack->Show(true);
BtnHistoryForward->Show(true);
SetHistoryStates();
}
void MyQueryView::HideControls()
{
//
// making all controls to be invisible
//
SqlCtrl->Show(false);
BtnSqlGo->Show(false);
BtnSqlFilter->Show(false);
BtnSqlErase->Show(false);
BtnSqlAbort->Show(false);
BtnHistoryBack->Show(false);
BtnHistoryForward->Show(false);
}
void MyQueryView::AddToHistory(wxString & sql)
{
//
// adds an SQL statement to history
//
History.Add(sql);
SetHistoryStates();
}
void MyQueryView::SetHistoryStates()
{
//
// updates the history buttons state
//
BtnHistoryForward->Enable(History.TestNext());
BtnHistoryBack->Enable(History.TestPrev());
}
void MyQueryView::SetSql(wxString & sql, bool execute)
{
bool coverage = false;
wxString tile_data_table;
wxString tile_data_db_prefix;
SetSql(sql, execute, coverage, tile_data_db_prefix, tile_data_table, true);
}
void MyQueryView::SetSql(wxString & sql, bool execute, bool coverage,
wxString & tile_data_db_prefix,
wxString & tile_data_table, bool reset)
{
//
// sets an SQL statement [and maybe executes it]
//
int metaDataType = MainFrame->GetMetaDataType();
SqlCtrl->SetValue(sql);
if (execute == true)
{
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->InsertIntoLog(sql);
}
if (MainFrame->GetRsView()->ExecuteSqlPre(sql, 0, true, coverage,
tile_data_db_prefix,
tile_data_table,
reset) == false)
{
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg());
}
wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame);
} else
{
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->UpdateLog();
}
}
}
}
void MyQueryView::OnSize(wxSizeEvent & WXUNUSED(event))
{
//
// this window has changed its size
//
int vert;
int vertBack;
wxSize sz = GetClientSize();
// setting the SQL statement pane size
SqlCtrl->SetSize(sz.GetWidth() - 113, sz.GetHeight() - 10);
// setting the SQL GO button position
BtnSqlGo->Move(sz.GetWidth() - 35, 5);
// setting the SQL GO button size
vert = sz.GetHeight() - 10;
if (vert < 32)
vert = 32;
BtnSqlGo->SetSize(32, vert);
vert = (sz.GetHeight() - 18) / 3;
// setting the SQL FILTER button position
BtnSqlFilter->Move(sz.GetWidth() - 70, 5);
// setting the SQL FILTER button size
BtnSqlFilter->SetSize(32, vert);
// setting the SQL ERASE button position
BtnSqlErase->Move(sz.GetWidth() - 70, 10 + vert);
// setting the SQL ERASE button size
BtnSqlErase->SetSize(32, vert);
// setting the SQL ABORT button position
BtnSqlAbort->Move(sz.GetWidth() - 70, 15 + (vert * 2));
// setting the SQL ABORT button size
BtnSqlAbort->SetSize(32, vert);
// setting the HISTORY BACK button position
BtnHistoryBack->Move(5, 5);
// setting the HISTORY BACK button size
vert = (sz.GetHeight() - 15) / 2;
if (vert < 32)
vert = 32;
BtnHistoryBack->SetSize(32, vert);
vertBack = 10 + vert;
// setting the HISTORY FORWARD button position
BtnHistoryForward->Move(5, vertBack);
// setting the HISTORY FORWARD button size
BtnHistoryForward->SetSize(32, vert);
}
void MyQueryView::OnSqlGo(wxCommandEvent & WXUNUSED(event))
{
//
// executing an SQL statement
//
wxString tile_data_db_prefix;
wxString tile_data_name;
int metaDataType = MainFrame->GetMetaDataType();
wxString sql = SqlCtrl->GetValue();
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->InsertIntoLog(sql);
}
if (MainFrame->GetRsView()->
ExecuteSqlPre(sql, 0, true, false, tile_data_db_prefix, tile_data_name,
true) == false)
{
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg());
}
wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame);
} else
{
if (metaDataType == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->UpdateLog();
}
}
MainFrame->GetQueryView()->DisableFilterButton();
MainFrame->DoResetSqlFilters();
}
void MyQueryView::OnSqlFilter(wxCommandEvent & WXUNUSED(event))
{
//
// managing SQL filters
//
MainFrame->SqlFiltersComposer();
}
void MyQueryView::OnSqlErase(wxCommandEvent & WXUNUSED(event))
{
//
// cleaning the current SQL query
//
wxString empty;
MainFrame->GetRsView()->ResetEmpty();
SqlCtrl->Clear();
}
void MyQueryView::OnSqlAbort(wxCommandEvent & WXUNUSED(event))
{
//
// aborting the current SQL query
//
MainFrame->GetRsView()->AbortRequested();
if (MainFrame->GetMetaDataType() == METADATA_CURRENT)
{
// current metadata style >= v.4.0.0
MainFrame->UpdateAbortedLog();
}
}
void MyQueryView::OnHistoryBack(wxCommandEvent & WXUNUSED(event))
{
//
// going backward into the SQL Queries History
//
MySqlQuery *sql = History.GetPrev();
if (sql)
{
MainFrame->GetRsView()->ResetEmpty();
SetSql(sql->GetSql(), false);
SetHistoryStates();
}
}
void MyQueryView::OnHistoryForward(wxCommandEvent & WXUNUSED(event))
{
//
// going forward into the SQL Queries History
//
MySqlQuery *sql = History.GetNext();
if (sql)
{
MainFrame->GetRsView()->ResetEmpty();
SetSql(sql->GetSql(), false);
SetHistoryStates();
}
}
bool MyQueryView::IsSqlString(wxString & str)
{
// checks if this one is an SQL string constant
char *word = new char[str.Len() * 4];
strcpy(word, str.ToUTF8());
int len = strlen(word);
if (len < 2)
goto no;
if (word[0] == '\'' && word[len - 1] == '\'')
goto yes;
if (word[0] == '"' && word[len - 1] == '"')
goto yes;
no:
delete[]word;
return false;
yes:
delete[]word;
return true;
}
bool MyQueryView::IsSqlNumber(wxString & str)
{
// checks if this one is an SQL numeric constant
double dbl;
return str.ToDouble(&dbl);
}
bool MyQueryView::IsSqliteExtra(wxString & str)
{
// checks if this one is an extra SQLite keyword
if (str.CmpNoCase(wxT("add")) == 0)
return true;
if (str.CmpNoCase(wxT("asc")) == 0)
return true;
if (str.CmpNoCase(wxT("attach")) == 0)
return true;
if (str.CmpNoCase(wxT("column")) == 0)
return true;
if (str.CmpNoCase(wxT("database")) == 0)
return true;
if (str.CmpNoCase(wxT("detach")) == 0)
return true;
if (str.CmpNoCase(wxT("desc")) == 0)
return true;
if (str.CmpNoCase(wxT("null")) == 0)
return true;
if (str.CmpNoCase(wxT("trigger")) == 0)
return true;
if (str.CmpNoCase(wxT("for")) == 0)
return true;
if (str.CmpNoCase(wxT("each")) == 0)
return true;
if (str.CmpNoCase(wxT("row")) == 0)
return true;
if (str.CmpNoCase(wxT("begin")) == 0)
return true;
if (str.CmpNoCase(wxT("end")) == 0)
return true;
if (str.CmpNoCase(wxT("before")) == 0)
return true;
if (str.CmpNoCase(wxT("after")) == 0)
return true;
if (str.CmpNoCase(wxT("rename")) == 0)
return true;
if (str.CmpNoCase(wxT("virtual")) == 0)
return true;
if (str.CmpNoCase(wxT("with")) == 0)
return true;
if (str.CmpNoCase(wxT("recursive")) == 0)
return true;
if (str.CmpNoCase(wxT("vacuum")) == 0)
return true;
if (str.CmpNoCase(wxT("analize")) == 0)
return true;
return false;
}
bool MyQueryView::IsSqlFunction(wxString & str, char next_c)
{
// checks if this one is an SQL function
if (next_c != '(')
return false;
if (str.CmpNoCase(wxT("raise")) == 0)
return true;
if (str.CmpNoCase(wxT("avg")) == 0)
return true;
if (str.CmpNoCase(wxT("count")) == 0)
return true;
if (str.CmpNoCase(wxT("group_concat")) == 0)
return true;
if (str.CmpNoCase(wxT("max")) == 0)
return true;
if (str.CmpNoCase(wxT("min")) == 0)
return true;
if (str.CmpNoCase(wxT("sum")) == 0)
return true;
if (str.CmpNoCase(wxT("total")) == 0)
return true;
if (str.CmpNoCase(wxT("abs")) == 0)
return true;
if (str.CmpNoCase(wxT("changes")) == 0)
return true;
if (str.CmpNoCase(wxT("char")) == 0)
return true;
if (str.CmpNoCase(wxT("coalesce")) == 0)
return true;
if (str.CmpNoCase(wxT("glob")) == 0)
return true;
if (str.CmpNoCase(wxT("ifnull")) == 0)
return true;
if (str.CmpNoCase(wxT("instr")) == 0)
return true;
if (str.CmpNoCase(wxT("hex")) == 0)
return true;
if (str.CmpNoCase(wxT("last_insert_rowid")) == 0)
return true;
if (str.CmpNoCase(wxT("length")) == 0)
return true;
if (str.CmpNoCase(wxT("load_extension")) == 0)
return true;
if (str.CmpNoCase(wxT("lower")) == 0)
return true;
if (str.CmpNoCase(wxT("ltrim")) == 0)
return true;
if (str.CmpNoCase(wxT("nullif")) == 0)
return true;
if (str.CmpNoCase(wxT("quote")) == 0)
return true;
if (str.CmpNoCase(wxT("random")) == 0)
return true;
if (str.CmpNoCase(wxT("randomblob")) == 0)
return true;
if (str.CmpNoCase(wxT("replace")) == 0)
return true;
if (str.CmpNoCase(wxT("round")) == 0)
return true;
if (str.CmpNoCase(wxT("rtrim")) == 0)
return true;
if (str.CmpNoCase(wxT("soundex")) == 0)
return true;
if (str.CmpNoCase(wxT("sqlite_version")) == 0)
return true;
if (str.CmpNoCase(wxT("substr")) == 0)
return true;
if (str.CmpNoCase(wxT("trim")) == 0)
return true;
if (str.CmpNoCase(wxT("typeof")) == 0)
return true;
if (str.CmpNoCase(wxT("unicode")) == 0)
return true;
if (str.CmpNoCase(wxT("upper")) == 0)
return true;
if (str.CmpNoCase(wxT("zeroblob")) == 0)
return true;
return false;
}
bool MyQueryView::IsSqlGeoFunction(wxString & str, char next_c)
{
// checks if this one is an SQL geo-function
if (next_c != '(')
return false;
if (str.CmpNoCase(wxT("spatialite_version")) == 0)
return true;
if (str.CmpNoCase(wxT("spatialite_target_cpu")) == 0)
return true;
if (str.CmpNoCase(wxT("check_strict_sql_quoting")) == 0)
return true;
if (str.CmpNoCase(wxT("freexl_version")) == 0)
return true;
if (str.CmpNoCase(wxT("geos_version")) == 0)
return true;
if (str.CmpNoCase(wxT("proj4_version")) == 0)
return true;
if (str.CmpNoCase(wxT("proj_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rttopo_version")) == 0)
return true;
if (str.CmpNoCase(wxT("libxml2_version")) == 0)
return true;
if (str.CmpNoCase(wxT("hasIconv")) == 0)
return true;
if (str.CmpNoCase(wxT("hasMathSql")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeoCallbacks")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeos")) == 0)
return true;
if (str.CmpNoCase(wxT("hasProj")) == 0)
return true;
if (str.CmpNoCase(wxT("hasProj6")) == 0)
return true;
if (str.CmpNoCase(wxT("hasProjGeodesic")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeosAdvanced")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeosTrunk")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeosReentrant")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeosOnlyReentrant")) == 0)
return true;
if (str.CmpNoCase(wxT("hasMiniZip")) == 0)
return true;
if (str.CmpNoCase(wxT("hasRtTopo")) == 0)
return true;
if (str.CmpNoCase(wxT("hasEpsg")) == 0)
return true;
if (str.CmpNoCase(wxT("hasFreeXL")) == 0)
return true;
if (str.CmpNoCase(wxT("hasLibXML2")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGeoPackage")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGGP")) == 0)
return true;
if (str.CmpNoCase(wxT("hasGroundControlPoints")) == 0)
return true;
if (str.CmpNoCase(wxT("hasTopology")) == 0)
return true;
if (str.CmpNoCase(wxT("hasKNN")) == 0)
return true;
if (str.CmpNoCase(wxT("hasRouting")) == 0)
return true;
if (str.CmpNoCase(wxT("EnableGpkgAmphibiousMode")) == 0)
return true;
if (str.CmpNoCase(wxT("DisableGpkgAmphibiousMode")) == 0)
return true;
if (str.CmpNoCase(wxT("GetGpkgAmphibiousMode")) == 0)
return true;
if (str.CmpNoCase(wxT("EnableGpkgMode")) == 0)
return true;
if (str.CmpNoCase(wxT("DisableGpkgMode")) == 0)
return true;
if (str.CmpNoCase(wxT("GetGpkgMode")) == 0)
return true;
if (str.CmpNoCase(wxT("EnableTinyPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("DisableTInyPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("IsTinyPointEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("SetDecimalPrecision")) == 0)
return true;
if (str.CmpNoCase(wxT("GetDecimalPrecision")) == 0)
return true;
if (str.CmpNoCase(wxT("GetVirtualShapeExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("GetVirtualGeoJsonExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("GetVirtualTableExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_Reset")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_SetEndCapStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_GetEndCapStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_SetJoinStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_GetJoinStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_SetMitreLimit")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_GetMitreLimit")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_SetQuadrantSegments")) == 0)
return true;
if (str.CmpNoCase(wxT("BufferOptions_GetQuadrantSegments")) == 0)
return true;
if (str.CmpNoCase(wxT("IsLowASCII")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_CreateTables")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_RegisterGetCapabilities")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_UnRegisterGetCapabilities")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_SetGetCapabilitiesInfos")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_RegisterGetMap")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_UnRegisterGetMap")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_SetGetMapInfos")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_SetGetMapCopyright")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_SetGetMapOptions")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_RegisterSetting")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_UnRegisterSetting")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_DefaultSetting")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_RegisterRefSys")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_UnRegisterRefSys")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_DefaultRefSys")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_GetMapRequestURL")) == 0)
return true;
if (str.CmpNoCase(wxT("WMS_GetFeatureInfoRequestURL")) == 0)
return true;
if (str.CmpNoCase(wxT("RegisterDataLicense")) == 0)
return true;
if (str.CmpNoCase(wxT("UnRegisterDataLicense")) == 0)
return true;
if (str.CmpNoCase(wxT("RenameDataLicense")) == 0)
return true;
if (str.CmpNoCase(wxT("SetDataLicenseUrl")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryConstraints")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckSpatialMetaData")) == 0)
return true;
if (str.CmpNoCase(wxT("AutoFDOStart")) == 0)
return true;
if (str.CmpNoCase(wxT("AutoFDOStop")) == 0)
return true;
if (str.CmpNoCase(wxT("InitFDOSpatialMetaData")) == 0)
return true;
if (str.CmpNoCase(wxT("AddFDOGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("RecoverFDOGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("DiscardFDOGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("GetDbObjectScope")) == 0)
return true;
if (str.CmpNoCase(wxT("EnablePause")) == 0)
return true;
if (str.CmpNoCase(wxT("DisablePause")) == 0)
return true;
if (str.CmpNoCase(wxT("IsPauseEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("Pause")) == 0)
return true;
if (str.CmpNoCase(wxT("InitSpatialMetaData")) == 0)
return true;
if (str.CmpNoCase(wxT("InitSpatialMetaDataFull")) == 0)
return true;
if (str.CmpNoCase(wxT("AddGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("RecoverGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("DiscardGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("AddTemporaryGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("RegisterVirtualGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("DropVirtualGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("InvalidateLayerStatistics")) == 0)
return true;
if (str.CmpNoCase(wxT("UpdateLayerStatistics")) == 0)
return true;
if (str.CmpNoCase(wxT("GetLayerExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateSpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateTemporarySpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateMbrCache")) == 0)
return true;
if (str.CmpNoCase(wxT("DisableSpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("RebuildGeometryTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("UpgradeGeometryTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckSpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("RecoverSpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("GetSpatialIndexExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckShadowedRowid")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckWithoutRowid")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateMetaCatalogTables")) == 0)
return true;
if (str.CmpNoCase(wxT("UpdateMetaCatalogStatistics")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateStylingTables")) == 0)
return true;
if (str.CmpNoCase(wxT("ReCreateStylingTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVectorCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterSpatialViewCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVirtualShapeCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVirtualGeoJsonCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVirtualTableCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterTopoGeoCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterTopoNetCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_SetVectorCoverageCopyright")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_SetVectorCoverageInfos")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVectorCoverageSrid")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverageSrid")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVectorCoverageKeyword")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverageKeyword")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UpdateVectorCoverageExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_AutoRegisterStandardBrushes")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterExternalGraphic")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterExternalGraphic")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVectorStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterVectorStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_ReloadVectorStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterVectorStyledLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterVectorStyledLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterRasterStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterRasterStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_ReloadRasterStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterRasterStyledLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterRasterStyledLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterRasterCoverageSrid")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterRasterCoverageSrid")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_RegisterRasterCoverageKeyword")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UnregisterRasterCoverageKeyword")) == 0)
return true;
if (str.CmpNoCase(wxT("SE_UpdateRasterCoverageExtent")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_RegisterMapConfiguration")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_UnregisterMapConfiguration")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_ReloadMapConfiguration")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateIsoMetadataTables")) == 0)
return true;
if (str.CmpNoCase(wxT("GetIsoMetadataId")) == 0)
return true;
if (str.CmpNoCase(wxT("RegisterIsoMetadata")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_LoadXML")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_StoreXML")) == 0)
return true;
if (str.CmpNoCase(wxT("CountUnsafeTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("IsInteger")) == 0)
return true;
if (str.CmpNoCase(wxT("IsDecimalNumber")) == 0)
return true;
if (str.CmpNoCase(wxT("IsNumber")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToInteger")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToDouble")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToText")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("ForceAsNull")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateUUID")) == 0)
return true;
if (str.CmpNoCase(wxT("MD5Checksum")) == 0)
return true;
if (str.CmpNoCase(wxT("MD5TotalChecksum")) == 0)
return true;
if (str.CmpNoCase(wxT("EncodeURL")) == 0)
return true;
if (str.CmpNoCase(wxT("DecodeURL")) == 0)
return true;
if (str.CmpNoCase(wxT("DirNameFromPath")) == 0)
return true;
if (str.CmpNoCase(wxT("FullFileNameFromPath")) == 0)
return true;
if (str.CmpNoCase(wxT("FileNameFromPath")) == 0)
return true;
if (str.CmpNoCase(wxT("FileExtFromPath")) == 0)
return true;
if (str.CmpNoCase(wxT("RemoveExtraSpaces")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeStringList")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Create")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateTranslate")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateScale")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateRotate")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateXRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateYRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_CreateZRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Translate")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Scale")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Rotate")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_XRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_YRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_ZRoll")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Multiply")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Transform")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_AsText")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Determinant")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_IsInvertible")) == 0)
return true;
if (str.CmpNoCase(wxT("ATM_Invert")) == 0)
return true;
if (str.CmpNoCase(wxT("GCP_Compute")) == 0)
return true;
if (str.CmpNoCase(wxT("GCP_Transform")) == 0)
return true;
if (str.CmpNoCase(wxT("GCP_IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("GCP_AsText")) == 0)
return true;
if (str.CmpNoCase(wxT("GCP2ATM")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Cutter")) == 0)
return true;
if (str.CmpNoCase(wxT("GetCutterMessage")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateRasterCoveragesTable")) == 0)
return true;
if (str.CmpNoCase(wxT("ReCreateRasterCoveragesTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateVectorCoveragesTables")) == 0)
return true;
if (str.CmpNoCase(wxT("ReCreateVectorCoveragesTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("CloneTable")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateClonedTable")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckDuplicateRows")) == 0)
return true;
if (str.CmpNoCase(wxT("RemoveDuplicateRows")) == 0)
return true;
if (str.CmpNoCase(wxT("ElementaryGeometries")) == 0)
return true;
if (str.CmpNoCase(wxT("DropGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("DropTable")) == 0)
return true;
if (str.CmpNoCase(wxT("RenameTable")) == 0)
return true;
if (str.CmpNoCase(wxT("RenameColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportZipSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("Zipfile_NumSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("Zipfile_ShpN")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportDBF")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportZipDBF")) == 0)
return true;
if (str.CmpNoCase(wxT("Zipfile_NumDBF")) == 0)
return true;
if (str.CmpNoCase(wxT("Zipfile_DbfN")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportDBF")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportKML")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportGeoJSON")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportGeoJSON2")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportGeoJSON")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportXLS")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportWFS")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportDXF")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportDXFfromDir")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_GetLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_SetLogfile")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_GetLogfile")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_FromFile")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_FromText")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_NumVariables")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_VariableN")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_AllVariables")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_RawSQL")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_VarValue")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_IsValidVarValue")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_CookedSQL")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_Execute")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_ExecuteLoop")) == 0)
return true;
if (str.CmpNoCase(wxT("SqlProc_Return")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_CreateTables")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_Register")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_Get")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_Delete")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_UpdateTitle")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_UpdateSqlBody")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_Execute")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_ExecuteLoop")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredProc_Return")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_Register")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_Get")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_GetValue")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_Delete")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_UpdateTitle")) == 0)
return true;
if (str.CmpNoCase(wxT("StoredVar_UpdateValue")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateMissingSystemTables")) == 0)
return true;
if (str.CmpNoCase(wxT("PostgreSql_ResetLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("PostgreSql_SetLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("PostgreSql_GetLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateRoutingNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateRouting")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateRouting_GetLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("sequence_nextval")) == 0)
return true;
if (str.CmpNoCase(wxT("sequence_currval")) == 0)
return true;
if (str.CmpNoCase(wxT("sequence_lastval")) == 0)
return true;
if (str.CmpNoCase(wxT("sequence_setval")) == 0)
return true;
if (str.CmpNoCase(wxT("InsertEpsgSrid")) == 0)
return true;
if (str.CmpNoCase(wxT("Abs")) == 0)
return true;
if (str.CmpNoCase(wxT("Acos")) == 0)
return true;
if (str.CmpNoCase(wxT("Asin")) == 0)
return true;
if (str.CmpNoCase(wxT("Atan")) == 0)
return true;
if (str.CmpNoCase(wxT("Atan2")) == 0)
return true;
if (str.CmpNoCase(wxT("Ceil")) == 0)
return true;
if (str.CmpNoCase(wxT("Ceiling")) == 0)
return true;
if (str.CmpNoCase(wxT("Cos")) == 0)
return true;
if (str.CmpNoCase(wxT("Cot")) == 0)
return true;
if (str.CmpNoCase(wxT("Degrees")) == 0)
return true;
if (str.CmpNoCase(wxT("Exp")) == 0)
return true;
if (str.CmpNoCase(wxT("Floor")) == 0)
return true;
if (str.CmpNoCase(wxT("Ln")) == 0)
return true;
if (str.CmpNoCase(wxT("Log")) == 0)
return true;
if (str.CmpNoCase(wxT("Log2")) == 0)
return true;
if (str.CmpNoCase(wxT("Log10")) == 0)
return true;
if (str.CmpNoCase(wxT("PI")) == 0)
return true;
if (str.CmpNoCase(wxT("Pow")) == 0)
return true;
if (str.CmpNoCase(wxT("Power")) == 0)
return true;
if (str.CmpNoCase(wxT("Radians")) == 0)
return true;
if (str.CmpNoCase(wxT("Round")) == 0)
return true;
if (str.CmpNoCase(wxT("Sign")) == 0)
return true;
if (str.CmpNoCase(wxT("Sin")) == 0)
return true;
if (str.CmpNoCase(wxT("Sqrt")) == 0)
return true;
if (str.CmpNoCase(wxT("Stddev_pop")) == 0)
return true;
if (str.CmpNoCase(wxT("Stddev_samp")) == 0)
return true;
if (str.CmpNoCase(wxT("Var_pop")) == 0)
return true;
if (str.CmpNoCase(wxT("Var_samp")) == 0)
return true;
if (str.CmpNoCase(wxT("Tan")) == 0)
return true;
if (str.CmpNoCase(wxT("IsGeometryBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsCompressedGeometryBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsTinyPointBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsZipBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsPdfBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsGifBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsPngBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsTiffBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsWaveletBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsJpegBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsJp2Blob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsExifBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsExifGpsBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("IsWebpBlob")) == 0)
return true;
if (str.CmpNoCase(wxT("GetMimeType")) == 0)
return true;
if (str.CmpNoCase(wxT("BlobFromFile")) == 0)
return true;
if (str.CmpNoCase(wxT("BlobToFile")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportDXF")) == 0)
return true;
if (str.CmpNoCase(wxT("TinyPointEncode")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryPointEncode")) == 0)
return true;
if (str.CmpNoCase(wxT("MakePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Point")) == 0)
return true;
if (str.CmpNoCase(wxT("MakePointZ")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointZ")) == 0)
return true;
if (str.CmpNoCase(wxT("MakePointM")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointM")) == 0)
return true;
if (str.CmpNoCase(wxT("MakePointZM")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointZM")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeLine")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeCircle")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeEllipse")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeArc")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeEllipticArc")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeCircularSector")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeCircularStripe")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeEllipticSector")) == 0)
return true;
if (str.CmpNoCase(wxT("BuildMbr")) == 0)
return true;
if (str.CmpNoCase(wxT("BuildCircleMbr")) == 0)
return true;
if (str.CmpNoCase(wxT("Extent")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrMinX")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrMinY")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrMaxX")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrMaxY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MbrMinX")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MbrMinY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MbrMaxX")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MbrMaxY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MinX")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MinY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MaxX")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MaxY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MinZ")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MinM")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MaxZ")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MaxM")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeomFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_WKTToSQL")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeometryFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("PointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("LineFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("LineStringFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineStringFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("PolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("PolygonFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PolygonFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MPointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MPointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiPointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiPointFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MLineFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MLineFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiLineStringFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiLineStringFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiPolygonFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiPolygonFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomCollFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeomCollFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryCollectionFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("BdPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_BdPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("BdMPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_BdMPolyFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryCollectionFromText")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeomFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_WKBToSQL")) == 0)
return true;
if (str.CmpNoCase(wxT("PointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("LineFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("LineStringFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineStringFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("PolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("PolygonFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PolygonFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MPointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MPointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiPointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiPointFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MLineFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MLineFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiLineStringFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiLineStringFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("MultiPolygonFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MultiPolygonFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomCollFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeomCollFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryCollectionFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeometryCollectionFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("BdPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_BdPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("BdMPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_BdMPolyFromWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("AsText")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AsText")) == 0)
return true;
if (str.CmpNoCase(wxT("AsWKT")) == 0)
return true;
if (str.CmpNoCase(wxT("AsSVG")) == 0)
return true;
if (str.CmpNoCase(wxT("AsKML")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromKML")) == 0)
return true;
if (str.CmpNoCase(wxT("AsGML")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromGML")) == 0)
return true;
if (str.CmpNoCase(wxT("AsGeoJSON")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromGeoJSON")) == 0)
return true;
if (str.CmpNoCase(wxT("AsFGF")) == 0)
return true;
if (str.CmpNoCase(wxT("AsBinary")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AsBinary")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromFGF")) == 0)
return true;
if (str.CmpNoCase(wxT("AsEWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromEWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("AsTWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromTWKB")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AsEncodedPolyline")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineFromEncodedPolyline")) == 0)
return true;
if (str.CmpNoCase(wxT("AsEWKT")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromEWKT")) == 0)
return true;
if (str.CmpNoCase(wxT("CompressGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("UncompressGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("SanitizeGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("EnsureClosedRings")) == 0)
return true;
if (str.CmpNoCase(wxT("RemoveRepeatedPoints")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToLinestring")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToPolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToMultiPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToMultiLinestring")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToMultiPolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToGeometryCollection")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToMulti")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Multi")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToSingle")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToXY")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToXYZ")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToXYM")) == 0)
return true;
if (str.CmpNoCase(wxT("CastToXYZM")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Reverse")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ForceLHR")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ForcePolygonCW")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ForcePolygonCCW")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsPolygonCW")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsPolygonCCW")) == 0)
return true;
if (str.CmpNoCase(wxT("Dimension")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Dimension")) == 0)
return true;
if (str.CmpNoCase(wxT("CoordDimension")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NDims")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Is3D")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsMeasured")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryType")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryAliasType")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeometryType")) == 0)
return true;
if (str.CmpNoCase(wxT("SRID")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SRID")) == 0)
return true;
if (str.CmpNoCase(wxT("SetSRID")) == 0)
return true;
if (str.CmpNoCase(wxT("ToGARS")) == 0)
return true;
if (str.CmpNoCase(wxT("GARSMbr")) == 0)
return true;
if (str.CmpNoCase(wxT("IsEmpty")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsEmpty")) == 0)
return true;
if (str.CmpNoCase(wxT("IsSimple")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsSimple")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidReason")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsValidReason")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidDetail")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsValidDetail")) == 0)
return true;
if (str.CmpNoCase(wxT("Boundary")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Boundary")) == 0)
return true;
if (str.CmpNoCase(wxT("Envelope")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Envelope")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Expand")) == 0)
return true;
if (str.CmpNoCase(wxT("X")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_X")) == 0)
return true;
if (str.CmpNoCase(wxT("Y")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Y")) == 0)
return true;
if (str.CmpNoCase(wxT("Z")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Z")) == 0)
return true;
if (str.CmpNoCase(wxT("M")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_M")) == 0)
return true;
if (str.CmpNoCase(wxT("StartPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_StartPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("EndPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_EndPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("GLength")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Length")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_3dLength")) == 0)
return true;
if (str.CmpNoCase(wxT("Perimeter")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Perimeter")) == 0)
return true;
if (str.CmpNoCase(wxT("LinestringMinSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LinestringMinSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("LinestringMaxSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LinestringMaxSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("LinestringAvgSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LinestringAvgSegmentLength")) == 0)
return true;
if (str.CmpNoCase(wxT("IsClosed")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsClosed")) == 0)
return true;
if (str.CmpNoCase(wxT("IsRing")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsRing")) == 0)
return true;
if (str.CmpNoCase(wxT("Simplify")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Simplify")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Generalize")) == 0)
return true;
if (str.CmpNoCase(wxT("SimplifyPreserveTopology")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SimplifyPreserveTopology")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicLength")) == 0)
return true;
if (str.CmpNoCase(wxT("GreatCircleLength")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicArcLength")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicChordLength")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicCentralAngle")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicArcArea")) == 0)
return true;
if (str.CmpNoCase(wxT("GeodesicArcHeigth")) == 0)
return true;
if (str.CmpNoCase(wxT("NumPoints")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NumPoints")) == 0)
return true;
if (str.CmpNoCase(wxT("PointN")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointN")) == 0)
return true;
if (str.CmpNoCase(wxT("Centroid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Centroid")) == 0)
return true;
if (str.CmpNoCase(wxT("PointOnSurface")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_PointOnSurface")) == 0)
return true;
if (str.CmpNoCase(wxT("Area")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Area")) == 0)
return true;
if (str.CmpNoCase(wxT("Circularity")) == 0)
return true;
if (str.CmpNoCase(wxT("ExteriorRing")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ExteriorRing")) == 0)
return true;
if (str.CmpNoCase(wxT("NumInteriorRing")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NumInteriorRing")) == 0)
return true;
if (str.CmpNoCase(wxT("NumInteriorRings")) == 0)
return true;
if (str.CmpNoCase(wxT("InteriorRingN")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_InteriorRingN")) == 0)
return true;
if (str.CmpNoCase(wxT("NumGeometries")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NumGeometries")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NPoints")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NRings")) == 0)
return true;
if (str.CmpNoCase(wxT("GeometryN")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeometryN")) == 0)
return true;
if (str.CmpNoCase(wxT("AddPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("RemovePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemovePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("SetPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SetPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("SetStartPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SetStartPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("SetEndPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SetEndPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrEqual")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrDisjoint")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrTouches")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrWithin")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrOverlaps")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrIntersects")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_EnvIntersects")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_EnvelopesIntersects")) == 0)
return true;
if (str.CmpNoCase(wxT("MbrContains")) == 0)
return true;
if (str.CmpNoCase(wxT("Equals")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Equals")) == 0)
return true;
if (str.CmpNoCase(wxT("Disjoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Disjoint")) == 0)
return true;
if (str.CmpNoCase(wxT("Touches")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Touches")) == 0)
return true;
if (str.CmpNoCase(wxT("Within")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Within")) == 0)
return true;
if (str.CmpNoCase(wxT("Overlaps")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Overlaps")) == 0)
return true;
if (str.CmpNoCase(wxT("Crosses")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Crosses")) == 0)
return true;
if (str.CmpNoCase(wxT("Intersects")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Intersects")) == 0)
return true;
if (str.CmpNoCase(wxT("Contains")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Contains")) == 0)
return true;
if (str.CmpNoCase(wxT("Covers")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Covers")) == 0)
return true;
if (str.CmpNoCase(wxT("CoveredBy")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_CoveredBy")) == 0)
return true;
if (str.CmpNoCase(wxT("OffsetCurve")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_OffsetCurve")) == 0)
return true;
if (str.CmpNoCase(wxT("SingleSidedBuffer")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SingleSidedBuffer")) == 0)
return true;
if (str.CmpNoCase(wxT("SharedPaths")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SharedPaths")) == 0)
return true;
if (str.CmpNoCase(wxT("Relate")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Relate")) == 0)
return true;
if (str.CmpNoCase(wxT("RelateMatch")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RelateMatch")) == 0)
return true;
if (str.CmpNoCase(wxT("Distance")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Distance")) == 0)
return true;
if (str.CmpNoCase(wxT("HausdorffDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_HausdorffDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("FrechetDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_FrechetDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("PtDistWithin")) == 0)
return true;
if (str.CmpNoCase(wxT("Intersection")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Intersection")) == 0)
return true;
if (str.CmpNoCase(wxT("Difference")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Difference")) == 0)
return true;
if (str.CmpNoCase(wxT("GUnion")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Union")) == 0)
return true;
if (str.CmpNoCase(wxT("SymDifference")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SymDifference")) == 0)
return true;
if (str.CmpNoCase(wxT("Buffer")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Buffer")) == 0)
return true;
if (str.CmpNoCase(wxT("ConvexHull")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ConvexHull")) == 0)
return true;
if (str.CmpNoCase(wxT("Transform")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Transform")) == 0)
return true;
if (str.CmpNoCase(wxT("TransformXY")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_TransformXY")) == 0)
return true;
if (str.CmpNoCase(wxT("TransformXYZ")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_TransformXYZ")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Shift_Longitude")) == 0)
return true;
if (str.CmpNoCase(wxT("NormalizeLonLat")) == 0)
return true;
if (str.CmpNoCase(wxT("Line_Interpolate_Point")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Line_Interpolate_Point")) == 0)
return true;
if (str.CmpNoCase(wxT("Line_Interpolate_Equidistant_Points")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Line_Interpolate_Equidistant_Points")) == 0)
return true;
if (str.CmpNoCase(wxT("Line_Locate_Point")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Line_Locate_Point")) == 0)
return true;
if (str.CmpNoCase(wxT("Line_Substring")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Line_Substring")) == 0)
return true;
if (str.CmpNoCase(wxT("ClosestPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ClosestPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ShortestLine")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ShortestLine")) == 0)
return true;
if (str.CmpNoCase(wxT("Snap")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Snap")) == 0)
return true;
if (str.CmpNoCase(wxT("Collect")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Collect")) == 0)
return true;
if (str.CmpNoCase(wxT("LineMerge")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LineMerge")) == 0)
return true;
if (str.CmpNoCase(wxT("BuildArea")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_BuildArea")) == 0)
return true;
if (str.CmpNoCase(wxT("Polygonize")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Polygonize")) == 0)
return true;
if (str.CmpNoCase(wxT("UnaryUnion")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_UnaryUnion")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DrapeLine")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DrapeLineExceptions")) == 0)
return true;
if (str.CmpNoCase(wxT("DissolveSegments")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DissolveSegments")) == 0)
return true;
if (str.CmpNoCase(wxT("DissolvePoints")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DissolvePoints")) == 0)
return true;
if (str.CmpNoCase(wxT("LinesFromRings")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LinesFromRings")) == 0)
return true;
if (str.CmpNoCase(wxT("RingsCutAtNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RingsCutAtNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("LinesCutAtNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LinesCutAtNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("CollectionExtract")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_CollectionExtract")) == 0)
return true;
if (str.CmpNoCase(wxT("ExtractMultiPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ExtractMultiLinestring")) == 0)
return true;
if (str.CmpNoCase(wxT("ExtractMultiPolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddMeasure")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_InterpolatePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Locate_Along_Measure")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LocateAlong")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Locate_Between_Measures")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LocateBetween")) == 0)
return true;
if (str.CmpNoCase(wxT("CurvosityIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_CurvosityIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("UpHillHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_UpHillHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("DownHillHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DownHillHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("UpDownHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_UpDownHeight")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_IsValidTrajectory")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_TrajectoryInterpolatePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("SquareGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SquareGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("TriangularGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_TriangularGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("HexagonalGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_HexagonalGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("DelaunayTriangulation")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_DelaunayTriangulation")) == 0)
return true;
if (str.CmpNoCase(wxT("VoronojDiagram")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_VoronojDiagram")) == 0)
return true;
if (str.CmpNoCase(wxT("ConcaveHull")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ConcaveHull")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeValid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MakeValid")) == 0)
return true;
if (str.CmpNoCase(wxT("MakeValidDiscarded")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MakeValidDiscarded")) == 0)
return true;
if (str.CmpNoCase(wxT("Segmentize")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Segmentize")) == 0)
return true;
if (str.CmpNoCase(wxT("SnapAndSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SnapAndSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("Split")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Split")) == 0)
return true;
if (str.CmpNoCase(wxT("SplitLeft")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SplitLeft")) == 0)
return true;
if (str.CmpNoCase(wxT("SplitRight")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SplitRight")) == 0)
return true;
if (str.CmpNoCase(wxT("Azimuth")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Azimuth")) == 0)
return true;
if (str.CmpNoCase(wxT("Project")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Project")) == 0)
return true;
if (str.CmpNoCase(wxT("GeoHash")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GeoHash")) == 0)
return true;
if (str.CmpNoCase(wxT("AsX3D")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AsX3D")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_3DDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_3DMaxDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("MaxDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MaxDistance")) == 0)
return true;
if (str.CmpNoCase(wxT("SnapToGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SnapToGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Node")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Subdivide")) == 0)
return true;
if (str.CmpNoCase(wxT("SelfIntersections")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SelfIntersections")) == 0)
return true;
if (str.CmpNoCase(wxT("SridFromAuthCRS")) == 0)
return true;
if (str.CmpNoCase(wxT("SridIsGeographic")) == 0)
return true;
if (str.CmpNoCase(wxT("SridIsProjected")) == 0)
return true;
if (str.CmpNoCase(wxT("SridHasFlippedAxes")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetSpheroid")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetEllipsoid")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetPrimeMeridian")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetDatum")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetUnit")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetProjection")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetAxis_1_Name")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetAxis_1_Orientation")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetAxis_2_Name")) == 0)
return true;
if (str.CmpNoCase(wxT("SridGetAxis_2_Orientation")) == 0)
return true;
if (str.CmpNoCase(wxT("ShiftCoords")) == 0)
return true;
if (str.CmpNoCase(wxT("ShiftCoordinates")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_Translate")) == 0)
return true;
if (str.CmpNoCase(wxT("ScaleCoords")) == 0)
return true;
if (str.CmpNoCase(wxT("ScaleCoordinates")) == 0)
return true;
if (str.CmpNoCase(wxT("RotateCoords")) == 0)
return true;
if (str.CmpNoCase(wxT("RotateCoordinates")) == 0)
return true;
if (str.CmpNoCase(wxT("ReflectCoords")) == 0)
return true;
if (str.CmpNoCase(wxT("ReflectCoordinates")) == 0)
return true;
if (str.CmpNoCase(wxT("SwapCoords")) == 0)
return true;
if (str.CmpNoCase(wxT("SwapCoordinates")) == 0)
return true;
if (str.CmpNoCase(wxT("FilterMbrWithin")) == 0)
return true;
if (str.CmpNoCase(wxT("FilterMbrContains")) == 0)
return true;
if (str.CmpNoCase(wxT("FilterMbrIntersects")) == 0)
return true;
if (str.CmpNoCase(wxT("BuildMbrFilter")) == 0)
return true;
if (str.CmpNoCase(wxT("RTreeWithin")) == 0)
return true;
if (str.CmpNoCase(wxT("RTreeContains")) == 0)
return true;
if (str.CmpNoCase(wxT("RTreeIntersects")) == 0)
return true;
if (str.CmpNoCase(wxT("RTreeDistWithin")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_Create")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetPayload")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetDocument")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsValid")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_SchemaValidate")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsCompressed")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsIsoMetadata")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsSldSeVectorStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsSldSeRasterStyle")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsSvg")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsGpx")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsMapConfig")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_Compress")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_Uncompress")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsSchemaValidated")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetSchemaURI")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetInternalSchemaURI")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetFileId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_SetFileId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_AddFileId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetParentId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_SetParentId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_AddParentId")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetName")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetTitle")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetAbstract")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetDocumentSize")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetEncoding")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_MLineFromGPX")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetLastParseError")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_IsValidXPathExpression")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetLastValidateError")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_GetLastXPathError")) == 0)
return true;
if (str.CmpNoCase(wxT("XB_CacheFlush")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_GetDatabasePath")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_SetDatabasePath")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_AsProjString")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_AsWKT")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_GuessSridFromWKT")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_GuessSridFromSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_GuessSridFromZipSHP")) == 0)
return true;
if (str.CmpNoCase(wxT("PROJ_GetLastErrorMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("GEOS_GetLastWarningMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("GEOS_GetLastErrorMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("GEOS_GetLastAuxErrorMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("GEOS_GetCriticalPointFromMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("RTTOPO_GetLastWarningMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("RTTOPO_GetLastErrorMsg")) == 0)
return true;
if (str.CmpNoCase(wxT("MakePolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MakePolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("LongLatToDMS")) == 0)
return true;
if (str.CmpNoCase(wxT("LongitudeFromDMS")) == 0)
return true;
if (str.CmpNoCase(wxT("LatitudeFromDMS")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateTopoTables")) == 0)
return true;
if (str.CmpNoCase(wxT("ReCreateTopoTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateTopology")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_InitTopoGeo")) == 0)
return true;
if (str.CmpNoCase(wxT("DropTopology")) == 0)
return true;
if (str.CmpNoCase(wxT("GetLastTopologyException")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddIsoNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MoveIsoNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemIsoNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddIsoEdge")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemIsoEdge")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ModEdgeSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NewEdgesSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ModEdgeHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NewEdgeHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddEdgeModFace")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddEdgeNewFaces")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemEdgeModFace")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemEdgeNewFace")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ChangeEdgeGeom")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GetFaceGeometry")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_GetFaceEdges")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ValidateTopoGeo")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_CreateTopoGeo")) == 0)
return true;
if (str.CmpNoCase(wxT("GetNodeByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("GetEdgeByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("GetFaceByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_AddPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_AddLineString")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_AddLineStringNoFace")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_AddPolygon")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_TopoSnap")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_SnappedGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_SubdivideLines")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_FromGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_FromGeoTableNoFace")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_FromGeoTableExt")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_FromGeoTableNoFaceExt")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_Polygonize")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_RemoveSmallFaces")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_RemoveDanglingEdges")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_RemoveDanglingNodes")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_NewEdgeHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_ModEdgeHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_NewEdgesSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_ModEdgesSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_Clone")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_GetEdgeSeed")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_GetFaceSeed")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_DisambiguateSegmentEdges")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_UpdateSeeds")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_SnapPointToSeed")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_SnapLineToSeed")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_ToGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_ToGeoTableGeneralize")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_CreateTopoLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_InitTopoLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_RemoveTopoLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_ExportTopoLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_InsertFeatureFromTopoLayer")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_PolyFacesList")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoGeo_LineEdgesList")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateNetwork")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_InitTopoNet")) == 0)
return true;
if (str.CmpNoCase(wxT("DropNetwork")) == 0)
return true;
if (str.CmpNoCase(wxT("GetLastNetworkException")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddIsoNetNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_MoveIsoNetNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemIsoNetNode")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_AddLink")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ChangeLinkGeom")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_RemoveLink")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NewLogLinkSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ModLogLinkSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NewGeoLinkSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ModGeoLinkSplit")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_NewLinkHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ModLinkHeal")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_LogiNetFromTGeo")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SpatNetFromTGeo")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_SpatNetFromGeom")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ValidLogicalNet")) == 0)
return true;
if (str.CmpNoCase(wxT("ST_ValidSpatialNet")) == 0)
return true;
if (str.CmpNoCase(wxT("GetNetNodeByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("GetLinkByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_FromGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_Clone")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_GetLinkSeed")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_DisambiguateSegmentLinks")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_UpdateSeeds")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_ToGeoTable")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_ToGeoTableGeneralize")) == 0)
return true;
if (str.CmpNoCase(wxT("TopoNet_LineLinksList")) == 0)
return true;
return false;
}
bool MyQueryView::IsSqlRasterFunction(wxString & str, char next_c)
{
// checks if this one is an SQL raster-function
if (next_c != '(')
return false;
if (str.CmpNoCase(wxT("rl2_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_target_cpu")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_none")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_deflate")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_deflate_no")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_jpeg")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_png")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_fax4")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_lzma")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_lzma_no")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_lz4")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_lz4_no")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_zstd")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_zstd_no")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_webp")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_ll_webp")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_jp2")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_has_codec_ll_jp2")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_cairo_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_curl_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_zlib_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_lzma_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_lz4_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_zstd_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_png_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_jpeg_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_tiff_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_geotiff_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_webp_version")) == 0)
return true;
if (str.CmpNoCase(wxT("rl2_openJpeg_version")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetMaxThreads")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetMaxThreads")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsAntiLabelCollisionEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_EnableAntiLabelCollision")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DisableAntiLabelCollision")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsPolygonLabelsMultilineEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_EnablePolygonLabelsMultiline")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DisablePolygonLabelsMultiline")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsPolygonLabelsAutorotateEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_EnablePolygonLabelsAutorotate")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DisablePolygonLabelsAutorotate")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsValidPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("IsPixelNone")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsPixelNone")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidRasterPalette")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsValidRasterPalette")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidRasterStatistics")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsValidRasterStatistics")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidRasterTile")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsValidRasterTile")) == 0)
return true;
if (str.CmpNoCase(wxT("CreateCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_CreateRasterCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("CopyRasterCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_CopyRasterCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("DeleteSection")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DeleteSection")) == 0)
return true;
if (str.CmpNoCase(wxT("DropRasterCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DropRasterCoverage")) == 0)
return true;
if (str.CmpNoCase(wxT("SetRasterCoverageInfos")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetRasterCoverageInfos")) == 0)
return true;
if (str.CmpNoCase(wxT("SetRasterCoverageCopyright")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetRasterCoverageCopyright")) == 0)
return true;
if (str.CmpNoCase(wxT("SetRasterCoverageDefaultBands")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetRasterCoverageDefaultBands")) == 0)
return true;
if (str.CmpNoCase(wxT("EnableRasterCoverageAutoNDVI")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_EnableRasterCoverageAutoNDVI")) == 0)
return true;
if (str.CmpNoCase(wxT("IsRasterCoverageAutoNdviEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsRasterCoverageAutoNdviEnabled")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPaletteNumEntries")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPaletteNumEntries")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPaletteColorEntry")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPaletteColorEntry")) == 0)
return true;
if (str.CmpNoCase(wxT("SetPaletteColorEntry")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetPaletteColorEntry")) == 0)
return true;
if (str.CmpNoCase(wxT("PaletteEquals")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PaletteEquals")) == 0)
return true;
if (str.CmpNoCase(wxT("CreatePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_CreatePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("CreatePixelNone")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_CreatePixelNone")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPixelType")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPixelType")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPixelSampleType")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPixelSampleType")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPixelNumBands")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPixelNumBands")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPixelValue")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPixelValue")) == 0)
return true;
if (str.CmpNoCase(wxT("SetPixelValue")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetPixelValue")) == 0)
return true;
if (str.CmpNoCase(wxT("IsTransparentPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsTransparentPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("IsOpaquePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsOpaquePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("SetTransparentPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetTransparentPixel")) == 0)
return true;
if (str.CmpNoCase(wxT("SetOpaquePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_SetOpaquePixel")) == 0)
return true;
if (str.CmpNoCase(wxT("PixelEquals")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PixelEquals")) == 0)
return true;
if (str.CmpNoCase(wxT("GetRasterStatistics_NoDataPixelsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_NoDataPixelsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("GetRasterStatistics_ValidPixelsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_ValidPixelsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("GetRasterStatistics_SampleType")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_SampleType")) == 0)
return true;
if (str.CmpNoCase(wxT("GetRasterStatistics_BandsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_BandsCount")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_Min")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Min")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_Max")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Max")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_Avg")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Avg")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_Var")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Var")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_StdDev")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_StdDev")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandStatistics_Histogram")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Histogram")) == 0)
return true;
if (str.CmpNoCase(wxT("GetBandHistogramFromImage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetBandHistogramFromImage")) == 0)
return true;
if (str.CmpNoCase(wxT("Pyramidize")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_Pyramidize")) == 0)
return true;
if (str.CmpNoCase(wxT("DePyramidize")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DePyramidize")) == 0)
return true;
if (str.CmpNoCase(wxT("GetPixelFromRasterByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetPixelFromRasterByPoint")) == 0)
return true;
if (str.CmpNoCase(wxT("GetMapImageFromRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetMapImageFromRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("GetStyledMapImageFromRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetStyledMapImageFromRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("GetMapImageFromVector")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetMapImageFromVector")) == 0)
return true;
if (str.CmpNoCase(wxT("GetStyledMapImageFromVector")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetStyledMapImageFromVector")) == 0)
return true;
if (str.CmpNoCase(wxT("GetMapImageFromWMS")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetMapImageFromWMS")) == 0)
return true;
if (str.CmpNoCase(wxT("InitializeMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_InitializeMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("FinalizeMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_FinalizeMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("PaintRasterOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PaintRasterOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("PaintStyledRasterOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PaintStyledRasterOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("PaintVectorOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PaintVectorOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("PaintStyledVectorOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_PaintStyledVectorOnMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("GetImageFromMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetImageFromMapCanvas")) == 0)
return true;
if (str.CmpNoCase(wxT("GetTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("GetTripleBandTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetTripleBandTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("GetMonoBandTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetMonoBandTileImage")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_ExportRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportSectionRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_ExportSectionRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("ImportSectionRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_ImportSectionRawPixels")) == 0)
return true;
if (str.CmpNoCase(wxT("GetDrapingLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetDrapingLastError")) == 0)
return true;
if (str.CmpNoCase(wxT("DrapeGeometries")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_DrapeGeometries")) == 0)
return true;
if (str.CmpNoCase(wxT("LoadFontFromFile")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_LoadFontFromFile")) == 0)
return true;
if (str.CmpNoCase(wxT("ExportFontToFile")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_ExportFontToFile")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidFont")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsValidFont")) == 0)
return true;
if (str.CmpNoCase(wxT("GetFontFamily")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetFontFamily")) == 0)
return true;
if (str.CmpNoCase(wxT("GetFontFacename")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_GetFontFacename")) == 0)
return true;
if (str.CmpNoCase(wxT("IsFontBold")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsFontBold")) == 0)
return true;
if (str.CmpNoCase(wxT("IsFontItalic")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_IsFontItalic")) == 0)
return true;
if (str.CmpNoCase(wxT("LoadRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_LoadRaster")) == 0)
return true;
if (str.CmpNoCase(wxT("LoadRastersFromDir")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_LoadRastersFromDir")) == 0)
return true;
if (str.CmpNoCase(wxT("LoadRasterFromWMS")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_LoadRasterFromWMS")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteJpegJgw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteJpegJgw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteJpeg")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteJpeg")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionJpegJgw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionJpegJgw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionJpeg")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionJpeg")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteTripleBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteTripleBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteMonoBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteMonoBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteTripleBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteTripleBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteMonoBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteMonoBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteTripleBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteTripleBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteMonoBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteMonoBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionTripleBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionMonoBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandGeoTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionTripleBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionMonoBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandTiffTfw")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionTripleBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionMonoBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandTiff")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteNdviAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteNdviAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("WriteSectionNdviAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("RL2_WriteSectionNdviAsciiGrid")) == 0)
return true;
if (str.CmpNoCase(wxT("AutoGPKGStart")) == 0)
return true;
if (str.CmpNoCase(wxT("AutoGPKGStop")) == 0)
return true;
if (str.CmpNoCase(wxT("CheckGeoPackageMetaData")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgCreateBaseTables")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgInsertEpsgSRID")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgCreateTilesTable")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgCreateTilesZoomLevel")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgAddTileTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgGetNormalZoom")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgGetNormalRow")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgGetImageType")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgAddGeometryColumn")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgAddGeometryTriggers")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgAddSpatialIndex")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgMakePoint")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgMakePointZ")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgMakePointM")) == 0)
return true;
if (str.CmpNoCase(wxT("gpkgMakePointZM")) == 0)
return true;
if (str.CmpNoCase(wxT("AsGPB")) == 0)
return true;
if (str.CmpNoCase(wxT("GeomFromGPB")) == 0)
return true;
if (str.CmpNoCase(wxT("IsValidGPB")) == 0)
return true;
if (str.CmpNoCase(wxT("GPKG_IsAssignable")) == 0)
return true;
if (str.CmpNoCase(wxT("CastAutomagic")) == 0)
return true;
return false;
}
void MyQueryView::DoSqlSyntaxColor()
{
//
// evidencing a nice colored SQL syntax
//
IgnoreEvent = true;
SqlCtrl->Hide();
wxTextAttr normal_style(wxColour(128, 128, 128), wxColour(255, 255, 255),
wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL));
wxTextAttr sql_style(wxColour(0, 0, 255), wxColour(255, 255, 255),
wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_BOLD));
wxTextAttr const_style(wxColour(255, 0, 255), wxColour(255, 255, 255),
wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL));
wxTextAttr fnct_style(wxColour(192, 128, 0), wxColour(255, 255, 255),
wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_BOLD));
wxTextAttr bracket_style(wxColour(255, 0, 0), wxColour(192, 192, 192),
wxFont(12, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_BOLD));
wxString sql = SqlCtrl->GetValue();
// setting the base style
SqlCtrl->SetStyle(0, sql.Len(), normal_style);
wxString right = sql;
int from;
int to = 0;
int i;
char c;
char next_c;
SqlTokenizer tokenizer(sql);
while (tokenizer.HasMoreTokens())
{
wxString token = tokenizer.GetNextToken();
from = to + right.Find(token);
to = from + token.Len();
// extracting the unparsed portion of the SQL string
right = sql.Mid(to);
next_c = '\0';
for (i = 0; i < (int) right.Len(); i++)
{
c = right.GetChar(i);
if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
continue;
next_c = c;
break;
}
char *word = new char[token.Len() * 4];
strcpy(word, token.ToUTF8());
if (gaiaIsReservedSqliteName(word))
{
// setting the SQL keyword style
SqlCtrl->SetStyle(from, to, sql_style);
} else if (IsSqliteExtra(token))
{
// setting the SQL keyword style
SqlCtrl->SetStyle(from, to, sql_style);
} else if (IsSqlString(token) == true)
{
// setting the SQL string constant style
SqlCtrl->SetStyle(from, to, const_style);
} else if (IsSqlNumber(token) == true)
{
// setting the SQL numeric constant style
SqlCtrl->SetStyle(from, to, const_style);
} else if (IsSqlFunction(token, next_c) == true)
{
// setting the SQL function style
SqlCtrl->SetStyle(from, to, fnct_style);
} else if (IsSqlGeoFunction(token, next_c) == true)
{
// setting the SQL geo-function style
SqlCtrl->SetStyle(from, to, fnct_style);
} else if (IsSqlRasterFunction(token, next_c) == true)
{
// setting the SQL raster-function style
SqlCtrl->SetStyle(from, to, fnct_style);
}
delete[]word;
}
if (BracketStart >= 0)
{
// evidencing an opening bracket
SqlCtrl->SetStyle(BracketStart, BracketStart + 1, bracket_style);
}
if (BracketEnd >= 0)
{
// evidencing a closing bracket
SqlCtrl->SetStyle(BracketEnd, BracketEnd + 1, bracket_style);
}
SqlCtrl->Show();
SqlCtrl->SetFocus();
IgnoreEvent = false;
}
void MyQueryView::OnSqlSyntaxColor(wxCommandEvent & event)
{
//
// EVENT: updating the SQL syntax
//
if (IgnoreEvent == true)
{
// processing is still in progress; ignoring any internally generated call
return;
}
event.Skip();
EventBrackets();
}
void MyQueryView::EvidBrackets(int on, int off)
{
// evidencing corresponding brackets [open/close]
BracketStart = -1;
BracketEnd = -1;
if (on >= 0)
BracketStart = on;
if (off >= 0)
BracketEnd = off;
DoSqlSyntaxColor();
}
void MyQueryView::EventBrackets()
{
//
// evidencing brackets [balancing open-close pairs]
//
if (IgnoreEvent == true)
{
// processing is still in progress; ignoring any internally generated call
return;
}
int pos = SqlCtrl->GetInsertionPoint();
int on;
int off;
wxString sql = SqlCtrl->GetValue();
char pre = '\0';
char post = '\0';
if (pos > 0)
pre = sql.GetChar(pos - 1);
if (pos < (int) sql.Len())
post = sql.GetChar(pos);
if (post == '(')
{
// positioned before an opening bracket
if (CheckBrackets(pos, false, &on, &off) == true)
EvidBrackets(on, off);
else
EvidBrackets(pos, -1);
return;
}
if (pre == ')')
{
// positioned after a closing bracket
if (CheckBrackets(pos - 1, true, &on, &off) == true)
EvidBrackets(on, off);
else
EvidBrackets(-1, pos - 1);
return;
}
EvidBrackets(-1, -1);
}
bool MyQueryView::CheckBrackets(int pos, bool reverse_direction, int *on,
int *off)
{
// trying to balance a brackets pair [opening/closing]
int i;
int len;
int level = 0;
char c;
int single_quoted = 0;
int double_quoted = 0;
wxString sql = SqlCtrl->GetValue();
if (reverse_direction == true)
{
// going backward from CLOSE to OPEN
for (i = pos - 1; i >= 0; i--)
{
c = sql.GetChar(i);
if (c == '\'' && !double_quoted)
{
// single quoting start-stop
if (single_quoted)
single_quoted = 0;
else
single_quoted = 1;
}
if (c == '"' && !single_quoted)
{
// double quoting start-stop
if (double_quoted)
double_quoted = 0;
else
double_quoted = 1;
}
if (single_quoted || double_quoted)
continue;
if (c == ')')
level++;
if (c == '(')
{
if (level == 0)
{
*on = i;
*off = pos;
return true;
}
level--;
}
}
} else
{
// going forward from OPEN to CLOSE
len = sql.Len();
for (i = pos + 1; i < len; i++)
{
c = sql.GetChar(i);
if (c == '\'' && !double_quoted)
{
// single quoting start-stop
if (single_quoted)
single_quoted = 0;
else
single_quoted = 1;
}
if (c == '"' && !single_quoted)
{
// double quoting start-stop
if (double_quoted)
double_quoted = 0;
else
double_quoted = 1;
}
if (single_quoted || double_quoted)
continue;
if (c == '(')
level++;
if (c == ')')
{
if (level == 0)
{
*on = pos;
*off = i;
return true;
}
level--;
}
}
}
return false;
}
MySqlControl::MySqlControl(MyQueryView * parent, wxWindowID id,
const wxString & value, const wxPoint & pos,
const wxSize & size, long style):wxTextCtrl(parent,
id,
value,
pos,
size,
style)
{
//
// constructor: SQL text control
//
Parent = parent;
Connect(wxID_ANY, wxEVT_LEFT_DOWN,
(wxObjectEventFunction) & MySqlControl::OnSqlMousePosition);
Connect(wxID_ANY, wxEVT_KEY_UP,
(wxObjectEventFunction) & MySqlControl::OnSqlArrowPosition);
}
void MySqlControl::OnSqlMousePosition(wxMouseEvent & event)
{
//
// intercepting mouse clicks
//
if (Parent->IsIgnoreEvent() == true)
return;
event.Skip();
Parent->EventBrackets();
}
void MySqlControl::OnSqlArrowPosition(wxKeyEvent & event)
{
//
// intercepting arrow keys
//
if (Parent->IsIgnoreEvent() == true)
return;
event.Skip();
int key_code = event.GetKeyCode();
switch (key_code)
{
case WXK_DELETE:
case WXK_HOME:
case WXK_LEFT:
case WXK_UP:
case WXK_RIGHT:
case WXK_DOWN:
case WXK_PAGEUP:
case WXK_PAGEDOWN:
case WXK_NUMPAD_DELETE:
case WXK_NUMPAD_HOME:
case WXK_NUMPAD_LEFT:
case WXK_NUMPAD_UP:
case WXK_NUMPAD_RIGHT:
case WXK_NUMPAD_DOWN:
case WXK_NUMPAD_PAGEUP:
case WXK_NUMPAD_PAGEDOWN:
Parent->EventBrackets();
break;
default:
break;
};
}
SqlTokenizer::SqlTokenizer(wxString & sql)
{
// breaking tokens from an SQL expression
Block = 1024;
Max = Block;
int i;
char c;
int single_quoted = 0;
int double_quoted = 0;
int white_space = 0;
int start = -1;
int len;
// initial allocation for the token list
TokenList = new wxString *[Max];
for (i = 0; i < Max; i++)
TokenList[i] = NULL;
Index = 0;
for (i = 0; i < (int) sql.Len(); i++)
{
// scanning the SQL statement
c = sql.GetChar(i);
if (c == '\'' && !double_quoted)
{
if (single_quoted)
{
single_quoted = 0;
len = i - start;
len++;
wxString *token = new wxString(sql.Mid(start, len));
Insert(token);
start = -1;
} else
{
single_quoted = 1;
start = i;
}
continue;
}
if (c == '"' && !single_quoted)
{
if (double_quoted)
{
double_quoted = 0;
len = i - start;
len++;
wxString *token = new wxString(sql.Mid(start, len));
Insert(token);
start = -1;
} else
{
double_quoted = 1;
start = i;
}
continue;
}
if (single_quoted || double_quoted)
continue;
if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '('
|| c == ')' || c == ';' || c == ',')
{
if (white_space)
continue;
if (start >= 0)
{
// ok, we have a valid SQL token
len = i - start;
wxString *token = new wxString(sql.Mid(start, len));
Insert(token);
}
start = -1;
white_space = 1;
continue;
}
white_space = 0;
if (start < 0)
start = i;
}
if (start >= 0)
{
// fetching the last token
i = sql.Len();
len = i - start;
wxString *token = new wxString(sql.Mid(start, len));
Insert(token);
}
Index = 0;
}
SqlTokenizer::~SqlTokenizer()
{
// destructor
wxString *token;
Index = 0;
while (1)
{
token = TokenList[Index];
if (token == NULL)
break;
delete token;
Index++;
}
delete[]TokenList;
}
void SqlTokenizer::Expand()
{
// expanding the token list
int newSize = Max + Block;
int i;
wxString **newList = new wxString *[newSize];
for (i = 0; i < newSize; i++)
newList[i] = NULL;
for (i = 0; i < Max; i++)
newList[i] = TokenList[i];
delete[]TokenList;
TokenList = newList;
Max = newSize;
}
void SqlTokenizer::Insert(wxString * token)
{
// inserting a new token
if (Index == (Max - 1))
Expand();
TokenList[Index++] = token;
}
bool SqlTokenizer::HasMoreTokens()
{
wxString *token = TokenList[Index];
if (token == NULL)
return false;
return true;
}
wxString & SqlTokenizer::GetNextToken()
{
// return the next token
wxString *token = TokenList[Index];
Index++;
CurrentToken = *token;
return CurrentToken;
}
spatialite_gui-2.1.0-beta1/Makefile.am 0000664 0001750 0001750 00000002204 13711576502 014473 0000000 0000000 ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = spatialite_gui
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
@PG_CFLAGS@ @LIBCURL_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)
spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \
Dialogs.cpp DialogsGraph.cpp WmsDialog.cpp Exif.cpp \
Main.cpp MalformedGeoms.cpp \
Objects.cpp QueryView.cpp QueryViewComposer.cpp \
ResultSetView.cpp Shapefiles.cpp TableTree.cpp \
TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \
RasterSymbolizers.cpp VectorSymbolizers1.cpp \
VectorSymbolizers2.cpp SqlFiltersComposer.cpp \
MapPanel.cpp MapView.cpp LayerTree.cpp \
QuickStylesVector.cpp QuickStylesTopology.cpp \
QuickStylesRaster.cpp HtmlHelp.cpp Postgres.cpp \
AuxCurl.h AuxCurl.cpp PrinterPlotter.cpp \
MapConfig.cpp ExportXLSX.cpp
LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \
@LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ \
@LIBVIRTUALPG_LIBS@ @LIBXML2_LIBS@ \
@LIBCURL_LIBS@ @PG_LDFLAGS@ @PG_LIB@ -lgeos_c -lz
EXTRA_DIST = Makefile-static-mingw32 \
Makefile-static-mingw64 \
helpgen/helpgen.c \
helpgen/READ_ME.txt \
indent_me
AUTOMAKE_OPTIONS = dist-zip foreign
SUBDIRS = icons win_resource mac_resource gnome_resource
spatialite_gui-2.1.0-beta1/Classdef.h 0000664 0001750 0001750 00001550507 13711576502 014353 0000000 0000000 /*
/ Classdef.h
/ class definitions for spatialite_gui - a SQLite /SpatiaLite GUI tool
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include "wx/wx.h"
#include "wx/aui/aui.h"
#include "wx/treectrl.h"
#include "wx/grid.h"
#include "wx/listctrl.h"
#include "wx/textctrl.h"
#include "wx/propdlg.h"
#include "wx/generic/propdlg.h"
#include "wx/timer.h"
#include "wx/string.h"
#include "wx/dynlib.h"
#include "config.h"
#ifdef SPATIALITE_AMALGAMATION
#include
#else
#include
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "rasterlite2/rl2graphics.h"
#include "rasterlite2/rl2mapconfig.h"
#include "AuxCurl.h"
//
// functions for threaded queries
//
int SqlProgressCallback(void *arg);
#if defined(__WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteSqlThread(void *arg);
#else
void *DoExecuteSqlThread(void *arg);
#endif
//
// functions for threaded WFS download
//
void WfsCallback(int rows, void *ptr);
#if defined(__WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteWfs(void *arg);
#else
void *DoExecuteWfs(void *arg);
#endif
//
// functions for threaded Raster Import
//
#if defined(__WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteRasterLoad(void *arg);
#else
void *DoExecuteRasterLoad(void *arg);
#endif
//
// functions for threaded Raster Style Import
//
#if defined(__WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteRasterStylesLoad(void *arg);
#else
void *DoExecuteRasterStylesLoad(void *arg);
#endif
//
// functions for threaded Vector Style Import
//
#if defined(__WIN32) && !defined(__MINGW32__)
DWORD WINAPI DoExecuteVectorStylesLoad(void *arg);
#else
void *DoExecuteVectorStylesLoad(void *arg);
#endif
// constants for UOM
#define GUI_UOM_PIXEL 0xa0
#define GUI_UOM_METRE 0xb0
#define GUI_UOM_INCH 0xc0
// constants for Preview Background
#define GUI_PREVIEW_BACKGROUND_CHECKERED 0xfa
#define GUI_PREVIEW_BACKGROUND_WHITE 0xfb
#define GUI_PREVIEW_BACKGROUND_BLACK 0xfc
enum
{
// control IDs for main window and tree list control
ID_Connect = 1,
ID_Connect_RO,
ID_CreateNew,
ID_Disconnect,
ID_MemoryDbLoad,
ID_MemoryDbNew,
ID_MemoryDbClock,
ID_MemoryDbSave,
ID_Vacuum,
ID_MapPanel,
ID_SqlScript,
ID_QueryViewComposer,
ID_LoadShp,
ID_LoadGeoJSON,
ID_LoadTxt,
ID_LoadDbf,
ID_LoadXL,
ID_VirtualShp,
ID_VirtualGeoJSON,
ID_VirtualTxt,
ID_VirtualDbf,
ID_VirtualXL,
ID_Network,
ID_Exif,
ID_GpsPics,
ID_LoadXml,
ID_Srids,
ID_Charset,
ID_Help,
ID_Attach,
ID_Postgres,
ID_SqlLog,
ID_DbStatus,
ID_CheckGeom,
ID_SaneGeom,
ID_WFS,
ID_DXF,
ID_LoadMapConfig,
ID_AddLayer,
ID_SqlLayer,
ID_Identify,
ID_ZoomIn,
ID_ZoomOut,
ID_Pan,
ID_MapImage,
ID_Printer,
ID_PROJ_LIB,
Tree_NewTable,
Tree_NewView,
Tree_NewIndex,
Tree_NewTrigger,
Tree_NewColumn,
Tree_NewRasterStyle,
Tree_ReloadRasterStyle,
Tree_UnregisterRasterStyle,
Tree_NewVectorStyle,
Tree_ReloadVectorStyle,
Tree_UnregisterVectorStyle,
Tree_NewMapConfig,
Tree_ReloadMapConfig,
Tree_UnregisterMapConfig,
Tree_VerifyExternalMapConfig,
Tree_VerifyRegisteredMapConfig,
Tree_QueryViewComposer,
Tree_Show,
Tree_Drop,
Tree_Rename,
Tree_Select,
Tree_SelectTiles,
Tree_Refresh,
Tree_RefreshDeferred,
Tree_SpatialIndex,
Tree_CheckSpatialIndex,
Tree_RecoverSpatialIndex,
Tree_MbrCache,
Tree_RebuildTriggers,
Tree_ShowSql,
Tree_Recover,
Tree_CheckGeometry,
Tree_Extent,
Tree_UpdateLayerStatistics,
Tree_UpdateLayerStatisticsAll,
Tree_ElementaryGeoms,
Tree_MalformedGeometries,
Tree_RepairPolygons,
Tree_SetSrid,
Tree_DumpShp,
Tree_DumpGeoJSON,
Tree_DumpKml,
Tree_DumpTxtTab,
Tree_DumpCsv,
Tree_DumpHtml,
Tree_DumpDif,
Tree_DumpSylk,
Tree_DumpDbf,
Tree_DumpXlsx,
Tree_DumpPostGIS,
Tree_Edit,
Tree_DropColumn,
Tree_RenameColumn,
Tree_ColumnStats,
Tree_MapPreview,
Tree_CreateVectorCoverage,
Tree_CreateTopologyCoverage,
Tree_CreateNetworkCoverage,
Tree_CheckDuplicates,
Tree_RemoveDuplicates,
Tree_Detach,
Tree_CheckGeom,
Tree_SaneGeom,
Tree_SldSeRasterStyles,
Tree_SldSeVectorStyles,
Tree_ImportRaster,
Tree_Pyramidize,
Tree_PyramidizeMonolithic,
Tree_DePyramidize,
Tree_RasterDrop,
Tree_AddAllRastersSrid,
Tree_RasterInfos,
Tree_VectorRegister,
Tree_SpatialViewRegister,
Tree_VirtualTableRegister,
Tree_TopoGeoRegister,
Tree_TopoNetRegister,
Tree_VectorUnregister,
Tree_AddAllVectorsSrid,
Tree_VectorInfos,
Tree_CreateRasterCoverage,
Tree_UpdateRasterExtent,
Tree_UpdateRasterExtentAll,
Tree_UpdateVectorExtent,
Tree_UpdateVectorExtentAll,
Tree_Raster_SRIDs,
Tree_Vector_SRIDs,
Tree_Raster_Keywords,
Tree_Vector_Keywords,
Tree_RegisterExternalGraphic,
Tree_UnregisterExternalGraphic,
Tree_RegisterTextFont,
Tree_UnregisterTextFont,
Tree_RasterSymbolizerContrast,
Tree_RasterSymbolizerChannelRgb,
Tree_RasterSymbolizerChannelGray,
Tree_RasterSymbolizerCategorize,
Tree_RasterSymbolizerInterpolate,
Tree_RasterSymbolizerShadedRelief,
Tree_RasterSymbolizerMonochrome,
Tree_SimplePointSymbolizer,
Tree_SimpleLineSymbolizer,
Tree_SimplePolygonSymbolizer,
Tree_SimpleTextSymbolizer,
Tree_CloneTable,
Tree_WmsLayerRegister,
Tree_WmsLayerUnregister,
Tree_WmsLayerInfos,
Tree_WmsLayerConfigure,
Tree_CreateTopoGeo,
Tree_DropTopoGeo,
Tree_CreateTopoNet,
Tree_DropTopoNet,
Tree_MapRemoveAll,
Tree_MapShowAll,
Tree_MapHideAll,
Tree_MapConfigure,
Tree_MapVisible,
Tree_MapFullExtent,
Tree_MapLayerFullExtent,
Tree_SqlSample,
Tree_UrlSample,
Tree_SqlLayer,
Tree_MapLayerConfigure,
Tree_MapLayerInfo,
Tree_QuickStyleEdit,
Tree_MapRemoveLayer,
Tree_MapDeleteItem,
Tree_CreatePostgreSqlConn,
Tree_CloseAllPostgreSqlConns,
Tree_ClosePostgreSqlConn,
Tree_PostgreSqlDropOrphans,
Tree_PostgreSqlInfos,
Grid_Clear,
Grid_All,
Grid_Column,
Grid_Row,
Grid_Copy,
Grid_Blob,
Grid_Delete,
Grid_Insert,
Grid_Abort,
Grid_BlobIn,
Grid_BlobOut,
Grid_BlobNull,
Grid_XmlBlobIn,
Grid_XmlBlobOut,
Grid_XmlBlobOutIndented,
Grid_ExpTxtTab,
Grid_ExpCsv,
Grid_ExpHtml,
Grid_ExpShp,
Grid_ExpDif,
Grid_ExpSylk,
Grid_ExpDbf,
Grid_ExpXlsx,
Grid_TilePreview,
Grid_Filter,
Grid_MapShow,
Grid_MapZoom,
Tree_ShowAll,
Tree_HideAll,
Image_Copy,
Wfs_Copy,
Wfs_Layer
};
enum
{
// control IDs for dialogs
ID_SQL = 10000,
ID_SQL_GO,
ID_SQL_FILTER,
ID_SQL_ERASE,
ID_SQL_ABORT,
ID_HISTORY_BACK,
ID_HISTORY_FORWARD,
ID_RS_FIRST,
ID_RS_LAST,
ID_RS_NEXT,
ID_RS_PREVIOUS,
ID_REFRESH,
ID_RS_BLOCK,
ID_RS_THREAD_FINISHED,
ID_RS_STATS_UPDATE,
ID_RS_MAP_SHOW,
ID_RS_MAP_ZOOM,
ID_PANE_HEXADECIMAL,
ID_PANE_GEOMETRY,
ID_PANE_WKT,
ID_PANE_EWKT,
ID_PANE_SVG,
ID_PANE_KML,
ID_PANE_GML,
ID_PANE_GEOJSON,
ID_PANE_IMAGE,
ID_HEX,
ID_GEOM_TABLE,
ID_WKT_TABLE,
ID_WKT_COPY,
ID_EWKT_TABLE,
ID_EWKT_COPY,
ID_SVG_TABLE,
ID_SVG_RELATIVE,
ID_SVG_PRECISION,
ID_SVG_COPY,
ID_KML_TABLE,
ID_KML_PRECISION,
ID_KML_COPY,
ID_GML_TABLE,
ID_GML_V2_V3,
ID_GML_PRECISION,
ID_GML_COPY,
ID_GEOJSON_TABLE,
ID_GEOJSON_OPTIONS,
ID_GEOJSON_PRECISION,
ID_GEOJSON_COPY,
ID_GEOM_GRAPH,
ID_GEOM_BOX,
ID_IMAGE_TITLE,
ID_IMG_BOX,
ID_IMAGE,
ID_XML_DOCUMENT_TABLE,
ID_XML_DOCUMENT_COPY,
ID_XML_INDENTED_TABLE,
ID_XML_INDENTED_COPY,
ID_VIRTSHP_TABLE,
ID_VIRTSHP_SRID,
ID_VIRTSHP_CHARSET,
ID_VIRTSHP_TEXTDATES,
ID_VIRTTXT_TABLE,
ID_VIRTTXT_CHARSET,
ID_VIRTTXT_TITLES,
ID_VIRTTXT_SEPARATOR,
ID_VIRTTXT_CHARSEPARATOR,
ID_VIRTTXT_QUOTE,
ID_VIRTTXT_POINT,
ID_VIRTDBF_TABLE,
ID_VIRTDBF_CHARSET,
ID_VIRTDBF_TEXTDATES,
ID_VIRTXL_TABLE,
ID_VIRTXL_WORKSHEET,
ID_VIRTXL_TITLES,
ID_LDSHP_TABLE,
ID_LDSHP_COLUMN,
ID_LDSHP_SRID,
ID_LDSHP_CHARSET,
ID_LDSHP_COERCE_2D,
ID_LDSHP_COMPRESSED,
ID_LDSHP_RTREE,
ID_LDSHP_USER_GTYPE,
ID_LDSHP_GTYPE,
ID_LDSHP_USER_PKEY,
ID_LDSHP_PKCOL,
ID_LDSHP_TEXTDATES,
ID_LDSHP_COLNAME_CASE,
ID_LDSHP_STATISTICS,
ID_LDXL_TABLE,
ID_LDXL_WORKSHEET,
ID_LDXL_TITLES,
ID_LDXML_COMPRESSED,
ID_LDXML_VALIDATE,
ID_LDXML_INTERNAL_SCHEMA,
ID_LDXML_SCHEMA_URI,
ID_LDTXT_TABLE,
ID_LDTXT_CHARSET,
ID_LDTXT_TITLES,
ID_LDTXT_SEPARATOR,
ID_LDTXT_CHARSEPARATOR,
ID_LDTXT_QUOTE,
ID_LDTXT_POINT,
ID_LDDBF_TABLE,
ID_LDDBF_CHARSET,
ID_LDDBF_USER_PKEY,
ID_LDDBF_PKCOL,
ID_LDDBF_TEXTDATES,
ID_LDDBF_COLNAME_CASE,
ID_DMPSHP_CHARSET,
ID_DMPTXT_CHARSET,
ID_NET_TABLE,
ID_NET_FROM,
ID_NET_TO,
ID_NET_NO_GEOM,
ID_NET_GEOM,
ID_NET_LENGTH,
ID_NET_COST,
ID_NET_BIDIR,
ID_NET_ONEWAY,
ID_NET_FROM_TO,
ID_NET_TO_FROM,
ID_NET_NAME_ENABLE,
ID_NET_NAME,
ID_NET_A_STAR,
ID_NET_DATA,
ID_NET_VIRTUAL,
ID_NET_OVERWRITE,
ID_EXIF_PATH,
ID_EXIF_FOLDER,
ID_EXIF_METADATA,
ID_EXIF_GPS_ONLY,
ID_GPS_PICS_PATH,
ID_GPS_PICS_FOLDER,
ID_GPS_PICS_TABLE,
ID_GPS_PICS_GEOMETRY,
ID_GPS_PICS_STATISTICS,
ID_GPS_PICS_RTREE,
ID_XML_OK_SUFFIX,
ID_XML_SUFFIX,
ID_XML_PATH,
ID_XML_FOLDER,
ID_XML_TARGET_TABLE,
ID_XML_PK_NAME,
ID_XML_BLOB_COLUMN,
ID_XML_OK_PATH,
ID_XML_PATH_COLUMN,
ID_XML_OK_SCHEMA_URI,
ID_XML_SCHEMA_URI_COLUMN,
ID_XML_OK_PARSE_ERR,
ID_XML_PARSE_ERR_COLUMN,
ID_XML_OK_VALIDATE_ERR,
ID_XML_VALIDATE_ERR_COLUMN,
ID_XML_COMPRESSED,
ID_XML_VALIDATED,
ID_XML_INTERNAL_SCHEMA,
ID_XML_SCHEMA_URI,
ID_DXF_OK_PREFIX,
ID_DXF_PREFIX,
ID_DXF_PATH,
ID_DXF_FOLDER,
ID_DXF_OK_SINGLE,
ID_DXF_SINGLE,
ID_DXF_DIMS,
ID_DXF_SRID,
ID_DXF_RINGS,
ID_DXF_MIXED,
ID_DXF_APPEND,
ID_DFLT_CHARSET,
ID_DFLT_ASK,
ID_SCRIPT_CHARSET,
ID_RCVR_SRID,
ID_RCVR_TYPE,
ID_RCVR_DIMS,
ID_SRID_OLD,
ID_SRID_SRID,
ID_SEARCH,
ID_BY_SRID,
ID_HELP_HTML,
ID_MAPCFG_HTML,
ID_AUTO_SAVE_PATH,
ID_AUTO_SAVE_INTERVAL,
ID_AUTO_SAVE_CHANGE_PATH,
ID_QVC_SQL,
ID_QVC_TAB,
ID_QVC_TABLE_2,
ID_QVC_TABLE_NAME_1,
ID_QVC_TABLE_NAME_2,
ID_QVC_TABLE_ALIAS_1,
ID_QVC_TABLE_ALIAS_2,
ID_QVC_COLUMNS_1,
ID_QVC_COLUMNS_2,
ID_QVC_JOIN_MODE,
ID_QVC_MATCH_1_T1,
ID_QVC_MATCH_1_T2,
ID_QVC_MATCH_2_ENABLE,
ID_QVC_MATCH_2_T1,
ID_QVC_MATCH_2_T2,
ID_QVC_MATCH_3_ENABLE,
ID_QVC_MATCH_3_T1,
ID_QVC_MATCH_3_T2,
ID_QVC_WHERE_1_ENABLE,
ID_QVC_WHERE_1_TABLE,
ID_QVC_WHERE_1_COLUMN,
ID_QVC_WHERE_1_OPERATOR,
ID_QVC_WHERE_1_VALUE,
ID_QVC_WHERE_2_ENABLE,
ID_QVC_WHERE_2_TABLE,
ID_QVC_WHERE_2_COLUMN,
ID_QVC_WHERE_2_OPERATOR,
ID_QVC_WHERE_2_VALUE,
ID_QVC_WHERE_3_ENABLE,
ID_QVC_WHERE_3_TABLE,
ID_QVC_WHERE_3_COLUMN,
ID_QVC_WHERE_3_OPERATOR,
ID_QVC_WHERE_3_VALUE,
ID_QVC_CONNECTOR_12,
ID_QVC_CONNECTOR_23,
ID_QVC_ORDER_1_ENABLE,
ID_QVC_ORDER_1_TABLE,
ID_QVC_ORDER_1_COLUMN,
ID_QVC_ORDER_1_DESC,
ID_QVC_ORDER_2_ENABLE,
ID_QVC_ORDER_2_TABLE,
ID_QVC_ORDER_2_COLUMN,
ID_QVC_ORDER_2_DESC,
ID_QVC_ORDER_3_ENABLE,
ID_QVC_ORDER_3_TABLE,
ID_QVC_ORDER_3_COLUMN,
ID_QVC_ORDER_3_DESC,
ID_QVC_ORDER_4_ENABLE,
ID_QVC_ORDER_4_TABLE,
ID_QVC_ORDER_4_COLUMN,
ID_QVC_ORDER_4_DESC,
ID_QVC_VIEW_TYPE,
ID_QVC_VIEW_NAME,
ID_QVC_VIEW_GEOTABLE,
ID_QVC_VIEW_GEOMETRY,
ID_QVC_WRITABLE_1,
ID_QVC_WRITABLE_2,
ID_SQL_FC_SQL,
ID_SQL_FC_TAB,
ID_SQL_FC_COLUMNS,
ID_SQL_FC_WHERE_1_ENABLE,
ID_SQL_FC_WHERE_1_COLUMN,
ID_SQL_FC_WHERE_1_OPERATOR,
ID_SQL_FC_WHERE_1_VALUE,
ID_SQL_FC_WHERE_2_ENABLE,
ID_SQL_FC_WHERE_2_COLUMN,
ID_SQL_FC_WHERE_2_OPERATOR,
ID_SQL_FC_WHERE_2_VALUE,
ID_SQL_FC_WHERE_3_ENABLE,
ID_SQL_FC_WHERE_3_COLUMN,
ID_SQL_FC_WHERE_3_OPERATOR,
ID_SQL_FC_WHERE_3_VALUE,
ID_SQL_FC_CONNECTOR_12,
ID_SQL_FC_CONNECTOR_23,
ID_SQL_FC_ORDER_1_ENABLE,
ID_SQL_FC_ORDER_1_COLUMN,
ID_SQL_FC_ORDER_1_DESC,
ID_SQL_FC_ORDER_2_ENABLE,
ID_SQL_FC_ORDER_2_COLUMN,
ID_SQL_FC_ORDER_2_DESC,
ID_SQL_FC_ORDER_3_ENABLE,
ID_SQL_FC_ORDER_3_COLUMN,
ID_SQL_FC_ORDER_3_DESC,
ID_SQL_FC_ORDER_4_ENABLE,
ID_SQL_FC_ORDER_4_COLUMN,
ID_SQL_FC_ORDER_4_DESC,
ID_SQL_FC_FREE_HAND,
ID_MALFORMED_GRID,
ID_MALFORMED_CLOSE,
ID_MALFORMED_REPAIR,
ID_MALFORMED_CLEAR,
ID_MALFORMED_ALL,
ID_MALFORMED_ROW,
ID_MALFORMED_COLUMN,
ID_MALFORMED_COPY,
ID_MALFORMED_BLOB,
ID_DB_STATUS_GRID,
ID_DB_STATUS_CLOSE,
ID_DB_STATUS_RESET,
ID_DB_STATUS_CLEAR,
ID_DB_STATUS_ALL,
ID_DB_STATUS_ROW,
ID_DB_STATUS_COLUMN,
ID_DB_STATUS_COPY,
ID_STAT_CHART,
ID_CHART_TYPE,
ID_CHART_SIZE,
ID_CHART_MODE,
ID_CHART_CLASS,
ID_CHART_COPY,
ID_CHART_PNG,
ID_CHART_SVG,
ID_CHART_PDF,
ID_MAP_SYMBOL,
ID_MAP_SIZE,
ID_MAP_SYM_SIZE,
ID_MAP_THICKNESS,
ID_MAP_FILL,
ID_MAP_FILL_COL,
ID_MAP_LINE_COL,
ID_MAP_COPY,
ID_MAP_PNG,
ID_MAP_SVG,
ID_MAP_PDF,
ID_MAP_CONFIG_INSERT,
ID_MAP_CONFIG_EXPORT,
ID_MAP_CONFIG_COPY,
ID_MAP_CONFIG_NAME,
ID_MAP_CONFIG_TITLE,
ID_MAP_CONFIG_ABSTRACT,
ID_MAP_CONFIG_PANE_SRS,
ID_MAP_CONFIG_PANE_OPTIONS,
ID_KML_NAME,
ID_KML_NAME_K,
ID_KML_DESC,
ID_KML_DESC_K,
ID_SHEET_DECIMAL_POINT,
ID_SHEET_DATE_TIME,
ID_ELEMGEOM_TABLE,
ID_ELEMGEOM_PKEY,
ID_ELEMGEOM_MULTI_ID,
ID_ELEMGEOM_TYPE,
ID_ELEMGEOM_SRID,
ID_ELEMGEOM_COORDS,
ID_ELEMGEOM_RTREE,
ID_POSTGIS_SCHEMA,
ID_POSTGIS_TABLE,
ID_POSTGIS_LOWER,
ID_POSTGIS_CREATE,
ID_POSTGIS_SPINDEX,
ID_SANEGEOM_PREFIX,
ID_CLONE_OUTPUT,
ID_CLONE_JUST_CREATE,
ID_CLONE_WITH_FK,
ID_CLONE_WITH_TRIGGERS,
ID_CLONE_RESEQUENCE,
ID_CLONE_APPEND,
ID_CLONE_IGNORE,
ID_CLONE_CAST2MULTI,
ID_WFS_URL,
ID_WFS_CATALOG,
ID_WFS_RESET,
ID_WFS_NAME,
ID_WFS_SRID,
ID_WFS_VERSION,
ID_WFS_LABEL,
ID_WFS_PAGE,
ID_WFS_MAX,
ID_WFS_PAGING,
ID_WFS_TABLE,
ID_WFS_PK,
ID_WFS_RTREE,
ID_WFS_SWAP,
ID_WFS_LOAD,
ID_WFS_EXTRA,
ID_WFS_KEYWORD,
ID_WFS_KEYFILTER,
ID_WFS_KEYRESET,
ID_WFS_ENABLE_PROXY,
ID_WFS_PROXY,
ID_WFS_STATUS,
ID_WFS_THREAD_FINISHED,
ID_SLD_SE_GRID,
ID_SLD_SE_REMOVE,
ID_SLD_SE_ADD,
ID_MAP_CONFIG_GRID,
ID_WAIT_VALIDATING,
ID_CVG_NAME,
ID_CVG_TITLE,
ID_CVG_ABSTRACT,
ID_CVG_COPYRIGHT,
ID_CVG_LICENSE,
ID_CVG_SAMPLE,
ID_CVG_PIXEL,
ID_CVG_BANDS,
ID_CVG_COMPRESSION,
ID_CVG_QUALITY,
ID_CVG_RED,
ID_CVG_GREEN,
ID_CVG_BLUE,
ID_CVG_NIR,
ID_CVG_AUTO_NDVI,
ID_CVG_NODATA,
ID_CVG_WIDTH,
ID_CVG_SQTILE,
ID_CVG_HEIGHT,
ID_CVG_SRID,
ID_CVG_NOREF,
ID_CVG_HORZ_RES,
ID_CVG_SAME_RES,
ID_CVG_VERT_RES,
ID_CVG_STRICT_RES,
ID_CVG_MIXED_RES,
ID_CVG_PATHS,
ID_CVG_MD5,
ID_CVG_SUMMARY,
ID_CVG_QUERYABLE,
ID_LOAD_FORCE_SRID,
ID_LOAD_SRID,
ID_LOAD_WITH_WORLDFILE,
ID_LOAD_PYRAMIDIZE,
ID_LOAD_LIST_DONE,
ID_LOAD_ABORT,
ID_LOAD_RASTER_THREAD_FINISHED,
ID_LOAD_RASTER_START,
ID_LOAD_RASTER_STOP,
ID_PYRAMID_MODE,
ID_LOAD_STYLE_DONE,
ID_LOAD_RASTER_STYLE_THREAD_FINISHED,
ID_LOAD_RASTER_STYLE_START,
ID_LOAD_RASTER_STYLE_STOP,
ID_LOAD_RASTER_STYLE_SKIP,
ID_LOAD_VECTOR_STYLE_THREAD_FINISHED,
ID_LOAD_VECTOR_STYLE_START,
ID_LOAD_VECTOR_STYLE_STOP,
ID_LOAD_VECTOR_STYLE_SKIP,
ID_LOAD_MAP_CONFIG_THREAD_FINISHED,
ID_LOAD_MAP_CONFIG_START,
ID_LOAD_MAP_CONFIG_STOP,
ID_LOAD_MAP_CONFIG_SKIP,
ID_LOAD_EXTERNAL_THREAD_FINISHED,
ID_LOAD_EXTERNAL_DONE,
ID_LOAD_EXTERNAL_START,
ID_LOAD_EXTERNAL_STOP,
ID_LOAD_EXTERNAL_SKIP,
ID_LOAD_FONT_THREAD_FINISHED,
ID_LOAD_FONT_DONE,
ID_LOAD_FONT_START,
ID_LOAD_FONT_STOP,
ID_LOAD_FONT_SKIP,
ID_VECTOR_GRID,
ID_VECTOR_COVERAGE,
ID_VECTOR_TITLE,
ID_VECTOR_ABSTRACT,
ID_VECTOR_COPYRIGHT,
ID_VECTOR_LICENSE,
ID_VECTOR_QUERYABLE,
ID_VECTOR_EDITABLE,
ID_VECTOR_SRID_ADD,
ID_VECTOR_SRID_REMOVE,
ID_VECTOR_SRID,
ID_VECTOR_SRID_GRID,
ID_VECTOR_REFSYS,
ID_RASTER_SRID_ADD,
ID_RASTER_SRID_REMOVE,
ID_RASTER_SRID,
ID_RASTER_SRID_GRID,
ID_RASTER_REFSYS,
ID_VECTOR_KEYWORD_ADD,
ID_VECTOR_KEYWORD_REMOVE,
ID_VECTOR_KEYWORD,
ID_VECTOR_KEYWORD_GRID,
ID_RASTER_KEYWORD_ADD,
ID_RASTER_KEYWORD_REMOVE,
ID_RASTER_KEYWORD,
ID_RASTER_KEYWORD_GRID,
ID_SYMBOLIZER_NAME,
ID_SYMBOLIZER_TITLE,
ID_SYMBOLIZER_ABSTRACT,
ID_SYMBOLIZER_OPACITY,
ID_SYMBOLIZER_BAND_MODE,
ID_SYMBOLIZER_RED,
ID_SYMBOLIZER_GREEN,
ID_SYMBOLIZER_BLUE,
ID_SYMBOLIZER_GRAY,
ID_SYMBOLIZER_CONTRAST,
ID_SYMBOLIZER_GAMMA,
ID_SYMBOLIZER_MAP,
ID_SYMBOLIZER_FALLBACK,
ID_SYMBOLIZER_VALUE,
ID_SYMBOLIZER_COLOR,
ID_SYMBOLIZER_PICKER_HEX,
ID_SYMBOLIZER_PICKER_BTN,
ID_SYMBOLIZER_SHADED,
ID_SYMBOLIZER_RELIEF,
ID_SYMBOLIZER_MINMAX_SCALE,
ID_SYMBOLIZER_MIN_SCALE,
ID_SYMBOLIZER_MAX_SCALE,
ID_SYMBOLIZER_UOM,
ID_SYMBOLIZER_STROKE1_ENABLE,
ID_SYMBOLIZER_STROKE1_OPACITY,
ID_SYMBOLIZER_STROKE1_PERPENDICULAR,
ID_SYMBOLIZER_STROKE1_TYPE,
ID_SYMBOLIZER_STROKE1_COLOR,
ID_SYMBOLIZER_STROKE1_PICKER_HEX,
ID_SYMBOLIZER_STROKE1_PICKER_BTN,
ID_SYMBOLIZER_STROKE1_GRAPHIC,
ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT,
ID_SYMBOLIZER_STROKE1_REPLACEMENT,
ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX,
ID_SYMBOLIZER_STROKE1_WIDTH,
ID_SYMBOLIZER_STROKE1_LINEJOIN,
ID_SYMBOLIZER_STROKE1_LINECAP,
ID_SYMBOLIZER_STROKE1_DASHARRAY,
ID_SYMBOLIZER_STROKE1_DASHOFFSET,
ID_SYMBOLIZER_STROKE2_ENABLE,
ID_SYMBOLIZER_STROKE2_OPACITY,
ID_SYMBOLIZER_STROKE2_PERPENDICULAR,
ID_SYMBOLIZER_STROKE2_TYPE,
ID_SYMBOLIZER_STROKE2_COLOR,
ID_SYMBOLIZER_STROKE2_PICKER_HEX,
ID_SYMBOLIZER_STROKE2_PICKER_BTN,
ID_SYMBOLIZER_STROKE2_GRAPHIC,
ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT,
ID_SYMBOLIZER_STROKE2_REPLACEMENT,
ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX,
ID_SYMBOLIZER_STROKE2_WIDTH,
ID_SYMBOLIZER_STROKE2_LINEJOIN,
ID_SYMBOLIZER_STROKE2_LINECAP,
ID_SYMBOLIZER_STROKE2_DASHARRAY,
ID_SYMBOLIZER_STROKE2_DASHOFFSET,
ID_SYMBOLIZER_STROKE3_ENABLE,
ID_SYMBOLIZER_STROKE3_OPACITY,
ID_SYMBOLIZER_STROKE3_PERPENDICULAR,
ID_SYMBOLIZER_STROKE3_TYPE,
ID_SYMBOLIZER_STROKE3_COLOR,
ID_SYMBOLIZER_STROKE3_PICKER_HEX,
ID_SYMBOLIZER_STROKE3_PICKER_BTN,
ID_SYMBOLIZER_STROKE3_GRAPHIC,
ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT,
ID_SYMBOLIZER_STROKE3_REPLACEMENT,
ID_SYMBOLIZER_STROKE3_REPLACEMENT_HEX,
ID_SYMBOLIZER_STROKE3_WIDTH,
ID_SYMBOLIZER_STROKE3_LINEJOIN,
ID_SYMBOLIZER_STROKE3_LINECAP,
ID_SYMBOLIZER_STROKE3_DASHARRAY,
ID_SYMBOLIZER_STROKE3_DASHOFFSET,
ID_SYMBOLIZER_SECOND_STROKE_ENABLE,
ID_SYMBOLIZER_FILL1_ENABLE,
ID_SYMBOLIZER_FILL1_OPACITY,
ID_SYMBOLIZER_FILL1_TYPE,
ID_SYMBOLIZER_FILL1_COLOR,
ID_SYMBOLIZER_FILL1_PICKER_HEX,
ID_SYMBOLIZER_FILL1_PICKER_BTN,
ID_SYMBOLIZER_FILL1_GRAPHIC,
ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT,
ID_SYMBOLIZER_FILL1_REPLACEMENT,
ID_SYMBOLIZER_FILL1_REPLACEMENT_HEX,
ID_SYMBOLIZER_FILL2_ENABLE,
ID_SYMBOLIZER_FILL2_OPACITY,
ID_SYMBOLIZER_FILL2_TYPE,
ID_SYMBOLIZER_FILL2_COLOR,
ID_SYMBOLIZER_FILL2_PICKER_HEX,
ID_SYMBOLIZER_FILL2_PICKER_BTN,
ID_SYMBOLIZER_FILL2_GRAPHIC,
ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT,
ID_SYMBOLIZER_FILL2_REPLACEMENT,
ID_SYMBOLIZER_FILL2_REPLACEMENT_HEX,
ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X,
ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y,
ID_SYMBOLIZER_POLYGON1_PERPENDICULAR,
ID_SYMBOLIZER_POLYGON2_ENABLE,
ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_X,
ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_Y,
ID_SYMBOLIZER_POLYGON2_PERPENDICULAR,
ID_SYMBOLIZER_SIZE,
ID_SYMBOLIZER_ROTATION,
ID_SYMBOLIZER_DISPLACEMENT_X,
ID_SYMBOLIZER_DISPLACEMENT_Y,
ID_SYMBOLIZER_ANCHOR_X,
ID_SYMBOLIZER_ANCHOR_Y,
ID_SYMBOLIZER_TYPE,
ID_SYMBOLIZER_GRAPHIC,
ID_SYMBOLIZER_MARK,
ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT,
ID_SYMBOLIZER_COLOR_REPLACEMENT,
ID_SYMBOLIZER_COLOR_REPLACEMENT_HEX,
ID_SYMBOLIZER_REPLACEMENT_PICKER_BTN,
ID_ONLY_RESCALE_SVG_SYMBOLS,
ID_SYMBOLIZER_FILL_ENABLE,
ID_SYMBOLIZER_FILL_COLOR,
ID_SYMBOLIZER_FILL_PICKER_HEX,
ID_SYMBOLIZER_FILL_PICKER_BTN,
ID_SYMBOLIZER_STROKE_ENABLE,
ID_SYMBOLIZER_STROKE_COLOR,
ID_SYMBOLIZER_STROKE_PICKER_HEX,
ID_SYMBOLIZER_STROKE_PICKER_BTN,
ID_SYMBOLIZER_STROKE_WIDTH,
ID_SYMBOLIZER_STROKE_LINEJOIN,
ID_SYMBOLIZER_STROKE_LINECAP,
ID_SYMBOLIZER_STROKE_DASHARRAY,
ID_SYMBOLIZER_STROKE_DASHOFFSET,
ID_SYMBOLIZER_DASH_DOT,
ID_SYMBOLIZER_DASH_DOT_2,
ID_SYMBOLIZER_LABEL,
ID_SYMBOLIZER_FONT,
ID_SYMBOLIZER_FONT_OPACITY,
ID_SYMBOLIZER_HALO_ENABLE,
ID_SYMBOLIZER_HALO_OPACITY,
ID_SYMBOLIZER_HALO_RADIUS,
ID_SYMBOLIZER_HALO_COLOR,
ID_SYMBOLIZER_HALO_PICKER_HEX,
ID_SYMBOLIZER_HALO_PICKER_BTN,
ID_SYMBOLIZER_PERPENDICULAR,
ID_SYMBOLIZER_IS_REPEATED,
ID_SYMBOLIZER_INITIAL_GAP,
ID_SYMBOLIZER_GAP,
ID_SYMBOLIZER_IS_ALIGNED,
ID_SYMBOLIZER_GENERALIZE,
ID_SYMBOLIZER_PREVIEW,
ID_SYMBOLIZER_BACKGROUND,
ID_SYMBOLIZER_CROSSHAIR,
ID_SYMBOLIZER_REFLINE,
ID_SYMBOLIZER_INSERT,
ID_SYMBOLIZER_EXPORT,
ID_SYMBOLIZER_COPY,
ID_SYMBOLIZER_ADD,
ID_SYMBOLIZER_REMOVE,
ID_LABEL_NO_GEOM_SYMBOLIZER,
ID_SYMBOLIZER_TEXT1_ENABLE,
ID_SYMBOLIZER_TEXT2_ENABLE,
ID_SYMBOLIZER_TEXT1_BOLD,
ID_SYMBOLIZER_TEXT2_BOLD,
ID_SYMBOLIZER_TEXT1_ITALIC,
ID_SYMBOLIZER_TEXT2_ITALIC,
ID_SYMBOLIZER_TEXT1_LABEL,
ID_SYMBOLIZER_FONT1_NAME,
ID_SYMBOLIZER_FONT2_NAME,
ID_SYMBOLIZER_TEXT2_LABEL,
ID_SYMBOLIZER_FONT1_SIZE,
ID_SYMBOLIZER_FONT2_SIZE,
ID_SYMBOLIZER_FONT1_OPACITY,
ID_SYMBOLIZER_FONT2_OPACITY,
ID_SYMBOLIZER_FONT1_COLOR,
ID_SYMBOLIZER_FONT2_COLOR,
ID_SYMBOLIZER_FONT1_PICKER_HEX,
ID_SYMBOLIZER_FONT2_PICKER_HEX,
ID_SYMBOLIZER_FONT1_PICKER_BTN,
ID_SYMBOLIZER_FONT2_PICKER_BTN,
ID_SYMBOLIZER_HALO1_ENABLE,
ID_SYMBOLIZER_HALO1_OPACITY,
ID_SYMBOLIZER_HALO1_RADIUS,
ID_SYMBOLIZER_HALO1_COLOR,
ID_SYMBOLIZER_HALO1_PICKER_HEX,
ID_SYMBOLIZER_HALO1_PICKER_BTN,
ID_SYMBOLIZER_HALO2_ENABLE,
ID_SYMBOLIZER_HALO2_OPACITY,
ID_SYMBOLIZER_HALO2_RADIUS,
ID_SYMBOLIZER_HALO2_COLOR,
ID_SYMBOLIZER_HALO2_PICKER_HEX,
ID_SYMBOLIZER_HALO2_PICKER_BTN,
ID_SYMBOLIZER_TEXT_ANCHOR_X,
ID_SYMBOLIZER_TEXT_ANCHOR_Y,
ID_SYMBOLIZER_TEXT_DISPLACEMENT_X,
ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y,
ID_SYMBOLIZER_TEXT_ROTATION,
ID_SYMBOLIZER_TEXT_PERPENDICULAR,
ID_SYMBOLIZER_TEXT_IS_REPEATED,
ID_SYMBOLIZER_TEXT_INITIAL_GAP,
ID_SYMBOLIZER_TEXT_GAP,
ID_SYMBOLIZER_TEXT_IS_ALIGNED,
ID_SYMBOLIZER_TEXT_GENERALIZE,
ID_SYMBOLIZER_NODE_OPACITY,
ID_SYMBOLIZER_NODE_MARK,
ID_SYMBOLIZER_NODE_SIZE,
ID_SYMBOLIZER_NODE_ROTATION,
ID_SYMBOLIZER_NODE_DISPLACEMENT_X,
ID_SYMBOLIZER_NODE_DISPLACEMENT_Y,
ID_SYMBOLIZER_NODE_ANCHOR_X,
ID_SYMBOLIZER_NODE_ANCHOR_Y,
ID_SYMBOLIZER_NODE_FILL_COLOR,
ID_SYMBOLIZER_NODE_FILL_PICKER_HEX,
ID_SYMBOLIZER_NODE_FILL_PICKER_BTN,
ID_SYMBOLIZER_NODE_STROKE_COLOR,
ID_SYMBOLIZER_NODE_STROKE_PICKER_HEX,
ID_SYMBOLIZER_NODE_STROKE_PICKER_BTN,
ID_SYMBOLIZER_EDGELINK_SEED_OPACITY,
ID_SYMBOLIZER_EDGELINK_SEED_MARK,
ID_SYMBOLIZER_EDGELINK_SEED_SIZE,
ID_SYMBOLIZER_EDGELINK_SEED_ROTATION,
ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X,
ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y,
ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X,
ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y,
ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR,
ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_HEX,
ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_BTN,
ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR,
ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_HEX,
ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_BTN,
ID_SYMBOLIZER_FACE_SEED_OPACITY,
ID_SYMBOLIZER_FACE_SEED_MARK,
ID_SYMBOLIZER_FACE_SEED_SIZE,
ID_SYMBOLIZER_FACE_SEED_ROTATION,
ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X,
ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y,
ID_SYMBOLIZER_FACE_SEED_ANCHOR_X,
ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y,
ID_SYMBOLIZER_FACE_SEED_FILL_COLOR,
ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX,
ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN,
ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR,
ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX,
ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN,
ID_SYMBOLIZER_COLOR_MAP_MODE,
ID_SYMBOLIZER_MIN_COLOR,
ID_SYMBOLIZER_MIN_PICKER_HEX,
ID_SYMBOLIZER_MIN_PICKER_BTN,
ID_SYMBOLIZER_MAX_COLOR,
ID_SYMBOLIZER_MAX_PICKER_HEX,
ID_SYMBOLIZER_MAX_PICKER_BTN,
ID_WMS_URL,
ID_WMS_INFO_URL,
ID_WMS_CATALOG,
ID_WMS_RESET,
ID_WMS_SERVER,
ID_WMS_VERSION,
ID_WMS_CRS,
ID_WMS_STYLE,
ID_WMS_FORMAT,
ID_WMS_TRANSPARENT,
ID_WMS_TILED,
ID_WMS_WIDTH,
ID_WMS_HEIGHT,
ID_WMS_NAME,
ID_WMS_TITLE,
ID_WMS_ABSTRACT,
ID_WMS_COPYRIGHT,
ID_WMS_LICENSE,
ID_WMS_QUERYABLE,
ID_WMS_GETFEATUREINFO,
ID_WMS_SWAP,
ID_WMS_CACHED,
ID_WMS_OK,
ID_WMS_ENABLE_PROXY,
ID_WMS_PROXY,
ID_WMS_LIST,
ID_WMS_LAYER,
ID_WMS_ENABLE_BGCOLOR,
ID_WMS_BGCOLOR,
ID_RASTER_STYLE,
ID_RASTER_OK,
ID_VECTOR_LAYER,
ID_VECTOR_TYPE,
ID_VECTOR_UUID,
ID_VECTOR_STYLE,
ID_VECTOR_OK,
ID_VECTOR_COPY,
ID_MIME_TYPE,
ID_IMAGE_QUALITY,
ID_SQL_SAMPLE,
ID_TOPOGEO_LAYER,
ID_TOPOGEO_SRID,
ID_TOPOGEO_STYLE,
ID_TOPOGEO_FACE,
ID_TOPOGEO_EDGE,
ID_TOPOGEO_NODE,
ID_TOPOGEO_FACE_SEED,
ID_TOPOGEO_EDGE_SEED,
ID_TOPOGEO_OK,
ID_TOPONET_LAYER,
ID_TOPONET_SRID,
ID_TOPONET_STYLE,
ID_TOPONET_LINK,
ID_TOPONET_NODE,
ID_TOPONET_LINK_SEED,
ID_TOPONET_OK,
ID_TOPO_NAME,
ID_TOPO_SRID,
ID_TOPO_3D,
ID_TOPO_TOLERANCE,
ID_TOPO_SPATIAL,
ID_TOPO_COINCIDENT,
ID_LAYER_TYPE,
ID_PANE_MAIN,
ID_PANE_STROKE1,
ID_PANE_STROKE2,
ID_PANE_STROKE3,
ID_PANE_FILL1,
ID_PANE_FILL2,
ID_PANE_POSITION,
ID_PANE_GRAPHIC,
ID_PANE_MARK,
ID_PANE_FONT,
ID_PANE_PLACEMENT,
ID_PANE_PREVIEW,
ID_PANE_TEXT1,
ID_PANE_TEXT2,
ID_LAYERS_LIST,
ID_MAPLAYER_NAME,
ID_MAPLAYER_TITLE,
ID_MAPLAYER_ABSTRACT,
ID_MAPLAYER_COPYRIGHT,
ID_MAPLAYER_LICENSE,
ID_MAPLAYER_DATASOURCE,
ID_MAPLAYER_EXTENTS,
ID_MAPLAYER_QUERYABLE,
ID_MAPLAYER_EDITABLE,
ID_MAPOPT_MULTITHREAD,
ID_MAPOPT_MAXTHREADS,
ID_MAPOPT_AUTOTRANSFORM,
ID_MAPOPT_SRID,
ID_MAPOPT_NAME,
ID_MAPOPT_EXTENTS,
ID_MAPOPT_AUTOSWITCH,
ID_MAPOPT_DD_DMS,
ID_MAPOPT_CHECKERED_BACKGROUND,
ID_MAPOPT_SOLID_BACKGROUND,
ID_MAPOPT_ANTI_COLLISION,
ID_MAPOPT_WRAP_TEXT,
ID_MAPOPT_AUTO_ROTATE,
ID_MAPOPT_SHIFT_POSITION,
ID_ADDALL_SRID_NEW,
ID_ADDALL_NAME_NEW,
ID_ADDALL_SRID_OLD,
ID_ADDALL_NAME_OLD,
ID_QUICK_STYLE_APPLY,
ID_QUICK_STYLE_EXPORT,
ID_QUICK_STYLE_COPY,
ID_PANE_POINT,
ID_PANE_LINE,
ID_PANE_POLYGON,
ID_PANE_TEXT,
ID_PANE_CONTRAST_ENHANCEMENT,
ID_PANE_CHANNEL_SELECTION,
ID_PANE_COLOR_MAP,
ID_PAINT_MAP_STEP,
ID_PAINT_MAP_THREAD_FINISHED,
ID_POSTGRES_HOST,
ID_POSTGRES_HOSTADDR,
ID_POSTGRES_PORT,
ID_POSTGRES_DBNAME,
ID_POSTGRES_USER,
ID_POSTGRES_PASSWORD,
ID_POSTGRES_RDONLY,
ID_POSTGRES_TEXTDATES,
ID_PRINTER_FORMAT,
ID_PRINTER_PORTRAIT,
ID_PRINTER_DPI,
ID_PRINTER_MARGIN,
ID_PRINTER_WIDTH,
ID_PRINTER_HEIGTH,
ID_MAP_IMAGE_WIDTH,
ID_MAP_IMAGE_HEIGTH,
ID_MAP_IMAGE_FORMAT,
ID_MAP_IMAGE_COMPRESSION,
ID_MAP_IMAGE_QUALITY,
ID_MAP_IMAGE_WORLD_FILE,
ID_MAP_IMAGE_GEO_TIFF,
ID_ZIPSHP,
ID_ZIPDBF
};
enum
{
// tree item data types
MY_ROOT_NODE = 0,
MY_ROOT_USERDATA,
MY_ROOT_ISOMETADATA,
MY_ROOT_TOPOLOGIES,
MY_ROOT_NETWORKS,
MY_ROOT_RASTER,
MY_ROOT_VECTOR,
MY_ROOT_WMS,
MY_ROOT_POSTGRESQL,
MY_ROOT_STYLING,
MY_ROOT_METADATA,
MY_ROOT_INTERNAL,
MY_ROOT_RTREE,
MY_TABLE,
MY_VTABLE,
MY_VIEW,
MY_TILE_DATA,
MY_GPKG_TABLE,
MY_GPKG_VTABLE,
MY_FDO_TABLE,
MY_FDO_VTABLE,
MY_COLUMN,
MY_VIEW_COLUMN,
MY_VIRTUAL_COLUMN,
MY_GEOMETRY,
MY_GEOMETRY_INDEX,
MY_GEOMETRY_CACHED,
MY_VIEW_GEOMETRY,
MY_VIEW_GEOMETRY_INDEX,
MY_VIEW_GEOMETRY_CACHED,
MY_VIRTUAL_GEOMETRY,
MY_GPKG_COLUMN,
MY_GPKG_GEOMETRY,
MY_GPKG_GEOMETRY_INDEX,
MY_VIRTUAL_GPKG_GEOMETRY,
MY_FDO_COLUMN,
MY_FDO_GEOMETRY,
MY_VIRTUAL_FDO_GEOMETRY,
MY_TOPO_GEO,
MY_TOPO_NET,
MY_VECTOR_COVERAGE,
MY_RASTER_COVERAGE,
MY_WMS_LAYER,
MY_INDEX,
MY_INDEX_FLD,
MY_TRIGGER,
MY_ATTACHED,
MY_PRIMARY_KEY,
MY_PRIMARY_KEY_FLD,
MY_FOREIGN_KEY,
MY_FOREIGN_KEY_FLD,
MY_INT_VARIANT,
MY_DBL_VARIANT,
MY_TXT_VARIANT,
MY_BLOB_VARIANT,
MY_NULL_VARIANT,
MY_UNDEFINED,
MY_POSTGRES_CONN,
MY_POSTGRES_SCHEMA,
MY_POSTGRES_TABLE,
MY_POSTGRES_VIEW,
MY_POSTGIS_VIEW,
MY_POSTGRES_COLUMN,
MY_POSTGIS_GEOMETRY
};
enum
{
// control IDs for timers
ID_AUTO_SAVE_TIMER = 20000,
ID_DB_STATUS_TIMER,
ID_WFS_TIMER,
ID_WHEEL_TIMER,
ID_MAP_PAINT_TIMER,
ID_MAP_BLINK_TIMER,
ID_MAP_TIP_TIMER
};
enum
{
// control IDs for Keyboard Shortcuts
KEY_Center = 37000,
KEY_Up,
KEY_MicroUp,
KEY_Down,
KEY_MicroDown,
KEY_Left,
KEY_MicroLeft,
KEY_Right,
KEY_MicroRight,
KEY_ZoomIn,
KEY_MicroZoomIn,
KEY_ZoomOut,
KEY_MicroZoomOut
};
enum
{
// DOT-COMMANDS [SQL scripts]
CMD_NONE = 0,
CMD_LOADSHP,
CMD_LOADDBF,
CMD_LOADXL,
CMD_DUMPSHP,
CMD_DUMPDBF,
CMD_SQLLOG
};
enum
{
// METADATA TYPEs
METADATA_UNKNOWN = 0,
METADATA_LEGACY,
METADATA_CURRENT
};
enum
{
// Map Layer TYPEs
MAP_LAYER_UNKNOWN = 0,
MAP_LAYER_RASTER,
MAP_LAYER_WMS,
MAP_LAYER_VECTOR,
MAP_LAYER_VECTOR_VIEW,
MAP_LAYER_VECTOR_VIRTUAL,
MAP_LAYER_TOPOLOGY,
MAP_LAYER_NETWORK
};
enum
{
// Quick Style TYPEs and dot-styles
QUICK_STYLE_UNKNOWN = 0,
QUICK_STYLE_POINT,
QUICK_STYLE_LINE,
QUICK_STYLE_POLYGON,
QUICK_STYLE_GEOMETRY,
QUICK_STYLE_TOPOGEO,
QUICK_STYLE_TOPONET,
QUICK_STYLE_SOLID_LINE,
QUICK_STYLE_DOT_LINE,
QUICK_STYLE_DASH_LINE,
QUICK_STYLE_DASH_DOT_LINE
};
enum
{
// Graphic Standard Brushes
GRAPHIC_BRUSH_HORZ = 0,
GRAPHIC_BRUSH_VERT,
GRAPHIC_BRUSH_CROSS,
GRAPHIC_BRUSH_DIAG1,
GRAPHIC_BRUSH_DIAG2,
GRAPHIC_BRUSH_CROSS_DIAG,
GRAPHIC_BRUSH_DOTS
};
enum
{
// constants for PrinterPlotter
MY_PAPER_A0 = 0,
MY_PAPER_A1,
MY_PAPER_A2,
MY_PAPER_A3,
MY_PAPER_A4,
MY_PAPER_A5,
MY_IMAGE_PNG,
MY_IMAGE_JPEG,
MY_IMAGE_TIFF,
MY_IMG_COMPRESSION_NONE,
MY_IMG_COMPRESSION_DEFLATE,
MY_IMG_COMPRESSION_JPEG,
MY_IMG_COMPRESSION_LZMA
};
class RasterCoverageItem
{
//
// a class wrapping a Raster Coverage related Table or View
//
private:
wxString Name;
bool TileData;
RasterCoverageItem *Next;
public:
RasterCoverageItem(wxString & name, bool tile_data);
~RasterCoverageItem()
{;
}
wxString & GetName()
{
return Name;
}
bool IsTileData()
{
return TileData;
}
void SetNext(RasterCoverageItem * next)
{
Next = next;
}
RasterCoverageItem *GetNext()
{
return Next;
}
};
class RasterCoverageSet
{
//
// a class representing a full Raster Coverage Set
//
private:
wxString Name;
int SRID;
public:
RasterCoverageSet(const char *name, int srid);
~RasterCoverageSet()
{;
}
wxString & GetName()
{
return Name;
}
int GetSRID()
{
return SRID;
}
};
class VectorCoverageItem
{
//
// a class wrapping a Vector Coverage related Table or View
//
private:
wxString Name;
VectorCoverageItem *Next;
public:
VectorCoverageItem(wxString & name);
~VectorCoverageItem()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(VectorCoverageItem * next)
{
Next = next;
}
VectorCoverageItem *GetNext()
{
return Next;
}
};
class VectorCoverageSet
{
//
// a class representing a full Vector Coverage Set
//
private:
wxString Prefix;
wxString Name;
int SRID;
int GeometryType;
public:
VectorCoverageSet(const char *prefix, const char *name, int srid, int type);
~VectorCoverageSet()
{;
}
wxString & GetPrefix()
{
return Prefix;
}
wxString & GetName()
{
return Name;
}
int GetSRID()
{
return SRID;
}
int GetGeometryType()
{
return GeometryType;
}
};
class MyObject:public wxTreeItemData
{
//
// a class to store TreeItemData
//
private:
int Type; // the object type
int SubType; // the object sub-type
wxString DbAlias; // the DB alias [Attached DB]
wxString MainName; // the object name [usually: table name]
wxString ColName; // the column name [optional]
wxString PathOrURL; // the Path or request URL [optional]
bool Restricted; // not editable
bool TopoObject; // Topology or Network Table
// PostgreSQL specific
wxString Host;
wxString HostAddr;
int Port;
wxString DbName;
wxString User;
wxString Schema;
wxString Name;
wxString Column;
wxString VirtName;
bool ReadOnly;
bool PK;
bool Select;
bool InsertUpdateDelete;
public:
MyObject(int type);
MyObject(int type, wxString & dbAlias);
MyObject(int type, wxString & dbAlias, wxString & name, bool restricted =
false, bool topoObj = false);
MyObject(int type, wxString & dbAlias, wxString & name, wxString & column);
MyObject(int type, wxString & dbAlias, wxString & name, bool topo_obj,
wxString & column);
MyObject(int type, wxString & dbAlias, wxString & name, wxString & column,
wxString & path_or_url);
MyObject(int type, wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, bool readOnly);
MyObject(int type, wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, wxString & schema);
MyObject(int type, wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, wxString & schema,
wxString & name, wxString & virtname, bool readOnly, bool pk,
bool select, bool insertUpdateDelete);
MyObject(int type, wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, wxString & schema,
wxString & name, wxString & column, wxString & virtname);
virtual ~ MyObject()
{;
}
int GetType()
{
return Type;
}
int GetSubType()
{
return SubType;
}
bool IsTopoObject()
{
return TopoObject;
}
wxString & GetDbAlias()
{
return DbAlias;
}
wxString & GetMainName()
{
return MainName;
}
wxString & GetColName()
{
return ColName;
}
wxString & GetPathOrURL()
{
return PathOrURL;
}
wxString & GetHost()
{
return Host;
}
wxString & GetHostAddr()
{
return HostAddr;
}
int GetPort()
{
return Port;
}
wxString & GetDbName()
{
return DbName;
}
wxString & GetUser()
{
return User;
}
wxString & GetSchema()
{
return Schema;
}
wxString & GetName()
{
return Name;
}
wxString & GetColumn()
{
return Column;
}
wxString & GetVirtName()
{
return VirtName;
}
bool IsReadOnly()
{
return ReadOnly;
}
bool HasPK()
{
return PK;
}
bool CanSelect()
{
return Select;
}
bool CanInsertUpdateDelete()
{
return InsertUpdateDelete;
}
bool IsTable();
bool IsView();
bool IsTemporary();
bool IsEditable();
bool IsAttachedDB();
bool IsRootAttached();
bool IsAttached();
bool IsColumn();
bool IsGpkgColumn();
bool IsFdoOgrColumn();
bool IsVirtualColumn();
bool IsViewColumn();
bool IsAnyGeometryColumn();
bool IsGpkgGeometryColumn();
bool IsGpkgVirtualGeometryColumn();
bool IsFdoOgrGeometryColumn();
bool IsFdoOgrVirtualGeometryColumn();
bool IsGeometryColumn();
bool IsIndex();
bool IsIndexColumn();
bool IsTrigger();
bool IsPrimaryKey();
bool IsPrimaryKeyColumn();
bool IsForeignKey();
bool IsForeignKeyColumn();
bool IsPostgreSQL();
bool IsAlreadyDefinedVectorCoverage(sqlite3 * sqlite);
char *DoFindUnusedCoverageName(sqlite3 * sqlite);
};
class MyColumnInfo
{
//
// a class to store a DB column
//
private:
wxString Name; // the column name
bool PrimaryKey; // Primary Key column
bool Geometry; // Geometry column
bool GPKGGeometry; // GPKG Geometry column
bool GPKGVirtualGeometry; // GPKG Virtual Geometry column
bool GeometryIndex; // Geometry column + SpatialIndex
bool MbrCache; // Geometry column + MbrCache
bool GPKGGeometryIndex; // GPKG Geometry column + SpatialIndex
bool FdoOgrGeometry; // FDO/OGR Geometry column
bool FdoOgrVirtualGeometry; // FDO/OGR Virtual Geometry column
MyColumnInfo *Next; // pointer to next element into the linked list
public:
MyColumnInfo(wxString & name, bool pkey);
~MyColumnInfo()
{;
}
wxString & GetName()
{
return Name;
}
bool IsPrimaryKey()
{
return PrimaryKey;
}
void SetGeometry()
{
Geometry = true;
}
bool IsGeometry()
{
return Geometry;
}
void SetGPKGGeometry()
{
GPKGGeometry = true;
}
bool IsGPKGGeometry()
{
return GPKGGeometry;
}
void SetGPKGVirtualGeometry()
{
GPKGVirtualGeometry = true;
}
bool IsGPKGVirtualGeometry()
{
return GPKGVirtualGeometry;
}
void SetFdoOgrGeometry()
{
FdoOgrGeometry = true;
}
bool IsFdoOgrGeometry()
{
return FdoOgrGeometry;
}
void SetFdoOgrVirtualGeometry()
{
FdoOgrVirtualGeometry = true;
}
bool IsFdoOgrVirtualGeometry()
{
return FdoOgrVirtualGeometry;
}
void SetGeometryIndex()
{
GeometryIndex = true;
}
bool IsGeometryIndex()
{
return GeometryIndex;
}
void SetMbrCache()
{
MbrCache = true;
}
bool IsMbrCache()
{
return MbrCache;
}
void SetGPKGGeometryIndex()
{
GPKGGeometryIndex = true;
}
bool IsGPKGGeometryIndex()
{
return GPKGGeometryIndex;
}
void SetNext(MyColumnInfo * next)
{
Next = next;
}
MyColumnInfo *GetNext()
{
return Next;
}
};
class MyIndexInfo
{
//
// a class to store a DB index
//
private:
wxString Name; // the index name
MyIndexInfo *Next; // pointer to next element into the linked list
public:
MyIndexInfo(wxString & name);
MyIndexInfo()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(MyIndexInfo * next)
{
Next = next;
}
MyIndexInfo *GetNext()
{
return Next;
}
bool ContainsOnlyPrimaryKeyColumns(sqlite3 * sqlite, wxString & indexName,
MyColumnInfo * first_column);
};
class MyTriggerInfo
{
//
// a class to store a DB trigger
//
private:
wxString Name; // the trigger name
MyTriggerInfo *Next; // pointer to next element into the linked list
public:
MyTriggerInfo(wxString & name);
~MyTriggerInfo()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(MyTriggerInfo * next)
{
Next = next;
}
MyTriggerInfo *GetNext()
{
return Next;
}
};
class MyTableInfo
{
//
// a class to store DB table columns
//
private:
MyColumnInfo * FirstColumn; // first element into the columns linked list
MyColumnInfo *LastColumn; // last element into the columns linked list
MyIndexInfo *FirstIndex; // first element into the indices linked list
MyIndexInfo *LastIndex; // last element into the indices linked list
MyTriggerInfo *FirstTrigger; // first element into the triggers linked list
MyTriggerInfo *LastTrigger; // last element into the triggers linked list
public:
MyTableInfo()
{
FirstColumn = NULL;
LastColumn = NULL;
FirstIndex = NULL;
LastIndex = NULL;
FirstTrigger = NULL;
LastTrigger = NULL;
}
~MyTableInfo();
void AddColumn(wxString & name, bool pkey);
void SetGeometry(wxString & name, bool index, bool cached);
void AddIndex(wxString & name);
void AddTrigger(wxString & name);
MyColumnInfo *GetFirstColumn()
{
return FirstColumn;
}
MyIndexInfo *GetFirstIndex()
{
return FirstIndex;
}
MyTriggerInfo *GetFirstTrigger()
{
return FirstTrigger;
}
void CheckGPKG(class MyFrame * MainFrame, sqlite3 * handle, wxString & table);
void CheckFdoOgr(MyFrame * MainFrame, sqlite3 * handle, wxString & table);
};
class MyViewInfo
{
//
// a class to store DB view columns
//
private:
MyColumnInfo * First; // first element into the columns linked list
MyColumnInfo *Last; // last element into the columns linked list
MyTriggerInfo *FirstTrigger; // first element into the triggers linked list
MyTriggerInfo *LastTrigger; // last element into the triggers linked list
public:
MyViewInfo()
{
First = NULL;
Last = NULL;
FirstTrigger = NULL;
LastTrigger = NULL;
}
~MyViewInfo();
void AddColumn(wxString & name);
void AddTrigger(wxString & name);
void SetGeometry(wxString & name, bool index, bool cached);
MyColumnInfo *GetFirst()
{
return First;
}
MyTriggerInfo *GetFirstTrigger()
{
return FirstTrigger;
}
};
class MyVariant
{
//
// a class to store Variant-Type values
//
private:
int Type; // the Variant-Type
sqlite3_int64 IntValue; // the Integer value
double DblValue; // the Double value
wxString TxtValue; // the Text value
unsigned char *Blob; // the BLOB value
int BlobSize; // the BLOB size
public:
MyVariant()
{
Type = MY_NULL_VARIANT;
Blob = NULL;
}
~MyVariant()
{
if (Blob)
delete[]Blob;
}
void Clear()
{
if (Blob)
delete[]Blob;
Blob = NULL;
Type = MY_NULL_VARIANT;
}
void Set(sqlite3_int64 value)
{
Type = MY_INT_VARIANT;
IntValue = value;
}
void Set(double value)
{
Type = MY_DBL_VARIANT;
DblValue = value;
}
void Set(const unsigned char *text);
void Set(wxString & string)
{
Type = MY_TXT_VARIANT;
TxtValue = string;
}
void Set(const void *blob, int size);
void Copy(MyVariant * other);
int GetType()
{
return Type;
}
sqlite3_int64 GetIntValue()
{
return IntValue;
}
double GetDblValue()
{
return DblValue;
}
wxString & GetTxtValue()
{
return TxtValue;
}
int GetBlobSize()
{
return BlobSize;
}
unsigned char *GetBlob()
{
return Blob;
}
};
class MyRowVariant
{
//
// a class to store a row composed of Variant-Type values
//
private:
int NumCols; // number of columns
MyVariant *ColumnArray; // the column as an array
bool Deleted; // switch to mark row deletion
MyRowVariant *Next; // pointer to next element into the linked list
public:
MyRowVariant()
{
NumCols = 0;
ColumnArray = NULL;
Deleted = false;
Next = NULL;
}
MyRowVariant(int cols)
{
NumCols = cols;
ColumnArray = new MyVariant[cols];
Next = NULL;
}
~MyRowVariant()
{
if (ColumnArray)
delete[]ColumnArray;
}
void Create(int cols);
int GetNumCols()
{
return NumCols;
}
void Set(int col, sqlite3_int64 value);
void Set(int col, double value);
void Set(int col, const unsigned char *text);
void Set(int col, const void *blob, int size);
MyVariant *GetColumn(int col);
void SetDeleted()
{
Deleted = true;
}
bool IsDeleted()
{
return Deleted;
}
void SetNext(MyRowVariant * next)
{
Next = next;
}
MyRowVariant *GetNext()
{
return Next;
}
};
class MyVariantList
{
//
// a class to store a whole result set
//
private:
int NumCols; // number of columns
wxString *ColumnName; // the column names
MyRowVariant *First; // first element into the linked list
MyRowVariant *Last; // last element into the linked list
public:
MyVariantList();
~MyVariantList();
void Reset(void);
MyRowVariant *Add(int columns);
void SetColumnName(int col, const char *colName);
MyRowVariant *GetFirst()
{
return First;
}
int GetRows();
int GetColumns()
{
return NumCols;
}
wxString & GetColumnName(int col);
};
class MyBlobs
{
//
// a class to store BLOBs
//
private:
int NumRows; // the number of rows
int NumCols; // the number of columns
MyRowVariant *Rows; // pointer to an array of rows
public:
MyBlobs(int rows, int cols);
~MyBlobs();
void SetBlob(int row, int col, MyVariant * blobVar);
MyVariant *GetBlob(int row, int col);
};
class MyValues
{
//
// a class to store column values for editing
//
private:
int NumRows; // the number of rows
int NumCols; // the number of columns
MyRowVariant *Rows; // pointer to an array of rows
public:
MyValues(int rows, int cols);
~MyValues();
void SetValue(int row, int col, sqlite3_int64 value);
void SetValue(int row, int col, double value);
void SetValue(int row, int col, wxString & string);
MyRowVariant *GetRow(int row);
MyVariant *GetValue(int row, int col);
};
class MySqlQuery
{
//
// a class to store an SQL query - history
//
private:
wxString Sql;
MySqlQuery *Prev;
MySqlQuery *Next;
public:
MySqlQuery(wxString & sql)
{
Sql = sql;
Prev = NULL;
Next = NULL;
}
~MySqlQuery()
{;
}
wxString & GetSql()
{
return Sql;
}
void SetPrev(MySqlQuery * prev)
{
Prev = prev;
}
MySqlQuery *GetPrev()
{
return Prev;
}
void SetNext(MySqlQuery * next)
{
Next = next;
}
MySqlQuery *GetNext()
{
return Next;
}
};
class MySqlHistory
{
//
// a class supporting SQL queries history
//
private:
MySqlQuery * First;
MySqlQuery *Last;
MySqlQuery *Current;
public:
MySqlHistory()
{
First = NULL;
Last = NULL;
Current = NULL;
}
~MySqlHistory();
void Prepend(wxString & sql);
void Add(wxString & sql);
MySqlQuery *GetCurrent()
{
return Current;
}
MySqlQuery *GetNext();
MySqlQuery *GetPrev();
bool TestNext();
bool TestPrev();
};
class MyApp:public wxApp
{
//
// the main APP
//
virtual bool OnInit();
};
class TopoGeoItem
{
//
// a class wrapping a TopoGeo related Table or View
//
private:
wxString Name;
TopoGeoItem *Next;
public:
TopoGeoItem(wxString & name);
~TopoGeoItem()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(TopoGeoItem * next)
{
Next = next;
}
TopoGeoItem *GetNext()
{
return Next;
}
};
class TopoGeoSet
{
//
// a class representing a full TopoGeo Set
//
private:
wxString DbPrefix;
wxString Name;
int SRID;
bool HasZ;
public:
TopoGeoSet(const char *name, int srid, bool has_z);
TopoGeoSet(const char *db_prefix, const char *name, int srid, bool has_z);
~TopoGeoSet()
{;
}
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetName()
{
return Name;
}
int GetSRID()
{
return SRID;
}
bool GetHasZ()
{
return HasZ;
}
};
class TopoGeo
{
//
// TopoGeo container
//
private:
sqlite3 * DbHandle;
wxString DbPrefix;
wxString Name;
wxTreeItemId TopologyNode;
TopoGeo *Next;
public:
TopoGeo(class MyTableTree * tree, wxTreeItemId & root,
wxString & topology, int srid, bool has_z);
TopoGeo(class MyTableTree * tree, wxTreeItemId & root,
wxString & db_prefix, wxString & topology, int srid, bool has_z);
~TopoGeo()
{;
}
wxTreeItemId *Check(wxString & table);
bool CheckTopoFeature(wxString & table);
TopoGeo *GetNext()
{
return Next;
}
void SetNext(TopoGeo * next)
{
Next = next;
}
};
class TopoGeoList
{
//
// TopoGeo container
//
private:
TopoGeo * First;
TopoGeo *Last;
int Count;
public:
TopoGeoList()
{
First = NULL;
Last = NULL;
Count = 0;
}
~TopoGeoList()
{
Flush();
}
void Flush();
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & topology, int srid, bool has_z);
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & db_prefix, wxString & topology, int srid, bool has_z);
wxTreeItemId *FindNode(wxString & table);
int GetCount()
{
return Count;
}
};
class TopoNetItem
{
//
// a class wrapping a TopoNet related Table or View
//
private:
wxString Name;
TopoNetItem *Next;
public:
TopoNetItem(wxString & name);
~TopoNetItem()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(TopoNetItem * next)
{
Next = next;
}
TopoNetItem *GetNext()
{
return Next;
}
};
class TopoNetSet
{
//
// a class representing a full TopoNet Set
//
private:
wxString DbPrefix;
wxString Name;
bool Spatial;
int SRID;
bool HasZ;
public:
TopoNetSet(const char *name, bool spatial, int srid, bool has_z);
TopoNetSet(const char *db_prefix, const char *name, bool spatial, int srid,
bool has_z);
~TopoNetSet()
{;
}
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetName()
{
return Name;
}
bool IsSpatial()
{
return Spatial;
}
int GetSRID()
{
return SRID;
}
bool GetHasZ()
{
return HasZ;
}
};
class TopoNet
{
//
// TopoNet container
//
private:
wxString DbPrefix;
wxString Name;
wxTreeItemId NetworkNode;
TopoNet *Next;
public:
TopoNet(class MyTableTree * tree, wxTreeItemId & root,
wxString & network, bool spatial, int srid, bool has_z);
TopoNet(class MyTableTree * tree, wxTreeItemId & root,
wxString & dbPrefix, wxString & network, bool spatial, int srid,
bool has_z);
~TopoNet()
{;
}
wxTreeItemId *Check(wxString & table);
TopoNet *GetNext()
{
return Next;
}
void SetNext(TopoNet * next)
{
Next = next;
}
};
class TopoNetList
{
//
// TopoNet container
//
private:
TopoNet * First;
TopoNet *Last;
int Count;
public:
TopoNetList()
{
First = NULL;
Last = NULL;
Count = 0;
}
~TopoNetList()
{
Flush();
}
void Flush();
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & network, bool spatial, int srid, bool has_z);
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & db_prefix, wxString & network, bool spatial, int srid,
bool has_z);
wxTreeItemId *FindNode(wxString & table);
int GetCount()
{
return Count;
}
};
class RasterCoverage
{
//
// Raster Coverage container
//
private:
wxString DbPrefix;
wxString Name;
wxTreeItemId CoverageNode;
RasterCoverage *Next;
public:
RasterCoverage(class MyTableTree * tree, wxTreeItemId & root,
wxString & coverage, int srid);
RasterCoverage(class MyTableTree * tree, wxTreeItemId & root,
wxString & dbPrefix, wxString & coverage, int srid);
~RasterCoverage()
{;
}
wxTreeItemId *Check(wxString & table, bool *tile_data);
RasterCoverage *GetNext()
{
return Next;
}
void SetNext(RasterCoverage * next)
{
Next = next;
}
};
class RasterCoverageList
{
//
// Raster Coverage container
//
private:
RasterCoverage * First;
RasterCoverage *Last;
int Count;
public:
RasterCoverageList()
{
First = NULL;
Last = NULL;
Count = 0;
}
~RasterCoverageList()
{
Flush();
}
void Flush();
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & coverage, int srid);
void Add(class MyTableTree * tree, wxTreeItemId & root, wxString & dbPrefix,
wxString & coverage, int srid);
wxTreeItemId *FindNode(wxString & table, bool *tile_data);
int GetCount()
{
return Count;
}
};
class VectorCoverage
{
//
// Vector Coverage container
//
private:
wxString DbPrefix;
wxString Prefix;
wxString Name;
wxTreeItemId CoverageNode;
VectorCoverage *Next;
public:
VectorCoverage(class MyTableTree * tree, wxTreeItemId & root,
wxString & prefix, wxString & coverage, int srid,
int geometry_type);
VectorCoverage(class MyTableTree * tree, wxTreeItemId & root,
wxString & dbPrefix, wxString & prefix, wxString & coverage,
int srid, int geometry_type);
~VectorCoverage()
{;
}
VectorCoverage *GetNext()
{
return Next;
}
void SetNext(VectorCoverage * next)
{
Next = next;
}
};
class VectorCoverageList
{
//
// Vector Coverage container
//
private:
VectorCoverage * First;
VectorCoverage *Last;
int Count;
public:
VectorCoverageList()
{
First = NULL;
Last = NULL;
Count = 0;
}
~VectorCoverageList()
{
Flush();
}
void Flush();
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & prefix, wxString & coverage, int srid, int geometry_type);
void Add(class MyTableTree * tree, wxTreeItemId & root, wxString & dbPrefix,
wxString & prefix, wxString & coverage, int srid, int geometry_type);
int GetCount()
{
return Count;
}
};
class WmsLayer
{
//
// WMS Layers container
//
private:
wxString DbPrefix;
wxString LayerName;
wxString URL;
wxTreeItemId CoverageNode;
WmsLayer *Next;
public:
WmsLayer(class MyTableTree * tree, wxTreeItemId & root,
wxString & layer_name, wxString & url);
WmsLayer(class MyTableTree * tree, wxTreeItemId & root,
wxString & dbPrefix, wxString & layer_name, wxString & url);
~WmsLayer()
{;
}
WmsLayer *GetNext()
{
return Next;
}
void SetNext(WmsLayer * next)
{
Next = next;
}
};
class WmsLayerList
{
//
// WMS Layers container
//
private:
WmsLayer * First;
WmsLayer *Last;
int Count;
public:
WmsLayerList()
{
First = NULL;
Last = NULL;
Count = 0;
}
~WmsLayerList()
{
Flush();
}
void Flush();
void Add(class MyTableTree * tree, wxTreeItemId & root,
wxString & wms_layer_name, wxString & url);
void Add(class MyTableTree * tree, wxTreeItemId & root, wxString & dbPrefix,
wxString & wms_layer_name, wxString & url);
int GetCount()
{
return Count;
}
};
class IncompleteLayer
{
//
// an incomplete Layer identified by its Coverage Name
//
private:
char *Type;
char *CoverageName;
IncompleteLayer *Next;
public:
IncompleteLayer(const char *type, const char *name);
~IncompleteLayer()
{
if (Type != NULL)
free(Type);
if (CoverageName != NULL)
free(CoverageName);
}
const char *GetType()
{
return Type;
}
const char *GetCoverageName()
{
return CoverageName;
}
void SetNext(IncompleteLayer * next)
{
Next = next;
}
IncompleteLayer *GetNext()
{
return Next;
}
};
class IncompleteLayersList
{
//
// incomplete Layers container
//
private:
IncompleteLayer * First;
IncompleteLayer *Last;
public:
IncompleteLayersList()
{
First = NULL;
Last = NULL;
}
~IncompleteLayersList();
void Add(const char *type, const char *coverage_name);
IncompleteLayer *GetFirst()
{
return First;
}
};
class RootNodes
{
//
// a class wrapping root nodes for an Attached DB
//
private:
wxString dbAlias;
wxTreeItemId rootUserData;
wxTreeItemId rootTopologies;
wxTreeItemId rootNetworks;
wxTreeItemId rootRasterCoverages;
wxTreeItemId rootVectorCoverages;
wxTreeItemId rootStyling;
wxTreeItemId rootWMS;
wxTreeItemId rootIsoMetadata;
wxTreeItemId rootMetadata;
wxTreeItemId rootInternal;
wxTreeItemId rootSpatialIndex;
public:
RootNodes(wxString & alias, wxTreeItemId userData, wxTreeItemId topologies,
wxTreeItemId networks, wxTreeItemId raster_coverages,
wxTreeItemId vector_coverages, wxTreeItemId styling,
wxTreeItemId wms, wxTreeItemId isoMetadata, wxTreeItemId metadata,
wxTreeItemId internal, wxTreeItemId spatialIndex)
{
dbAlias = alias;
rootUserData = userData;
rootTopologies = topologies;
rootNetworks = networks;
rootRasterCoverages = raster_coverages;
rootVectorCoverages = vector_coverages;
rootStyling = styling;
rootWMS = wms;
rootIsoMetadata = isoMetadata;
rootMetadata = metadata;
rootInternal = internal;
rootSpatialIndex = spatialIndex;
}
~RootNodes()
{;
}
wxString & GetDbAlias()
{
return dbAlias;
}
wxTreeItemId & GetRootUserData()
{
return rootUserData;
}
wxTreeItemId & GetRootTopologies()
{
return rootTopologies;
}
wxTreeItemId & GetRootNetworks()
{
return rootNetworks;
}
wxTreeItemId & GetRootRasterCoverages()
{
return rootRasterCoverages;
}
wxTreeItemId & GetRootVectorCoverages()
{
return rootVectorCoverages;
}
wxTreeItemId & GetRootStyling()
{
return rootStyling;
}
wxTreeItemId & GetRootWMS()
{
return rootWMS;
}
wxTreeItemId & GetRootIsoMetadata()
{
return rootIsoMetadata;
}
wxTreeItemId & GetRootMetadata()
{
return rootMetadata;
}
wxTreeItemId & GetRootInternal()
{
return rootInternal;
}
wxTreeItemId & GetRootSpatialIndex()
{
return rootSpatialIndex;
}
};
class MyTableTree:public wxTreeCtrl
{
//
// a tree-control used for SQLite DB tables
//
private:
MyFrame * MainFrame;
bool IsGeoPackage;
bool IsFdoOgr;
wxTreeItemId Root; // the root node
wxTreeItemId RootUserData;
wxTreeItemId RootTopologies;
wxTreeItemId RootNetworks;
wxTreeItemId RootRasterCoverages;
wxTreeItemId RootVectorCoverages;
wxTreeItemId RootStyling;
wxTreeItemId RootWMS;
wxTreeItemId RootIsoMetadata;
wxTreeItemId RootPostgreSQL;
TopoGeoList Topologies;
TopoNetList Networks;
RasterCoverageList RasterCoverages;
VectorCoverageList VectorCoverages;
WmsLayerList WmsLayers;
TopoGeoList AltTopologies;
TopoNetList AltNetworks;
RasterCoverageList AltRasterCoverages;
VectorCoverageList AltVectorCoverages;
WmsLayerList AltWmsLayers;
wxTreeItemId RootMetadata;
wxTreeItemId RootInternal;
wxTreeItemId RootSpatialIndex;
wxImageList *Images; // the images list
wxTreeItemId CurrentItem; // the tree item holding the current context menu
wxString CurrentRasterCoverageName;
wxString CurrentVectorCoverageName;
wxString CurrentWmsLayerURL;
wxString CurrentWmsLayerName;
void ExpandTable(wxTreeItemId & item);
void ExpandView(wxTreeItemId & item);
void ExpandAttachedTable(wxTreeItemId & item);
void ExpandAttachedView(wxTreeItemId & item);
void ExpandPostgresTable(wxTreeItemId & item);
void ExpandPostGisView(wxTreeItemId & item);
// context menus
void DoRootRasterCoveragesContextMenu(wxPoint & pt);
void DoRootVectorCoveragesContextMenu(wxPoint & pt);
void DoRootWmsLayersContextMenu(wxPoint & pt);
void DoRootTopoGeoContextMenu(wxPoint & pt);
void DoRootTopoNetContextMenu(wxPoint & pt);
void DoRootStylingContextMenu(wxPoint & pt);
void DoRootPostgreSqlContextMenu(wxPoint & pt);
void DoRootOthersContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedDbContextMenu(wxPoint & pt, MyObject * obj);
void DoRootAttachedContextMenu(wxPoint & pt, MyObject * obj);
void DoGenericAttachedContextMenu(wxPoint & pt, wxString & title);
void DoTopoGeoContextMenu(wxPoint & pt, wxString & name);
void DoTopoNetContextMenu(wxPoint & pt, wxString & name);
void DoRasterCoverageContextMenu(wxPoint & pt, wxString & name);
void DoVectorCoverageContextMenu(wxPoint & pt, wxString & name);
void DoWmsLayerContextMenu(wxPoint & pt, wxString & name);
void DoMainTableContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoMainViewContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoAttachedTableContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoAttachedViewContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoMainColumnContextMenu(wxPoint & pt, MyObject * obj, int icon,
bool metadata);
void DoMainGpkgColumnContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoMainFdoOgrColumnContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoMainLimitedColumnContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoAttachedColumnContextMenu(wxPoint & pt, MyObject * obj, int icon);
void DoMainGeometryColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoMainLimitedGeometryColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedGeometryColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoMainIndexContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedIndexContextMenu(wxPoint & pt, MyObject * obj);
void DoMainIndexColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedIndexColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoMainTriggerContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedTriggerContextMenu(wxPoint & pt, MyObject * obj);
void DoMainPrimaryKeyContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedPrimaryKeyContextMenu(wxPoint & pt, MyObject * obj);
void DoMainPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoMainForeignKeyContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedForeignKeyContextMenu(wxPoint & pt, MyObject * obj);
void DoMainForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoAttachedForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoPostgreSqlContextMenu(wxPoint & pt, MyObject * obj);
void DoPostgresConnContextMenu(wxPoint & pt);
void DoPostgresSchemaContextMenu(wxPoint & pt);
void DoPostgresTableContextMenu(wxPoint & pt, MyObject * obj);
void DoPostgresViewContextMenu(wxPoint & pt, MyObject * obj);
void DoPostGisViewContextMenu(wxPoint & pt, MyObject * obj);
void DoPostgresColumnContextMenu(wxPoint & pt, MyObject * obj);
void DoPostGisGeometryContextMenu(wxPoint & pt, MyObject * obj);
bool IsAlreadyDefinedTopologyCoverage(wxString & name);
bool IsAlreadyDefinedNetworkCoverage(wxString & name);
public:
MyTableTree()
{;
}
MyTableTree(MyFrame * parent, wxWindowID id = wxID_ANY);
virtual ~ MyTableTree();
void SetPath(wxString & path)
{
SetItemText(Root, path);
}
bool IsGeoPackageMode()
{
return IsGeoPackage;
}
void SetGeoPackageMode(bool mode)
{
IsGeoPackage = mode;
}
bool IsFdoOgrMode()
{
return IsFdoOgr;
}
void SetFdoOgrMode(bool mode)
{
IsFdoOgr = mode;
}
void FlushAll();
wxTreeItemId & GetRootNode(wxString & tableName, bool *restricted,
bool *topoObj, bool *tile_data);
wxTreeItemId & GetAltRootNode(wxString & tableName, RootNodes * nodes,
bool *topoObj, bool *tile_data);
void AddTable(wxString & tableName, bool virtualTable, bool geometry);
void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable,
bool geometry);
void AddTmpMetadata(wxString & tableName);
void AddGeoPackageTable(wxString & tableName);
void AddGeoPackageTable(wxString & dbAlias, wxString & tableName,
RootNodes * nodes);
void AddGeoPackageVirtualTable(wxString & tableName);
void AddGeoPackageVirtualTable(wxString & dbAlias, wxString & tableName,
RootNodes * nodes);
void AddFdoOgrTable(wxString & tableName);
void AddFdoOgrTable(wxString & dbAlias, wxString & tableName,
RootNodes * nodes);
void AddFdoOgrVirtualTable(wxString & tableName);
void AddFdoOgrVirtualTable(wxString & dbAlias, wxString & tableName,
RootNodes * nodes);
wxTreeItemId & AddAttached(wxString & dbAlias, wxString & path);
void AddTable(wxString & dbAlias, wxString & tableName,
bool virtualTable, bool geometry, RootNodes * list);
void AddView(wxString & viewName, bool geometry);
void AddView(wxString & dbAlias, wxString & viewName, bool geometry);
void AddView(wxString & dbAlias, wxString & viewName, bool geometry,
RootNodes * list);
void AddPostgresTable(class MyPostgres * list, wxString & virtName);
void ExpandRoot()
{
Expand(Root);
Expand(RootUserData);
CollapseAllChildren(RootTopologies);
CollapseAllChildren(RootNetworks);
CollapseAllChildren(RootRasterCoverages);
CollapseAllChildren(RootVectorCoverages);
CollapseAllChildren(RootStyling);
CollapseAllChildren(RootWMS);
CollapseAllChildren(RootPostgreSQL);
CollapseAllChildren(RootIsoMetadata);
Collapse(RootMetadata);
Collapse(RootInternal);
Collapse(RootSpatialIndex);
}
void AddTopology(TopoGeoSet * topology)
{
Topologies.Add(this, RootTopologies,
topology->GetName(), topology->GetSRID(),
topology->GetHasZ());
}
void AddAltTopology(wxTreeItemId & rootTopologies, wxString & dbAlias,
TopoGeoSet * topology)
{
AltTopologies.Add(this, rootTopologies, dbAlias,
topology->GetName(), topology->GetSRID(),
topology->GetHasZ());
}
void DeleteTopologies(wxTreeItemId & root_topologies);
void DeleteAltTopologies(void)
{
AltTopologies.Flush();
}
void AddNetwork(TopoNetSet * network)
{
Networks.Add(this, RootNetworks, network->GetName(), network->IsSpatial(),
network->GetSRID(), network->GetHasZ());
}
void AddAltNetwork(wxTreeItemId & rootNetworks, wxString & dbAlias,
TopoNetSet * network)
{
AltNetworks.Add(this, rootNetworks, dbAlias, network->GetName(),
network->IsSpatial(), network->GetSRID(),
network->GetHasZ());
}
void DeleteNetworks(wxTreeItemId & root_networks);
void DeleteAltNetworks(void)
{
AltNetworks.Flush();
}
void AddRasterCoverage(RasterCoverageSet * coverage)
{
RasterCoverages.Add(this, RootRasterCoverages, coverage->GetName(),
coverage->GetSRID());
}
void AddAltRasterCoverage(wxTreeItemId & rootRasterCoverages,
wxString & dbAlias, RasterCoverageSet * coverage)
{
AltRasterCoverages.Add(this, rootRasterCoverages, dbAlias,
coverage->GetName(), coverage->GetSRID());
}
void AddVectorCoverage(VectorCoverageSet * coverage)
{
VectorCoverages.Add(this, RootVectorCoverages, coverage->GetPrefix(),
coverage->GetName(), coverage->GetSRID(),
coverage->GetGeometryType());
}
void AddAltVectorCoverage(wxTreeItemId & rootVectorCoverages,
wxString & dbAlias, VectorCoverageSet * coverage)
{
AltVectorCoverages.Add(this, rootVectorCoverages, dbAlias,
coverage->GetPrefix(), coverage->GetName(),
coverage->GetSRID(), coverage->GetGeometryType());
}
void AddWmsLayer(wxString & name, wxString & url)
{
WmsLayers.Add(this, RootWMS, name, url);
}
void AddWmsLayer(wxTreeItemId & rootWMS,
wxString & dbAlias, wxString & name, wxString & url)
{
AltWmsLayers.Add(this, rootWMS, dbAlias, name, url);
}
bool GetCurrentlySelectedTable(wxString & table_name);
void DeleteRasterCoverages(wxTreeItemId & root_coverages);
void DeleteVectorCoverages(wxTreeItemId & root_coverages);
void DeleteAltRasterCoverages(void)
{
AltRasterCoverages.Flush();
}
void DeleteAltVectorCoverages(void)
{
AltVectorCoverages.Flush();
}
void AddPostgresConnection(int num, class MyPostgresConn * conn,
wxTreeItemId & itemId);
void AddPostgresSchema(wxTreeItemId & parent, MyPostgresConn * conn,
wxString & schema, wxTreeItemId & itemId);
void AddPostgresTable(wxTreeItemId & parent, MyPostgresConn * conn,
wxString & schema, wxString & table,
wxString & virtName);
void AddPostgresView(wxTreeItemId & parent, MyPostgresConn * conn,
wxString & schema, wxString & view, wxString & virtName);
void AddPostGisView(wxTreeItemId & parent, MyPostgresConn * conn,
wxString & schema, wxString & table, wxString & geometry,
wxString & virtName);
void DoVerifyMapConfig(const unsigned char *xml, wxString & report);
bool DoVerifyLayer(int type, const char *prefix, const char *name);
bool DoVerifyRasterInternalStyle(const char *prefix, const char *style);
bool DoVerifyVectorInternalStyle(const char *prefix, const char *style);
sqlite3 *GetSQLiteHandle();
void OnSelChanged(wxTreeEvent & event);
void OnRightClick(wxTreeEvent & event);
void OnCmdQueryViewComposer(wxCommandEvent & event);
void OnCmdCloneTable(wxCommandEvent & event);
void OnCmdNewTable(wxCommandEvent & event);
void OnCmdNewView(wxCommandEvent & event);
void OnCmdNewIndex(wxCommandEvent & event);
void OnCmdNewTrigger(wxCommandEvent & event);
void OnCmdNewColumn(wxCommandEvent & event);
void OnCmdNewRasterStyle(wxCommandEvent & event);
void OnCmdReloadRasterStyle(wxCommandEvent & event);
void OnCmdUnregisterRasterStyle(wxCommandEvent & event);
void OnCmdRegisterExternalGraphic(wxCommandEvent & event);
void OnCmdUnregisterExternalGraphic(wxCommandEvent & event);
void OnCmdRegisterTextFont(wxCommandEvent & event);
void OnCmdUnregisterTextFont(wxCommandEvent & event);
void OnCmdNewVectorStyle(wxCommandEvent & event);
void OnCmdReloadVectorStyle(wxCommandEvent & event);
void OnCmdUnregisterVectorStyle(wxCommandEvent & event);
void OnCmdNewMapConfig(wxCommandEvent & event);
void OnCmdReloadMapConfig(wxCommandEvent & event);
void OnCmdUnregisterMapConfig(wxCommandEvent & event);
void OnCmdVerifyExternalMapConfig(wxCommandEvent & event);
void OnCmdVerifyRegisteredMapConfig(wxCommandEvent & event);
void OnCmdRasterSymbolizerContrast(wxCommandEvent & event);
void OnCmdRasterSymbolizerChannelRgb(wxCommandEvent & event);
void OnCmdRasterSymbolizerChannelGray(wxCommandEvent & event);
void OnCmdRasterSymbolizerCategorize(wxCommandEvent & event);
void OnCmdRasterSymbolizerInterpolate(wxCommandEvent & event);
void OnCmdRasterSymbolizerShadedRelief(wxCommandEvent & event);
void OnCmdRasterSymbolizerMonochrome(wxCommandEvent & event);
void OnCmdSimpleLineSymbolizer(wxCommandEvent & event);
void OnCmdSimplePolygonSymbolizer(wxCommandEvent & event);
void OnCmdSimplePointSymbolizer(wxCommandEvent & event);
void OnCmdSimpleTextSymbolizer(wxCommandEvent & event);
void OnCmdImportRaster(wxCommandEvent & event);
void OnCmdPyramidize(wxCommandEvent & event);
void OnCmdPyramidizeMonolithic(wxCommandEvent & event);
void OnCmdDePyramidize(wxCommandEvent & event);
void OnCmdRasterDrop(wxCommandEvent & event);
void OnCmdRasterInfos(wxCommandEvent & event);
void OnCmdRasterSRIDs(wxCommandEvent & event);
void OnCmdRasterKeywords(wxCommandEvent & event);
void OnCmdAddAllRastersSrid(wxCommandEvent & event);
void OnCmdUpdateRasterExtent(wxCommandEvent & event);
void OnCmdUpdateRasterExtentAll(wxCommandEvent & event);
void OnCmdVectorUnregister(wxCommandEvent & event);
void OnCmdVectorInfos(wxCommandEvent & event);
void OnCmdVectorSRIDs(wxCommandEvent & event);
void OnCmdVectorKeywords(wxCommandEvent & event);
void OnCmdUpdateVectorExtent(wxCommandEvent & event);
void OnCmdAddAllVectorsSrid(wxCommandEvent & event);
void OnCmdUpdateVectorExtentAll(wxCommandEvent & event);
void OnCmdRegisterWmsLayer(wxCommandEvent & event);
void OnCmdWmsLayerUnregister(wxCommandEvent & event);
void OnCmdWmsLayerInfos(wxCommandEvent & event);
void OnCmdWmsLayerConfigure(wxCommandEvent & event);
void OnCmdCreateTopoGeo(wxCommandEvent & event);
void OnCmdDropTopoGeo(wxCommandEvent & event);
void OnCmdCreateTopoNet(wxCommandEvent & event);
void OnCmdDropTopoNet(wxCommandEvent & event);
void OnCmdShow(wxCommandEvent & event);
void OnCmdDrop(wxCommandEvent & event);
void OnCmdRename(wxCommandEvent & event);
void OnCmdSelect(wxCommandEvent & event);
void OnCmdSelectTiles(wxCommandEvent & event);
void OnCmdRefresh(wxCommandEvent & event);
void OnRefreshDeferred(wxCommandEvent & event);
void OnCmdRecover(wxCommandEvent & event);
void OnCmdShowSql(wxCommandEvent & event);
void OnCmdSpatialIndex(wxCommandEvent & event);
void OnCmdCheckSpatialIndex(wxCommandEvent & event);
void OnCmdRecoverSpatialIndex(wxCommandEvent & event);
void OnCmdMbrCache(wxCommandEvent & event);
void OnCmdRebuildTriggers(wxCommandEvent & event);
void OnCmdCheckGeometry(wxCommandEvent & event);
void OnCmdExtent(wxCommandEvent & event);
void OnCmdUpdateLayerStatistics(wxCommandEvent & event);
void OnCmdUpdateLayerStatisticsAll(wxCommandEvent & event);
void OnCmdElementaryGeometries(wxCommandEvent & event);
void OnCmdMalformedGeometries(wxCommandEvent & event);
void OnCmdRepairPolygons(wxCommandEvent & event);
void OnCmdSetSrid(wxCommandEvent & event);
void OnCmdDumpShp(wxCommandEvent & event);
void OnCmdDumpGeoJSON(wxCommandEvent & event);
void OnCmdDumpKml(wxCommandEvent & event);
void OnCmdDumpTxtTab(wxCommandEvent & event);
void OnCmdDumpCsv(wxCommandEvent & event);
void OnCmdDumpHtml(wxCommandEvent & event);
void OnCmdDumpDif(wxCommandEvent & event);
void OnCmdDumpSylk(wxCommandEvent & event);
void OnCmdDumpDbf(wxCommandEvent & event);
void OnCmdDumpXlsx(wxCommandEvent & event);
void OnCmdDumpPostGIS(wxCommandEvent & event);
void OnCmdEdit(wxCommandEvent & event);
void OnCmdCreatePostgreSqlConn(wxCommandEvent & event);
void OnCmdCloseAllPostgreSqlConns(wxCommandEvent & event);
void OnCmdClosePostgreSqlConn(wxCommandEvent & event);
void OnCmdPostgreSqlDropOrphans(wxCommandEvent & event);
void OnCmdPostgreSqlInfos(wxCommandEvent & event);
bool DropRenameAux1(MyObject * obj, class GeomColsList * geometries,
bool *autoincrement);
void DropRenameAux2(MyObject * obj, GeomColsList * geometries,
wxString & aliasTable, wxString & new_column,
wxString & renameSql, wxString & dropSql,
wxString & disableSpatialIdxSql,
wxString & dropSpatialIdxSql,
wxString & createSpatialIdxSql,
wxString & discardGeometrySql);
void DropRenameAux3(MyObject * obj, wxString & new_column,
GeomColsList * geometries, class TblIndexList * index,
wxString & addGeometrySql);
void OnCmdDropColumn(wxCommandEvent & event);
void OnCmdRenameColumn(wxCommandEvent & event);
void OnCmdColumnStats(wxCommandEvent & event);
void OnCmdMapPreview(wxCommandEvent & event);
void OnCmdCreateVectorCoverage(wxCommandEvent & event);
void OnCmdCreateTopologyCoverage(wxCommandEvent & event);
void OnCmdCreateNetworkCoverage(wxCommandEvent & event);
void OnCmdCheckDuplicates(wxCommandEvent & event);
void OnCmdRemoveDuplicates(wxCommandEvent & event);
void OnCmdDetachDB(wxCommandEvent & event);
void OnCmdCheckGeometries(wxCommandEvent & event);
void OnCmdSanitizeGeometries(wxCommandEvent & event);
void OnCmdSldSeRasterStyles(wxCommandEvent & event);
void OnCmdSldSeVectorStyles(wxCommandEvent & event);
void OnCreateRasterCoverage(wxCommandEvent & event);
void OnRegisterVectorCoverage(wxCommandEvent & event);
void OnRegisterSpatialViewCoverage(wxCommandEvent & event);
void OnRegisterVirtualTableCoverage(wxCommandEvent & event);
void OnRegisterTopoGeoCoverage(wxCommandEvent & event);
void OnRegisterTopoNetCoverage(wxCommandEvent & event);
void OnItemCollapsed(wxTreeEvent & event);
void OnItemExpanding(wxTreeEvent & event);
};
class SqlThreadParams
{
//
// an auxiliary class used for SQL threaded queries
//
private:
class MyResultSetView * Mother;
wxString Sql;
sqlite3_stmt *Stmt;
int FromRow;
int EndRow;
int MaxRow;
MyVariantList List;
sqlite3 *Sqlite;
clock_t Start;
bool Error;
int FetchedRows;
int StatFullscanStep;
int StatSort;
int StatAutoindex;
double ElapsedTime;
bool AbortRequested;
bool Valid;
public:
SqlThreadParams()
{
Reset();
}
~SqlThreadParams()
{;
}
void Initialize(MyResultSetView * mother, wxString & sql, sqlite3_stmt * stmt,
int from, sqlite3 * sqlite, clock_t start);
void Reset(void);
bool IsValid()
{
return Valid;
}
MyResultSetView *GetMother()
{
return Mother;
}
wxString & GetSql()
{
return Sql;
}
sqlite3_stmt *GetStmt()
{
return Stmt;
}
int GetFromRow()
{
return FromRow;
}
void SetEndRow(int end)
{
EndRow = end;
}
int GetEndRow()
{
return EndRow;
}
void SetMaxRow(int max)
{
MaxRow = max;
}
int GetMaxRow()
{
return MaxRow;
}
MyVariantList *GetList()
{
return &List;
}
sqlite3 *GetSqlite()
{
return Sqlite;
}
clock_t GetStart()
{
return Start;
}
void FetchedRow()
{
FetchedRows++;
}
void UpdateStats(int fullscan, int sort, int autoindex, clock_t now);
int GetFetchedRows()
{
return FetchedRows;
}
int GetStatFullscanStep()
{
return StatFullscanStep;
}
int GetStatSort()
{
return StatSort;
}
int GetStatAutoindex()
{
return StatAutoindex;
}
double GetElapsedTime()
{
return ElapsedTime;
}
void SetError()
{
Error = true;
Valid = false;
}
bool IsError()
{
return Error;
}
void Abort()
{
AbortRequested = true;
}
bool IsAbortRequested()
{
return AbortRequested;
}
void Finalize()
{
sqlite3_finalize(Stmt);
Stmt = NULL;
}
};
class MyResultSetView:public wxPanel
{
//
// a panel to be used for SQL Queries
//
private:
wxTimer * ProgressTimer;
MyFrame *MainFrame;
wxBitmapButton *BtnRsFirst;
wxBitmapButton *BtnRsLast;
wxBitmapButton *BtnRsNext;
wxBitmapButton *BtnRsPrevious;
wxBitmapButton *BtnRefresh;
wxBitmapButton *BtnRsMapShow;
wxBitmapButton *BtnRsMapZoom;
wxStaticText *RsCurrentBlock;
int RsBlock;
int RsBeginRow;
int RsEndRow;
int RsMaxRow;
bool IsMaxAlreadySet;
int CurrentEvtRow;
int CurrentEvtColumn;
int CurrentTileId;
wxString TileDataDbPrefix;
wxString TileDataTable;
MyVariant *CurrentBlob;
wxGrid *TableView;
MyBlobs *TableBlobs;
MyValues *TableValues;
bool ReadOnly;
bool CoverageTiles;
sqlite3_int64 *RowIds;
int PrimaryKeys[1024];
int BlobColumns[1024];
wxString DbPrefix;
wxString TableName;
bool InsertPending;
MyRowVariant *InsertRow;
wxString SqlErrorMsg;
SqlThreadParams ThreadParams;
void XmlBlobOut(bool indented);
const char *CleanSqlTail(const char *dirty);
char *ConsumeSqlComment(char *sql, bool mode);
char *ConsumeSqlEmptyLine(char *sql);
void UpdateMaxRow(wxString & sql);
public:
MyResultSetView()
{;
}
MyResultSetView(MyFrame * parent, wxWindowID id = wxID_ANY);
virtual ~ MyResultSetView();
void HideControls();
void ShowControls();
wxString & GetSqlErrorMsg()
{
return SqlErrorMsg;
}
bool IsReadOnly()
{
return ReadOnly;
}
bool IsPrimaryKey(int column);
bool IsBlobColumn(int column);
void EditTable(wxString & sql, int *primaryKeys, int *blobCols,
wxString & tableName);
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetTableName()
{
return TableName;
}
int FindGeomColumnIndex(wxString & geometry_column);
void CreateGrid(int rows, int cols);
void CreateStatsGrid();
void ResetEmpty();
bool ExecuteSqlPre(wxString & sql, int from, bool read_only, bool coverage,
wxString & tile_data_db_prefix, wxString & tile_data_table,
bool reset);
bool ExecuteSqlPost(void);
void AbortRequested(void);
wxStaticText *GetCurrentBlock()
{
return RsCurrentBlock;
}
static void FormatElapsedTime(double seconds, char *elapsed, bool simple =
false);
int GetRsBlock()
{
return RsBlock;
}
void SetSqlErrorMsg(wxString & msg)
{
SqlErrorMsg = msg;
}
gaiaGeomCollPtr DoTransformMapGeometry(unsigned char *blob, int blob_size,
int srid);
void ResizeView(void);
void DoInsert(bool confirmed);
void HexBlobValue(unsigned char *blob, int size, wxString & hex);
void OnSize(wxSizeEvent & event);
void OnRsFirst(wxCommandEvent & event);
void OnMapFeatureSelect(wxCommandEvent & event);
void OnRsLast(wxCommandEvent & event);
void OnRsNext(wxCommandEvent & event);
void OnRsPrevious(wxCommandEvent & event);
void OnRefresh(wxCommandEvent & event);
void OnRsMapShow(wxCommandEvent & event);
void OnRsMapZoom(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
void OnTimerStatistics(wxTimerEvent & event);
void OnCellSelected(wxGridEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCellChanged(wxGridEvent & event);
void OnCmdDelete(wxCommandEvent & event);
void OnCmdInsert(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnCmdClearSelection(wxCommandEvent & event);
void OnCmdSelectAll(wxCommandEvent & event);
void OnCmdSelectRow(wxCommandEvent & event);
void OnCmdSelectColumn(wxCommandEvent & event);
void OnCmdCopy(wxCommandEvent & event);
void OnCmdBlob(wxCommandEvent & event);
void OnCmdBlobIn(wxCommandEvent & event);
void OnCmdBlobOut(wxCommandEvent & event);
void OnCmdBlobNull(wxCommandEvent & event);
void OnCmdXmlBlobIn(wxCommandEvent & event);
void OnCmdXmlBlobOut(wxCommandEvent & event);
void OnCmdXmlBlobOutIndented(wxCommandEvent & event);
void OnCmdExpTxtTab(wxCommandEvent & event);
void OnCmdExpCsv(wxCommandEvent & event);
void OnCmdExpHtml(wxCommandEvent & event);
void OnCmdExpShp(wxCommandEvent & event);
void OnCmdExpDif(wxCommandEvent & event);
void OnCmdExpSylk(wxCommandEvent & event);
void OnCmdExpDbf(wxCommandEvent & event);
void OnCmdExpXlsx(wxCommandEvent & event);
void OnCmdTilePreview(wxCommandEvent & event);
void OnCmdFilter(wxCommandEvent & event);
};
class MySqlControl:public wxTextCtrl
{
//
// the SQL text control
//
private:
class MyQueryView * Parent;
public:
MySqlControl(MyQueryView * parent, wxWindowID id, const wxString & value,
const wxPoint & pos, const wxSize & size, long style);
virtual ~ MySqlControl()
{;
}
void OnSqlMousePosition(wxMouseEvent & event);
void OnSqlArrowPosition(wxKeyEvent & event);
};
class SqlTokenizer
{
//
// a class used for tokenizing SQL statements
//
private:
wxString ** TokenList;
int Block;
int Max;
int Index;
void Expand();
void Insert(wxString * token);
wxString CurrentToken;
public:
SqlTokenizer(wxString & sql);
~SqlTokenizer();
bool HasMoreTokens();
wxString & GetNextToken();
};
class MyQueryView:public wxPanel
{
//
// a panel to be used for SQL Queries
//
private:
MyFrame * MainFrame;
MySqlHistory History;
MySqlControl *SqlCtrl;
wxBitmapButton *BtnSqlGo;
wxBitmapButton *BtnSqlFilter;
wxBitmapButton *BtnSqlErase;
wxBitmapButton *BtnSqlAbort;
wxBitmapButton *BtnHistoryBack;
wxBitmapButton *BtnHistoryForward;
int BracketStart;
int BracketEnd;
bool IgnoreEvent;
public:
MyQueryView()
{;
}
MyQueryView(MyFrame * parent, wxWindowID id = wxID_ANY);
virtual ~ MyQueryView()
{;
}
void HideControls();
void ShowControls();
static bool IsSqliteExtra(wxString & str);
static bool IsSqlString(wxString & str);
static bool IsSqlNumber(wxString & str);
static bool IsSqlFunction(wxString & str, char next_c);
static bool IsSqlGeoFunction(wxString & str, char next_c);
static bool IsSqlRasterFunction(wxString & str, char next_c);
bool IsIgnoreEvent()
{
return IgnoreEvent;
}
void EventBrackets();
bool CheckBrackets(int pos, bool reverse_direction, int *on, int *off);
void EvidBrackets(int on, int off);
void DoSqlSyntaxColor();
void EnableAbortButton()
{
BtnSqlAbort->Enable(true);
}
void DisableAbortButton()
{
BtnSqlAbort->Enable(false);
}
void EnableFilterButton()
{
BtnSqlFilter->Enable(true);
}
void DisableFilterButton()
{
BtnSqlFilter->Enable(false);
}
wxTextCtrl *GetSqlCtrl()
{
return SqlCtrl;
}
MySqlHistory *GetHistory()
{
return &History;
}
void SetSql(wxString & sql, bool execute);
void SetSql(wxString & sql, bool execute, bool coverage,
wxString & tile_data_db_prefix, wxString & tile_data_table,
bool reset);
void SetHistoryStates();
void OnSize(wxSizeEvent & event);
void OnSqlGo(wxCommandEvent & event);
void OnSqlFilter(wxCommandEvent & event);
void OnSqlErase(wxCommandEvent & event);
void OnSqlAbort(wxCommandEvent & event);
void OnHistoryBack(wxCommandEvent & event);
void OnHistoryForward(wxCommandEvent & event);
void OnSqlSyntaxColor(wxCommandEvent & event);
void AddToHistory(wxString & sql);
};
class MalformedGeom
{
//
// a malformed geometry item
//
private:
sqlite3_int64 RowId;
int Severity;
wxString Error;
wxString GeosMsg;
bool CanFix;
MalformedGeom *Next;
public:
MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix,
wxString & error);
MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix,
wxString & error, wxString & geosMsg);
~MalformedGeom()
{;
}
sqlite3_int64 GetRowId()
{
return RowId;
}
int GetSeverity()
{
return Severity;
}
bool CanBeFixed()
{
return CanFix;
}
wxString & GetError()
{
return Error;
}
wxString & GetGeosMsg()
{
return GeosMsg;
}
void SetNext(MalformedGeom * next)
{
Next = next;
}
MalformedGeom *GetNext()
{
return Next;
}
};
class MalformedGeomsList
{
//
// a list of malformed geometries
//
private:
MalformedGeom * First;
MalformedGeom *Last;
public:
MalformedGeomsList()
{
First = NULL;
Last = NULL;
}
~MalformedGeomsList();
void AddEntity(sqlite3_int64 rowid, int severity, bool canFix,
wxString & error);
void AddEntity(sqlite3_int64 rowid, int severity, bool CanFix,
wxString & error, wxString & geosMsg);
MalformedGeom *GetFirst()
{
return First;
}
};
class PostgresConnectionDialog:public wxDialog
{
//
// a dialog for connecting to a PosgreSQL DBMS
//
private:
MyFrame * MainFrame;
char *host;
char *hostaddr;
unsigned int port;
char *dbname;
char *user;
char *password;
bool ReadOnly;
bool TextDates;
public:
PostgresConnectionDialog()
{
host = NULL;
hostaddr = NULL;
port = 5432;
dbname = NULL;
user = NULL;
password = NULL;
ReadOnly = true;
TextDates = true;
}
virtual ~ PostgresConnectionDialog()
{
if (host != NULL)
free(host);
if (hostaddr != NULL)
free(hostaddr);
if (dbname != NULL)
free(dbname);
if (user != NULL)
free(user);
if (password != NULL)
free(password);
}
bool Create(MyFrame * parent);
void CreateControls();
const char *GetHost()
{
return host;
}
const char *GetHostAddr()
{
return hostaddr;
}
int GetPort()
{
return port;
}
const char *GetDbName()
{
return dbname;
}
const char *GetUser()
{
return user;
}
const char *GetPassword()
{
return password;
}
bool IsReadOnly()
{
return ReadOnly;
}
bool IsTextDates()
{
return TextDates;
}
void OnOk(wxCommandEvent & event);
};
class SanitizeAllGeometriesDialog:public wxDialog
{
//
// a dialog supporting Sanitize All Geometries
//
private:
MyFrame * MainFrame;
wxString TmpPrefix;
public:
SanitizeAllGeometriesDialog()
{;
}
virtual ~ SanitizeAllGeometriesDialog()
{;
}
bool Create(MyFrame * parent);
void CreateControls();
wxString & GetTmpPrefix()
{
return TmpPrefix;
}
void OnYes(wxCommandEvent & event);
void OnNo(wxCommandEvent & event);
};
class CreateTopoGeoDialog:public wxDialog
{
//
// a Dialog for creating a new Topology-Geometry
//
private:
MyFrame * MainFrame;
wxString TopologyName;
int SRID;
bool HasZ;
double Tolerance;
public:
CreateTopoGeoDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ CreateTopoGeoDialog()
{;
}
void CreateControls();
wxString & GetTopologyName()
{
return TopologyName;
}
int GetSRID()
{
return SRID;
}
bool Is3D()
{
return HasZ;
}
double GetTolerance()
{
return Tolerance;
}
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class CreateTopoNetDialog:public wxDialog
{
//
// a Dialog for creating a new Topology-Network
//
private:
MyFrame * MainFrame;
wxString NetworkName;
bool Spatial;
int SRID;
bool HasZ;
bool Coincident;
public:
CreateTopoNetDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ CreateTopoNetDialog()
{;
}
void CreateControls();
wxString & GetNetworkName()
{
return NetworkName;
}
bool IsSpatial()
{
return Spatial;
}
int GetSRID()
{
return SRID;
}
bool Is3D()
{
return HasZ;
}
bool AllowsCoincident()
{
return Coincident;
}
void OnSpatialChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class WfsParams
{
// parameters for WFS download
private:
class WfsDialog * Mother;
wxGauge *ProgressCtrl;
sqlite3 *sqlite;
wxString wfs_version;
wxString url;
wxString alt_describe;
wxString layer_name;
int swap_axes;
wxString table;
wxString primary_key;
int spatial_index;
int page_size;
wxString extra;
void (*callback)(int, void *);
int ret;
char *err_msg;
int rows;
int ProgressCount;
int LastProgressCount;
public:
WfsParams()
{;
}
~WfsParams()
{;
}
void Initialize(WfsDialog * mother, sqlite3 * sqlite, wxString & wfs_version,
wxString & url, wxString & alt_describe,
wxString & layer_name, int swap_axes, wxString & table,
wxString & primary_key, int spatial_index, int page_size,
wxString & extra, void (*callback)(int, void *))
{
Mother = mother;
this->sqlite = sqlite;
this->wfs_version = wfs_version;
this->url = url;
this->alt_describe = alt_describe;
this->layer_name = layer_name;
this->swap_axes = swap_axes;
this->table = table;
this->primary_key = primary_key;
this->spatial_index = spatial_index;
this->page_size = page_size;
this->extra = extra;
this->callback = callback;
ProgressCount = 0;
LastProgressCount = 0;
}
WfsDialog *GetMother()
{
return Mother;
}
sqlite3 *GetSqlite()
{
return sqlite;
}
wxString & GetWfsVersion()
{
return wfs_version;
}
wxString & GetUrl()
{
return url;
}
wxString & GetAltDescribeUri()
{
return alt_describe;
}
wxString & GetLayerName()
{
return layer_name;
}
int GetSwapAxes()
{
return swap_axes;
}
wxString & GetTable()
{
return table;
}
wxString & GetPrimaryKey()
{
return primary_key;
}
int GetSpatialIndex()
{
return spatial_index;
}
int GetPageSize()
{
return page_size;
}
wxString & GetExtra()
{
return extra;
}
void (*GetCallback())(int, void *)
{
return callback;
}
void SetRet(int ret)
{
this->ret = ret;
}
int GetRet()
{
return ret;
}
void SetErrMsg(char *err_msg)
{
this->err_msg = err_msg;
}
char *GetErrMsg()
{
return err_msg;
}
void SetRows(int rows)
{
this->rows = rows;
}
int GetRows()
{
return rows;
}
int *GetProgressCountPtr()
{
return &ProgressCount;
}
void SetLastProgressCount()
{
LastProgressCount = 0;
}
int GetProgressCount()
{
return ProgressCount;
}
int GetLastProgressCount()
{
return LastProgressCount;
}
};
class WfsKey
{
// a WFS Keyword
private:
wxString Keyword;
WfsKey *Next;
public:
WfsKey(wxString key)
{
Keyword = key;
Next = NULL;
}
~WfsKey()
{;
}
wxString & GetKeyword()
{
return Keyword;
}
void SetNext(WfsKey * next)
{
Next = next;
}
WfsKey *GetNext()
{
return Next;
}
};
class WfsKeywords
{
// an ancillary class storing the WFS Keywords dictionary
private:
WfsKey * First;
WfsKey *Last;
WfsKey **SortedArray;
int MaxSorted;
public:
WfsKeywords()
{
First = NULL;
Last = NULL;
SortedArray = NULL;
MaxSorted = 0;
}
~WfsKeywords();
void Add(const char *key);
void Sort();
int GetMaxSorted()
{
return MaxSorted;
}
WfsKey *GetKey(int index);
};
class WfsDialog:public wxDialog
{
//
// a dialog supporting data import from a WFS datasource
//
private:
wxTimer * ProgressTimer;
MyFrame *MainFrame;
WfsParams Params;
gaiaWFScatalogPtr Catalog;
WfsKeywords *Keywords;
wxGrid *WfsView;
wxGauge *Progress;
int CurrentEvtRow;
int CurrentEvtColumn;
bool ProxyEnabled;
wxString WfsGetCapabilitiesURL;
wxString PreviousHttpProxy;
wxString HttpProxy;
gaiaWFSitemPtr FindLayerByName(wxString & name);
void SelectLayer();
public:
WfsDialog()
{
Catalog = NULL;
WfsView = NULL;
Keywords = NULL;
ProxyEnabled = false;
ProgressTimer = NULL;
}
virtual ~ WfsDialog()
{
if (ProgressTimer)
{
ProgressTimer->Stop();
delete ProgressTimer;
}
if (Catalog != NULL)
destroy_wfs_catalog(Catalog);
if (Keywords != NULL)
delete Keywords;
}
void ResetProgress();
void ProgressWait();
void ProgressUpdate(int rows);
bool Create(MyFrame * parent, wxString & wfs_url, wxString & proxy);
void CreateControls();
void OnProxy(wxCommandEvent & event);
void OnPagingChanged(wxCommandEvent & event);
void OnLeftClick(wxGridEvent & event);
void OnRightClick(wxGridEvent & event);
void OnKeyFilter(wxCommandEvent & event);
void OnKeyReset(wxCommandEvent & event);
void OnCatalog(wxCommandEvent & event);
void OnReset(wxCommandEvent & event);
void OnLoadFromWfs(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
void OnCmdCopy(wxCommandEvent & event);
void OnCmdSelectLayer(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
void OnRefreshTimer(wxTimerEvent & event);
};
class CheckGeometryDialog:public wxDialog
{
//
// a dialog supporting Check Geometry Column
//
private:
MyFrame * MainFrame;
wxString Table;
wxString Geometry;
public:
CheckGeometryDialog()
{;
}
virtual ~ CheckGeometryDialog()
{;
}
bool Create(MyFrame * parent, wxString & table, wxString & geom);
void CreateControls();
void OnYes(wxCommandEvent & event);
void OnNo(wxCommandEvent & event);
};
class SanitizeGeometryDialog:public wxDialog
{
//
// a dialog supporting Sanitize Geometry Column
//
private:
MyFrame * MainFrame;
wxString TmpPrefix;
wxString Table;
wxString Geometry;
public:
SanitizeGeometryDialog()
{;
}
virtual ~ SanitizeGeometryDialog()
{;
}
bool Create(MyFrame * parent, wxString & table, wxString & geom);
void CreateControls();
wxString & GetTmpPrefix()
{
return TmpPrefix;
}
void OnYes(wxCommandEvent & event);
void OnNo(wxCommandEvent & event);
};
class MalformedGeomsDialog:public wxDialog
{
//
// a dialog displaying a Malformed Geometries list
//
private:
MyFrame * MainFrame;
wxString Table;
wxString Geometry;
wxGrid *GridCtrl;
MalformedGeomsList *List;
int CurrentEvtRow;
int CurrentEvtColumn;
public:
MalformedGeomsDialog()
{
List = NULL;
}
MalformedGeomsDialog(MyFrame * parent, wxString & table, wxString & column,
MalformedGeomsList * list);
bool Create(MyFrame * parent, wxString & table, wxString & column,
MalformedGeomsList * list);
virtual ~ MalformedGeomsDialog()
{
if (List)
delete List;
}
void CreateControls();
void OnClose(wxCommandEvent & event);
void OnRepair(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCmdClearSelection(wxCommandEvent & event);
void OnCmdSelectAll(wxCommandEvent & event);
void OnCmdSelectRow(wxCommandEvent & event);
void OnCmdSelectColumn(wxCommandEvent & event);
void OnCmdCopy(wxCommandEvent & event);
void OnCmdBlob(wxCommandEvent & event);
};
class TableViewItem
{
//
// an ancillary class wrapping Tables and Views
//
private:
wxString DbName;
wxString Name;
bool View;
bool Virtual;
bool Geometry;
bool GeoPackageGeometry;
bool GeoPackageVirtualGeometry;
bool FdoOgrGeometry;
bool FdoOgrVirtualGeometry;
TableViewItem *Next;
public:
TableViewItem(wxString & db, wxString & name);
TableViewItem(wxString & name, bool is_view, bool is_virtual);
~TableViewItem()
{;
}
wxString & GetDbName()
{
return DbName;
}
wxString & GetName()
{
return Name;
}
bool IsView()
{
return View;
}
bool IsVirtual()
{
return Virtual;
}
void SetGeometry()
{
Geometry = true;
}
bool IsGeometry()
{
return Geometry;
}
void SetGeoPackageGeometry()
{
GeoPackageGeometry = true;
}
bool IsGeoPackageGeometry()
{
return GeoPackageGeometry;
}
void SetGeoPackageVirtualGeometry()
{
GeoPackageVirtualGeometry = true;
}
bool IsGeoPackageVirtualGeometry()
{
return GeoPackageVirtualGeometry;
}
void SetFdoOgrGeometry()
{
FdoOgrGeometry = true;
}
bool IsFdoOgrGeometry()
{
return FdoOgrGeometry;
}
void SetFdoOgrVirtualGeometry()
{
FdoOgrVirtualGeometry = true;
}
bool IsFdoOgrVirtualGeometry()
{
return FdoOgrVirtualGeometry;
}
bool IsPostgresTable(class MyPostgres * list);
bool IsTmpMetadata();
void SetNext(TableViewItem * next)
{
Next = next;
}
TableViewItem *GetNext()
{
return Next;
}
};
class TableViewList
{
//
// an ancillary class used to build the Tree Control
//
private:
TableViewItem * First;
TableViewItem *Last;
int Count;
TableViewItem **Sorted;
public:
TableViewList();
~TableViewList();
void Add(wxString & db, wxString & name);
void Add(wxString & name, bool isView, bool isVirtual);
void PrepareSorted();
void SetGeometry(wxString & name);
void SetGeoPackageGeometry(wxString & name);
void SetGeoPackageVirtualGeometry(wxString & name);
void SetFdoOgrGeometry(wxString & name);
void SetFdoOgrVirtualGeometry(wxString & name);
TableViewItem *GetFirst()
{
return First;
}
};
class DbStatusDialog:public wxDialog
{
//
// a dialog displaying DB Status infos
//
private:
MyFrame * MainFrame;
wxGrid *GridCtrl;
wxStaticBitmap *Graph;
int CurrentEvtRow;
int CurrentEvtColumn;
int *DynamicIds;
int *DynamicModes;
wxTimer *RefreshTimer;
enum StatusModes
{
ModeNone,
ModeStatusBoth,
ModeStatusFirst,
ModeStatusSecond,
ModeStatusBothBytes,
ModeStatusFirstBytes,
ModeStatusSecondBytes,
ModeDbStatusBoth,
ModeDbStatusFirst,
ModeDbStatusSecond,
ModeDbStatusBothBytes,
ModeDbStatusFirstBytes,
ModeDbStatusSecondBytes
};
public:
DbStatusDialog();
bool Create(MyFrame * parent);
virtual ~ DbStatusDialog();
void CreateControls();
void OnClose(wxCommandEvent & event);
void OnReset(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCmdClearSelection(wxCommandEvent & event);
void OnCmdSelectAll(wxCommandEvent & event);
void OnCmdSelectRow(wxCommandEvent & event);
void OnCmdSelectColumn(wxCommandEvent & event);
void OnCmdCopy(wxCommandEvent & event);
void OnRefreshTimer(wxTimerEvent & event);
};
class MyStatusBar:public wxStatusBar
{
//
// a StatusBar with an Icon
//
private:
MyFrame * Parent;
wxStaticBitmap *Bitmap;
public:
MyStatusBar(MyFrame * parent);
virtual ~ MyStatusBar()
{;
}
void SetSecurityRelaxedIcon();
void SetSecurityStrongIcon();
void SetReadOnlyIcon();
void SetNotConnectedIcon();
void SetText(wxString & msg);
void OnSize(wxSizeEvent & event);
};
class CurrentSqlFilters
{
//
// a class storing current SQL Filters
//
private:
bool Valid;
wxString DbPrefix;
wxString TableName;
wxString GeometryColumn;
bool ReadOnly;
bool Where1Enabled;
bool Where2Enabled;
bool Where3Enabled;
bool AndOr12;
bool AndOr23;
wxString Where1Column;
wxString Where2Column;
wxString Where3Column;
wxString Where1Operator;
wxString Where2Operator;
wxString Where3Operator;
wxString Where1Value;
wxString Where2Value;
wxString Where3Value;
bool Order1Enabled;
bool Order2Enabled;
bool Order3Enabled;
bool Order4Enabled;
wxString Order1Column;
wxString Order2Column;
wxString Order3Column;
wxString Order4Column;
bool Order1Desc;
bool Order2Desc;
bool Order3Desc;
bool Order4Desc;
wxString FreeHand;
public:
CurrentSqlFilters()
{;
}
~CurrentSqlFilters()
{;
}
void Initialize(wxString & db_prefix, wxString & table, bool read_only,
wxString & geom_column);
void Reset();
void Save(class SqlFiltersDialog * dlg);
bool IsValid()
{
return Valid;
}
bool IsMapLinked()
{
if (GeometryColumn.Len() == 0)
return false;
return true;
}
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetTableName()
{
return TableName;
}
wxString & GetGeometryColumn()
{
return GeometryColumn;
}
bool IsReadOnly()
{
return ReadOnly;
}
bool IsWhere1Enabled()
{
return Where1Enabled;
}
bool IsWhere2Enabled()
{
return Where2Enabled;
}
bool IsWhere3Enabled()
{
return Where3Enabled;
}
bool IsAndOr12()
{
return AndOr12;
}
bool IsAndOr23()
{
return AndOr23;
}
wxString & GetWhere1Column()
{
return Where1Column;
}
wxString & GetWhere2Column()
{
return Where2Column;
}
wxString & GetWhere3Column()
{
return Where3Column;
}
wxString & GetWhere1Operator()
{
return Where1Operator;
}
wxString & GetWhere2Operator()
{
return Where2Operator;
}
wxString & GetWhere3Operator()
{
return Where3Operator;
}
wxString & GetWhere1Value()
{
return Where1Value;
}
wxString & GetWhere2Value()
{
return Where2Value;
}
wxString & GetWhere3Value()
{
return Where3Value;
}
bool IsOrder1Enabled()
{
return Order1Enabled;
}
bool IsOrder2Enabled()
{
return Order2Enabled;
}
bool IsOrder3Enabled()
{
return Order3Enabled;
}
bool IsOrder4Enabled()
{
return Order4Enabled;
}
wxString & GetOrder1Column()
{
return Order1Column;
}
wxString & GetOrder2Column()
{
return Order2Column;
}
wxString & GetOrder3Column()
{
return Order3Column;
}
wxString & GetOrder4Column()
{
return Order4Column;
}
bool IsOrder1Desc()
{
return Order1Desc;
}
bool IsOrder2Desc()
{
return Order2Desc;
}
bool IsOrder3Desc()
{
return Order3Desc;
}
bool IsOrder4Desc()
{
return Order4Desc;
}
wxString & GetFreeHand()
{
return FreeHand;
}
};
class MyAttachedTable
{
//
// an object wrapping a GeoTable into an ATTACHED-DB
//
private:
wxString Name;
int Type;
MyAttachedTable *Next;
public:
MyAttachedTable(wxString & name, int type)
{
Name = name;
Type = type;
Next = NULL;
}
~MyAttachedTable()
{;
}
wxString & GetName()
{
return Name;
}
int GetType()
{
return Type;
}
void SetNext(MyAttachedTable * next)
{
Next = next;
}
MyAttachedTable *GetNext()
{
return Next;
}
};
class MyAttachedDB
{
//
// an object wrapping an ATTACHED-DB
//
private:
wxString DbPrefix;
wxString Path;
bool GeoPackage;
bool FdoOgr;
bool Initialized;
MyAttachedTable *First;
MyAttachedTable *Last;
MyAttachedDB *Prev;
MyAttachedDB *Next;
public:
MyAttachedDB(wxString & db_prefix, wxString & path);
~MyAttachedDB();
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetPath()
{
return Path;
}
void SetGeoPackage()
{
GeoPackage = true;
}
bool IsGeoPackage()
{
return GeoPackage;
}
void SetFdoOgr()
{
FdoOgr = true;
}
bool IsFdoOgr()
{
return FdoOgr;
}
void SetInitialized()
{
Initialized = true;
}
bool IsInitialized()
{
return Initialized;
}
void AddGeoTable(wxString & name, int type);
MyAttachedTable *GetFirst()
{
return First;
}
void SetPrev(MyAttachedDB * prev)
{
Prev = prev;
}
MyAttachedDB *GetPrev()
{
return Prev;
}
void SetNext(MyAttachedDB * next)
{
Next = next;
}
MyAttachedDB *GetNext()
{
return Next;
}
};
class MyAttachedDbList
{
//
// list of all currently ATTACHED-DBs
//
private:
MyAttachedDB * First;
MyAttachedDB *Last;
public:
MyAttachedDbList();
~MyAttachedDbList();
void Flush();
MyAttachedDB *Find(wxString & db_prefix, wxString & path);
void Insert(wxString & db_prefix, wxString & path);
void Remove(MyAttachedDB * item);
void Remove(wxString & db_prefix);
void AddGeoTable(wxString & db_prefix, wxString & table_name, int type);
MyAttachedTable *FindGeoTable(wxString & db_prefix, wxString & name);
MyAttachedDB *GetFirst()
{
return First;
}
};
class MyPostgresCol
{
//
// a PostgreSQL Column
//
private:
wxString Name;
bool PK;
MyPostgresCol *Next;
public:
MyPostgresCol(wxString & name)
{
Name = name;
PK = false;
Next = NULL;
}
~MyPostgresCol()
{;
}
wxString & GetName()
{
return Name;
}
void SetPK()
{
PK = true;
}
bool IsPK()
{
return PK;
}
void SetNext(MyPostgresCol * next)
{
Next = next;
}
MyPostgresCol *GetNext()
{
return Next;
}
};
class MyPostgresColumns
{
//
// a list of PostgreSQL Columns
//
private:
MyPostgresCol * First;
MyPostgresCol *Last;
public:
MyPostgresColumns()
{
First = NULL;
Last = NULL;
}
~MyPostgresColumns();
void Add(wxString & name);
void SetPK(wxString & name);
MyPostgresCol *GetFirst()
{
return First;
}
char *BuildWhere();
};
class MyPostGisGeometry
{
//
// a PostGIS Geometry column
//
private:
wxString Name;
wxString GeomType;
bool MultiType;
int Srid;
int Dims;
MyPostGisGeometry *Next;
public:
MyPostGisGeometry(wxString & name, wxString & type, int srid, int dims);
~MyPostGisGeometry()
{;
}
wxString & GetName()
{
return Name;
}
wxString & GetGeomType()
{
return GeomType;
}
bool IsMultiType()
{
return MultiType;
}
int GetSrid()
{
return Srid;
}
int GetDims()
{
return Dims;
}
void SetNext(MyPostGisGeometry * next)
{
Next = next;
}
MyPostGisGeometry *GetNext()
{
return Next;
}
};
class MyPostgresPK
{
//
// a ProgresSQL PK column
//
private:
wxString Name;
MyPostgresPK *Next;
public:
MyPostgresPK(wxString & name)
{
Name = name;
Next = NULL;
}
~MyPostgresPK()
{;
}
wxString & GetName()
{
return Name;
}
void SetNext(MyPostgresPK * next)
{
Next = next;
}
MyPostgresPK *GetNext()
{
return Next;
}
};
class MyPostgresTable
{
//
// a PostgreSQL Table
//
private:
wxString Name;
wxString VirtName;
wxString PostGisName;
bool PkChecked;
bool GrantSelect;
bool GrantInsertUpdateDelete;
MyPostgresPK *FirstPK;
MyPostgresPK *LastPK;
MyPostGisGeometry *First;
MyPostGisGeometry *Last;
MyPostgresTable *Next;
public:
MyPostgresTable(wxString & name);
~MyPostgresTable();
wxString & GetName()
{
return Name;
}
void SetVirtName(wxString & name)
{
VirtName = name;
}
wxString & GetVirtName()
{
return VirtName;
}
void SetPostGisName(wxString & name)
{
PostGisName = name;
}
wxString & GetPostGisName()
{
return PostGisName;
}
void Add(wxString & geometry, wxString & type, int srid, int dims);
void AddPK(wxString & column);
MyPostGisGeometry *Find(wxString & column);
bool IsPkColumn(wxString & column);
bool HasPK();
void SetGrants(bool grantSelect, bool granInsertUpdateDelete)
{
GrantSelect = grantSelect;
GrantInsertUpdateDelete = granInsertUpdateDelete;
}
bool CanSelect()
{
return GrantSelect;
}
bool CanInsertUpdateDelete()
{
return GrantInsertUpdateDelete;
}
bool IsPkAlreadyChecked()
{
return PkChecked;
}
void SetPkChecked()
{
PkChecked = true;
}
MyPostgresPK *GetFirstPK()
{
return FirstPK;
}
MyPostGisGeometry *GetFirst()
{
return First;
}
void SetNext(MyPostgresTable * next)
{
Next = next;
}
MyPostgresTable *GetNext()
{
return Next;
}
};
class MyPostgresView
{
//
// a PostgreSQL View
//
private:
wxString Name;
wxString VirtName;
bool GrantSelect;
bool GrantInsertUpdateDelete;
MyPostgresView *Next;
public:
MyPostgresView(wxString & name);
~MyPostgresView()
{;
}
wxString & GetName()
{
return Name;
}
void SetVirtName(wxString & name)
{
VirtName = name;
}
wxString & GetVirtName()
{
return VirtName;
}
void SetGrants(bool grantSelect, bool granInsertUpdateDelete)
{
GrantSelect = grantSelect;
GrantInsertUpdateDelete = granInsertUpdateDelete;
}
bool CanSelect()
{
return GrantSelect;
}
bool CanInsertUpdateDelete()
{
return GrantInsertUpdateDelete;
}
void SetNext(MyPostgresView * next)
{
Next = next;
}
MyPostgresView *GetNext()
{
return Next;
}
};
class MyPostgresSchema
{
//
// a PostgreSQL Schema
//
private:
wxString Name;
wxTreeItemId TreeNode;
MyPostgresTable *FirstTable;
MyPostgresTable *LastTable;
MyPostgresTable *CurrentTable;
MyPostgresView *FirstView;
MyPostgresView *LastView;
MyPostgresSchema *Next;
public:
MyPostgresSchema(wxString & name);
~MyPostgresSchema();
wxString & GetName()
{
return Name;
}
void Add(wxString & name, wxString & geometry, wxString & type, int srid,
int dims);
void Add(wxString & name);
void SetTreeNode(wxTreeItemId & node)
{
TreeNode = node;
}
wxTreeItemId & GetTreeNode()
{
return TreeNode;
}
MyPostgresTable *GetFirstTable()
{
return FirstTable;
}
MyPostgresView *GetFirstView()
{
return FirstView;
}
void SetNext(MyPostgresSchema * next)
{
Next = next;
}
MyPostgresSchema *GetNext()
{
return Next;
}
};
class MyPostgresConn
{
//
// a connection to some PosgreSQL DBMS
//
private:
wxString Host;
wxString HostAddr;
int Port;
wxString DbName;
wxString User;
bool ReadOnly;
bool TextDates;
wxString ConnectionString;
MyPostgresSchema *First;
MyPostgresSchema *Last;
MyPostgresSchema *Current;
MyPostgresConn *Prev;
MyPostgresConn *Next;
public:
MyPostgresConn(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, bool readOnly,
bool textDates);
~MyPostgresConn();
wxString & GetHost()
{
return Host;
}
wxString & GetHostAddr()
{
return HostAddr;
}
int GetPort()
{
return Port;
}
wxString & GetDbName()
{
return DbName;
}
wxString & GetUser()
{
return User;
}
bool IsReadOnly()
{
return ReadOnly;
}
bool IsTextDates()
{
return TextDates;
}
void SetConnectionString(const char *connection_string)
{
ConnectionString = wxString::FromUTF8(connection_string);
}
wxString & GetConnectionString()
{
return ConnectionString;
}
MyPostgresSchema *Add(wxString & schema);
void Add(wxString & schema, wxString & table, wxString & geometry,
wxString & type, int srid, int dims);
void Add(wxString & schema, wxString & view);
MyPostgresSchema *GetFirst()
{
return First;
}
void SetPrev(MyPostgresConn * conn)
{
Prev = conn;
}
MyPostgresConn *GetPrev()
{
return Prev;
}
void SetNext(MyPostgresConn * conn)
{
Next = conn;
}
MyPostgresConn *GetNext()
{
return Next;
}
};
class MyPostgres
{
//
// general container for all PostgreSQL connections
//
private:
MyPostgresConn * First;
MyPostgresConn *Last;
MyPostgresConn *Current;
public:
MyPostgres()
{
First = NULL;
Last = NULL;
Current = NULL;
}
~MyPostgres()
{
Clear();
}
void Clear();
MyPostgresConn *Insert(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, bool readOnly,
bool textDates);
MyPostgresConn *Find(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user);
MyPostgresTable *FindTable(class MyFrame * parent, wxString & virtName);
MyPostgresTable *FindPostGisView(class MyFrame * parent, wxString & virtName);
void Remove(MyPostgresConn * conn);
bool CheckUniqueVirtName(wxString & virtName);
void MakeUniqueVirtName(wxString & baseName, wxString & uniqueName);
MyPostgresConn *GetFirst()
{
return First;
}
};
class MyFrame:public wxFrame
{
//
// the main GUI frame
//
private:
char *Old_SPATIALITE_SECURITY_ENV;
class MyMapPanel *MapPanel; // the Map Panel
wxString AutoFDOmsg;
wxString AutoGPKGmsg;
MyAttachedDbList AttachedList;
bool SpatiaLiteMetadata;
wxAuiManager Manager; // the GUI manager
wxString ConfigLayout; // PERSISTENCY - the layout configuration
int ConfigPaneX; // PERSISTENCY - the main pane screen origin X
int ConfigPaneY; // PERSISTENCY - the main pane screen origin Y
int ConfigPaneWidth; // PERSISTENCY - the main pane screen width
int ConfigPaneHeight; // PERSISTENCY - the main pane screen height
wxString ConfigDbPath; // PERSISTENCY - the last opened DB path
wxString ConfigDir; // PERSISTENCY - the last used directory
wxString HttpProxy; // PERSISTENCY - the last used HTTP Proxy
wxString WfsGetCapabilitiesURL; // PERSISTENCY - the last used WFS GetCapabilities URL
bool MapMultiThreadingEnabled; // PERSISTENCY - Map MultiThreading Enabled
int MapMaxThreads; // PERSISTENCY - Map MaxThreads
bool MapAutoTransformEnabled; // PERSISTENCY - Map AutoTransform Enabled
MyTableTree *TableTree; // the tables tree list
MyQueryView *QueryView; // the QueryResult panel
MyResultSetView *RsView; // the QueryResult panel
bool HelpPane; // is the HELP pane already opened ?
bool SecurityRelaxed; // is "SPATIALITE_SECURITY=relaxed" currently set ?
int RL2MaxThreads; // max concurrent threads for RL2
sqlite3 *SqliteHandle; // handle for SQLite DB
wxString SqlitePath; // path of SQLite DB
void *SpliteInternalCache; // pointer to the InternalCache supporting the DB connection
void *RL2PrivateData; // pointer to RL2 Private Data
wxString ExternalSqlitePath; // path of external SQLite DB [LOAD/SAVE MEMORY database]
bool MemoryDatabase; // TRUE if we are currently working on the MEMORY database
wxString LastDirectory; // path of directory used
int CharsetsLen; // # charsets defined
wxString *Charsets; // table of charsets [code only]
wxString *CharsetsNames; // table of charsets [with description]
wxString LocaleCharset; // locale charset
wxString DefaultCharset; // default charset
bool AskCharset; // switch to set default charset for every output
int TablesLen; // # tables defined
wxString *TableNames; // array of tables
wxBitmap *BtnCreateNew; // button icon for DB CREATE&CONNECT
wxBitmap *BtnConnect; // button icon for DB CONNECT
wxBitmap *BtnConnectReadOnly; // button icon for DB CONNECT - READ ONLY
wxBitmap *BtnDisconnect; // button icon for DB DISCONNECT
wxBitmap *BtnMemDbLoad; // button icon for MEMORY DB LOAD
wxBitmap *BtnMemDbNew; // button icon for MEMORY DB NEW
wxBitmap *BtnMemDbClock; // button icon for MEMORY DB CLOCK
wxBitmap *BtnMemDbSave; // button icon for MEMORY DB SAVE
wxBitmap *BtnVacuum; // button icon for DB VACUUM
wxBitmap *BtnSqlScript; // button icon for Execute SQL SCRIPT
wxBitmap *BtnQueryComposer; // button icon for Query/View Composer
wxBitmap *BtnCharset; // button icon for Default CHARSET
wxBitmap *BtnLoadShp; // button icon for LOAD SHP
wxBitmap *BtnLoadGeoJSON; // button icon for LOAD GeoJSON
wxBitmap *BtnLoadTxt; // button icon for LOAD TXT/CSV
wxBitmap *BtnLoadDbf; // button icon for LOAD DBF
wxBitmap *BtnLoadXL; // button icon for LOAD_XL
wxBitmap *BtnVirtualShp; // button icon for VIRTUAL SHP
wxBitmap *BtnVirtualGeoJSON; // button icon for VIRTUAL GeoJSON
wxBitmap *BtnVirtualTxt; // button icon for VIRTUAL TXT/CSV
wxBitmap *BtnVirtualDbf; // button icon for VIRTUAL DBF
wxBitmap *BtnVirtualXL; // button icon for VIRTUAL XL
wxBitmap *BtnNetwork; // button icon for BUILD NETWORK
wxBitmap *BtnExif; // button icon for EXIF LOAD
wxBitmap *BtnGpsPics; // button icon for GPS_PICS LOAD
wxBitmap *BtnLoadXml; // button icon for XML LOAD
wxBitmap *BtnSrids; // button icon for SEARCH SRIDs
wxBitmap *BtnHelp; // button icon for HELP
wxBitmap *BtnAbout; // button icon for ABOUT
wxBitmap *BtnExit; // button icon for EXIT
wxBitmap *BtnAttach; // button icon for ATTACH
wxBitmap *BtnSqlLog; // button icon for SQL LOG
wxBitmap *BtnDbStatus; // button icon for DB STATUS
wxBitmap *BtnCheckGeom; // button icon for CheckGeom
wxBitmap *BtnSaneGeom; // button icon for SaneGeom
wxBitmap *BtnWFS; // button icon for WFS
wxBitmap *BtnDXF; // button icon for DXF
wxBitmap *BtnMap; // button icon for Map Panel
wxBitmap *BtnPostgres; // button icon for PostgreSQL
rl2WmsCachePtr WmsCache; // internal WMS Cache
bool ReadOnlyConnection;
// AutoSave timer
int AutoSaveInterval;
int LastTotalChanges;
wxTimer *TimerAutoSave;
gaiaGeomCollPtr GeomFromPoint(gaiaPointPtr pt, int srid);
gaiaGeomCollPtr GeomFromLinestring(gaiaLinestringPtr ln, int srid);
gaiaGeomCollPtr GeomFromPolygon(gaiaPolygonPtr pg, int srid);
sqlite3_int64 LastSqlLogID;
bool SqlLogEnabled;
bool GetRtTopoVersion(char *buf);
bool GetLibXml2Version(char *buf);
MyStatusBar *StatusBar;
void TestSecurityRelaxed(const char *path);
bool IsSafeDB(const char *path);
void SetSecurityRelaxed();
void ResetSecurity();
rl2PixelPtr DefaultNoData(unsigned char sample, unsigned char pixel,
unsigned char num_bands);
rl2PixelPtr ParseNoData(wxString & NoData, int SampleType, int PixelType,
int NumBands);
char *GetNum(const char *start, const char *end);
bool IsValidSqliteFile(wxString & path);
void DoUpdateRL2MaxThreads();
void DoAutoDetachDatabases();
CurrentSqlFilters SqlFilters;
MyPostgres PostgresList;
virtualPQ VirtualPQapi;
wxDynamicLibrary DynamicLibPQ;
wxString PathLibPQ;
bool VirtualPQapiOK;
void DoInitVirtualPQapi();
void DoLocateLibPQ(wxString & path);
void DoLoadLibPQ(wxString & path);
bool DoCheckPostgres(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user);
bool DoInitPostgres(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user, bool readOnly,
bool textDates, const char *conninfo);
void DoSetUniqueVirtNames();
void DoCreatePostgresTables();
void DoDropPostgresTables();
char *DoCreatePostGisSpatialView(MyPostgresTable * table, char *sql);
void DoCreatePostGisSpatialViewTriggers(MyPostgresConn * conn,
MyPostgresSchema * schema,
MyPostgresTable * table);
void GetPQlibVersion(wxString & ver);
void DoCreatePostgreSqlNodes();
MyPostgresColumns *DoGetPostgresColumns(MyPostgresTable * table);
void DoCheckGrantPermissions(void *pg_conn, wxString & user,
MyPostgresSchema * schema,
MyPostgresTable * table);
void DoCheckGrantPermissions(void *pg_conn, wxString & user,
MyPostgresSchema * schema,
MyPostgresView * view);
void DoLoadZipShp(wxString & path);
void DoLoadZipDbf(wxString & path);
public:
MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size);
virtual ~ MyFrame();
enum VectorTypes
{
VECTOR_UNKNOWN = 0,
VECTOR_GEOTABLE,
VECTOR_SPATIALVIEW,
VECTOR_VIRTUALTABLE,
VECTOR_TOPOGEO,
VECTOR_TOPONET
};
void UpdateStatusBar(bool changeIcon = true);
bool IsConnected()
{
if (SqliteHandle)
return true;
else
return false;
}
bool IsSecurityLevelRelaxed()
{
return SecurityRelaxed;
}
int GetRL2MaxThreads();
void InsertIntoLog(wxString & sql);
void UpdateLog(void);
void UpdateLog(wxString & error_msg);
void UpdateAbortedLog(void);
void EnableSqlLog();
wxString & GetAutoFDOmsg()
{
return AutoFDOmsg;
}
void AutoFDOmsgReset()
{
AutoFDOmsg = wxT("");
}
wxString & GetAutoGPKGmsg()
{
return AutoGPKGmsg;
}
void AutoGPKGmsgReset()
{
AutoGPKGmsg = wxT("");
}
void RemoveAttachedDB(wxString & symbol)
{
AttachedList.Remove(symbol);
}
bool DoAttachDatabase(wxString & path);
void GetNextAttachedSymbol(wxString & symbol);
void AddAttachedTable(wxString & dbAlias, wxString & name, int type)
{
AttachedList.AddGeoTable(dbAlias, name, type);
}
void EnableMapMultiThreading(bool mode)
{
MapMultiThreadingEnabled = mode;
}
bool IsMapMultiThreadingEnabled()
{
return MapMultiThreadingEnabled;
}
void SetMapMaxThreads(int max)
{
MapMaxThreads = max;
}
int GetMapMaxThreads()
{
return MapMaxThreads;
}
void EnableMapAutoTransform(bool mode)
{
MapAutoTransformEnabled = mode;
}
bool IsMapAutoTransformEnabled()
{
return MapAutoTransformEnabled;
}
void MapViewShowSelected(class MapFeaturesList * list, bool zoom_mode);
int GetMapSRID();
void CleanTxtTab(char *str);
char *CleanCsv(const char *str);
char *CleanHtml(const char *str);
char *DifQuote(const char *str);
char *SylkQuote(const char *str);
void DecimalNumber(double num, char *str, char decimal_point);
bool TestDateValue(char *date);
bool TestDateTimeValue(char *datetime);
bool TestTimeValue(char *time);
int ComputeSpreadsheetDate(int yy, int mm, int dd);
double ComputeSpreadsheetTime(int hh, int mm, int ss);
int GetDateValue(char *date);
double GetDateTimeValue(char *datetime);
double GetTimeValue(char *time);
wxString & GetSqlitePath()
{
return SqlitePath;
}
wxString & GetExternalSqlitePath()
{
return ExternalSqlitePath;
}
void SetExternalSqlitePath(wxString & path)
{
ExternalSqlitePath = path;
}
sqlite3 *GetSqlite()
{
return SqliteHandle;
}
void *GetSpliteInternalCache()
{
return SpliteInternalCache;
}
int GetDecimalPrecision();
void *GetRL2PrivateData()
{
return RL2PrivateData;
}
bool IsSecurityRelaxed()
{
return SecurityRelaxed;
}
void CloseHelpPane()
{
HelpPane = false;
}
void OpenHelpPane()
{
HelpPane = true;
}
bool OpenDB(bool read_only);
bool CreateDB();
void CloseDB();
void InitializeSpatialMetadata();
void AutoFDOStart();
void AutoFDOStop();
void AutoGPKGStart();
void AutoGPKGStop();
void AutoPostgresStart();
void AutoPostgresStop();
bool DoClosePostgreSqlConn(wxString & host, wxString & hostaddr, int port,
wxString & dbname, wxString & user);
char *DropPostgreSqlOrphans();
void DoInitVirtualPG();
void InitTableTree();
void LoadHistory();
bool HasHistory();
void ListAttached();
void AutoFDOStart(wxString & dbAlias, MyAttachedDB * db);
void AutoFDOStop(wxString & dbAlias);
void AutoGPKGStart(wxString & dbAlias, MyAttachedDB * db);
void AutoGPKGStop(wxString & dbAlias);
void InitTableTree(wxString & dbAlias, wxString & path);
void ClearTableTree();
int GetMetaDataType();
bool HasViewsMetadata();
bool HasVirtsMetadata();
bool HasViewsMetadata(wxString & dbAlias);
bool HasVirtsMetadata(wxString & dbAlias);
void FindGeometries(TableViewList * list);
void FindGeometries(wxString & dbAlias, TableViewList * list);
void FindGeoPackageGeometries(TableViewList * list);
void FindGeoPackageGeometries(wxString & dbAlias, TableViewList * list);
void FindFdoOgrGeometries(TableViewList * list);
void FindFdoOgrGeometries(wxString & dbAlias, TableViewList * list);
void GetTableColumns(wxString & tableName, MyTableInfo * list);
void GetTableIndices(wxString & tableName, MyTableInfo * list);
void GetTableTriggers(wxString & tableName, MyTableInfo * list);
void GetViewColumns(wxString & viewName, MyViewInfo * list);
void GetViewTriggers(wxString & viewName, MyViewInfo * list);
void CheckGPKG(wxString & tableName, MyTableInfo * list);
void CheckFdoOgr(wxString & tableName, MyTableInfo * list);
void GetIndexFields(wxString & indexName, wxString & tableName,
wxTreeItemId & node);
void GetPrimaryKeyFields(wxString & indexName, wxString & tableName,
wxTreeItemId & node);
void GetForeignKeys(wxString & tableName, wxTreeItemId & node);
void GetTableColumns(wxString & dbAlias, wxString & tableName,
MyTableInfo * list);
void GetTableIndices(wxString & dbAlias, wxString & tableName,
MyTableInfo * list);
void GetTableTriggers(wxString & dbAlias, wxString & tableName,
MyTableInfo * list);
void GetViewColumns(wxString & dbAlias, wxString & viewName,
MyViewInfo * list);
void GetViewTriggers(wxString & dbAlias, wxString & viewName,
MyViewInfo * list);
void GetIndexFields(wxString & dbAlias, wxString & indexName,
wxString & tableName, wxTreeItemId & node);
void GetPrimaryKeyFields(wxString & dbAlias, wxString & indexName,
wxString & tableName, wxTreeItemId & node);
void GetForeignKeys(wxString & dbAlias, wxString & tableName,
wxTreeItemId & node);
bool ExistsViewsGeometryColumns();
bool ExistsTopologies();
bool ExistsTopologies(wxString & dbAlias);
bool ExistsNetworks();
bool ExistsNetworks(wxString & dbAlias);
bool ExistsRasterCoverages();
bool ExistsRasterCoverages(wxString & dbAlias);
bool ExistsVectorCoverages();
bool ExistsVectorCoverages(wxString & dbAlias);
bool ExistsWmsGetMap();
bool ExistsWmsGetMap(wxString & dbAlias);
void ElementaryGeoms(wxString & inTable, wxString & geometry,
wxString & outTable, wxString & pKey, wxString & multiID,
wxString & type, int *srid, wxString & coordDims,
bool *spIdx);
bool ElementaryViewGeoms(wxString & inTable, wxString & geometry,
wxString & type, int *srid, wxString & coordDims,
bool *spIdx);
bool ElementaryVirtGeoms(wxString & inTable, wxString & geometry,
wxString & type, int *srid, wxString & coordDims);
bool DoElementaryGeometries(wxString & inTable, wxString & geometry,
wxString & outTable, wxString & pKey,
wxString & multiID, wxString & type, int srid,
wxString & coordDims, bool spIdx);
void EditTable(wxString & sql, int *primaryKeys, int *blobCols,
wxString & table)
{
RsView->EditTable(sql, primaryKeys, blobCols, table);
}
bool IsSpatialIndex(wxString & tableName);
bool IsSpatialIndex(wxString & dbAlias, wxString & tableName);
bool IsMbrCache(wxString & tableName);
bool IsMbrCache(wxString & dbAlias, wxString & tableName);
bool IsGeoPackageSpatialIndex(wxString & tableName);
bool IsGeoPackageSpatialIndex(wxString & dbAlias, wxString & tableName);
bool IsTopoFaceSpatialIndex(wxString & tableName);
bool IsTopoFaceSpatialIndex(wxString & dbAlias, wxString & tableName);
void SetSql(wxString & sql, bool execute)
{
QueryView->SetSql(sql, execute);
}
void SetSql(wxString & sql, bool execute, bool coverage,
wxString & tile_data_db_prefix, wxString & tile_data_table,
bool reset)
{
QueryView->SetSql(sql, execute, coverage, tile_data_db_prefix,
tile_data_table, reset);
}
bool ExecuteSql(const char *sql, int rowNo);
void Rollback();
void InitializeSqlFilters(wxString & db_prefix, wxString & table,
bool read_only, wxString & geom_column)
{
SqlFilters.Initialize(db_prefix, table, read_only, geom_column);
}
bool IsValidSqlFilter()
{
return SqlFilters.IsValid();
}
void ResetSqlFilters()
{
return SqlFilters.Reset();
}
bool IsMapLinkedResultSet()
{
return SqlFilters.IsMapLinked();
}
wxString & GetGeometryColumnFromSqlFilter()
{
return SqlFilters.GetGeometryColumn();
}
void DoCreateStylingTables(void);
bool TableAlreadyExists(wxString & name);
bool CoverageAlreadyExists(wxString & name);
bool SRIDnotExists(int srid);
bool CheckMetadata();
bool CheckMetadata(wxString & dbAlias);
void SaveConfig();
void LoadConfig(wxString & externalPath);
void CheckUpdates();
bool DoParseNewVersion(const char *text, char **version, char **date,
char **download_url);
void DoGetPackageName(const char *download_url, wxString & name);
void DoSaveUpdatedPackage(const unsigned char *data, int data_len,
wxString & fileName);
wxString *GetCharsets()
{
return Charsets;
}
wxString *GetCharsetsNames()
{
return CharsetsNames;
}
int GetCharsetsLen()
{
return CharsetsLen;
}
gaiaDbfFieldPtr GetDbfField(gaiaDbfListPtr list, int index);
void OutputPrjFile(const void *proj_ctx, wxString & path, int srid);
bool OutputPrjFileProjNew(const void *proj_ctx, wxString & path, int srid);
void LoadText(wxString & path, wxString & table, wxString & charset,
bool first_titles, const char decimal_separator,
const char separator, const char text_separator);
void DumpTxtTab(wxString & path, wxString & table, wxString & charset);
void DumpCsv(wxString & path, wxString & table, wxString & charset);
void DumpHtml(wxString & path, wxString & table, wxString & dbPath,
wxString & charset);
void DumpDif(wxString & path, wxString & table, wxString & charset,
char decimal_point, bool date_time);
void DumpSylk(wxString & path, wxString & table, wxString & charset,
bool date_time);
void DumpKml(wxString & path, wxString & table, wxString & column,
int precision, wxString & name, bool isNameConst,
wxString & desc, bool isDescConst);
void ExportResultSetAsTxtTab(wxString & path, wxString & sql,
wxString & charset);
void ExportResultSetAsCsv(wxString & path, wxString & sql,
wxString & charset);
void ExportResultSetAsHtml(wxString & path, wxString & sql, wxString & dbPath,
wxString & charset);
bool ExportHtmlColorSqlSyntax(FILE * out, wxString & sql, char *out_cs);
void ExportResultSetAsShp(const void *proj_ctx, wxString & path,
wxString & sql, wxString & charset);
void ExportResultSetAsDif(wxString & path, wxString & sql, wxString & charset,
char decimal_point, bool date_time);
void ExportResultSetAsSylk(wxString & path, wxString & sql,
wxString & charset, bool date_time);
void ExportResultSetAsDbf(wxString & path, wxString & sql,
wxString & charset);
void DoExportXLSX(wxString & path, wxString & sql);
void GetHelp(wxString & html);
void FeedZipHtml(unsigned char *zip, int offset, const char *data);
wxString *GetColumnNames(wxString & table, int *columns);
void SetLastDirectory(wxString & path)
{
LastDirectory = path;
}
wxString & GetLastDirectory()
{
return LastDirectory;
}
rl2WmsCachePtr GetWmsCache()
{
return WmsCache;
}
void SetHttpProxy(wxString & proxy)
{
HttpProxy = proxy;
}
wxString & GetHttpProxy()
{
return HttpProxy;
}
void SetWfsGetCapabilitiesURL(wxString & url)
{
WfsGetCapabilitiesURL = url;
}
wxString & GetWfsGetCapabilitiesURL()
{
return WfsGetCapabilitiesURL;
}
wxString & GetLocaleCharset()
{
return LocaleCharset;
}
wxString & GetDefaultCharset()
{
return DefaultCharset;
}
wxString & GetCharsetName(wxString & charset);
int GetCharsetIndex(wxString & charset);
bool IsSetAskCharset()
{
return AskCharset;
}
char *ReadSqlLine(FILE * fl, int *len, int *eof);
MyQueryView *GetQueryView()
{
return QueryView;
}
MyResultSetView *GetRsView()
{
return RsView;
}
wxString *GetTables(int *cnt);
wxString *GetTableColumns(wxString & dbPrefix, wxString & table, int *cnt);
wxString *GetTableGeometries(wxString & dbPrefix, wxString & table, int *cnt);
void ImportExifPhotos(wxString & path, bool folder, bool metadata,
bool gps_only);
void ImportGpsPhotos(wxString & path, bool folder, wxString & table,
wxString & geometry, bool update_statistics,
bool spatial_index);
void ImportXmlDocuments(wxString & path, bool folder, wxString & suffix,
wxString & table, wxString & pkName,
wxString & xmlColumn, wxString & inPathColumn,
wxString & schemaColumn, wxString & parseErrColumn,
wxString & validateErrColumn, int compressed,
const char *schemaURI, bool isInternaleSchemaUri);
void ImportDXFfiles(wxString & path, bool folder, wxString & prefix,
wxString & layer, int srid, bool force2d, bool force3d,
bool mixed, bool linked, bool unlinked, bool append);
bool CheckExifTables();
int ExifLoadDir(wxString & path, bool gps_only, bool metadata);
int ExifLoadFile(wxString & path, bool gps_only, bool metadata);
bool UpdateExifTables(unsigned char *blob, int sz,
gaiaExifTagListPtr tag_list, bool metadata,
wxString & path);
bool CheckGpsPicsTable(wxString & table, wxString & geometry, bool rtree);
int GpsPicsLoadDir(wxString & path, sqlite3_stmt * stmt);
int GpsPicsLoadFile(wxString & path, sqlite3_stmt * stmt);
bool ImportExifGps(unsigned char *blob, int sz, gaiaExifTagListPtr ttag_list,
wxString & path, sqlite3_stmt * stmt);
bool IsExifGps(gaiaExifTagListPtr tag_list);
int DxfLoadDir(wxString & path, wxString & prefix, wxString & layer, int srid,
bool force2d, bool force3d, bool mixed, bool linked,
bool unlinked, bool append, int *failed);
int DxfLoadFile(wxString & path, wxString & prefix, wxString & layer,
int srid, bool force2d, bool force3d, bool mixed, bool linked,
bool unlinked, bool append, int *failed);
bool CheckOrCreateXmlTable(wxString & table, wxString & pkName,
wxString & xmlColumn, wxString & inPathColumn,
wxString & schemaUriColumn,
wxString & parseErrColumn,
wxString & validateErrColumn);
bool IsValidSuffix(const char *fileName, wxString & suffix);
int XmlDocumentLoadDir(wxString & path, wxString & suffix, int compressed,
const char *schemaURI, bool isInternalSchemaUri,
wxString & inPathColumn, wxString & schemaUriColumn,
wxString & parseErrColumn,
wxString & validateErrColumn, sqlite3_stmt * stmt,
int *failed);
int XmlDocumentLoadFile(wxString & path, int compressed,
const char *schemaURI, bool isInternalSchemaUri,
wxString & inPathColumn, wxString & parseErrColumn,
wxString & validateErrColumn,
wxString & schemaUriColumn, sqlite3_stmt * stmt,
int *failed);
bool InsertIntoXmlTable(sqlite3_stmt * stmt, char *blob, int sz,
wxString & inPathColumn, wxString & path,
wxString & schemaUriColumn, const char *schemaUri,
wxString & parseErrColumn, const char *parseError,
wxString & validateErrColumn,
const char *validateError);
void GetMake(gaiaExifTagListPtr tag_list, wxString & str, bool *ok);
void GetModel(gaiaExifTagListPtr tag_list, wxString & str, bool *ok);
void GetGpsTimestamp(gaiaExifTagListPtr tag_list, wxString & str, bool *ok);
void GetDate(gaiaExifTagListPtr tag_list, wxString & str, bool *ok);
double GetGpsDirection(gaiaExifTagListPtr tag_list, bool *ok);
void GetGpsSatellites(gaiaExifTagListPtr tag_list, wxString & str, bool *ok);
void GetGpsCoords(gaiaExifTagListPtr tag_list, double *longitude,
double *latitude, bool *ok);
sqlite3_int64 GetPixelX(gaiaExifTagListPtr tag_list, bool *ok);
sqlite3_int64 GetPixelY(gaiaExifTagListPtr tag_list, bool *ok);
bool MemoryDbSave();
void LastDitchMemoryDbSave();
void QueryViewComposer();
void SqlFiltersComposer();
MalformedGeomsList *FindMalformedGeoms(wxString & table, wxString & geom,
bool allowRepair);
void PreRepairPolygons(wxString & table, wxString & geom, int *count);
void RepairPolygons(wxString & table, wxString & geom, int *count);
bool IsPrimaryKey(wxString & table, wxString & column);
void DbPagesCount(int *total, int *frees);
void EnableAllTools(bool mode = true);
void DisableAllTools()
{
EnableAllTools(false);
};
void DoResetSqlFilters()
{
SqlFilters.Reset();
}
void DoSaveSqlFilters(SqlFiltersDialog * dlg)
{
SqlFilters.Save(dlg);
}
int TestDotCommand(const char *stmt);
bool IsDotCommandLoadShp(const char *stmt, char *path, char *table,
char *charset, char *column, int *srid,
bool *coerce2D, bool *compressed);
bool IsDotCommandLoadDbf(const char *stmt, char *path, char *table,
char *charset);
bool IsDotCommandLoadXL(const char *stmt, char *path, char *table,
int *worksheetIndex, int *firstTitle);
bool IsDotCommandDumpShp(const char *stmt, char *table,
char *column, char *path, char *charset, char *type);
bool IsViewGeometry(wxString & table, wxString & column);
bool GetTilePreview(wxString & curretntTileDataDbPrefix,
wxString & currentTileData, int currentTileId,
unsigned char **blob, int *blobSize);
class RasterCoverageStylesList *FindRasterCoverageStyles(wxString & coverage);
class RasterCoverageStylesList *FindRasterStyles();
class VectorCoverageStylesList *FindVectorCoverageStyles(wxString & coverage);
class VectorCoverageStylesList *FindVectorStyles();
class MapConfigurationsList *FindMapConfigurations();
class CandidateVectorCoveragesList *FindUnregisteredVectorCoverages();
class CandidateSpatialViewCoveragesList
* FindUnregisteredSpatialViewCoverages();
class CandidateVirtualTableCoveragesList
* FindUnregisteredVirtualTableCoverages();
class CandidateTopoGeoCoveragesList *FindUnregisteredTopoGeoCoverages();
class CandidateTopoNetCoveragesList *FindUnregisteredTopoNetCoverages();
bool DoRegisterVectorCoverage(wxString & name, wxString & table,
wxString & geometry, wxString & title,
wxString & abstract, wxString & copyright,
wxString & license, bool isQueryable,
bool isEditable);
bool DoRegisterSpatialViewCoverage(wxString & name, wxString & view,
wxString & geometry, wxString & title,
wxString & abstract, wxString & copyright,
wxString & license, bool isQueryable,
bool isEditable);
bool DoRegisterVirtualTableCoverage(wxString & name, wxString & virt_table,
wxString & virt_geometry,
wxString & title, wxString & abstract,
wxString & copyright, wxString & license,
bool isQueryable);
bool DoRegisterTopoGeoCoverage(wxString & name, wxString & topology,
wxString & title, wxString & abstract,
wxString & copyright, wxString & license,
bool isQueryable, bool isEditable);
bool DoRegisterTopoNetCoverage(wxString & name, wxString & network,
wxString & title, wxString & abstract,
wxString & copyright, wxString & license,
bool isQueryable, bool isEditable);
bool ValidateRasterStyle(const char *path, void **blob, int *blob_size);
bool ValidateRasterStyle(void **blob, int *blob_size, const char *xml);
bool DoInsertRasterSymbolizer(char *xml);
bool ValidateVectorStyle(const char *path, void **blob, int *blob_size);
bool ValidateVectorStyle(void **blob, int *blob_size, const char *xml);
bool DoInsertVectorSymbolizer(char *xml);
bool ValidateMapConfig(const char *path, void **blob, int *blob_size);
bool ValidateMapConfig(void **blob, int *blob_size, const char *xml);
bool ValidateExternalGraphicResource(const char *path, void **blob,
int *blob_size, wxString & abstract);
class RasterCoverageSRIDsList *FindRasterAlternativeSRIDs(wxString &
coverage);
class VectorCoverageSRIDsList *FindVectorAlternativeSRIDs(wxString &
coverage);
int FindVectorType(char *cvg);
class RasterCoverageKeywordsList *FindRasterKeywords(wxString & coverage);
class VectorCoverageKeywordsList *FindVectorKeywords(wxString & coverage);
class ExternalGraphicList *FindExternalGraphic(bool no_svg);
class TextFontList *FindTextFont(void);
void CheckTTFont(const char *facename, bool *bold, bool *italic);
bool GetCurrentlySelectedTable(wxString & table_name)
{
return TableTree->GetCurrentlySelectedTable(table_name);
}
bool DoGetRasterCoverageInfos(wxString & coverage, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, wxString & sample,
wxString & pixel, wxString & compression,
int *srid, bool *mixed_resolutions);
bool DoImportRasterFiles(wxString & coverage, wxString & title,
wxArrayString & paths, int forced_srid,
bool with_worldfile, bool pyramidize);
bool DoImportRaster(sqlite3_stmt * stmt, wxString & coverage, wxString & path,
int forced_srid, bool with_worldfile, bool pyramidize);
bool DoGetVectorCoverageInfos(wxString & coverage, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, int *origin,
wxString & type, int *srid);
bool CreateRasterCoverage(wxString & CoverageName, wxString & Title,
wxString & Abstract, int SampleType, int PixelType,
int NumBands, int Compression, int Quality,
int TileWidth, int TileHeight,
bool NotGeoreferenced, int Srid,
double HorzResolution, double VertResolution,
wxString NoData, bool StrictResolution,
bool MixedResolutions, bool InputPaths, bool MD5,
bool Summary, int RedBand, int GreenBand,
int BlueBand, int NIRband, bool AutoNDVI,
bool isQueryable);
static void DoubleQuoted(wxString & str);
bool IsView(wxString & view);
bool IsWritableView(wxString & view);
void GetWritableViewPK(wxString & view, wxString & pk_name);
bool HasFlippedAxes(const char *crs);
bool BBoxFromLongLat(const char *crs_str, double *minx, double *maxx,
double *miny, double *maxy);
char *GetProjParams(int srid);
void CreateWmsTables();
bool IsDefinedWmsGetCapabilities(const char *url);
bool IsDefinedWmsGetMap(const char *getmap_url, const char *layer_name);
bool DoGetWmsLayerInfos(wxString & url, wxString & layer_name,
wxString & title, wxString & abstract,
wxString & copyright, int *license_id,
wxString & data_license, bool *is_queryable,
wxString & getfeatureinfo_url);
bool RegisterWmsGetCapabilities(const char *url, const char *title,
const char *abstract);
bool RegisterWmsGetMap(const char *getcapabilities_url,
const char *getmap_url, const char *layer_name,
const char *title, const char *abstract,
const char *version, const char *ref_sys,
const char *image_format, const char *style,
int transparent, int flip_axes, int is_queryable,
int tiled, int cached, int tile_width, int tile_height,
const char *bgcolor, const char *getfeatureinfo);
bool RegisterWmsSetting(const char *url, const char *layer_name,
const char *key, const char *value, int is_default);
bool RegisterWmsSRS(const char *url, const char *layer_name,
const char *ref_sys, double minx, double miny,
double maxx, double maxy, int is_default);
bool TransformWmsBBox(const char *ref_sys, double geoMinX, double geoMinY,
double geoMaxX, double geoMaxY, double *minx,
double *miny, double *maxx, double *maxy);
void DoRegisterWMS();
void DoCreateTopoGeo();
void DoCreateTopoNet();
bool DoGuessSridFromSHP(wxString & path, int *srid);
bool DoGuessSridFromZipSHP(const char *zip_path, const char *bansename,
int *srid);
void MapPanelClosing();
void CreateNetwork(wxString & table, wxString & from, wxString & to,
bool isNoGeometry, wxString & geom, bool isNameEnabled,
wxString & name, bool isGeomLength, wxString & cost,
bool isBidirectional, bool isOneWays,
wxString & oneWayFromTo, wxString & oneWayToFrom,
bool aStarSupported, wxString & dataTableName,
wxString & virtualTableName, bool overwrite);
void GetLastRoutingError(wxString & errCause);
bool HasPostgreSqlConnections();
void DoPostgreSqlConnection();
bool DoCheckPostGisGeometry(wxString & virtName, wxString & columnName);
MyPostgresTable *FindPostgresTable(wxString & virtName)
{
return PostgresList.FindTable(this, virtName);
}
MyPostgresTable *FindPostGisView(wxString & virtName)
{
return PostgresList.FindPostGisView(this, virtName);
}
void InitPostgresPkColumns(MyPostgresConn * conn, MyPostgresSchema * schema,
MyPostgresTable * table);
void InitPostgresPks(void *conn, MyPostgresSchema * schema,
MyPostgresTable * table);
char *MapAuxPrepareSqlQuery(const char *db_prefix, const char *table,
const char *rowid);
void OnQuit(wxCommandEvent & event);
void OnClose(wxCloseEvent & event);
void OnAbout(wxCommandEvent & event);
void OnConnect(wxCommandEvent & event);
void OnConnectReadOnly(wxCommandEvent & event);
void OnCreateNew(wxCommandEvent & event);
void OnDisconnect(wxCommandEvent & event);
void OnMemoryDbLoad(wxCommandEvent & event);
void OnMemoryDbNew(wxCommandEvent & event);
void OnMemoryDbClock(wxCommandEvent & event);
void OnMemoryDbSave(wxCommandEvent & event);
void OnVacuum(wxCommandEvent & event);
void OnPostgreSQL(wxCommandEvent & WXUNUSED(&event))
{
DoPostgreSqlConnection();
}
void OnMapPanel(wxCommandEvent & event);
void OnSqlScript(wxCommandEvent & event);
void OnQueryViewComposer(wxCommandEvent & event);
void OnCharset(wxCommandEvent & event);
void OnLoadShp(wxCommandEvent & event);
void OnLoadGeoJSON(wxCommandEvent & event);
void OnLoadTxt(wxCommandEvent & event);
void OnLoadDbf(wxCommandEvent & event);
void OnLoadXL(wxCommandEvent & event);
void OnVirtualShp(wxCommandEvent & event);
void OnVirtualGeoJSON(wxCommandEvent & event);
void OnVirtualTxt(wxCommandEvent & event);
void OnVirtualDbf(wxCommandEvent & event);
void OnVirtualXL(wxCommandEvent & event);
void OnNetwork(wxCommandEvent & event);
void OnImportExifPhotos(wxCommandEvent & event);
void OnImportGpsPhotos(wxCommandEvent & event);
void OnImportXmlDocuments(wxCommandEvent & event);
void OnImportWFS(wxCommandEvent & event);
void OnImportDXF(wxCommandEvent & event);
void OnSrids(wxCommandEvent & event);
void OnAttachDatabase(wxCommandEvent & event);
void OnSqlLog(wxCommandEvent & event);
void OnDbStatus(wxCommandEvent & event);
void OnCheckGeometries(wxCommandEvent & event);
void OnSanitizeGeometries(wxCommandEvent & event);
void OnProjLib(wxCommandEvent & event);
void OnHelp(wxCommandEvent & event);
void OnMouseMove(wxMouseEvent & event);
void OnTimerAutoSave(wxTimerEvent & event);
};
class HelpDialog:public wxDialog
{
//
// the help dialog
//
private:
MyFrame * MainFrame;
public:
HelpDialog()
{
MainFrame = NULL;
}
HelpDialog(MyFrame * parent)
{
Create(parent);
}
bool Create(MyFrame * parent);
virtual ~ HelpDialog()
{;
}
void CreateControls();
void OnCancel(wxCommandEvent & event);
void OnClose(wxCloseEvent & event);
void OnSize(wxSizeEvent & event);
};
class CloneTableDialog:public wxDialog
{
//
// the CloneTable dialog
//
private:
MyFrame * MainFrame;
wxString dbPrefix;
wxString inTable;
public:
CloneTableDialog()
{
MainFrame = NULL;
}
CloneTableDialog(MyFrame * parent, wxString & dbPrefix, wxString & inTable)
{
Create(parent, dbPrefix, inTable);
}
bool Create(MyFrame * parent, wxString & dbPrefix, wxString & inTable);
virtual ~ CloneTableDialog()
{;
}
void CreateControls();
void GetSQL(wxString & sql);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class SearchSridDialog:public wxDialog
{
//
// a dialog preparing a Search SRID by name
//
private:
MyFrame * MainFrame;
wxString String; // search string [name]
int SRID; // search id [srid]
bool SearchBySRID;
public:
SearchSridDialog()
{;
}
SearchSridDialog(MyFrame * parent);
bool Create(MyFrame * parent);
virtual ~ SearchSridDialog()
{;
}
void CreateControls();
wxString & GetString()
{
return String;
}
int GetSRID()
{
return SRID;
}
bool IsSearchBySrid()
{
return SearchBySRID;
}
void OnOk(wxCommandEvent & event);
void OnSearchBySrid(wxCommandEvent & event);
};
class SetSridDialog:public wxDialog
{
//
// a dialog preparing a SET SRID
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name to be recovered
int OldSRID; // SRID to substitute
int SRID; // required SRID
public:
SetSridDialog()
{;
}
SetSridDialog(MyFrame * parent, wxString & table, wxString & column);
bool Create(MyFrame * parent, wxString & table, wxString & column);
virtual ~ SetSridDialog()
{;
}
void CreateControls();
int GetOldSRID()
{
return OldSRID;
}
int GetSRID()
{
return SRID;
}
void OnOk(wxCommandEvent & event);
};
class RecoverDialog:public wxDialog
{
//
// a dialog preparing a RECOVER GEOMETRY
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name to be recovered
int SRID; // required SRID
wxString Type; // required Geometry Type
wxString Dimension; // required CoordDimension
public:
RecoverDialog()
{;
}
RecoverDialog(MyFrame * parent, wxString & table, wxString & column);
bool Create(MyFrame * parent, wxString & table, wxString & column);
virtual ~ RecoverDialog()
{;
}
void CreateControls();
wxString & GetType()
{
return Type;
}
wxString & GetDimension()
{
return Dimension;
}
int GetSRID()
{
return SRID;
}
void OnOk(wxCommandEvent & event);
};
class ElementaryGeomsDialog:public wxDialog
{
//
// a dialog asking ElementaryGeoms args
//
private:
MyFrame * MainFrame;
wxString InTable;
wxString Geometry;
wxString OutTable;
wxString PrimaryKey;
wxString MultiID;
wxString Type;
int SRID;
wxString CoordDims;
bool SpatialIndex;
public:
ElementaryGeomsDialog()
{;
}
ElementaryGeomsDialog(MyFrame * parent, wxString & table, wxString & column);
bool Create(MyFrame * parent, wxString & table, wxString & column);
virtual ~ ElementaryGeomsDialog()
{;
}
wxString & GetOutTable()
{
return OutTable;
}
wxString & GetPrimaryKey()
{
return PrimaryKey;
}
wxString & GetMultiID()
{
return MultiID;
}
wxString & GetType()
{
return Type;
}
int GetSRID()
{
return SRID;
}
wxString & GetCoordDims()
{
return CoordDims;
}
bool IsSpatialIndex()
{
return SpatialIndex;
}
void CreateControls();
void OnOk(wxCommandEvent & event);
};
class ColumnStatsDialog:public wxDialog
{
//
// a dialog showing Column Stats
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name
int NullValues;
int TextValues;
int IntegerValues;
int RealValues;
int BlobValues;
double Min;
double Max;
double Avg;
double StdDevPop;
double StdDevSamp;
double VarPop;
double VarSamp;
int DistinctValues;
void CleanDecimals(char *number);
public:
ColumnStatsDialog()
{;
}
bool Create(MyFrame * parent, wxString & table, wxString & column,
int null_count, int text_count, int integer_count, int real_count,
int blob_count, double min, double max, double avg,
double stddev_pop, double stddev_samp, double var_pop,
double var_samp, int distinct_values);
virtual ~ ColumnStatsDialog()
{;
}
void CreateControls();
void OnShowChart(wxCommandEvent & event);
void OnExit(wxCommandEvent & event);
};
class MyChartIntervalClass
{
// a Chart interval class
private:
double Min;
double Max;
int Count;
public:
MyChartIntervalClass()
{;
}
~MyChartIntervalClass()
{;
}
void Create(double min, double max)
{
Min = min;
Max = max;
Count = 0;
}
double GetMin()
{
return Min;
}
double GetMax()
{
return Max;
}
void Add()
{
Count++;
}
int GetCount()
{
return Count;
}
};
class MyChartUniqueClass
{
// a Chart unique-value class
private:
wxString Value;
int Count;
MyChartUniqueClass *Next;
public:
MyChartUniqueClass(wxString & value, int count)
{
Value = value;
Count = count;
Next = NULL;
}
~MyChartUniqueClass()
{;
}
wxString & GetValue()
{
return Value;
}
int GetCount()
{
return Count;
}
void SetNext(MyChartUniqueClass * p)
{
Next = p;
}
MyChartUniqueClass *GetNext()
{
return Next;
}
};
class MyChartData
{
// a container storing Chart data classes
private:
bool Initialized;
MyChartIntervalClass *Array;
double Min;
double Max;
int MaxFreq;
int TotFreq;
MyChartUniqueClass *First;
MyChartUniqueClass *Last;
int MaxClasses;
int NumClasses;
int OtherUniquesFreq;
int OtherUniquesCount;
bool Valid;
bool ByIntervals;
public:
MyChartData();
~MyChartData();
bool Create(int max_classes);
bool Create(double min, double max, int classes);
void Add(wxString & value, int count);
void Add(double value);
MyChartUniqueClass *GetFirst()
{
return First;
}
int GetMaxFreq()
{
return MaxFreq;
}
int GetTotFreq()
{
return TotFreq;
}
int GetNumClasses()
{
return NumClasses;
}
int GetOtherUniquesFreq()
{
return OtherUniquesFreq;
}
int GetOtherUniquesCount()
{
return OtherUniquesCount;
}
MyChartIntervalClass *GetClass(int idx);
void SetValid()
{
Valid = true;
}
bool IsValid()
{
return Valid;
}
void CleanData();
bool Check(bool by_intervals, int classes);
};
class MyChartScaleLabel
{
// a Chart Scale label
private:
wxString Label;
double Position;
MyChartScaleLabel *Next;
public:
MyChartScaleLabel(wxString & label, double pos)
{
Label = label;
Position = pos;
Next = NULL;
}
~MyChartScaleLabel()
{;
}
wxString & GetLabel()
{
return Label;
}
double GetPosition()
{
return Position;
}
void SetNext(MyChartScaleLabel * p)
{
Next = p;
}
MyChartScaleLabel *GetNext()
{
return Next;
}
};
class MyPieChartLabel
{
// a PieChart label
private:
wxString Label;
double X;
double Y;
MyPieChartLabel *Next;
public:
MyPieChartLabel(wxString & label, double x, double y)
{
Label = label;
X = x;
Y = y;
Next = NULL;
}
~MyPieChartLabel()
{;
}
wxString & GetLabel()
{
return Label;
}
double GetX()
{
return X;
}
double GetY()
{
return Y;
}
void SetNext(MyPieChartLabel * p)
{
Next = p;
}
MyPieChartLabel *GetNext()
{
return Next;
}
};
class MyChartScaleLabels
{
// a container storing Chart Scale labels
private:
MyChartScaleLabel * First;
MyChartScaleLabel *Last;
public:
MyChartScaleLabels()
{
First = NULL;
Last = NULL;
}
~MyChartScaleLabels();
void Initialize(double span, int max_freq);
void Add(const char *label, double pos);
MyChartScaleLabel *GetFirst()
{
return First;
}
};
class MyPieChartLabels
{
// a container storing PieChart labels
private:
MyPieChartLabel * First;
MyPieChartLabel *Last;
MyPieChartLabel **LeftLabels;
int NumLeftLabels;
MyPieChartLabel **RightLabels;
int NumRightLabels;
public:
MyPieChartLabels();
~MyPieChartLabels();
void Add(const char *label, double x, double y);
void Sort(double cx);
int GetNumLeftLabels()
{
return NumLeftLabels;
}
MyPieChartLabel *GetLeftLabel(int idx);
int GetNumRightLabels()
{
return NumRightLabels;
}
MyPieChartLabel *GetRightLabel(int idx);
};
class StatsChartDialog:public wxDialog
{
//
// a dialog generating a Stat Chart
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name
bool NumericData;
double Min;
double Max;
wxRadioBox *TypeCtrl;
wxRadioBox *SizeCtrl;
wxRadioBox *ModeCtrl;
wxSpinCtrl *ClassCtrl;
wxStaticBitmap *ChartShow;
bool Histogram;
bool LineChart;
bool PieChart;
bool ByInterval;
int Classes;
MyChartData ChartData;
wxString ExportPath;
enum Targets
{
CHART_TARGET_IS_PREVIEW,
CHART_TARGET_IS_COPY,
CHART_TARGET_IS_PNG,
CHART_TARGET_IS_SVG,
CHART_TARGET_IS_PDF
};
public:
StatsChartDialog()
{;
}
bool Create(ColumnStatsDialog * parent, MyFrame * granny, wxString & table,
wxString & column, bool numeric, double min, double max);
virtual ~ StatsChartDialog()
{;
}
void CreateControls();
void CleanDecimals(char *number);
void ReloadData();
void UpdatePreview();
void PrepareDataByInterval(int classes);
void PrepareDataByUniqueValue(int classes);
void DoIntervalHistogram(int hsize, int vsize, int target, int font_size);
void DoIntervalLineChart(int hsize, int vsize, int target, int font_size);
void DoIntervalPieChart(int hsize, int vsize, int target, int font_size);
void DoUniqueHistogram(int hsize, int vsize, int target, int font_size);
void DoUniqueLineChart(int hsize, int vsize, int target, int font_size);
void DoUniquePieChart(int hsize, int vsize, int target, int font_size);
void OnChartTypeChanged(wxCommandEvent & event);
void OnChartModeChanged(wxCommandEvent & event);
void OnChartClassesChanged(wxCommandEvent & event);
void OnChartCopy(wxCommandEvent & event);
void OnChartPng(wxCommandEvent & event);
void OnChartSvg(wxCommandEvent & event);
void OnChartPdf(wxCommandEvent & event);
void OnExit(wxCommandEvent & event);
};
class MapPreviewDialog:public wxDialog
{
//
// a dialog generating a Map Preview
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name
double MinX;
double MinY;
double MaxX;
double MaxY;
wxColour LineColor;
wxColour FillColor;
wxRadioBox *SizeCtrl;
wxRadioBox *SymbolCtrl;
wxRadioBox *FillCtrl;
wxSpinCtrl *SymSizeCtrl;
wxSpinCtrl *ThicknessCtrl;
wxBitmapButton *LineColorCtrl;
wxBitmapButton *FillColorCtrl;
wxStaticBitmap *MapShow;
wxString ExportPath;
enum Targets
{
MAP_TARGET_IS_PREVIEW,
MAP_TARGET_IS_COPY,
MAP_TARGET_IS_PNG,
MAP_TARGET_IS_SVG,
MAP_TARGET_IS_PDF
};
public:
MapPreviewDialog()
{;
}
bool Create(MyFrame * parent, wxString & table, wxString & column,
double minx, double mixy, double maxx, double maxy);
virtual ~ MapPreviewDialog()
{;
}
void CreateControls();
void UpdatePreview();
void DoMap(int hsize, int vsize, int target);
void GetButtonBitmap(wxColour & color, wxBitmap & bmp);
void OnSizeChanged(wxCommandEvent & event);
void OnSymbolTypeChanged(wxCommandEvent & event);
void OnFillModeChanged(wxCommandEvent & event);
void OnSymbolSizeChanged(wxCommandEvent & event);
void OnLineThicknessChanged(wxCommandEvent & event);
void OnLineColor(wxCommandEvent & event);
void OnFillColor(wxCommandEvent & event);
void OnMapCopy(wxCommandEvent & event);
void OnMapPng(wxCommandEvent & event);
void OnMapSvg(wxCommandEvent & event);
void OnMapPdf(wxCommandEvent & event);
void OnExit(wxCommandEvent & event);
};
class VirtualShpDialog:public wxDialog
{
//
// a dialog preparing a CREATE VIRTUAL SHAPE
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the SHP charset
int SRID; // the SRID
bool TextDates;
public:
VirtualShpDialog()
{;
}
VirtualShpDialog(MyFrame * parent, wxString & path, wxString & table,
int srid, wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table, int srid,
wxString & defCs);
virtual ~ VirtualShpDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
int GetSRID()
{
return SRID;
}
bool IsTextDates()
{
return TextDates;
}
void OnOk(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
};
class VirtualGeoJsonDialog:public wxDialog
{
//
// a dialog preparing a CREATE VIRTUAL GeoJSON
//
private:
MyFrame * MainFrame;
wxString Path; // the GeoJSON path
wxString Table; // the table name
int SRID; // the SRID
int ColnameCase;
public:
VirtualGeoJsonDialog()
{;
}
VirtualGeoJsonDialog(MyFrame * parent, wxString & path, wxString & table);
bool Create(MyFrame * parent, wxString & path, wxString & table);
virtual ~ VirtualGeoJsonDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
int GetSRID()
{
return SRID;
}
int GetColnameCase()
{
return ColnameCase;
}
void OnOk(wxCommandEvent & event);
};
class VirtualTxtDialog:public wxDialog
{
//
// a dialog preparing a CREATE VIRTUAL TEXT
//
private:
MyFrame * MainFrame;
wxString Path; // the CSV/TXT base path
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the CSV/TXT charset
bool FirstLineTitles; // TRUE if first line stores column titles
char Separator; // the character to be used as field separator
char TextSeparator; // the character to be used as text separator
bool DecimalPointIsComma; // TRUE if decimal separator is COMMA
public:
VirtualTxtDialog()
{;
}
VirtualTxtDialog(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
virtual ~ VirtualTxtDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
bool IsFirstLineTitles()
{
return FirstLineTitles;
}
char GetSeparator()
{
return Separator;
}
char GetTextSeparator()
{
return TextSeparator;
}
bool IsDecimalPointComma()
{
return DecimalPointIsComma;
}
void OnSeparator(wxCommandEvent & event);
void OnDecimalSeparator(wxCommandEvent & event);
void OnQuote(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class VirtualDbfDialog:public wxDialog
{
//
// a dialog preparing a CREATE VIRTUAL DBF
//
private:
MyFrame * MainFrame;
wxString Path; // the DBF path
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the DBF charset
bool TextDates;
public:
VirtualDbfDialog()
{;
}
VirtualDbfDialog(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
virtual ~ VirtualDbfDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
bool IsTextDates()
{
return TextDates;
}
void OnOk(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
};
class LoadShpDialog:public wxDialog
{
//
// a dialog preparing a LOAD SHAPE
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Table; // the table's name to be created
wxString Column; // the column's name for Geometry
wxString Default; // the default charset
wxString Charset; // the SHP charset
int SRID; // the SRID
bool Coerce2D; // coercing to 2D [x,y]
bool Compressed; // compressed geometries
bool SpatialIndex; // building the Spatial Index (or not)
bool UserDefinedGType; // mode: automatic / user defined Geometry Type
wxString GeometryType; // User Defined Geometry Type
bool UserDefinedPKey; // mode: automatic / user defined Primary Key
wxString PKColumn; // User Defined Primary Key
int PKCount; // # Primary Key Columns
wxString *PKFields; // array of Primary Key Columns
wxString *PKFieldsEx; // array of Primary Key Columns (full detail)
bool TextDates;
int ColnameCase;
bool UpdateStatistics;
public:
LoadShpDialog()
{;
}
LoadShpDialog(MyFrame * parent, wxString & path, wxString & table, int srid,
wxString & column, wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table, int srid,
wxString & column, wxString & defCs);
virtual ~ LoadShpDialog();
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetColumn()
{
return Column;
}
wxString & GetCharset()
{
return Charset;
}
int GetSRID()
{
return SRID;
}
bool ApplyCoertion2D()
{
return Coerce2D;
}
bool ApplyCompression()
{
return Compressed;
}
bool CreateSpatialIndex()
{
return SpatialIndex;
}
bool IsUserDefinedGType()
{
return UserDefinedGType;
}
wxString & GetGeometryType()
{
return GeometryType;
}
bool IsUserDefinedPKey()
{
return UserDefinedPKey;
}
wxString & GetPKColumn()
{
return PKColumn;
}
bool IsTextDates()
{
return TextDates;
}
int GetColnameCase()
{
return ColnameCase;
}
bool IsUpdateStatistics()
{
return UpdateStatistics;
}
void LoadPKFields();
void OnOk(wxCommandEvent & event);
void OnUserGType(wxCommandEvent & event);
void OnUserPKey(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
void OnUpdateStatistics(wxCommandEvent & event);
};
class LoadZipShpDialog:public wxDialog
{
//
// a dialog preparing a LOAD SHAPE
//
private:
MyFrame * MainFrame;
wxString ZipPath; // the Zipfile path
wxString Basename; // the SHP basename
wxString Table; // the table's name to be created
wxString Column; // the column's name for Geometry
wxString Default; // the default charset
wxString Charset; // the SHP charset
int SRID; // the SRID
bool Coerce2D; // coercing to 2D [x,y]
bool Compressed; // compressed geometries
bool SpatialIndex; // building the Spatial Index (or not)
bool UserDefinedGType; // mode: automatic / user defined Geometry Type
wxString GeometryType; // User Defined Geometry Type
bool UserDefinedPKey; // mode: automatic / user defined Primary Key
wxString PKColumn; // User Defined Primary Key
int PKCount; // # Primary Key Columns
wxString *PKFields; // array of Primary Key Columns
wxString *PKFieldsEx; // array of Primary Key Columns (full detail)
bool TextDates;
int ColnameCase;
bool UpdateStatistics;
public:
LoadZipShpDialog()
{;
}
LoadZipShpDialog(MyFrame * parent, const char *zip_path, const char *basename,
wxString & table, int srid, wxString & column,
wxString & defCs);
bool Create(MyFrame * parent, const char *zip_path, const char *basename,
wxString & table, int srid, wxString & column, wxString & defCs);
virtual ~ LoadZipShpDialog();
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetColumn()
{
return Column;
}
wxString & GetCharset()
{
return Charset;
}
int GetSRID()
{
return SRID;
}
bool ApplyCoertion2D()
{
return Coerce2D;
}
bool ApplyCompression()
{
return Compressed;
}
bool CreateSpatialIndex()
{
return SpatialIndex;
}
bool IsUserDefinedGType()
{
return UserDefinedGType;
}
wxString & GetGeometryType()
{
return GeometryType;
}
bool IsUserDefinedPKey()
{
return UserDefinedPKey;
}
wxString & GetPKColumn()
{
return PKColumn;
}
bool IsTextDates()
{
return TextDates;
}
int GetColnameCase()
{
return ColnameCase;
}
bool IsUpdateStatistics()
{
return UpdateStatistics;
}
void LoadPKFields();
void OnOk(wxCommandEvent & event);
void OnUserGType(wxCommandEvent & event);
void OnUserPKey(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
void OnUpdateStatistics(wxCommandEvent & event);
};
class ChoooseZipShpDialog:public wxDialog
{
//
// a dialog preparing a LOAD SHAPE from Zipfile
//
private:
MyFrame * MainFrame;
const char *ZipPath; // the Zipfile path
int Count; // number of Shapefiles
char **Shapefiles; // array of Shapefile's basenames
const char *Basename; // the selected Basename
public:
ChoooseZipShpDialog()
{;
}
ChoooseZipShpDialog(MyFrame * parent, const char *zip_path, int count);
bool Create(MyFrame * parent, const char *zip_path, int count);
virtual ~ ChoooseZipShpDialog();
void CreateControls();
const char *GetBasename()
{
return Basename;
}
void OnOk(wxCommandEvent & event);
};
class ChoooseZipDbfDialog:public wxDialog
{
//
// a dialog preparing a LOAD DBF file from Zipfile
//
private:
MyFrame * MainFrame;
const char *ZipPath; // the Zipfile path
int Count; // number of Shapefiles
char **DBFs; // array of DBF's filenames
const char *Filename; // the selected filename
public:
ChoooseZipDbfDialog()
{;
}
ChoooseZipDbfDialog(MyFrame * parent, const char *zip_path, int count);
bool Create(MyFrame * parent, const char *zip_path, int count);
virtual ~ ChoooseZipDbfDialog();
void CreateControls();
const char *GetFilename()
{
return Filename;
}
void OnOk(wxCommandEvent & event);
};
class LoadGeoJsonDialog:public wxDialog
{
//
// a dialog preparing a LOAD GeoJSON
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Table; // the table's name to be created
wxString Column; // the column's name for Geometry
int SRID; // the SRID
bool SpatialIndex; // building the Spatial Index (or not)
bool UserDefinedGType; // mode: automatic / user defined Geometry Type
int ColnameCase;
bool UpdateStatistics;
public:
LoadGeoJsonDialog()
{;
}
LoadGeoJsonDialog(MyFrame * parent, wxString & path, wxString & table,
int srid, wxString & column);
bool Create(MyFrame * parent, wxString & path, wxString & table, int srid,
wxString & column);
virtual ~ LoadGeoJsonDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetColumn()
{
return Column;
}
int GetSRID()
{
return SRID;
}
bool CreateSpatialIndex()
{
return SpatialIndex;
}
int GetColnameCase()
{
return ColnameCase;
}
bool IsUpdateStatistics()
{
return UpdateStatistics;
}
void OnOk(wxCommandEvent & event);
void OnUpdateStatistics(wxCommandEvent & event);
};
class DumpPostGISDialog:public wxDialog
{
//
// a dialog preparing a SQL DUMP for PostGIS
//
private:
MyFrame * MainFrame;
wxString SchemaName; // the PostGIS target schema
wxString TableName; // the PostGIS table name
bool Lowercase; // column-names to lowercase
bool CreateTable; // creating (or not) the PostGIS table
bool SpatialIndex; // creating (or not) the PostGIS Spatial Index
public:
DumpPostGISDialog()
{;
}
DumpPostGISDialog(MyFrame * parent, wxString & table);
bool Create(MyFrame * parent, wxString & table);
virtual ~ DumpPostGISDialog()
{;
}
void CreateControls();
wxString & GetSchemaName()
{
return SchemaName;
}
wxString & GetTableName()
{
return TableName;
}
bool IsLowercase()
{
return Lowercase;
}
bool IsCreateTable()
{
return CreateTable;
}
bool IsSpatialIndex()
{
return SpatialIndex;
}
void OnLowercase(wxCommandEvent & event);
void OnCreateTable(wxCommandEvent & event);
void OnSpatialIndex(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class DumpShpDialog:public wxDialog
{
//
// a dialog preparing a DUMP SHAPE
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Table; // the table's name to be created
wxString Column; // the column's name for Geometry
wxString Default; // the default charset
wxString Charset; // the SHP charset
public:
DumpShpDialog()
{;
}
DumpShpDialog(MyFrame * parent, wxString & path, wxString & table,
wxString & column, wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table,
wxString & column, wxString & defCs);
virtual ~ DumpShpDialog()
{;
}
void CreateControls();
wxString & GetCharset()
{
return Charset;
}
void OnOk(wxCommandEvent & event);
};
class LoadXLDialog:public wxDialog
{
//
// a dialog preparing a LOAD XL
//
private:
MyFrame * MainFrame;
wxString Path; // the XLS path
wxString Table; // the table name
wxString *Worksheets; // Worksheet array
int WorksheetCount; // array items
int WorksheetIndex; // selected Worksheet Index
bool FirstLineTitles; // first line contains column names
bool Invalid;
void GetWorksheets();
public:
LoadXLDialog()
{;
}
LoadXLDialog(MyFrame * parent, wxString & path, wxString & table);
bool Create(MyFrame * parent, wxString & path, wxString & table);
virtual ~ LoadXLDialog()
{
if (Worksheets != NULL)
delete[]Worksheets;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
int GetWorksheetIndex()
{
return WorksheetIndex;
}
bool IsFirstLineTitles()
{
return FirstLineTitles;
}
void OnOk(wxCommandEvent & event);
};
class VirtualXLDialog:public wxDialog
{
//
// a dialog preparing a CREATE VIRTUAL XL
//
private:
MyFrame * MainFrame;
wxString Path; // the XLS path
wxString Table; // the table name
wxString *Worksheets; // Worksheet array
int WorksheetCount; // array items
int WorksheetIndex; // selected Worksheet Index
bool FirstLineTitles; // first line contains column names
bool Invalid;
void GetWorksheets();
public:
VirtualXLDialog()
{;
}
VirtualXLDialog(MyFrame * parent, wxString & path, wxString & table);
bool Create(MyFrame * parent, wxString & path, wxString & table);
virtual ~ VirtualXLDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
int GetWorksheetIndex()
{
return WorksheetIndex;
}
bool IsFirstLineTitles()
{
return FirstLineTitles;
}
void OnOk(wxCommandEvent & event);
};
class LoadTxtDialog:public wxDialog
{
//
// a dialog preparing a LOAD TXT/CSV
//
private:
MyFrame * MainFrame;
wxString Path; // the CSV/TXT base path
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the CSV/TXT charset
bool FirstLineTitles; // TRUE if first line stores column titles
char Separator; // the character to be used as field separator
char TextSeparator; // the character to be used as text separator
bool DecimalPointIsComma; // TRUE if decimal separator is COMMA
public:
LoadTxtDialog()
{;
}
LoadTxtDialog(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
virtual ~ LoadTxtDialog()
{;
}
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
bool IsFirstLineTitles()
{
return FirstLineTitles;
}
char GetSeparator()
{
return Separator;
}
char GetTextSeparator()
{
return TextSeparator;
}
bool IsDecimalPointComma()
{
return DecimalPointIsComma;
}
void OnSeparator(wxCommandEvent & event);
void OnDecimalSeparator(wxCommandEvent & event);
void OnQuote(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class DumpTxtDialog:public wxDialog
{
//
// a dialog preparing a DUMP generic text
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Default; // the default charset
wxString Charset; // the target charset
public:
DumpTxtDialog()
{;
}
DumpTxtDialog(MyFrame * parent, wxString & path, wxString & target,
wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & target,
wxString & defCs);
virtual ~ DumpTxtDialog()
{;
}
void CreateControls();
wxString & GetCharset()
{
return Charset;
}
void OnOk(wxCommandEvent & event);
};
class LoadDbfDialog:public wxDialog
{
//
// a dialog preparing a LOAD DBF
//
private:
MyFrame * MainFrame;
wxString Path; // the DBF base path
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the DBF charset
bool UserDefinedPKey; // mode: automatic / user defined Primary Key
wxString PKColumn; // User Defined Primary Key
int PKCount; // # Primary Key Columns
wxString *PKFields; // array of Primary Key Columns
wxString *PKFieldsEx; // array of Primary Key Columns (full detail)
bool TextDates;
int ColnameCase;
public:
LoadDbfDialog()
{;
}
LoadDbfDialog(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & table,
wxString & defCs);
virtual ~ LoadDbfDialog();
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
bool IsUserDefinedPKey()
{
return UserDefinedPKey;
}
wxString & GetPKColumn()
{
return PKColumn;
}
bool IsTextDates()
{
return TextDates;
}
int GetColnameCase()
{
return ColnameCase;
}
void LoadPKFields();
void OnOk(wxCommandEvent & event);
void OnUserPKey(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
};
class LoadZipDbfDialog:public wxDialog
{
//
// a dialog preparing a LOAD DBF (from Zipfile)
//
private:
MyFrame * MainFrame;
wxString ZipPath; // the Zipfile path
wxString Filename; // the DBF filename
wxString Table; // the table name
wxString Default; // the default charset
wxString Charset; // the DBF charset
bool UserDefinedPKey; // mode: automatic / user defined Primary Key
wxString PKColumn; // User Defined Primary Key
int PKCount; // # Primary Key Columns
wxString *PKFields; // array of Primary Key Columns
wxString *PKFieldsEx; // array of Primary Key Columns (full detail)
bool TextDates;
int ColnameCase;
public:
LoadZipDbfDialog()
{;
}
LoadZipDbfDialog(MyFrame * parent, wxString & zip_path, wxString & filename,
wxString & table, wxString & defCs);
bool Create(MyFrame * parent, wxString & zip_path, wxString & filename,
wxString & table, wxString & defCs);
virtual ~ LoadZipDbfDialog();
void CreateControls();
wxString & GetTable()
{
return Table;
}
wxString & GetCharset()
{
return Charset;
}
bool IsUserDefinedPKey()
{
return UserDefinedPKey;
}
wxString & GetPKColumn()
{
return PKColumn;
}
bool IsTextDates()
{
return TextDates;
}
int GetColnameCase()
{
return ColnameCase;
}
void LoadPKFields();
void OnOk(wxCommandEvent & event);
void OnUserPKey(wxCommandEvent & event);
void OnTextDates(wxCommandEvent & event);
};
class NetworkDialog:public wxDialog
{
//
// a dialog preparing a BUILD NETWORK
//
private:
MyFrame * MainFrame;
wxString TableName; // the table name
wxString FromColumn; // the NodeFrom column name
wxString ToColumn; // the NodeTo column name
bool NoGeometry; // no Geometry column
wxString GeomColumn; // the Geometry column name
bool GeomLength; // Cost is Geometry Length
wxString CostColumn; // the Cost column name
bool Bidirectional; // Bidirectional arcs
bool OneWays; // OneWays columns supported
wxString OneWayToFrom; // the OneWay To-From column
wxString OneWayFromTo; // the OneWay From-To column
bool NameEnabled; // Name column supported
wxString NameColumn; // the Name column name
bool AStarSupported; // A* algorithm supported
wxString DataTable; // name of the binary data table
wxString VirtualTable; // name of the VirtualNetwork table
bool Overwrite; // enabled to overwrite existing tables
void SetCurrentTable();
public:
NetworkDialog()
{;
}
NetworkDialog(MyFrame * parent);
bool Create(MyFrame * parent);
virtual ~ NetworkDialog()
{;
}
void CreateControls();
wxString & GetTableName()
{
return TableName;
}
wxString & GetFromColumn()
{
return FromColumn;
}
wxString & GetToColumn()
{
return ToColumn;
}
bool IsNoGeometry()
{
return NoGeometry;
}
wxString & GetGeomColumn()
{
return GeomColumn;
}
wxString & GetNameColumn()
{
return NameColumn;
}
bool IsGeomLength()
{
return GeomLength;
}
wxString & GetCostColumn()
{
return CostColumn;
}
bool IsBidirectional()
{
return Bidirectional;
}
bool IsOneWays()
{
return OneWays;
}
wxString & GetOneWayFromTo()
{
return OneWayFromTo;
}
wxString & GetOneWayToFrom()
{
return OneWayToFrom;
}
bool IsNameEnabled()
{
return NameEnabled;
}
bool IsAStarSupported()
{
return AStarSupported;
}
wxString & GetDataTable()
{
return DataTable;
}
wxString & GetVirtualTable()
{
return VirtualTable;
}
bool IsOverwriteEnabled()
{
return Overwrite;
}
void OnTable(wxCommandEvent & event);
void OnDirection(wxCommandEvent & event);
void OnCost(wxCommandEvent & event);
void OnOneWay(wxCommandEvent & event);
void OnNameEnabled(wxCommandEvent & event);
void OnNoGeometry(wxCommandEvent & event);
void OnOverwrite(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class ExifDialog:public wxDialog
{
//
// a dialog preparing an IMPORT EXIF PHOTOS
//
private:
MyFrame * MainFrame;
wxString ImgPath; // the file name
wxString DirPath; // the folder path
bool Folder; // import a whole folder
bool Metadata; // feed Metadata tables
bool GpsOnly; // import only if GpsExif present
public:
ExifDialog()
{;
}
ExifDialog(MyFrame * parent, wxString & dir_path, wxString & img_path);
bool Create(MyFrame * parent, wxString & dir_path, wxString & img_path);
virtual ~ ExifDialog()
{;
}
void CreateControls();
wxString & GetImgPath()
{
return ImgPath;
}
wxString & GetDirPath()
{
return DirPath;
}
bool IsFolder()
{
return Folder;
}
bool IsMetadata()
{
return Metadata;
}
bool IsGpsOnly()
{
return GpsOnly;
}
void OnFolder(wxCommandEvent & event);
void OnMetadata(wxCommandEvent & event);
void OnGpsOnly(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class GpsPicsDialog:public wxDialog
{
//
// a dialog preparing an IMPORT GPS PHOTOS
//
private:
MyFrame * MainFrame;
wxString ImgPath; // the file name
wxString DirPath; // the folder path
wxString Table; // the DB Table name
wxString Geometry; // the Geometry column name
bool Folder; // import a whole folder
bool UpdateStatistics; // immediately updating layer statistics
bool SpatialIndex; // building a SpatialIndex
public:
GpsPicsDialog()
{;
}
GpsPicsDialog(MyFrame * parent, wxString & dir_path, wxString & img_path);
bool Create(MyFrame * parent, wxString & dir_path, wxString & img_path);
virtual ~ GpsPicsDialog()
{;
}
void CreateControls();
wxString & GetImgPath()
{
return ImgPath;
}
wxString & GetDirPath()
{
return DirPath;
}
wxString & GetTable()
{
return Table;
}
wxString & GetGeometry()
{
return Geometry;
}
bool IsFolder()
{
return Folder;
}
bool IsUpdateStatistics()
{
return UpdateStatistics;
}
bool IsSpatialIndex()
{
return SpatialIndex;
}
void OnFolder(wxCommandEvent & event);
void OnSpatialIndex(wxCommandEvent & event);
void OnUpdateStatistics(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class XmlDocumentsDialog:public wxDialog
{
//
// a dialog preparing an IMPORT XML DOCUMENTS
//
private:
MyFrame * MainFrame;
wxString XmlPath; // the file name
wxString DirPath; // the folder path
wxString Suffix; // the optional file suffix
wxString TargetTable; // the target Table
wxString PkName; // the Primary Key name
wxString XmlColumn; // the XML Payload Column
wxString SchemaUriColumn; // the SchemaURI Column
wxString InPathColumn; // the InPath Column
wxString ParseErrorColumn; // the XmlParseError Column
wxString ValidateErrorColumn; // the XmlValidateError Column
bool Folder; // import a whole folder
bool Compressed; // compressed XmlBLOB
bool Validated; // apply Schema Validation
bool InternalSchema; // apply the Internally declared Schema URI
bool OkSuffix; // apply suffix restriction
bool OkSchemaColumn; // create a "schemaURI" column
bool OkInPathColumn; // create an "inPath" column
bool OkParseErrorColumn; // create the "XmlParseError" column
bool OkValidateErrorColumn; // create the "XmlSchemaValidateError" column
wxString SchemaURI; // the Schema URI for validation
public:
XmlDocumentsDialog()
{;
}
bool Create(MyFrame * parent, wxString & dir_path, wxString & xml_path);
virtual ~ XmlDocumentsDialog()
{;
}
void CreateControls();
wxString & GetXmlPath()
{
return XmlPath;
}
wxString & GetDirPath()
{
return DirPath;
}
wxString & GetSuffix()
{
return Suffix;
}
wxString & GetTargetTable()
{
return TargetTable;
}
wxString & GetPkName()
{
return PkName;
}
wxString & GetXmlColumn()
{
return XmlColumn;
}
bool IsFolder()
{
return Folder;
}
bool IsCompressed()
{
return Compressed;
}
bool IsInternalSchemaURI()
{
return InternalSchema;
}
wxString & GetSchemaURI()
{
return SchemaURI;
}
wxString & GetSchemaUriColumn()
{
return SchemaUriColumn;
}
wxString & GetInPathColumn()
{
return InPathColumn;
}
wxString & GetParseErrorColumn()
{
return ParseErrorColumn;
}
wxString & GetValidateErrorColumn()
{
return ValidateErrorColumn;
}
void OnFolder(wxCommandEvent & event);
void OnSuffixChanged(wxCommandEvent & event);
void OnCompressionChanged(wxCommandEvent & event);
void OnValidationChanged(wxCommandEvent & event);
void OnInternalSchemaChanged(wxCommandEvent & event);
void OnSchemaColumnChanged(wxCommandEvent & event);
void OnInPathColumnChanged(wxCommandEvent & event);
void OnParseErrorColumnChanged(wxCommandEvent & event);
void OnValidateErrorColumnChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class DxfDialog:public wxDialog
{
//
// a dialog preparing an IMPORT DXF FILE(s)
//
private:
MyFrame * MainFrame;
wxString DxfPath; // the file name
wxString DirPath; // the folder path
wxString Prefix; // the optional table-name prefix
wxString SingleLayer; // filtering a single DXF layer by its name
int SRID; // the SRID to be applied
bool Folder; // import a whole folder
bool OkPrefix; // apply table-name prefix
bool OkSingle; // apply single layer filter
bool Force2D; // always forcing 2D
bool Force3D; // always forcing 3D
bool LinkedRings; // special - linked rings
bool UnlinkedRings; // special - unlinked rings
bool ImportMixed; // mixed layers mode
bool AppendMode; // append mode
public:
DxfDialog()
{;
}
bool Create(MyFrame * parent, wxString & dir_path, wxString & dxf_path);
virtual ~ DxfDialog()
{;
}
void CreateControls();
wxString & GetDxfPath()
{
return DxfPath;
}
wxString & GetDirPath()
{
return DirPath;
}
wxString & GetPrefix()
{
return Prefix;
}
wxString & GetSingleLayer()
{
return SingleLayer;
}
int GetSRID()
{
return SRID;
}
bool IsFolder()
{
return Folder;
}
bool IsForce2D()
{
return Force2D;
}
bool IsForce3D()
{
return Force3D;
}
bool IsLinkedRings()
{
return LinkedRings;
}
bool IsUnlinkedRings()
{
return UnlinkedRings;
}
bool IsImportMixed()
{
return ImportMixed;
}
bool IsAppendMode()
{
return AppendMode;
}
void OnFolder(wxCommandEvent & event);
void OnPrefixChanged(wxCommandEvent & event);
void OnSingleLayerChanged(wxCommandEvent & event);
void OnDimensionChanged(wxCommandEvent & event);
void OnModeChanged(wxCommandEvent & event);
void OnRingsChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class CreateRasterCoverageDialog:public wxDialog
{
//
// a dialog preparing an IMPORT DXF FILE(s)
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
int SampleType;
int PixelType;
int NumBands;
int RedBand;
int GreenBand;
int BlueBand;
int NIRband;
bool AutoNDVI;
int Compression;
int Quality;
int TileWidth;
int TileHeight;
bool NotGeoreferenced;
int SRID;
double HorzResolution;
double VertResolution;
wxString NoData;
bool StrictResolution;
bool MixedResolutions;
bool InputPaths;
bool MD5;
bool Summary;
bool Queryable;
bool IsValidNoData(wxString & no_data, int sample, int num_bands);
public:
CreateRasterCoverageDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ CreateRasterCoverageDialog()
{;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
int GetSampleType()
{
return SampleType;
}
int GetPixelType()
{
return PixelType;
}
int GetNumBands()
{
return NumBands;
}
int GetRedBand()
{
return RedBand;
}
int GetGreenBand()
{
return GreenBand;
}
int GetBlueBand()
{
return BlueBand;
}
int GetNIRband()
{
return NIRband;
}
bool IsAutoNDVI()
{
return AutoNDVI;
}
int GetCompression()
{
return Compression;
}
int GetQuality()
{
return Quality;
}
int GetTileWidth()
{
return TileWidth;
}
int GetTileHeight()
{
return TileHeight;
}
bool IsNotGeoreferenced()
{
return NotGeoreferenced;
}
int GetSRID()
{
return SRID;
}
double GetHorzResolution()
{
return HorzResolution;
}
double GetVertResolution()
{
return VertResolution;
}
wxString & GetNoData()
{
return NoData;
}
bool IsStrictResolution()
{
return StrictResolution;
}
bool IsMixedResolutions()
{
return MixedResolutions;
}
bool IsInputPaths()
{
return InputPaths;
}
bool IsMD5()
{
return MD5;
}
bool IsSummary()
{
return Summary;
}
bool IsQueryable()
{
return Queryable;
}
void OnSampleChanged(wxCommandEvent & event);
void OnPixelChanged(wxCommandEvent & event);
void OnCompressionChanged(wxCommandEvent & event);
void OnNumBandsChanged(wxCommandEvent & event);
void OnRedBandChanged(wxCommandEvent & event);
void OnGreenBandChanged(wxCommandEvent & event);
void OnBlueBandChanged(wxCommandEvent & event);
void OnNIRbandChanged(wxCommandEvent & event);
void OnAutoNDVIchanged(wxCommandEvent & event);
void OnSquareTileChanged(wxCommandEvent & event);
void OnNoGeorefChanged(wxCommandEvent & event);
void OnSameResChanged(wxCommandEvent & event);
void OnTileWidthChanged(wxCommandEvent & event);
void OnTileHeightChanged(wxCommandEvent & event);
void OnHorzResChanged(wxCommandEvent & event);
void OnStrictChanged(wxCommandEvent & event);
void OnMixedChanged(wxCommandEvent & event);
void OnPathsChanged(wxCommandEvent & event);
void OnMD5Changed(wxCommandEvent & event);
void OnSummaryChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class SqlScriptDialog:public wxDialog
{
//
// a dialog preparing an SQL SCRIPT execute
//
private:
MyFrame * MainFrame;
wxString Path; // the SHP base path
wxString Default; // the default charset
wxString Charset; // the target charset
public:
SqlScriptDialog()
{;
}
SqlScriptDialog(MyFrame * parent, wxString & path, wxString & defCs);
bool Create(MyFrame * parent, wxString & path, wxString & defCs);
virtual ~ SqlScriptDialog()
{;
}
void CreateControls();
wxString & GetCharset()
{
return Charset;
}
void OnOk(wxCommandEvent & event);
};
class DefaultCharsetDialog:public wxDialog
{
//
// a dialog for selecting DEFAULT CHARSET
//
private:
MyFrame * MainFrame;
wxString Charset; // the default charset
bool AskCharset; // true / false
public:
DefaultCharsetDialog()
{;
}
DefaultCharsetDialog(MyFrame * parent, wxString & charset, bool ask);
bool Create(MyFrame * parent, wxString & charset, bool ask);
virtual ~ DefaultCharsetDialog()
{;
}
void CreateControls();
wxString & GetCharset()
{
return Charset;
}
bool IsSetAskCharset()
{
return AskCharset;
}
void OnOk(wxCommandEvent & event);
};
class BlobExplorerDialog:public wxPropertySheetDialog
{
//
// a dialog to explore a BLOB value
//
private:
MyFrame * MainFrame;
int BlobSize; // the BLOB size
unsigned char *Blob; // the BLOB value
int BlobType; // the BLOB type
bool IsTextFont;
wxString FontFamily;
wxString FontStyle;
bool IsFontBold;
bool IsFontItalic;
bool IsSVG;
double SvgWidth;
double SvgHeight;
int SvgSize;
gaiaGeomCollPtr Geometry; // the geometry [optional]
wxString XMLDocument; // the XMLDocument [optional]
wxString XMLIndented; // the XMLDocument (indented) [optional]
wxImage *Image; // the image [optional]
wxBitmap GeomPreview; // the geometry preview
wxString WKTstring; // the WKT Geometry notation
wxString EWKTstring; // the EWKT Geometry notation
wxString SVGstring; // the SVG Geometry notation
wxString KMLstring; // the KML Geometry notation
wxString GMLstring; // the GML Geometry notation
wxString GeoJSONstring; // the GeoJSON Geometry notation
bool SVGrelative; // SVG relative / absolute mode
int SVGprecision; // SVG precision
int KMLprecision; // KML precision
bool GMLv2v3; // GML version (v2 / v3)
int GMLprecision; // GML precision
int GeoJSONoptions; // GeoJSON options
int GeoJSONprecision; // GeoJSON precision
void FormatWKT(wxTextCtrl * txtCtrl, wxString & in, wxString & out);
void FormatSVG(wxTextCtrl * txtCtrl, wxString & in, wxString & out);
public:
BlobExplorerDialog()
{;
}
BlobExplorerDialog(MyFrame * parent, int blob_size, unsigned char *blob);
bool Create(MyFrame * parent, int blob_size, unsigned char *blob);
virtual ~ BlobExplorerDialog()
{
if (Geometry)
gaiaFreeGeomColl(Geometry);
if (Image)
delete Image;
}
void DrawGeometry(int horz, int vert);
wxPanel *CreateHexadecimalPage(wxWindow * book);
wxPanel *CreateGeometryPage(wxWindow * book);
wxPanel *CreateWKTPage(wxWindow * book);
wxPanel *CreateEWKTPage(wxWindow * book);
wxPanel *CreateSVGPage(wxWindow * book);
wxPanel *CreateKMLPage(wxWindow * book);
wxPanel *CreateGMLPage(wxWindow * book);
wxPanel *CreateGeoJSONPage(wxWindow * book);
wxPanel *CreateImagePage(wxWindow * book);
wxPanel *CreateXmlDocumentPage(wxWindow * book);
wxPanel *CreateXmlIndentedPage(wxWindow * book);
void UpdateHexadecimalPage();
void UpdateGeometryPage();
void UpdateImagePage();
void UpdateXmlDocumentPage();
void UpdateXmlIndentedPage();
void UpdateWKTPage();
void UpdateEWKTPage();
void UpdateSVGPage();
void UpdateKMLPage();
void UpdateGMLPage();
void UpdateGeoJSONPage();
gaiaGeomCollPtr GetGeometry()
{
return Geometry;
}
wxImage *GetImage()
{
return Image;
}
int GetBlobType()
{
return BlobType;
}
void OnOk(wxCommandEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCopyWKT(wxCommandEvent & event);
void OnCopyEWKT(wxCommandEvent & event);
void OnSVGRelative(wxCommandEvent & event);
void OnSVGPrecision(wxCommandEvent & event);
void OnCopySVG(wxCommandEvent & event);
void OnKMLPrecision(wxCommandEvent & event);
void OnCopyKML(wxCommandEvent & event);
void OnGMLv2v3(wxCommandEvent & event);
void OnGMLPrecision(wxCommandEvent & event);
void OnCopyGML(wxCommandEvent & event);
void OnGeoJSONOptions(wxCommandEvent & event);
void OnGeoJSONPrecision(wxCommandEvent & event);
void OnCopyGeoJSON(wxCommandEvent & event);
void OnCopyXmlDocument(wxCommandEvent & event);
void OnCopyXmlIndented(wxCommandEvent & event);
};
class TilePreviewDialog:public wxDialog
{
//
// a dialog to show a Raster Tile Preview
//
private:
MyFrame * MainFrame;
wxString DbPrefix;
wxString CoverageTable;
int TileId;
wxImage *Image; // the image
bool Painted;
public:
TilePreviewDialog()
{;
}
TilePreviewDialog(MyFrame * parent, wxString & db_prefix, wxString & coverage,
int tile_id, int blob_size, unsigned char *blob);
bool Create(MyFrame * parent, wxString & db_prefix, wxString & coverage,
int tile_id, int blob_size, unsigned char *blob);
virtual ~ TilePreviewDialog()
{
if (Image)
delete Image;
}
void CreateControls();
void OnPaint(wxPaintEvent & event);
void OnOk(wxCommandEvent & event);
};
class GraphicsGeometry:public wxStaticBitmap
{
//
// a window to show some Geometry in a graphical fashion
//
private:
BlobExplorerDialog * Parent;
public:
GraphicsGeometry(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id,
const wxBitmap & bmp, wxSize const &size);
virtual ~ GraphicsGeometry()
{;
}
};
class ImageShow:public wxStaticBitmap
{
//
// a window to show some Image [Jpeg-Png-Gif]
//
private:
BlobExplorerDialog * Parent;
public:
ImageShow(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id,
const wxBitmap & bmp, const wxSize & size);
virtual ~ ImageShow()
{;
}
void OnRightClick(wxMouseEvent & event);
void OnCmdCopy(wxCommandEvent & event);
};
class MyHexList:public wxListCtrl
{
//
// a class for Hexdecimal dumps
//
private:
BlobExplorerDialog * Parent;
int BlobSize; // the BLOB size
unsigned char *Blob; // the BLOB value
public:
MyHexList(BlobExplorerDialog * parent, unsigned char *blob,
int blob_size, wxWindow * panel, wxWindowID id,
const wxPoint & pos = wxDefaultPosition, const wxSize & size =
wxDefaultSize, long style = 0);
virtual ~ MyHexList();
virtual wxString OnGetItemText(long item, long column) const;
};
class AutoFDOTable
{
private:
char *Name;
AutoFDOTable *Next;
public:
AutoFDOTable(const char *name, const int len)
{
Name = new char[len + 1];
strcpy(Name, name);
Next = NULL;
}
~AutoFDOTable()
{
if (Name)
delete[]Name;
}
char *GetName()
{
return Name;
}
void SetNext(AutoFDOTable * next)
{
Next = next;
}
AutoFDOTable *GetNext()
{
return Next;
}
};
class AutoFDOTables
{
private:
AutoFDOTable * First;
AutoFDOTable *Last;
public:
AutoFDOTables()
{
First = NULL;
Last = NULL;
}
~AutoFDOTables();
void Add(const char *name, const int len);
AutoFDOTable *GetFirst()
{
return First;
}
};
class AutoGPKGTable
{
private:
char *Name;
AutoGPKGTable *Next;
public:
AutoGPKGTable(const char *name, const int len)
{
Name = new char[len + 1];
strcpy(Name, name);
Next = NULL;
}
~AutoGPKGTable()
{
if (Name)
delete[]Name;
}
char *GetName()
{
return Name;
}
void SetNext(AutoGPKGTable * next)
{
Next = next;
}
AutoGPKGTable *GetNext()
{
return Next;
}
};
class AutoGPKGTables
{
private:
AutoGPKGTable * First;
AutoGPKGTable *Last;
public:
AutoGPKGTables()
{
First = NULL;
Last = NULL;
}
~AutoGPKGTables();
void Add(const char *name, const int len);
AutoGPKGTable *GetFirst()
{
return First;
}
};
class AutoSaveDialog:public wxDialog
{
//
// a dialog to manage AutoSave
//
private:
MyFrame * MainFrame;
wxString Path; // the path to save
int Seconds; // interval
wxRadioBox *IntervalCtrl;
wxTextCtrl *PathCtrl;
public:
AutoSaveDialog()
{;
}
AutoSaveDialog(MyFrame * parent, wxString & path, int secs);
bool Create(MyFrame * parent, wxString & path, int secs);
virtual ~ AutoSaveDialog()
{;
}
void CreateControls();
int GetSeconds()
{
return Seconds;
}
void OnOk(wxCommandEvent & event);
wxString & GetPath()
{
return Path;
}
void OnIntervalChanged(wxCommandEvent & event);
void OnChangePath(wxCommandEvent & event);
};
class LoadXmlDialog:public wxDialog
{
//
// a dialog to load XML documents
//
private:
MyFrame * MainFrame;
wxString Path; // the XML path
bool Compressed; // compressed XML
bool Validate; // Schema validation
wxString SchemaURI; // the Schema URI (if validation is required)
public:
LoadXmlDialog()
{;
}
bool Create(MyFrame * parent, wxString & path);
virtual ~ LoadXmlDialog()
{;
}
void CreateControls();
bool IsCompressed()
{
return Compressed;
}
wxString & GetSchemaURI()
{
return SchemaURI;
}
void OnOk(wxCommandEvent & event);
void OnCompressionChanged(wxCommandEvent & event);
void OnValidationChanged(wxCommandEvent & event);
};
class AuxTable
{
// a class used by ComposerDialog [table item]
private:
wxString TableName;
wxString Geometries[128];
int MaxGeometryIndex;
AuxTable *Next;
public:
AuxTable(wxString & table);
~AuxTable()
{;
}
void AddGeometryColumn(wxString & geom);
wxString & GetTableName()
{
return TableName;
}
wxString & GetGeometryColumn(int ind);
int GetGeometriesCount()
{
return MaxGeometryIndex;
}
void SetNext(AuxTable * next)
{
Next = next;
}
AuxTable *GetNext()
{
return Next;
}
};
class AuxTableList
{
// a class used by ComposerDialog [tables list]
private:
AuxTable * First;
AuxTable *Last;
int Count;
public:
AuxTableList();
~AuxTableList();
void Flush();
void Populate(sqlite3 * handle);
int GetCount()
{
return Count;
}
AuxTable *GetFirst()
{
return First;
}
};
class AuxColumn
{
// a class used by ComposerDialog [table item]
private:
wxString Name;
wxString AliasName;
bool Selected;
AuxColumn *Next;
public:
AuxColumn(wxString & name);
~AuxColumn()
{;
}
wxString & GetName()
{
return Name;
}
void SetState(bool mode)
{
Selected = mode;
}
bool IsSelected()
{
return Selected;
}
void SetAliasName(wxString & alias)
{
AliasName = alias;
}
wxString & GetAliasName()
{
return AliasName;
}
void SetNext(AuxColumn * next)
{
Next = next;
}
AuxColumn *GetNext()
{
return Next;
}
};
class AuxColumnList
{
// a class used by ComposerDialog [tables list]
private:
AuxColumn * First;
AuxColumn *Last;
int Count;
public:
AuxColumnList();
~AuxColumnList();
void Flush();
void Populate(sqlite3 * handle, wxString & table, bool force_rowid = true);
int GetCount()
{
return Count;
}
AuxColumn *GetFirst()
{
return First;
}
void SetState(int ind, bool mode);
void SetState(wxString & column);
void SetAlias(wxString & column, wxString & alias);
bool HasSelectedColumns();
};
class DumpKmlDialog:public wxDialog
{
//
// a dialog preparing a DUMP KML
//
private:
MyFrame * MainFrame;
wxString Table; // the table's name
wxString Column; // the column's name for Geometry
bool isNameConst;
bool isDescConst;
wxString Name;
wxString Desc;
int Precision;
wxComboBox *NameCtrl;
wxTextCtrl *NameConstCtrl;
wxComboBox *DescCtrl;
wxTextCtrl *DescConstCtrl;
wxSpinCtrl *PrecisionCtrl;
AuxColumnList ColumnList;
void InitializeComboColumns(wxComboBox * ctrl);
public:
DumpKmlDialog()
{;
}
DumpKmlDialog(MyFrame * parent, wxString & table, wxString & column);
bool Create(MyFrame * parent, wxString & table, wxString & column);
virtual ~ DumpKmlDialog()
{;
}
void CreateControls();
bool IsNameConst()
{
return isNameConst;
}
wxString & GetName()
{
return Name;
}
bool IsDescConst()
{
return isDescConst;
}
wxString & GetDesc()
{
return Desc;
}
int GetPrecision()
{
return Precision;
}
void OnNameSelected(wxCommandEvent & event);
void OnDescSelected(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class DumpSpreadsheetDialog:public wxDialog
{
//
// a dialog preparing a DUMP Speadsheet
//
private:
MyFrame * MainFrame;
char DecimalPoint;
bool DateTimes;
public:
DumpSpreadsheetDialog()
{;
}
DumpSpreadsheetDialog(MyFrame * parent);
bool Create(MyFrame * parent);
virtual ~ DumpSpreadsheetDialog()
{;
}
void CreateControls();
char GetDecimalPoint()
{
return DecimalPoint;
}
bool IsDateTimes()
{
return DateTimes;
}
void OnDecimalPointSelected(wxCommandEvent & event);
void OnDateTimesSelected(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class RasterCoverageStyle
{
// an SLD/SE Raster style
private:
int StyleID;
wxString Name;
wxString Title;
wxString Abstract;
wxString SchemaValidated;
wxString SchemaURI;
bool Selected;
RasterCoverageStyle *Next;
public:
RasterCoverageStyle(int style_id, wxString & name, wxString & title,
wxString & abstract, wxString & validated,
wxString & schema_uri);
~RasterCoverageStyle()
{;
}
int GetStyleID()
{
return StyleID;
}
wxString & GetName()
{
return Name;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetSchemaValidated()
{
return SchemaValidated;
}
wxString & GetSchemaURI()
{
return SchemaURI;
}
void MarkSelected()
{
Selected = true;
}
bool IsSelected()
{
return Selected;
}
RasterCoverageStyle *GetNext()
{
return Next;
}
void SetNext(RasterCoverageStyle * next)
{
Next = next;
}
};
class RasterCoverageStylesList
{
// a container for Raster Coverage SLD/SE styles
private:
RasterCoverageStyle * First;
RasterCoverageStyle *Last;
public:
RasterCoverageStylesList();
~RasterCoverageStylesList();
void Add(int style_id, wxString & name, wxString & title, wxString & abstract,
wxString & validated, wxString & schema_uri);
void MarkSelected(int stileId);
RasterCoverageStyle *GetFirst()
{
return First;
}
};
class RasterLoadParams
{
// a class wrapping Raster Import arguments
private:
MyFrame * MainFrame;
class ImportRasterDialog *Dlg;
wxString CoverageName;
wxArrayString Paths;
wxString CurrentPath;
int SRID;
bool WithWorldFile;
bool Pyramidize;
bool Error;
int Count;
bool AbortPending;
public:
RasterLoadParams()
{;
}
~RasterLoadParams()
{;
}
void Initialize(MyFrame * mother, ImportRasterDialog * dlg,
wxString & coverage, wxArrayString & paths, int srid,
bool with_worldfile, bool pyramidize)
{
MainFrame = mother;
Dlg = dlg;
CoverageName = coverage;
Paths = paths;
SRID = srid;
WithWorldFile = with_worldfile;
Pyramidize = pyramidize;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
ImportRasterDialog *GetDlg()
{
return Dlg;
}
wxString & GetCoverageName()
{
return CoverageName;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
int GetSRID()
{
return SRID;
}
bool IsWithWorldFile()
{
return WithWorldFile;
}
bool IsPyramidize()
{
return Pyramidize;
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class ImportRasterDialog:public wxDialog
{
//
// a dialog for importing external Raster files into a Coverage
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxArrayString Paths;
wxString Path;
wxString Title;
wxString Abstract;
wxString Sample;
wxString Pixel;
wxString Compression;
bool ForceSRID;
int SRID;
bool WithWorldFile;
bool Pyramidize;
wxString ListDone;
RasterLoadParams Params;
public:
ImportRasterDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxArrayString & paths,
wxString & path, wxString & title, wxString & abstract,
wxString & sample, wxString & pixel, wxString & compression,
int srid);
virtual ~ ImportRasterDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnCmdForceSridChanged(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class PyramidizeDialog:public wxDialog
{
//
// a dialog supporting Pyramidize
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Sample;
wxString Pixel;
wxString Compression;
public:
PyramidizeDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxString & title,
wxString & abstract, wxString & sample, wxString & pixel,
wxString & compression);
virtual ~ PyramidizeDialog()
{;
}
void CreateControls();
bool DoPyramidize(void);
void OnOk(wxCommandEvent & event);
};
class PyramidizeMonolithicDialog:public wxDialog
{
//
// a dialog supporting PyramidizeMonolithic
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Sample;
wxString Pixel;
wxString Compression;
public:
PyramidizeMonolithicDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxString & title,
wxString & abstract, wxString & sample, wxString & pixel,
wxString & compression);
virtual ~ PyramidizeMonolithicDialog()
{;
}
void CreateControls();
bool DoPyramidizeMonolithic(void);
void OnOk(wxCommandEvent & event);
};
class DePyramidizeDialog:public wxDialog
{
//
// a dialog supporting DePyramidize
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Sample;
wxString Pixel;
wxString Compression;
public:
DePyramidizeDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxString & title,
wxString & abstract, wxString & sample, wxString & pixel,
wxString & compression);
virtual ~ DePyramidizeDialog()
{;
}
void CreateControls();
bool DoDePyramidize(void);
void OnOk(wxCommandEvent & event);
};
class RasterDropDialog:public wxDialog
{
//
// a dialog supporting Drop Raster
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Copyright;
wxString DataLicense;
wxString Sample;
wxString Pixel;
wxString Compression;
public:
RasterDropDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, wxString & sample, wxString & pixel,
wxString & compression);
virtual ~ RasterDropDialog()
{;
}
void CreateControls();
bool DoDropCoverage(void);
void OnOk(wxCommandEvent & event);
};
class RasterInfosDialog:public wxDialog
{
//
// a dialog for editing Raster Coverage Infos
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool IsQueryable;
bool DoReadCoverage();
void DoUpdateCoverage();
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
RasterInfosDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ RasterInfosDialog()
{;
}
void CreateControls();
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class RasterCoverageStylesDialog:public wxDialog
{
//
// a dialog for handling SLD/SE Raster Coverage's Styles
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
int CurrentStyleID;
RasterCoverageStylesList *List;
wxGrid *GridCtrl;
public:
RasterCoverageStylesDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ RasterCoverageStylesDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
void DoRegistetRasterCoverageStyles(class ListRasterStylesDialog * dlg);
void OnRightClick(wxGridEvent & event);
void OnCmdRemoveStyle(wxCommandEvent & event);
void OnAddStyle(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class ListRasterStylesDialog:public wxDialog
{
//
// a dialog for listing and selecting SLD/SE Raster Styles
//
private:
MyFrame * MainFrame;
RasterCoverageStylesList *List;
wxGrid *GridCtrl;
public:
ListRasterStylesDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ ListRasterStylesDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
int GetSelectedCount();
int GetSelectedStyleId(int idx);
void OnOk(wxCommandEvent & event);
};
class RasterStylesLoadParams
{
// a class wrapping Raster Styles Import arguments
private:
MyFrame * MainFrame;
class LoadRasterStyleDialog *Dlg;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
bool AbortPending;
public:
RasterStylesLoadParams()
{;
}
~RasterStylesLoadParams()
{;
}
void Initialize(MyFrame * mother, LoadRasterStyleDialog * dlg,
wxArrayString & paths)
{
MainFrame = mother;
Dlg = dlg;
Paths = paths;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
LoadRasterStyleDialog *GetDlg()
{
return Dlg;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class LoadRasterStyleDialog:public wxDialog
{
//
// a dialog for adding new SLD/SE Raster Style
//
private:
MyFrame * MainFrame;
wxString Path;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
wxString ListDone;
RasterStylesLoadParams Params;
public:
LoadRasterStyleDialog()
{;
}
bool Create(MyFrame * parent, wxArrayString & paths, wxString & path);
virtual ~ LoadRasterStyleDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
bool RegisterRasterStyle(sqlite3_stmt * stmt, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnRequestSkip(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class ReloadRasterStyleDialog:public wxDialog
{
//
// a dialog for reloading an already existing SLD/SE Raster Style
//
private:
MyFrame * MainFrame;
wxString Path;
RasterCoverageStylesList *List;
wxGrid *GridCtrl;
public:
ReloadRasterStyleDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & path);
virtual ~ ReloadRasterStyleDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoReloadRasterStyle(int style_id, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class UnregisterRasterStyleDialog:public wxDialog
{
//
// a dialog for unregistering an already existing SLD/SE Raster Style
//
private:
MyFrame * MainFrame;
RasterCoverageStylesList *List;
wxGrid *GridCtrl;
public:
UnregisterRasterStyleDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ UnregisterRasterStyleDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoCheckUnreferencedRasterStyle(int style_id);
bool DoUnregisterRasterStyle(int style_id);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class MapConfigLoadParams
{
// a class wrapping MapConfig Import arguments
private:
MyFrame * MainFrame;
class LoadMapConfigDialog *Dlg;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
bool AbortPending;
public:
MapConfigLoadParams()
{;
}
~MapConfigLoadParams()
{;
}
void Initialize(MyFrame * mother, LoadMapConfigDialog * dlg,
wxArrayString & paths)
{
MainFrame = mother;
Dlg = dlg;
Paths = paths;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
LoadMapConfigDialog *GetDlg()
{
return Dlg;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class MapConfiguration
{
// an XML Map Configuration
private:
int ID;
wxString Name;
wxString Title;
wxString Abstract;
wxString SchemaValidated;
wxString SchemaURI;
bool Selected;
MapConfiguration *Next;
public:
MapConfiguration(int id, wxString & name, wxString & title,
wxString & abstract, wxString & validated,
wxString & schema_uri);
~MapConfiguration()
{;
}
int GetID()
{
return ID;
}
wxString & GetName()
{
return Name;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetSchemaValidated()
{
return SchemaValidated;
}
wxString & GetSchemaURI()
{
return SchemaURI;
}
void MarkSelected()
{
Selected = true;
}
bool IsSelected()
{
return Selected;
}
MapConfiguration *GetNext()
{
return Next;
}
void SetNext(MapConfiguration * next)
{
Next = next;
}
};
class MapConfigurationsList
{
// a container for XML Map COnfigurations
private:
MapConfiguration * First;
MapConfiguration *Last;
public:
MapConfigurationsList();
~MapConfigurationsList();
void Add(int id, wxString & name, wxString & title, wxString & abstract,
wxString & validated, wxString & schema_uri);
void MarkSelected(int stileId);
MapConfiguration *GetFirst()
{
return First;
}
};
class ListMapConfigDialog:public wxDialog
{
//
// a dialog for listing and selecting Map Configurations
//
private:
MyFrame * MainFrame;
MyMapPanel *Parent;
MapConfigurationsList *List;
wxGrid *GridCtrl;
unsigned char *XML;
void DoLoadXML(int id);
public:
ListMapConfigDialog()
{
List = NULL;
}
bool Create(MyFrame * main, MyMapPanel * parent);
virtual ~ ListMapConfigDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
unsigned char *GetXML()
{
return XML;
}
void OnOk(wxCommandEvent & event);
};
class LoadMapConfigDialog:public wxDialog
{
//
// a dialog for adding new XML Map Configuration
//
private:
MyFrame * MainFrame;
wxString Path;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
wxString ListDone;
MapConfigLoadParams Params;
public:
LoadMapConfigDialog()
{;
}
bool Create(MyFrame * parent, wxArrayString & paths, wxString & path);
virtual ~ LoadMapConfigDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
bool RegisterMapConfig(sqlite3_stmt * stmt, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnRequestSkip(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class ReloadMapConfigDialog:public wxDialog
{
//
// a dialog for reloading an already existing XML Map Configuration
//
private:
MyFrame * MainFrame;
wxString Path;
MapConfigurationsList *List;
wxGrid *GridCtrl;
public:
ReloadMapConfigDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & path);
virtual ~ ReloadMapConfigDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoReloadMapConfig(int id, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class UnregisterMapConfigDialog:public wxDialog
{
//
// a dialog for unregistering an already existing XML Map Configuration
//
private:
MyFrame * MainFrame;
MapConfigurationsList *List;
wxGrid *GridCtrl;
public:
UnregisterMapConfigDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ UnregisterMapConfigDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoUnregisterMapConfig(int style_id);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class VerifyMapConfigDialog:public wxDialog
{
//
// a dialog for verifying an already registered XML Map Configuration
//
private:
MyFrame * MainFrame;
MapConfigurationsList *List;
wxGrid *GridCtrl;
unsigned char *Xml;
void FetchXmlMapConfig(int id);
public:
VerifyMapConfigDialog()
{
List = NULL;
Xml = NULL;
}
bool Create(MyFrame * parent);
virtual ~ VerifyMapConfigDialog()
{
if (List != NULL)
delete List;
if (Xml != NULL)
free(Xml);
}
void CreateControls();
const unsigned char *GetXML()
{
return Xml;
}
void OnOk(wxCommandEvent & event);
};
class MapConfigHtmlDialog:public wxDialog
{
//
// a dialog for reporting an HTML report about validating Map Config
//
private:
MyFrame * MainFrame;
wxString Html;
public:
MapConfigHtmlDialog()
{
MainFrame = NULL;
}
MapConfigHtmlDialog(MyFrame * parent, wxString & html)
{
Create(parent, html);
}
bool Create(MyFrame * parent, wxString & html);
virtual ~ MapConfigHtmlDialog()
{;
}
void CreateControls();
void OnSize(wxSizeEvent & event);
void OnQuit(wxCommandEvent & event);
};
class RasterCoverageSRID
{
// a Raster Coverage alternative SRID
private:
int SRID;
wxString AuthName;
int AuthSRID;
wxString RefSysName;
bool Native;
bool Deleted;
RasterCoverageSRID *Next;
public:
RasterCoverageSRID(bool native, int srid, wxString & auth_name,
int auth_srid, wxString & name)
{
SRID = srid;
AuthName = auth_name;
AuthSRID = auth_srid;
RefSysName = name;
Native = native;
Deleted = false;
Next = NULL;
}
~RasterCoverageSRID()
{;
}
int GetSRID()
{
return SRID;
}
wxString & GetAuthName()
{
return AuthName;
}
int GetAuthSRID()
{
return AuthSRID;
}
wxString & GetRefSysName()
{
return RefSysName;
}
bool IsNative()
{
return Native;
}
void MarkDeleted()
{
Deleted = true;
}
bool IsDeleted()
{
return Deleted;
}
RasterCoverageSRID *GetNext()
{
return Next;
}
void SetNext(RasterCoverageSRID * next)
{
Next = next;
}
};
class RasterCoverageSRIDsList
{
// a container for Raster Coverage alternative SRIDs
private:
RasterCoverageSRID * First;
RasterCoverageSRID *Last;
public:
RasterCoverageSRIDsList()
{
First = NULL;
Last = NULL;
}
~RasterCoverageSRIDsList();
void Add(bool native, int srid, wxString & auth_name, int auth_srid,
wxString & name);
RasterCoverageSRID *GetFirst()
{
return First;
}
bool IsAlreadyDefinedSRID(int srid);
bool IsNativeSRID(int srid);
void MarkDeleted(int strid);
};
class RasterSRIDsDialog:public wxDialog
{
//
// a dialog for handling Raster Coverage's alternative SRIDs
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
int CurrentSRID;
RasterCoverageSRIDsList *List;
wxGrid *GridCtrl;
bool UpdateRefSysName(int srid);
void DoRemoveSRID();
public:
RasterSRIDsDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ RasterSRIDsDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoRegistetRasterCoverageSrid(int srid);
void OnSridChanged(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCellSelected(wxGridEvent & event);
void OnCmdRemoveSrid(wxCommandEvent & event);
void OnCmdAddSrid(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class RasterCoverageKeyword
{
// a Raster Coverage Keyword
private:
wxString Keyword;
bool Deleted;
RasterCoverageKeyword *Next;
public:
RasterCoverageKeyword(wxString & keyword)
{
Keyword = keyword;
Deleted = false;
Next = NULL;
}
~RasterCoverageKeyword()
{;
}
wxString & GetKeyword()
{
return Keyword;
}
void MarkDeleted()
{
Deleted = true;
}
bool IsDeleted()
{
return Deleted;
}
RasterCoverageKeyword *GetNext()
{
return Next;
}
void SetNext(RasterCoverageKeyword * next)
{
Next = next;
}
};
class RasterCoverageKeywordsList
{
// a container for Raster Coverage Keywords
private:
RasterCoverageKeyword * First;
RasterCoverageKeyword *Last;
public:
RasterCoverageKeywordsList()
{
First = NULL;
Last = NULL;
}
~RasterCoverageKeywordsList();
void Add(wxString & keyword);
RasterCoverageKeyword *GetFirst()
{
return First;
}
bool IsAlreadyDefinedKeyword(wxString & keyword);
void MarkDeleted(wxString & keyword);
};
class RasterKeywordsDialog:public wxDialog
{
//
// a dialog for handling Raster Coverage's Keywords
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
wxString Keyword;
RasterCoverageKeywordsList *List;
wxGrid *GridCtrl;
public:
RasterKeywordsDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ RasterKeywordsDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoRegistetRasterCoverageKeyword(wxString & keyword);
void OnRightClick(wxGridEvent & event);
void OnCmdRemoveKeyword(wxCommandEvent & event);
void OnCmdAddKeyword(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class ExternalGraphicLoadParams
{
// a class wrapping External Graphic Import arguments
private:
MyFrame * MainFrame;
class LoadExternalGraphicDialog *Dlg;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
bool AbortPending;
public:
ExternalGraphicLoadParams()
{;
}
~ExternalGraphicLoadParams()
{;
}
void Initialize(MyFrame * mother, LoadExternalGraphicDialog * dlg,
wxArrayString & paths)
{
MainFrame = mother;
Dlg = dlg;
Paths = paths;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
LoadExternalGraphicDialog *GetDlg()
{
return Dlg;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class LoadExternalGraphicDialog:public wxDialog
{
//
// a dialog for adding new External Graphic resource(s)
//
private:
MyFrame * MainFrame;
wxString Path;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
wxString ListDone;
ExternalGraphicLoadParams Params;
public:
LoadExternalGraphicDialog()
{;
}
bool Create(MyFrame * parent, wxArrayString & paths, wxString & path);
virtual ~ LoadExternalGraphicDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
bool RegisterExternalGraphic(sqlite3_stmt * stmt, const char *xlink_href,
const char *title, const char *abstract,
const char *filename, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnRequestSkip(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class ExternalGraphic
{
// a class wrapping an External Graphic
private:
wxString XLinkHref;
wxString Title;
wxString Abstract;
wxString MimeType;
wxImage Graphic;
ExternalGraphic *Next;
bool DoBuildGraphic(wxString & mime_type, const void *blob, int blob_sz);
void DoBuildDefaultGraphic();
public:
ExternalGraphic(wxString & xlink_href, wxString & title,
wxString & abstract, wxString & mime_type, const void *blob,
int blob_sz);
~ExternalGraphic()
{;
}
wxString & GetXLinkHref()
{
return XLinkHref;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetMimeType()
{
return MimeType;
}
wxImage *GetGraphic()
{
return &Graphic;
}
void SetNext(ExternalGraphic * next)
{
Next = next;
}
ExternalGraphic *GetNext()
{
return Next;
}
};
class ExternalGraphicList
{
// a class acting as a container of External Graphics
private:
ExternalGraphic * First;
ExternalGraphic *Last;
public:
ExternalGraphicList()
{
First = NULL;
Last = NULL;
}
~ExternalGraphicList();
void Add(wxString & xlink_href, wxString & title, wxString & abstract,
wxString & mime_type, const void *blob, int blob_sz);
ExternalGraphic *GetFirst()
{
return First;
}
void FindByIndex(int idx, wxString & xlink_href, wxString & mime_type);
int FindByXLinkHref(wxString & xlink_href);
};
class UnregisterExternalGraphicDialog:public wxDialog
{
//
// a dialog for unregistering an already existing External Graphic resource
//
private:
MyFrame * MainFrame;
ExternalGraphicList *List;
wxGrid *GridCtrl;
public:
UnregisterExternalGraphicDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ UnregisterExternalGraphicDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoUnregisterExternalGraphic(const char *xlink_href);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class TextFontLoadParams
{
// a class wrapping Text Font Import arguments
private:
MyFrame * MainFrame;
class LoadTextFontDialog *Dlg;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
bool AbortPending;
public:
TextFontLoadParams()
{;
}
~TextFontLoadParams()
{;
}
void Initialize(MyFrame * mother, LoadTextFontDialog * dlg,
wxArrayString & paths)
{
MainFrame = mother;
Dlg = dlg;
Paths = paths;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
LoadTextFontDialog *GetDlg()
{
return Dlg;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class LoadTextFontDialog:public wxDialog
{
//
// a dialog for adding new Text Font resource(s)
//
private:
MyFrame * MainFrame;
wxString Path;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
wxString ListDone;
TextFontLoadParams Params;
public:
LoadTextFontDialog()
{;
}
bool Create(MyFrame * parent, wxArrayString & paths, wxString & path);
virtual ~ LoadTextFontDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
bool RegisterTextFont(sqlite3_stmt * stmt, const char *path);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnRequestSkip(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class TextFont
{
// a class wrapping a Text Font
private:
wxString Facename;
bool Bold;
bool Italic;
wxImage *FontExample;
TextFont *Next;
public:
TextFont(const void *priv_data, const unsigned char *blob, int blob_sz);
~TextFont()
{
delete FontExample;
}
wxString & GetFacename()
{
return Facename;
}
bool IsBold()
{
return Bold;
}
bool IsItalic()
{
return Italic;
}
wxImage *GetFontExample()
{
return FontExample;
}
void SetNext(TextFont * next)
{
Next = next;
}
TextFont *GetNext()
{
return Next;
}
};
class TextFontList
{
// a class acting as a container of Text Font
private:
TextFont * First;
TextFont *Last;
public:
TextFontList()
{
First = NULL;
Last = NULL;
}
~TextFontList();
void Add(const void *priv_data, const unsigned char *blob, int blob_sz);
TextFont *GetFirst()
{
return First;
}
void FindByIndex(int idx, wxString & face_name, int *style, int *weight);
int FindByFaceName(wxString & face_name);
};
class UnregisterTextFontDialog:public wxDialog
{
//
// a dialog for unregistering an already existing Text Font
//
private:
MyFrame * MainFrame;
TextFontList *List;
wxGrid *GridCtrl;
public:
UnregisterTextFontDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ UnregisterTextFontDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoUnregisterTextFont(int font_id);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class VectorStylesLoadParams
{
// a class wrapping Vector Styles Import arguments
private:
MyFrame * MainFrame;
class LoadVectorStyleDialog *Dlg;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
bool AbortPending;
public:
VectorStylesLoadParams()
{;
}
~VectorStylesLoadParams()
{;
}
void Initialize(MyFrame * mother, LoadVectorStyleDialog * dlg,
wxArrayString & paths)
{
MainFrame = mother;
Dlg = dlg;
Paths = paths;
Error = false;
Count = 0;
AbortPending = false;
}
MyFrame *GetMainFrame()
{
return MainFrame;
}
LoadVectorStyleDialog *GetDlg()
{
return Dlg;
}
int GetPathsCount()
{
return Paths.Count();
}
wxString & GetPathByIndex(int idx)
{
return Paths.Item(idx);
}
void SetCurrentPath(wxString & path)
{
CurrentPath = path;
}
wxString & GetCurrentPath()
{
return CurrentPath;
}
void SetError()
{
Error = true;
}
bool GetError()
{
return Error;
}
void Done()
{
Count++;
}
int GetCount()
{
return Count;
}
void RequestAbort()
{
AbortPending = true;
}
bool IsAbortPending()
{
return AbortPending;
}
};
class VectorCoverageStyle
{
// an SLD/SE Vector style
private:
int StyleID;
wxString Name;
wxString Title;
wxString Abstract;
wxString SchemaValidated;
wxString SchemaURI;
bool Selected;
VectorCoverageStyle *Next;
public:
VectorCoverageStyle(int style_id, wxString & name, wxString & title,
wxString & abstract, wxString & validated,
wxString & schema_uri);
~VectorCoverageStyle()
{;
}
int GetStyleID()
{
return StyleID;
}
wxString & GetName()
{
return Name;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetSchemaValidated()
{
return SchemaValidated;
}
wxString & GetSchemaURI()
{
return SchemaURI;
}
void MarkSelected()
{
Selected = true;
}
bool IsSelected()
{
return Selected;
}
VectorCoverageStyle *GetNext()
{
return Next;
}
void SetNext(VectorCoverageStyle * next)
{
Next = next;
}
};
class VectorCoverageStylesList
{
// a container for Vector Coverage SLD/SE styles
private:
VectorCoverageStyle * First;
VectorCoverageStyle *Last;
public:
VectorCoverageStylesList();
~VectorCoverageStylesList();
void Add(int style_id, wxString & name, wxString & title, wxString & abstract,
wxString & validated, wxString & schema_uri);
void MarkSelected(int stileId);
VectorCoverageStyle *GetFirst()
{
return First;
}
};
class LoadVectorStyleDialog:public wxDialog
{
//
// a dialog for adding new SLD/SE Vector Style
//
private:
MyFrame * MainFrame;
wxString Path;
wxArrayString Paths;
wxString CurrentPath;
bool Error;
int Count;
wxString ListDone;
VectorStylesLoadParams Params;
public:
LoadVectorStyleDialog()
{;
}
bool Create(MyFrame * parent, wxArrayString & paths, wxString & path);
virtual ~ LoadVectorStyleDialog()
{;
}
void CreateControls();
void DoRunLoad(void);
bool RegisterVectorStyle(sqlite3_stmt * stmt, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdAbort(wxCommandEvent & event);
void OnRequestStart(wxCommandEvent & event);
void OnRequestStop(wxCommandEvent & event);
void OnRequestSkip(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
};
class ReloadVectorStyleDialog:public wxDialog
{
//
// a dialog for reloading an already existing SLD/SE Vector Style
//
private:
MyFrame * MainFrame;
wxString Path;
VectorCoverageStylesList *List;
wxGrid *GridCtrl;
public:
ReloadVectorStyleDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & path);
virtual ~ ReloadVectorStyleDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoReloadVectorStyle(int style_id, void *blob, int blob_size);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class UnregisterVectorStyleDialog:public wxDialog
{
//
// a dialog for unregistering an already existing SLD/SE Vector Style
//
private:
MyFrame * MainFrame;
VectorCoverageStylesList *List;
wxGrid *GridCtrl;
public:
UnregisterVectorStyleDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ UnregisterVectorStyleDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoCheckUnreferencedVectorStyle(int style_id);
bool DoUnregisterVectorStyle(int style_id);
void OnCancel(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
};
class VectorUnregisterDialog:public wxDialog
{
//
// a dialog supporting Unregister Vector
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Copyright;
wxString DataLicense;
int Origin;
wxString Type;
public:
VectorUnregisterDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage, wxString & title,
wxString & abstract, wxString & copyright, wxString & license,
int origin, wxString & type);
virtual ~ VectorUnregisterDialog()
{;
}
void CreateControls();
bool DoVectorUnregister(void);
void OnOk(wxCommandEvent & event);
};
class VectorCoverageStylesDialog:public wxDialog
{
//
// a dialog for handling SLD/SE Vector Coverage's Styles
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
int CurrentStyleID;
VectorCoverageStylesList *List;
wxGrid *GridCtrl;
public:
VectorCoverageStylesDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ VectorCoverageStylesDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
void DoRegistetVectorCoverageStyles(class ListVectorStylesDialog * dlg);
void OnRightClick(wxGridEvent & event);
void OnCmdRemoveStyle(wxCommandEvent & event);
void OnAddStyle(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class ListVectorStylesDialog:public wxDialog
{
//
// a dialog for listing and selecting SLD/SE Vector Styles
//
private:
MyFrame * MainFrame;
VectorCoverageStylesList *List;
wxGrid *GridCtrl;
public:
ListVectorStylesDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ ListVectorStylesDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
int GetSelectedCount();
int GetSelectedStyleId(int idx);
void OnOk(wxCommandEvent & event);
};
class CandidateVectorCoverage
{
// a candidate Vector Coverage - SpatialTable
private:
wxString TableName;
wxString GeometryColumn;
int SRID;
wxString GeometryType;
bool VectorCoverage;
bool RasterCoverage;
bool TopoGeo;
bool TopoNet;
CandidateVectorCoverage *Next;
public:
CandidateVectorCoverage(wxString & table, wxString & geometry, int srid,
wxString & type)
{
TableName = table;
GeometryColumn = geometry;
SRID = srid;
GeometryType = type;
VectorCoverage = false;
RasterCoverage = false;
TopoGeo = false;
TopoNet = false;
Next = NULL;
}
~CandidateVectorCoverage()
{;
}
wxString & GetTableName()
{
return TableName;
}
wxString & GetGeometryColumn()
{
return GeometryColumn;
}
int GetSRID()
{
return SRID;
}
wxString & GetGeometryType()
{
return GeometryType;
}
void MarkVectorCoverage()
{
VectorCoverage = true;
}
bool IsVectorCoverage()
{
return VectorCoverage;
}
void MarkRasterCoverage()
{
RasterCoverage = true;
}
bool IsRasterCoverage()
{
return RasterCoverage;
}
void MarkTopoGeoCoverage()
{
TopoGeo = true;
}
bool IsTopoGeo()
{
return TopoGeo;
}
void MarkTopoNetCoverage()
{
TopoNet = true;
}
bool IsTopoNet()
{
return TopoNet;
}
CandidateVectorCoverage *GetNext()
{
return Next;
}
void SetNext(CandidateVectorCoverage * next)
{
Next = next;
}
};
class CandidateVectorCoveragesList
{
// a container for candidate Vector Coverages - SpatialTables
private:
CandidateVectorCoverage * First;
CandidateVectorCoverage *Last;
public:
CandidateVectorCoveragesList()
{
First = NULL;
Last = NULL;
}
~CandidateVectorCoveragesList();
void Add(wxString & table_name, wxString & geometry, int srid,
wxString & type);
void MarkVectorCoverage(wxString & table, wxString & geometry);
void MarkRasterCoverage(wxString & table, wxString & geometry);
void MarkTopoGeoCoverage(wxString & table, wxString & geometry);
void MarkTopoNetCoverage(wxString & table, wxString & geometry);
CandidateVectorCoverage *GetFirst()
{
return First;
}
};
class VectorRegisterDialog:public wxDialog
{
//
// a dialog for Register Vector Coverage - SpatialTables
//
private:
MyFrame * MainFrame;
CandidateVectorCoveragesList *List;
wxGrid *GridCtrl;
wxString CoverageName;
wxString TableName;
wxString GeometryColumn;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool Queryable;
bool Editable;
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
VectorRegisterDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ VectorRegisterDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetTableName()
{
return TableName;
}
wxString & GetGeometryColumn()
{
return GeometryColumn;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
void OnOk(wxCommandEvent & event);
};
class CandidateSpatialViewCoverage
{
// a candidate Vector Coverage - SpatialView
private:
wxString ViewName;
wxString ViewGeometry;
int SRID;
wxString GeometryType;
bool VectorCoverage;
CandidateSpatialViewCoverage *Next;
public:
CandidateSpatialViewCoverage(wxString & view_name, wxString & view_geometry,
int srid, wxString & type)
{
ViewName = view_name;
ViewGeometry = view_geometry;
SRID = srid;
GeometryType = type;
VectorCoverage = false;
Next = NULL;
}
~CandidateSpatialViewCoverage()
{;
}
wxString & GetViewName()
{
return ViewName;
}
wxString & GetViewGeometry()
{
return ViewGeometry;
}
int GetSRID()
{
return SRID;
}
wxString & GetGeometryType()
{
return GeometryType;
}
void MarkVectorCoverage()
{
VectorCoverage = true;
}
bool IsVectorCoverage()
{
return VectorCoverage;
}
CandidateSpatialViewCoverage *GetNext()
{
return Next;
}
void SetNext(CandidateSpatialViewCoverage * next)
{
Next = next;
}
};
class CandidateSpatialViewCoveragesList
{
// a container for candidate Vector Coverages - SpatialViews
private:
CandidateSpatialViewCoverage * First;
CandidateSpatialViewCoverage *Last;
public:
CandidateSpatialViewCoveragesList()
{
First = NULL;
Last = NULL;
}
~CandidateSpatialViewCoveragesList();
void Add(wxString & view_name, wxString & geometry, int srid,
wxString & type);
void MarkVectorCoverage(wxString & view, wxString & geometry);
CandidateSpatialViewCoverage *GetFirst()
{
return First;
}
};
class SpatialViewRegisterDialog:public wxDialog
{
//
// a dialog for Register Vector Coverage - SpatialView
//
private:
MyFrame * MainFrame;
CandidateSpatialViewCoveragesList *List;
wxGrid *GridCtrl;
wxString CoverageName;
wxString ViewName;
wxString ViewGeometry;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool Queryable;
bool Editable;
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
SpatialViewRegisterDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ SpatialViewRegisterDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetViewName()
{
return ViewName;
}
wxString & GetViewGeometry()
{
return ViewGeometry;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
void OnOk(wxCommandEvent & event);
};
class CandidateVirtualTableCoverage
{
// a candidate Vector Coverage - VirtualTable
private:
wxString VirtName;
wxString VirtGeometry;
int SRID;
wxString GeometryType;
bool VectorCoverage;
CandidateVirtualTableCoverage *Next;
public:
CandidateVirtualTableCoverage(wxString & virt_name,
wxString & virt_geometry, int srid,
wxString & type)
{
VirtName = virt_name;
VirtGeometry = virt_geometry;
SRID = srid;
GeometryType = type;
VectorCoverage = false;
Next = NULL;
}
~CandidateVirtualTableCoverage()
{;
}
wxString & GetVirtName()
{
return VirtName;
}
wxString & GetVirtGeometry()
{
return VirtGeometry;
}
int GetSRID()
{
return SRID;
}
wxString & GetGeometryType()
{
return GeometryType;
}
void MarkVectorCoverage()
{
VectorCoverage = true;
}
bool IsVectorCoverage()
{
return VectorCoverage;
}
CandidateVirtualTableCoverage *GetNext()
{
return Next;
}
void SetNext(CandidateVirtualTableCoverage * next)
{
Next = next;
}
};
class CandidateVirtualTableCoveragesList
{
// a container for candidate Vector Coverages - VirtualTable
private:
CandidateVirtualTableCoverage * First;
CandidateVirtualTableCoverage *Last;
public:
CandidateVirtualTableCoveragesList()
{
First = NULL;
Last = NULL;
}
~CandidateVirtualTableCoveragesList();
void Add(wxString & view_name, wxString & geometry, int srid,
wxString & type);
void MarkVectorCoverage(wxString & view, wxString & geometry);
CandidateVirtualTableCoverage *GetFirst()
{
return First;
}
};
class VirtualTableRegisterDialog:public wxDialog
{
//
// a dialog for Register Vector Coverage - VirtualTable
//
private:
MyFrame * MainFrame;
CandidateVirtualTableCoveragesList *List;
wxGrid *GridCtrl;
wxString CoverageName;
wxString VirtName;
wxString VirtGeometry;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool Queryable;
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
VirtualTableRegisterDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ VirtualTableRegisterDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetVirtName()
{
return VirtName;
}
wxString & GetVirtGeometry()
{
return VirtGeometry;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
bool IsQueryable()
{
return Queryable;
}
void OnOk(wxCommandEvent & event);
};
class CandidateTopoGeoCoverage
{
// a candidate TopoGeo Coverage
private:
wxString TopologyName;
int SRID;
wxString Dimensions;
double Tolerance;
bool VectorCoverage;
CandidateTopoGeoCoverage *Next;
public:
CandidateTopoGeoCoverage(wxString & topology, int srid,
wxString & dimensions, double tolerance)
{
TopologyName = topology;
SRID = srid;
Dimensions = dimensions;
Tolerance = tolerance;
VectorCoverage = false;
Next = NULL;
}
~CandidateTopoGeoCoverage()
{;
}
wxString & GetTopologyName()
{
return TopologyName;
}
int GetSRID()
{
return SRID;
}
wxString & GetDimensions()
{
return Dimensions;
}
double GetTolerance()
{
return Tolerance;
}
void MarkVectorCoverage()
{
VectorCoverage = true;
}
bool IsVectorCoverage()
{
return VectorCoverage;
}
CandidateTopoGeoCoverage *GetNext()
{
return Next;
}
void SetNext(CandidateTopoGeoCoverage * next)
{
Next = next;
}
};
class CandidateTopoGeoCoveragesList
{
// a container for candidate TopoGeo Coverages
private:
CandidateTopoGeoCoverage * First;
CandidateTopoGeoCoverage *Last;
public:
CandidateTopoGeoCoveragesList()
{
First = NULL;
Last = NULL;
}
~CandidateTopoGeoCoveragesList();
void Add(wxString & topology, int srid, wxString & dimensions,
double tolerance);
void MarkVectorCoverage(wxString & topology);
CandidateTopoGeoCoverage *GetFirst()
{
return First;
}
};
class TopoGeoRegisterDialog:public wxDialog
{
//
// a dialog for Register TopoGeo Coverage
//
private:
MyFrame * MainFrame;
CandidateTopoGeoCoveragesList *List;
wxGrid *GridCtrl;
wxString CoverageName;
wxString TopologyName;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool Queryable;
bool Editable;
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
TopoGeoRegisterDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ TopoGeoRegisterDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetTopologyName()
{
return TopologyName;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
void OnOk(wxCommandEvent & event);
};
class CandidateTopoNetCoverage
{
// a candidate TopoNet Coverage
private:
wxString NetworkName;
int SRID;
wxString Dimensions;
bool VectorCoverage;
CandidateTopoNetCoverage *Next;
public:
CandidateTopoNetCoverage(wxString & network, int srid,
wxString & dimensions)
{
NetworkName = network;
SRID = srid;
Dimensions = dimensions;
VectorCoverage = false;
Next = NULL;
}
~CandidateTopoNetCoverage()
{;
}
wxString & GetNetworkName()
{
return NetworkName;
}
int GetSRID()
{
return SRID;
}
wxString & GetDimensions()
{
return Dimensions;
}
void MarkVectorCoverage()
{
VectorCoverage = true;
}
bool IsVectorCoverage()
{
return VectorCoverage;
}
CandidateTopoNetCoverage *GetNext()
{
return Next;
}
void SetNext(CandidateTopoNetCoverage * next)
{
Next = next;
}
};
class CandidateTopoNetCoveragesList
{
// a container for candidate TopoNet Coverages
private:
CandidateTopoNetCoverage * First;
CandidateTopoNetCoverage *Last;
public:
CandidateTopoNetCoveragesList()
{
First = NULL;
Last = NULL;
}
~CandidateTopoNetCoveragesList();
void Add(wxString & network, int srid, wxString & dimensions);
void MarkVectorCoverage(wxString & network);
CandidateTopoNetCoverage *GetFirst()
{
return First;
}
};
class TopoNetRegisterDialog:public wxDialog
{
//
// a dialog for Register TopoNet Coverage
//
private:
MyFrame * MainFrame;
CandidateTopoNetCoveragesList *List;
wxGrid *GridCtrl;
wxString CoverageName;
wxString NetworkName;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool Queryable;
bool Editable;
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
TopoNetRegisterDialog()
{
List = NULL;
}
bool Create(MyFrame * parent);
virtual ~ TopoNetRegisterDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
wxString & GetCoverageName()
{
return CoverageName;
}
wxString & GetNetworkName()
{
return NetworkName;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
void OnOk(wxCommandEvent & event);
};
class VectorInfosDialog:public wxDialog
{
//
// a dialog for editing Vector Coverage Data
//
private:
MyFrame * MainFrame;
wxString CoverageName;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
bool IsQueryable;
bool IsEditable;
bool DoReadCoverage();
void DoUpdateCoverage();
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
VectorInfosDialog()
{;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ VectorInfosDialog()
{;
}
void CreateControls();
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class VectorCoverageSRID
{
// a Vector Coverage alternative SRID
private:
int SRID;
wxString AuthName;
int AuthSRID;
wxString RefSysName;
bool Native;
bool Deleted;
VectorCoverageSRID *Next;
public:
VectorCoverageSRID(bool native, int srid, wxString & auth_name,
int auth_srid, wxString & name)
{
SRID = srid;
AuthName = auth_name;
AuthSRID = auth_srid;
RefSysName = name;
Native = native;
Deleted = false;
Next = NULL;
}
~VectorCoverageSRID()
{;
}
int GetSRID()
{
return SRID;
}
wxString & GetAuthName()
{
return AuthName;
}
int GetAuthSRID()
{
return AuthSRID;
}
wxString & GetRefSysName()
{
return RefSysName;
}
bool IsNative()
{
return Native;
}
void MarkDeleted()
{
Deleted = true;
}
bool IsDeleted()
{
return Deleted;
}
VectorCoverageSRID *GetNext()
{
return Next;
}
void SetNext(VectorCoverageSRID * next)
{
Next = next;
}
};
class VectorCoverageSRIDsList
{
// a container for Vector Coverage alternative SRIDs
private:
VectorCoverageSRID * First;
VectorCoverageSRID *Last;
public:
VectorCoverageSRIDsList()
{
First = NULL;
Last = NULL;
}
~VectorCoverageSRIDsList();
void Add(bool native, int srid, wxString & auth_name, int auth_srid,
wxString & name);
VectorCoverageSRID *GetFirst()
{
return First;
}
bool IsAlreadyDefinedSRID(int srid);
bool IsNativeSRID(int srid);
void MarkDeleted(int strid);
};
class VectorSRIDsDialog:public wxDialog
{
//
// a dialog for handling Vector Coverage's alternative SRIDs
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
int CurrentSRID;
VectorCoverageSRIDsList *List;
wxGrid *GridCtrl;
bool UpdateRefSysName(int srid);
void DoRemoveSRID();
public:
VectorSRIDsDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ VectorSRIDsDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoRegistetVectorCoverageSrid(int srid);
void OnSridChanged(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCellSelected(wxGridEvent & event);
void OnCmdRemoveSrid(wxCommandEvent & event);
void OnCmdAddSrid(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class VectorCoverageKeyword
{
// a Vector Coverage Keyword
private:
wxString Keyword;
bool Deleted;
VectorCoverageKeyword *Next;
public:
VectorCoverageKeyword(wxString & keyword)
{
Keyword = keyword;
Deleted = false;
Next = NULL;
}
~VectorCoverageKeyword()
{;
}
wxString & GetKeyword()
{
return Keyword;
}
void MarkDeleted()
{
Deleted = true;
}
bool IsDeleted()
{
return Deleted;
}
VectorCoverageKeyword *GetNext()
{
return Next;
}
void SetNext(VectorCoverageKeyword * next)
{
Next = next;
}
};
class VectorCoverageKeywordsList
{
// a container for Vector Coverage Keywords
private:
VectorCoverageKeyword * First;
VectorCoverageKeyword *Last;
public:
VectorCoverageKeywordsList()
{
First = NULL;
Last = NULL;
}
~VectorCoverageKeywordsList();
void Add(wxString & keyword);
VectorCoverageKeyword *GetFirst()
{
return First;
}
bool IsAlreadyDefinedKeyword(wxString & keyword);
void MarkDeleted(wxString & keyword);
};
class VectorKeywordsDialog:public wxDialog
{
//
// a dialog for handling Vector Coverage's Keywords
//
private:
MyFrame * MainFrame;
wxString CoverageName;
int CurrentRow;
wxString Keyword;
VectorCoverageKeywordsList *List;
wxGrid *GridCtrl;
public:
VectorKeywordsDialog()
{
List = NULL;
}
bool Create(MyFrame * parent, wxString & coverage);
virtual ~ VectorKeywordsDialog()
{
if (List != NULL)
delete List;
}
void CreateControls();
bool DoRegistetVectorCoverageKeyword(wxString & keyword);
void OnRightClick(wxGridEvent & event);
void OnCmdRemoveKeyword(wxCommandEvent & event);
void OnCmdAddKeyword(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class RasterSymbolizerContrastDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ContrastEnhancement type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
bool Normalize;
bool Histogram;
bool Gamma;
double GammaValue;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
public:
RasterSymbolizerContrastDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerContrastDialog()
{;
}
void CreateControls();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnCmdModeChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class RasterSymbolizerChannelRgbDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ChannelSelection (RGB) type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
int RedBand;
int GreenBand;
int BlueBand;
bool Normalize;
bool Histogram;
bool Gamma;
double GammaValue;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
public:
RasterSymbolizerChannelRgbDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerChannelRgbDialog()
{;
}
void CreateControls();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnCmdModeChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class RasterSymbolizerChannelGrayDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ChannelSelection (Gray) type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
int GrayBand;
bool Normalize;
bool Histogram;
bool Gamma;
double GammaValue;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
public:
RasterSymbolizerChannelGrayDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerChannelGrayDialog()
{;
}
void CreateControls();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnCmdModeChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class ColorMapEntry
{
//
// a class wrapping a ColorMap entry
//
private:
double Value;
wxString Color;
ColorMapEntry *Prev;
ColorMapEntry *Next;
public:
ColorMapEntry(double value, wxString & color)
{
Value = value;
Color = color.MakeLower();
Prev = NULL;
Next = NULL;
}
~ColorMapEntry()
{;
}
double GetValue()
{
return Value;
}
void SetColor(wxString & color)
{
Color = color;
}
wxString & GetColor()
{
return Color;
}
void SetPrev(ColorMapEntry * ptr)
{
Prev = ptr;
}
ColorMapEntry *GetPrev()
{
return Prev;
}
void SetNext(ColorMapEntry * ptr)
{
Next = ptr;
}
ColorMapEntry *GetNext()
{
return Next;
}
static bool IsValidColor(wxString & color);
static void GetWxColor(wxString & color, wxColour & clr);
static unsigned char ParseHex(unsigned char hi, unsigned char lo);
static void DoPaintColorSample(int width, int height, wxColour & color,
wxBitmap & bmp);
};
class ColorMapCategorize
{
//
// a class wrapping a ColorMap of the Categorize Type
//
private:
wxString FirstColor;
ColorMapEntry *First;
ColorMapEntry *Last;
public:
ColorMapCategorize()
{
FirstColor = wxT("#000000");
First = NULL;
Last = NULL;
}
~ColorMapCategorize();
void SetFirstColor(wxString & color)
{
FirstColor = color;
}
wxString & GetFirstColor()
{
return FirstColor;
}
void Add(double value, wxString & color);
void Remove(double value);
ColorMapEntry *GetFirst()
{
return First;
}
};
class ColorMapInterpolate
{
//
// a class wrapping a ColorMap of the Interpolate Type
//
private:
ColorMapEntry * First;
ColorMapEntry *Last;
public:
ColorMapInterpolate()
{
First = NULL;
Last = NULL;
}
~ColorMapInterpolate();
void Add(double value, wxString & color);
void Remove(double value);
ColorMapEntry *GetFirst()
{
return First;
}
};
class RasterSymbolizerCategorizeDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ColorMap Categorize type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
ColorMapCategorize Map;
bool ShadedRelief;
double ReliefFactor;
wxGrid *GridCtrl;
int CurrentRow;
double CurrentValue;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
void RefreshGrid();
public:
RasterSymbolizerCategorizeDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerCategorizeDialog()
{;
}
void CreateControls();
void OnCmdAddEntry(wxCommandEvent & event);
void OnCmdRemoveEntry(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnShadedChanged(wxCommandEvent & event);
void OnCmdColorPicker(wxCommandEvent & event);
void OnCmdAdd(wxCommandEvent & event);
void OnCmdRemove(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCellSelected(wxGridEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class RasterSymbolizerInterpolateDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ColorMap Interpolate type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
wxString Fallback;
ColorMapInterpolate Map;
bool ShadedRelief;
double ReliefFactor;
wxGrid *GridCtrl;
int CurrentRow;
double CurrentValue;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
void RefreshGrid();
public:
RasterSymbolizerInterpolateDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerInterpolateDialog()
{;
}
void CreateControls();
void OnCmdAddEntry(wxCommandEvent & event);
void OnCmdRemoveEntry(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnShadedChanged(wxCommandEvent & event);
void OnCmdColorPicker(wxCommandEvent & event);
void OnCmdAdd(wxCommandEvent & event);
void OnCmdRemove(wxCommandEvent & event);
void OnRightClick(wxGridEvent & event);
void OnCellSelected(wxGridEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class RasterSymbolizerShadedReliefDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the ChannelSelection (Gray) type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
double ReliefFactor;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
public:
RasterSymbolizerShadedReliefDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerShadedReliefDialog()
{;
}
void CreateControls();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class RasterSymbolizerMonochromeDialog:public wxDialog
{
//
// a dialog for creating an SLD/SE RasterSymbolizer
// of the Recolored Monochrome type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
double Opacity;
wxString Color;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
bool RetrieveParams();
char *DoCreateSymbolizerXML();
char *DoCreateCoverageXML();
public:
RasterSymbolizerMonochromeDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ RasterSymbolizerMonochromeDialog()
{;
}
void CreateControls();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdColorPicker(wxCommandEvent & event);
void OnCmdColorChanged(wxCommandEvent & event);
};
class MyGraphicCellRenderer:public wxGridCellRenderer
{
// a Grid CellRenderer supporting a Graphic Image
private:
wxImage * Graphic;
public:
virtual wxGridCellRenderer * Clone() const
{
return new MyGraphicCellRenderer;
}
virtual void Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
const wxRect & rect, int row, int col, bool isSelected);
virtual wxSize GetBestSize(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
int row, int col)
{
// silencing stupid compiler warnings about unused args
if (grid.IsEditable() && attr.HasFont() && dc.IsOk())
{
if (row == col)
col = row;
}
return wxSize(48, 24);
}
void SetGraphic(wxImage * graphic)
{
Graphic = graphic;
}
};
class MyBitmapCellRenderer:public wxGridCellRenderer
{
// a Grid CellRenderer supporting a Bitmap
private:
wxImage Graphic;
public:
virtual wxGridCellRenderer * Clone() const
{
return new MyBitmapCellRenderer;
}
virtual void Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
const wxRect & rect, int row, int col, bool isSelected);
virtual wxSize GetBestSize(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
int row, int col)
{
// silencing stupid compiler warnings about unused args
if (grid.IsEditable() && attr.HasFont() && dc.IsOk())
{
if (row == col)
col = row;
}
return wxSize(Graphic.GetWidth(), Graphic.GetHeight());
}
void SetGraphic(wxBitmap & graphic)
{
Graphic = graphic.ConvertToImage();
}
};
class MyFontCellRenderer:public wxGridCellRenderer
{
// a Grid CellRenderer supporting a Text Font
private:
wxImage * FontExample;
public:
virtual wxGridCellRenderer * Clone() const
{
return new MyFontCellRenderer;
}
virtual void Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
const wxRect & rect, int row, int col, bool isSelected);
virtual wxSize GetBestSize(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc,
int row, int col)
{
// silencing stupid compiler warnings about unused args
if (grid.IsEditable() && attr.HasFont() && dc.IsOk())
{
if (row == col)
col = row;
}
return wxSize(600, 22);
}
void SetFontExample(wxImage * example)
{
FontExample = example;
}
void SetFontExample(const void *priv_data, const char *facename);
};
class SymbolizerPreview:public wxStaticBitmap
{
//
// a window to show a Vector Symbolizer Preview
//
private:
wxPropertySheetDialog * Parent;
public:
SymbolizerPreview(wxPropertySheetDialog * parent, wxWindow * panel,
wxWindowID id, const wxBitmap & bmp, wxSize const &size);
virtual ~ SymbolizerPreview()
{;
}
};
class SimpleLineSymbolizerDialog:public wxPropertySheetDialog
{
//
// a dialog for creating an SLD/SE LineSymbolizer
// of the simple type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
unsigned char Uom;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
double PerpendicularOffset1;
double Stroke1Opacity;
bool HasGraphic1;
wxString Stroke1Color;
wxString Stroke1XLinkHref;
wxString Stroke1MimeType;
bool EnableStroke1Replacement;
wxString Stroke1ColorReplacement;
ExternalGraphicList *List;
wxGrid *GridCtrl1;
double Stroke1Width;
int Stroke1LineJoin;
int Stroke1LineCap;
int Stroke1DashCount;
double *Stroke1DashArray;
double Stroke1DashOffset;
bool EnableStroke2;
double PerpendicularOffset2;
double Stroke2Opacity;
bool HasGraphic2;
wxString Stroke2Color;
wxString Stroke2XLinkHref;
bool EnableStroke2Replacement;
wxString Stroke2ColorReplacement;
wxString Stroke2MimeType;
wxGrid *GridCtrl2;
double Stroke2Width;
int Stroke2LineJoin;
int Stroke2LineCap;
int Stroke2DashCount;
double *Stroke2DashArray;
double Stroke2DashOffset;
bool EnableStroke3;
double PerpendicularOffset3;
double Stroke3Opacity;
bool HasGraphic3;
wxString Stroke3Color;
wxString Stroke3XLinkHref;
bool EnableStroke3Replacement;
wxString Stroke3ColorReplacement;
wxString Stroke3MimeType;
wxGrid *GridCtrl3;
double Stroke3Width;
int Stroke3LineJoin;
int Stroke3LineCap;
int Stroke3DashCount;
double *Stroke3DashArray;
double Stroke3DashOffset;
unsigned char PreviewBackground;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateStroke1Page(wxWindow * book);
wxPanel *CreateStroke2Page(wxWindow * book);
wxPanel *CreateStroke3Page(wxWindow * book);
wxPanel *CreatePreviewPage(wxWindow * book);
void CreateButtons();
bool FinalValidityCheck();
bool RetrieveMainPage();
bool RetrieveStroke1Page(bool check = true);
bool RetrieveStroke2Page(bool check = true);
bool RetrieveStroke3Page(bool check = true);
bool RetrievePreviewPage();
void UpdateMainPage();
void UpdateStroke1Page();
void UpdateStroke2Page();
void UpdateStroke3Page();
void UpdatePreviewPage();
char *DoCreateSymbolizerXML();
char *DoCreateFeatureTypeXML();
void DrawPreview(int horz, int vert);
bool DoParseDashArray(wxString & str, int which);
void NormalizedDashArray(wxString & str, int which, char delimiter = ',');
void PrepareLinestringPath(void *ctx, double perpendicular_offset);
wxBitmap PreviewBackBitmap;
public:
SimpleLineSymbolizerDialog();
bool Create(MyFrame * parent);
virtual ~ SimpleLineSymbolizerDialog();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdUomChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdStroke1TypeChanged(wxCommandEvent & event);
void OnCmdStroke2TypeChanged(wxCommandEvent & event);
void OnCmdStroke3TypeChanged(wxCommandEvent & event);
void OnCmdColor1Changed(wxCommandEvent & event);
void OnCmdColor2Changed(wxCommandEvent & event);
void OnCmdColor3Changed(wxCommandEvent & event);
void OnCmdColor1Picker(wxCommandEvent & event);
void OnCmdColor2Picker(wxCommandEvent & event);
void OnCmdColor3Picker(wxCommandEvent & event);
void OnCmdReplacement1Changed(wxCommandEvent & event);
void OnCmdReplacement2Changed(wxCommandEvent & event);
void OnCmdReplacement3Changed(wxCommandEvent & event);
void OnCmdLineJoin1Changed(wxCommandEvent & event);
void OnCmdLineJoin2Changed(wxCommandEvent & event);
void OnCmdLineJoin3Changed(wxCommandEvent & event);
void OnCmdLineCap1Changed(wxCommandEvent & event);
void OnCmdLineCap2Changed(wxCommandEvent & event);
void OnCmdLineCap3Changed(wxCommandEvent & event);
void OnCmdStroke2Changed(wxCommandEvent & event);
void OnCmdStroke3Changed(wxCommandEvent & event);
void OnCmdStroke1EnableReplacementChanged(wxCommandEvent & event);
void OnCmdStroke2EnableReplacementChanged(wxCommandEvent & event);
void OnCmdStroke3EnableReplacementChanged(wxCommandEvent & event);
void OnCmdBackgroundChanged(wxCommandEvent & event);
};
class SimplePolygonSymbolizerDialog:public wxPropertySheetDialog
{
//
// a dialog for creating an SLD/SE PolygonSymbolizer
// of the simple type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
unsigned char Uom;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
double DisplacementX1;
double DisplacementY1;
double PerpendicularOffset1;
bool EnableFill1;
double Fill1Opacity;
bool HasGraphicFill1;
wxString Fill1Color;
wxString Fill1XLinkHref;
wxString Fill1MimeType;
bool EnableFill1Replacement;
wxString Fill1ColorReplacement;
wxGrid *GridCtrl1;
bool EnableStroke1;
double Stroke1Opacity;
bool HasGraphicStroke1;
wxString Stroke1Color;
wxString Stroke1XLinkHref;
wxString Stroke1MimeType;
bool EnableStroke1Replacement;
wxString Stroke1ColorReplacement;
ExternalGraphicList *List;
wxGrid *GridCtrl2;
double Stroke1Width;
int Stroke1LineJoin;
int Stroke1LineCap;
int Stroke1DashCount;
double *Stroke1DashArray;
double Stroke1DashOffset;
bool EnablePolygon2;
double DisplacementX2;
double DisplacementY2;
double PerpendicularOffset2;
bool EnableFill2;
wxString Fill2MimeType;
bool EnableFill2Replacement;
wxString Fill2ColorReplacement;
double Fill2Opacity;
bool HasGraphicFill2;
wxString Fill2Color;
wxString Fill2XLinkHref;
wxGrid *GridCtrl3;
bool EnableStroke2;
double Stroke2Opacity;
bool HasGraphicStroke2;
wxString Stroke2Color;
wxString Stroke2XLinkHref;
wxString Stroke2MimeType;
bool EnableStroke2Replacement;
wxString Stroke2ColorReplacement;
wxGrid *GridCtrl4;
double Stroke2Width;
int Stroke2LineJoin;
int Stroke2LineCap;
int Stroke2DashCount;
double *Stroke2DashArray;
double Stroke2DashOffset;
unsigned char PreviewBackground;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateStroke1Page(wxWindow * book);
wxPanel *CreateFill1Page(wxWindow * book);
wxPanel *CreateStroke2Page(wxWindow * book);
wxPanel *CreateFill2Page(wxWindow * book);
wxPanel *CreatePreviewPage(wxWindow * book);
void CreateButtons();
bool FinalValidityCheck();
bool RetrieveMainPage();
bool RetrieveStroke1Page(bool check = true);
bool RetrieveFill1Page(bool check = true);
bool RetrieveStroke2Page(bool check = true);
bool RetrieveFill2Page(bool check = true);
bool RetrievePreviewPage();
void UpdateMainPage();
void UpdateStroke1Page();
void UpdateFill1Page();
void UpdateStroke2Page();
void UpdateFill2Page();
void UpdatePreviewPage();
char *DoCreateSymbolizerXML();
char *DoCreateFeatureTypeXML();
void DrawPreview(int horz, int vert);
bool DoParseDashArray(wxString & str, int which);
void NormalizedDashArray(wxString & str, int which, char delimiter = ',');
void PreparePolygonPath(void *ctx, double perpendicular_offset,
double displacement_x, double displacement_y);
wxBitmap PreviewBackBitmap;
public:
SimplePolygonSymbolizerDialog();
bool Create(MyFrame * parent);
virtual ~ SimplePolygonSymbolizerDialog();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdUomChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdStroke1TypeChanged(wxCommandEvent & event);
void OnCmdFill1TypeChanged(wxCommandEvent & event);
void OnCmdStroke2TypeChanged(wxCommandEvent & event);
void OnCmdFill2TypeChanged(wxCommandEvent & event);
void OnCmdColor1Changed(wxCommandEvent & event);
void OnCmdColor2Changed(wxCommandEvent & event);
void OnCmdColor3Changed(wxCommandEvent & event);
void OnCmdColor4Changed(wxCommandEvent & event);
void OnCmdColor1Picker(wxCommandEvent & event);
void OnCmdColor2Picker(wxCommandEvent & event);
void OnCmdColor3Picker(wxCommandEvent & event);
void OnCmdColor4Picker(wxCommandEvent & event);
void OnCmdFill1ReplacementChanged(wxCommandEvent & event);
void OnCmdStroke1ReplacementChanged(wxCommandEvent & event);
void OnCmdFill2ReplacementChanged(wxCommandEvent & event);
void OnCmdStroke2ReplacementChanged(wxCommandEvent & event);
void OnCmdLineJoin1Changed(wxCommandEvent & event);
void OnCmdLineJoin2Changed(wxCommandEvent & event);
void OnCmdLineCap1Changed(wxCommandEvent & event);
void OnCmdLineCap2Changed(wxCommandEvent & event);
void OnCmdStroke1Changed(wxCommandEvent & event);
void OnCmdStroke2Changed(wxCommandEvent & event);
void OnCmdFill1Changed(wxCommandEvent & event);
void OnCmdFill2Changed(wxCommandEvent & event);
void OnCmdFill1EnableReplacementChanged(wxCommandEvent & event);
void OnCmdStroke1EnableReplacementChanged(wxCommandEvent & event);
void OnCmdFill2EnableReplacementChanged(wxCommandEvent & event);
void OnCmdStroke2EnableReplacementChanged(wxCommandEvent & event);
void OnCmdPolygon2Changed(wxCommandEvent & event);
void OnCmdBackgroundChanged(wxCommandEvent & event);
};
class SimplePointSymbolizerDialog:public wxPropertySheetDialog
{
//
// a dialog for creating an SLD/SE PointSymbolizer
// of the simple type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
unsigned char Uom;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
double Opacity;
double Size;
double Rotation;
double AnchorPointX;
double AnchorPointY;
double DisplacementX;
double DisplacementY;
bool OnlyRescaleSVG;
bool HasGraphic;
wxString XLinkHref;
wxString MimeType;
bool EnableColorReplacement;
wxString ColorReplacement;
int WellKnownMark;
bool EnableFill;
bool EnableStroke;
wxString FillColor;
wxString StrokeColor;
double StrokeWidth;
int StrokeLineJoin;
int StrokeLineCap;
int StrokeDashCount;
double *StrokeDashArray;
double StrokeDashOffset;
ExternalGraphicList *List;
wxGrid *GridCtrl;
unsigned char PreviewBackground;
bool Crosshair;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreatePositionPage(wxWindow * book);
wxPanel *CreateGraphicPage(wxWindow * book);
wxPanel *CreateMarkPage(wxWindow * book);
wxPanel *CreatePreviewPage(wxWindow * book);
void CreateButtons();
bool FinalValidityCheck();
bool RetrieveMainPage();
bool RetrievePositionPage(bool check = true);
bool RetrieveGraphicPage(bool check = true);
bool RetrieveMarkPage(bool check = true);
bool RetrievePreviewPage();
void UpdateMainPage();
void UpdatePositionPage();
void UpdateGraphicPage();
void UpdateMarkPage();
void UpdatePreviewPage();
char *DoCreateSymbolizerXML();
char *DoCreateFeatureTypeXML();
void DrawPreview(int horz, int vert);
bool DoParseDashArray(wxString & str);
void NormalizedDashArray(wxString & str, char delimiter = ',');
wxBitmap PreviewBackBitmap;
public:
SimplePointSymbolizerDialog();
bool Create(MyFrame * parent);
virtual ~ SimplePointSymbolizerDialog();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdUomChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdTypeChanged(wxCommandEvent & event);
void OnCmdMarkChanged(wxCommandEvent & event);
void OnCmdStrokeChanged(wxCommandEvent & event);
void OnCmdFillChanged(wxCommandEvent & event);
void OnCmdColorFillChanged(wxCommandEvent & event);
void OnCmdColorStrokeChanged(wxCommandEvent & event);
void OnCmdColorReplacementChanged(wxCommandEvent & event);
void OnCmdColorFillPicker(wxCommandEvent & event);
void OnCmdColorStrokePicker(wxCommandEvent & event);
void OnCmdColorReplacementPicker(wxCommandEvent & event);
void OnCmdOnlyRescaleSVG(wxCommandEvent & event);
void OnCmdLineJoinChanged(wxCommandEvent & event);
void OnCmdLineCapChanged(wxCommandEvent & event);
void OnCmdEnableReplacementChanged(wxCommandEvent & event);
void OnCmdBackgroundChanged(wxCommandEvent & event);
void OnCmdCrosshairChanged(wxCommandEvent & event);
};
class SimpleTextSymbolizerDialog:public wxPropertySheetDialog
{
//
// a dialog for creating an SLD/SE TextSymbolizer
// of the simple type
//
private:
MyFrame * MainFrame;
wxString Name;
wxString Title;
wxString Abstract;
unsigned char Uom;
bool MinScale;
bool MaxScale;
double MinScaleDenominator;
double MaxScaleDenominator;
wxString Label;
wxString FontFamily;
int FontStyle;
int FontWeight;
double FontSize;
bool PointPlacement;
double Rotation;
double AnchorPointX;
double AnchorPointY;
double DisplacementX;
double DisplacementY;
double PerpendicularOffset;
bool IsRepeated;
double InitialGap;
double Gap;
bool IsAligned;
bool GeneralizeLine;
bool HasHalo;
double HaloRadius;
wxString HaloColor;
double HaloOpacity;
wxString FillColor;
double FillOpacity;
TextFontList *List;
wxGrid *GridCtrl;
unsigned char PreviewBackground;
bool Crosshair;
bool ReferenceLine;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateFontPage(wxWindow * book);
wxPanel *CreatePlacementPage(wxWindow * book);
wxPanel *CreatePreviewPage(wxWindow * book);
void CreateButtons();
bool FinalValidityCheck();
bool RetrieveMainPage();
bool RetrieveFontPage(bool check = true);
bool RetrievePlacementPage(bool check = true);
bool RetrievePreviewPage();
void UpdateMainPage();
void UpdateFontPage();
void UpdatePlacementPage();
void UpdatePreviewPage();
char *DoCreateSymbolizerXML();
char *DoCreateFeatureTypeXML();
gaiaGeomCollPtr PrepareLinestring(double perpendicular_offset);
void PrepareLinestringPath(void *ctx, double perpendicular_offset);
void GetLineCenterPoint(double perpendicular_offset, double *x, double *y);
void CreateLineArray(double perpendicular_offset, int *points, double **x,
double **y, int generalize);
void DrawPreview(int horz, int vert);
wxBitmap PreviewBackBitmap;
public:
SimpleTextSymbolizerDialog();
bool Create(MyFrame * parent);
virtual ~ SimpleTextSymbolizerDialog();
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdUomChanged(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdTypeChanged(wxCommandEvent & event);
void OnCmdColorFillChanged(wxCommandEvent & event);
void OnCmdHaloEnableChanged(wxCommandEvent & event);
void OnCmdColorHaloChanged(wxCommandEvent & event);
void OnCmdColorFillPicker(wxCommandEvent & event);
void OnCmdColorHaloPicker(wxCommandEvent & event);
void OnCmdIsRepeatedChanged(wxCommandEvent & event);
void OnCmdIsAlignedChanged(wxCommandEvent & event);
void OnCmdGeneralizeLineChanged(wxCommandEvent & event);
void OnCmdBackgroundChanged(wxCommandEvent & event);
void OnCmdCrosshairChanged(wxCommandEvent & event);
void OnCmdReferenceLineChanged(wxCommandEvent & event);
};
class WmsCatalogObject:public wxTreeItemData
{
//
// a class to store TreeItemData - WMS Catalog wrapper
//
private:
rl2WmsLayerPtr LayerHandle;
const char *LayerName;
public:
WmsCatalogObject(const char *lyr)
{
LayerHandle = NULL;
LayerName = lyr;
}
WmsCatalogObject(rl2WmsLayerPtr handle, const char *lyr)
{
LayerHandle = handle;
LayerName = lyr;
}
virtual ~ WmsCatalogObject()
{;
}
rl2WmsLayerPtr GetHandle()
{
return LayerHandle;
}
const char *GetLayerName()
{
return LayerName;
}
};
class WmsCatalogTree:public wxTreeCtrl
{
//
// a tree-control used for WMS Service Layers
//
private:
class WmsDialog * MainDialog;
wxTreeItemId Root; // the root node
wxImageList *Images; // the images list
wxTreeItemId CurrentItem; // the tree item holding the current context menu
void ExpandChildren(wxTreeItemId item, rl2WmsLayerPtr handle);
public:
WmsCatalogTree()
{;
}
WmsCatalogTree(WmsDialog * parent, wxSize sz, wxWindowID id = wxID_ANY);
virtual ~ WmsCatalogTree();
void FlushAll()
{
DeleteAllItems();
Root = wxTreeItemId();
}
void AddLayer(rl2WmsLayerPtr handle, const char *layer);
void AddTiledRoot(const char *name);
void AddLayer(wxTreeItemId parent, rl2WmsLayerPtr handle, const char *layer);
void SetLayerIcons();
void MarkCurrentItem();
void RootAutoSelect(void);
void OnSelChanged(wxTreeEvent & event);
void OnCmdShowAll(wxCommandEvent & event);
void OnCmdHideAll(wxCommandEvent & event);
};
class WmsDialog:public wxDialog
{
//
// a dialog for selecting a WMS datasource
//
private:
MyFrame * MainFrame;
wxString URL;
WmsCatalogTree *WmsTree;
rl2WmsCatalogPtr Catalog;
rl2WmsLayerPtr CurrentLayer;
int MaxWidth;
int MaxHeight;
char *Version;
int SwapXY;
bool ProxyEnabled;
wxString HttpProxy;
char *NormalizeUrl(const char *url);
void DestroyNormalizedUrl(char *url);
public:
WmsDialog()
{
Catalog = NULL;
WmsTree = NULL;
Version = NULL;
CurrentLayer = NULL;
ProxyEnabled = false;
}
virtual ~ WmsDialog()
{
if (Catalog != NULL)
destroy_wms_catalog(Catalog);
if (Version != NULL)
delete[]Version;
}
bool Create(MyFrame * parent, wxString & proxy);
void CreateControls();
void SelectLayer(void);
void SelectLayer(rl2WmsLayerPtr layer);
int IsTiled();
int GetTileWidth();
int GetTileHeight();
rl2WmsLayerPtr GetLayerHandle()
{
return CurrentLayer;
}
int IsQueryable()
{
if (is_wms_layer_queryable(CurrentLayer) > 0)
return 1;
return 0;
}
int IsOpaque();
wxString & GetURL()
{
return URL;
}
const char *GetServiceVersion()
{
return get_wms_version(Catalog);
}
const char *GetServiceName()
{
return get_wms_name(Catalog);
}
const char *GetServiceTitle()
{
return get_wms_title(Catalog);
}
const char *GetServiceAbstract()
{
return get_wms_abstract(Catalog);
}
const char *GetURL_GetMap_Get()
{
return get_wms_url_GetMap_get(Catalog);
}
const char *GetURL_GetMap_Post()
{
return get_wms_url_GetMap_post(Catalog);
}
const char *GetURL_GetFeatureInfo_Get()
{
return get_wms_url_GetFeatureInfo_get(Catalog);
}
const char *GetURL_GetFeatureInfo_Post()
{
return get_wms_url_GetFeatureInfo_post(Catalog);
}
const char *GetGmlMimeType()
{
return get_wms_gml_mime_type(Catalog);
}
const char *GetXmlMimeType()
{
return get_wms_xml_mime_type(Catalog);
}
const char *GetContactPerson()
{
return get_wms_contact_person(Catalog);
}
const char *GetContactOrganization()
{
return get_wms_contact_organization(Catalog);
}
const char *GetContactPosition()
{
return get_wms_contact_position(Catalog);
}
const char *GetPostalAddress()
{
return get_wms_contact_postal_address(Catalog);
}
const char *GetCity()
{
return get_wms_contact_city(Catalog);
}
const char *GetStateProvince()
{
return get_wms_contact_state_province(Catalog);
}
const char *GetPostCode()
{
return get_wms_contact_post_code(Catalog);
}
const char *GetCountry()
{
return get_wms_contact_country(Catalog);
}
const char *GetVoiceTelephone()
{
return get_wms_contact_voice_telephone(Catalog);
}
const char *GetFaxTelephone()
{
return get_wms_contact_fax_telephone(Catalog);
}
const char *GetEMailAddress()
{
return get_wms_contact_email_address(Catalog);
}
const char *GetFees()
{
return get_wms_fees(Catalog);
}
const char *GetAccessConstraints()
{
return get_wms_access_constraints(Catalog);
}
int GetLayerLimit()
{
return get_wms_layer_limit(Catalog);
}
int GetMaxWidth()
{
return get_wms_max_width(Catalog);
}
int GetMaxHeight()
{
return get_wms_max_height(Catalog);
}
const char *GetName()
{
return get_wms_layer_name(CurrentLayer);
}
const char *GetTitle()
{
return get_wms_layer_title(CurrentLayer);
}
const char *GetAbstract()
{
return get_wms_layer_abstract(CurrentLayer);
}
const char *GetVersion();
const char *GetStyleName();
const char *GetStyleTitle();
const char *GetStyleAbstract();
const char *GetFormat();
const char *GetCRS();
int IsSwapXY()
{
return SwapXY;
}
double GetMinX();
double GetMaxX();
double GetMinY();
double GetMaxY();
double GetGeoMinX();
double GetGeoMaxX();
double GetGeoMinY();
double GetGeoMaxY();
double GetMinScaleDenominator()
{
return get_wms_layer_min_scale_denominator(CurrentLayer);
}
double GetMaxScaleDenominator()
{
return get_wms_layer_max_scale_denominator(CurrentLayer);
}
int CountFormats()
{
return get_wms_format_count(Catalog, 1);
}
const char *GetFormatByIndex(int idx)
{
return get_wms_format(Catalog, idx, 1);
}
int CountStyles()
{
return get_wms_layer_style_count(CurrentLayer);
}
bool GetStyleByIndex(int idx, const char **name, const char **title,
const char **abstract);
int CountCRS()
{
return get_wms_layer_crs_count(CurrentLayer);
}
const char *GetCrsByIndex(int idx)
{
return get_wms_layer_crs(CurrentLayer, idx);
}
wxString & GetHttpProxy()
{
return HttpProxy;
}
void PrepareCatalog(void);
void UpdateSwapXY(void);
void OnProxy(wxCommandEvent & event);
void OnCrsChanged(wxCommandEvent & event);
void OnVersionChanged(wxCommandEvent & event);
void OnSwapXYChanged(wxCommandEvent & event);
void OnTiledChanged(wxCommandEvent & event);
void OnCatalog(wxCommandEvent & event);
void OnReset(wxCommandEvent & event);
void OnWmsServer(wxCommandEvent & event);
void OnWmsOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class WmsServersDialog:public wxDialog
{
//
// a dialog for selecting a registered WMS server
//
private:
MyFrame * MainFrame;
wxListBox *WmsServers;
wxString URL;
int Count;
wxString *List;
void PopulateList();
public:
WmsServersDialog()
{;
}
virtual ~ WmsServersDialog()
{
if (List != NULL)
delete[]List;
}
bool Create(MyFrame * grandparent);
void CreateControls();
wxString & GetURL()
{
return URL;
}
void OnUrlSelected(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class WmsLayerDialog:public wxDialog
{
//
// a dialog for selecting a registered WMS layer
//
private:
MyFrame * MainFrame;
int CurrentEvtRow;
int CurrentEvtColumn;
wxGrid *WmsLayers;
wxString URL;
wxString LayerName;
int Count;
wxString *ListUrl;
wxString *ListLayer;
void PopulateList();
public:
WmsLayerDialog()
{;
}
virtual ~ WmsLayerDialog()
{
if (ListUrl != NULL)
delete[]ListUrl;
if (ListLayer != NULL)
delete[]ListLayer;
}
bool Create(MyFrame * parent);
void CreateControls();
wxString & GetURL()
{
return URL;
}
wxString & GetLayerName()
{
return LayerName;
}
void SelectWmsLayer();
void OnLeftClick(wxGridEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class WmsLayerUnregisterDialog:public wxDialog
{
//
// a dialog supporting Unregister WMS Layer
//
private:
MyFrame * MainFrame;
wxString URL;
wxString LayerName;
wxString Title;
wxString Abstract;
wxString Copyright;
wxString DataLicense;
public:
WmsLayerUnregisterDialog()
{;
}
bool Create(MyFrame * parent, wxString & url, wxString & name,
wxString & title, wxString & abstract, wxString & copyright,
wxString & data_license);
virtual ~ WmsLayerUnregisterDialog()
{;
}
void CreateControls();
bool DoWmsLayerUnregister(void);
void OnOk(wxCommandEvent & event);
};
class WmsLayerInfosDialog:public wxDialog
{
//
// a dialog for editing Vector Coverage Data
//
private:
MyFrame * MainFrame;
wxString URL;
wxString LayerName;
wxString Title;
wxString Abstract;
wxString Copyright;
int LicenseID;
wxString DataLicense;
wxString GetFeatureInfoUrl;
bool IsQueryable;
void DoUpdateWmsLayer();
void PopulateDataLicenses(wxComboBox * licenseCtrl);
public:
WmsLayerInfosDialog()
{;
}
bool Create(MyFrame * parent, wxString & url, wxString & name,
wxString & title, wxString & abstract, wxString & copyright,
int license_id, bool is_queryable, wxString & getfeatureinfo_url);
virtual ~ WmsLayerInfosDialog()
{;
}
void CreateControls();
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
void OnQueryableChanged(wxCommandEvent & event);
};
class WmsLayerConfigDialog:public wxDialog
{
//
// a dialog for configuring a WMS Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
class MapLayer *Layer;
wxString Url;
wxString InfoUrl;
wxString DbPrefix;
wxString LayerName;
char *Version;
char *MaxVersion;
char *RefSys;
char *Style;
char *ImageFormat;
char *BgColor;
bool BgColorEnabled;
int Opaque;
int SwapXY;
int Cached;
int Tiled;
int TileWidth;
int TileHeight;
bool IsBBoxChanged;
bool IsConfigChanged;
void GetButtonBitmap(const char *color, wxBitmap & bmp);
void ParseBgColor(const char *color, unsigned char *red, unsigned char *green,
unsigned char *blue);
unsigned char ParseHex(const char *byte);
void DoConfigureWmsLayer();
void DoConfigureMapLayer();
public:
WmsLayerConfigDialog()
{;
}
virtual ~ WmsLayerConfigDialog();
bool Create(MyFrame * parent, wxString url, wxString layer);
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void LoadData();
void InitData();
void FindMaxVersion();
void PopulateRefSys(wxComboBox * crsList);
void PopulateImageFormats(wxComboBox * fmtList);
void PopulateStyles(wxComboBox * stlList);
void UpdateSwapXY(void);
bool BBoxChanged()
{
return IsBBoxChanged;
}
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnCrsChanged(wxCommandEvent & event);
void OnVersionChanged(wxCommandEvent & event);
void OnSwapXYChanged(wxCommandEvent & event);
void OnCachedChanged(wxCommandEvent & event);
void OnTiledChanged(wxCommandEvent & event);
void OnBgColorEnabledChanged(wxCommandEvent & event);
void OnBgColorChanged(wxCommandEvent & event);
void OnWmsOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class RasterLayerConfigDialog:public wxDialog
{
//
// a dialog for configuring a Raster Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
int Srid;
char *Style;
bool IsBBoxChanged;
bool IsConfigChanged;
void DoConfigureMapLayer();
public:
RasterLayerConfigDialog()
{;
}
virtual ~ RasterLayerConfigDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
void PopulateSRIDs(wxComboBox * sridList);
void PopulateStyles(wxComboBox * stlList);
bool BBoxChanged()
{
return IsBBoxChanged;
}
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class VectorLayerConfigDialog:public wxDialog
{
//
// a dialog for configuring a Vector Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
int Srid;
int GeometryType;
char *Style;
bool IsBBoxChanged;
bool IsConfigChanged;
void DoConfigureMapLayer();
public:
VectorLayerConfigDialog()
{;
}
virtual ~ VectorLayerConfigDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
int DoGuessVectorLayerType();
void PopulateSRIDs(wxComboBox * sridList);
void PopulateViewSRIDs(wxComboBox * sridList);
void PopulateVirtualTableSRIDs(wxComboBox * sridList);
void PopulateStyles(wxComboBox * stlList);
bool BBoxChanged()
{
return IsBBoxChanged;
}
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class VectorSqlSampleDialog:public wxDialog
{
//
// a dialog for configuring an SQL Map Request
// based on some Vector Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
char *Style;
wxColour BgColor;
wxString Sql;
void GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp);
void DoUpdateSql();
public:
VectorSqlSampleDialog()
{;
}
virtual ~ VectorSqlSampleDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
void PopulateStyles(wxComboBox * stlList);
void OnStyleChanged(wxCommandEvent & event);
void OnMimeTypeChanged(wxCommandEvent & event);
void OnQualityChanged(wxCommandEvent & event);
void OnTransparentChanged(wxCommandEvent & event);
void OnBackgroundChanged(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class RasterSqlSampleDialog:public wxDialog
{
//
// a dialog for configuring an SQL Map Request
// based on some Raster Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
char *Style;
wxColour BgColor;
wxString Sql;
void GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp);
void DoUpdateSql();
public:
RasterSqlSampleDialog()
{;
}
virtual ~ RasterSqlSampleDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
void PopulateStyles(wxComboBox * stlList);
void OnStyleChanged(wxCommandEvent & event);
void OnMimeTypeChanged(wxCommandEvent & event);
void OnQualityChanged(wxCommandEvent & event);
void OnTransparentChanged(wxCommandEvent & event);
void OnBackgroundChanged(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class WmsSqlSampleDialog:public wxDialog
{
//
// a dialog for configuring an SQL Map Request
// based on some WMS Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
bool RequestURL;
wxString Url;
wxString DbPrefix;
wxString LayerName;
char *Version;
char *MaxVersion;
char *Style;
char *ImageFormat;
char *BgColor;
int Transparent;
wxString Sql;
void GetButtonBitmap(const char *color, wxBitmap & bmp);
void ParseBgColor(const char *color, unsigned char *red, unsigned char *green,
unsigned char *blue);
unsigned char ParseHex(const char *byte);
void DoUpdateSql();
void DoUpdateUrl();
int CheckMarker(wxString & url);
int DoQueryWmsCoverage(const char *db_prefix, const char *cvg_name, int srid,
char **url, int *swap_axes);
public:
WmsSqlSampleDialog()
{;
}
virtual ~ WmsSqlSampleDialog();
bool Create(MyMapPanel * parent, MapLayer * layer, bool request_url = false);
void CreateControls();
void InitData();
void FindMaxVersion();
void PopulateImageFormats(wxComboBox * fmtList);
void PopulateStyles(wxComboBox * stlList);
void OnStyleChanged(wxCommandEvent & event);
void OnMimeTypeChanged(wxCommandEvent & event);
void OnVersionChanged(wxCommandEvent & event);
void OnTransparentChanged(wxCommandEvent & event);
void OnBgColorChanged(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class TopologyLayerConfigDialog:public wxDialog
{
//
// a dialog for configuring a TopoGeo Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
int Srid;
char *Style;
bool IsBBoxChanged;
bool IsConfigChanged;
void DoConfigureMapLayer();
public:
TopologyLayerConfigDialog()
{;
}
virtual ~ TopologyLayerConfigDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
void PopulateSRIDs(wxComboBox * sridList);
void PopulateStyles(wxComboBox * stlList);
bool BBoxChanged()
{
return IsBBoxChanged;
}
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class NetworkLayerConfigDialog:public wxDialog
{
//
// a dialog for configuring a TopoNet Layer
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
int Srid;
char *Style;
bool IsBBoxChanged;
bool IsConfigChanged;
void DoConfigureMapLayer();
public:
NetworkLayerConfigDialog()
{;
}
virtual ~ NetworkLayerConfigDialog()
{
if (Style != NULL)
free(Style);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateControls();
void InitData();
void PopulateSRIDs(wxComboBox * sridList);
void PopulateStyles(wxComboBox * stlList);
bool BBoxChanged()
{
return IsBBoxChanged;
}
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
};
class QuickStyleObj
{
//
// a class wrapping a Quick Style
//
private:
char UUID[64];
int Type;
bool MinScaleEnabled;
bool MaxScaleEnabled;
double ScaleMin;
double ScaleMax;
double SymbolOpacity;
double SymbolSize;
double SymbolRotation;
double SymbolAnchorX;
double SymbolAnchorY;
double SymbolDisplacementX;
double SymbolDisplacementY;
int SymbolWellKnownMark;
char SymbolFillColor[8];
char SymbolStrokeColor[8];
double LineOpacity;
double LinePerpendicularOffset;
double LineStrokeWidth;
char LineStrokeColor[8];
int LineDotStyle;
bool Line2Enabled;
double Line2StrokeWidth;
char Line2StrokeColor[8];
int Line2DotStyle;
bool PolygonFill;
bool PolygonStroke;
double PolygonDisplacementX;
double PolygonDisplacementY;
double PolygonPerpendicularOffset;
double PolygonFillOpacity;
char PolygonFillColor[8];
bool PolygonSolidFill;
int PolygonFillBrushId;
double PolygonStrokeOpacity;
double PolygonStrokeWidth;
char PolygonStrokeColor[8];
bool LabelPrint;
bool DontPaintGeomSymbolizer;
bool LabelLinePlacement;
char *LabelColumn;
char *FontFacename;
double FontSize;
int FontStyle;
int FontWeight;
double FontOpacity;
char FontColor[8];
bool HasHalo;
double HaloRadius;
char HaloColor[8];
double HaloOpacity;
double LabelAnchorX;
double LabelAnchorY;
double LabelDisplacementX;
double LabelDisplacementY;
double LabelRotation;
double LabelPerpendicularOffset;
bool RepeatedLabel;
double LabelInitialGap;
double LabelGap;
bool LabelIsAligned;
bool LabelGeneralizeLine;
char *XmlStyle;
char *DoCreateFeatureTypeXML();
char *DoCreateSymbolizerXML(bool subordered);
char *DoCreatePointSymbolizerXML(bool subordered);
char *DoCreateLineSymbolizerXML(bool subordered);
char *DoCreatePolygonSymbolizerXML(bool subordered);
char *DoCreateTextPointSymbolizerXML();
char *DoCreateTextLineSymbolizerXML();
public:
QuickStyleObj(int Type);
~QuickStyleObj()
{
if (LabelColumn)
free(LabelColumn);
if (FontFacename)
free(FontFacename);
if (XmlStyle)
sqlite3_free(XmlStyle);
}
QuickStyleObj *Clone();
bool Compare(QuickStyleObj * style);
const char *GetUUID()
{
return UUID;
}
int GetType()
{
return Type;
}
void EnableMinScale(bool mode)
{
MinScaleEnabled = mode;
}
bool IsMinScaleEnabled()
{
return MinScaleEnabled;
}
void EnableMaxScale(bool mode)
{
MaxScaleEnabled = mode;
}
bool IsMaxScaleEnabled()
{
return MaxScaleEnabled;
}
void SetScaleMin(double x)
{
ScaleMin = x;
}
double GetScaleMin()
{
return ScaleMin;
}
void SetScaleMax(double x)
{
ScaleMax = x;
}
double GetScaleMax()
{
return ScaleMax;
}
void SetSymbolOpacity(double x)
{
SymbolOpacity = x;
}
double GetSymbolOpacity()
{
return SymbolOpacity;
}
void SetSymbolSize(double x)
{
SymbolSize = x;
}
double GetSymbolSize()
{
return SymbolSize;
}
void SetSymbolRotation(double x)
{
SymbolRotation = x;
}
double GetSymbolRotation()
{
return SymbolRotation;
}
void SetSymbolAnchorX(double x)
{
SymbolAnchorX = x;
}
double GetSymbolAnchorX()
{
return SymbolAnchorX;
}
void SetSymbolAnchorY(double x)
{
SymbolAnchorY = x;
}
double GetSymbolAnchorY()
{
return SymbolAnchorY;
}
void SetSymbolDisplacementX(double x)
{
SymbolDisplacementX = x;
}
double GetSymbolDisplacementX()
{
return SymbolDisplacementX;
}
void SetSymbolDisplacementY(double x)
{
SymbolDisplacementY = x;
}
double GetSymbolDisplacementY()
{
return SymbolDisplacementY;
}
void SetSymbolWellKnownMark(int x)
{
SymbolWellKnownMark = x;
}
int GetSymbolWellKnownMark()
{
return SymbolWellKnownMark;
}
void SetSymbolFillColor(const char *x)
{
strcpy(SymbolFillColor, x);
}
const char *GetSymbolFillColor()
{
return SymbolFillColor;
}
void SetSymbolStrokeColor(const char *x)
{
strcpy(SymbolStrokeColor, x);
}
const char *GetSymbolStrokeColor()
{
return SymbolStrokeColor;
}
void SetLineOpacity(double x)
{
LineOpacity = x;
}
double GetLineOpacity()
{
return LineOpacity;
}
void SetLinePerpendicularOffset(double x)
{
LinePerpendicularOffset = x;
}
double GetLinePerpendicularOffset()
{
return LinePerpendicularOffset;
}
void SetLineStrokeWidth(double x)
{
LineStrokeWidth = x;
}
double GetLineStrokeWidth()
{
return LineStrokeWidth;
}
void SetLineStrokeColor(const char *x)
{
strcpy(LineStrokeColor, x);
}
const char *GetLineStrokeColor()
{
return LineStrokeColor;
}
void SetLineDotStyle(int x)
{
LineDotStyle = x;
}
int GetLineDotStyle()
{
return LineDotStyle;
}
void SetLine2Enabled(bool x)
{
Line2Enabled = x;
}
bool IsLine2Enabled()
{
return Line2Enabled;
}
void SetLine2StrokeWidth(double x)
{
Line2StrokeWidth = x;
}
double GetLine2StrokeWidth()
{
return Line2StrokeWidth;
}
void SetLine2StrokeColor(const char *x)
{
strcpy(Line2StrokeColor, x);
}
const char *GetLine2StrokeColor()
{
return Line2StrokeColor;
}
void SetLine2DotStyle(int x)
{
Line2DotStyle = x;
}
int GetLine2DotStyle()
{
return Line2DotStyle;
}
void SetPolygonFill(bool x)
{
PolygonFill = x;
}
bool IsPolygonFill()
{
return PolygonFill;
}
void SetPolygonStroke(bool x)
{
PolygonStroke = x;
}
bool IsPolygonStroke()
{
return PolygonStroke;
}
void SetPolygonDisplacementX(double x)
{
PolygonDisplacementX = x;
}
double GetPolygonDisplacementX()
{
return PolygonDisplacementX;
}
void SetPolygonDisplacementY(double x)
{
PolygonDisplacementY = x;
}
double GetPolygonDisplacementY()
{
return PolygonDisplacementY;
}
void SetPolygonPerpendicularOffset(double x)
{
PolygonPerpendicularOffset = x;
}
double GetPolygonPerpendicularOffset()
{
return PolygonPerpendicularOffset;
}
void SetPolygonFillOpacity(double x)
{
PolygonFillOpacity = x;
}
double GetPolygonFillOpacity()
{
return PolygonFillOpacity;
}
void SetPolygonFillColor(const char *x)
{
strcpy(PolygonFillColor, x);
}
const char *GetPolygonFillColor()
{
return PolygonFillColor;
}
void SetPolygonSolidFill(bool mode)
{
PolygonSolidFill = mode;
}
bool IsPolygonSolidFill()
{
return PolygonSolidFill;
}
void SetPolygonFillBrushId(int brush_id)
{
PolygonFillBrushId = brush_id;
}
int GetPolygonFillBrushId()
{
return PolygonFillBrushId;
}
void SetPolygonStrokeOpacity(double x)
{
PolygonStrokeOpacity = x;
}
double GetPolygonStrokeOpacity()
{
return PolygonStrokeOpacity;
}
void SetPolygonStrokeWidth(double x)
{
PolygonStrokeWidth = x;
}
double GetPolygonStrokeWidth()
{
return PolygonStrokeWidth;
}
void SetPolygonStrokeColor(const char *x)
{
strcpy(PolygonStrokeColor, x);
}
const char *GetPolygonStrokeColor()
{
return PolygonStrokeColor;
}
void SetLabelPrint(bool mode)
{
LabelPrint = mode;
}
bool IsLabelPrint()
{
return LabelPrint;
}
void SetDontPaintGeomSymbolizer(bool mode)
{
DontPaintGeomSymbolizer = mode;
}
bool IsDontPaintGeomSymbolizer()
{
return DontPaintGeomSymbolizer;
}
void SetLabelLinePlacement(bool mode)
{
LabelLinePlacement = mode;
}
bool IsLabelLinePlacement()
{
return LabelLinePlacement;
}
void SetLabelColumn(const char *x);
const char *GetLabelColumn()
{
return LabelColumn;
}
void SetFontFacename(const char *x);
const char *GetFontFacename()
{
return FontFacename;
}
void SetFontSize(double x)
{
FontSize = x;
}
double GetFontSize()
{
return FontSize;
}
void SetFontStyle(int x)
{
FontStyle = x;
}
int GetFontStyle()
{
return FontStyle;
}
void SetFontWeight(int x)
{
FontWeight = x;
}
int GetFontWeight()
{
return FontWeight;
}
void SetFontOpacity(double x)
{
FontOpacity = x;
}
double GetFontOpacity()
{
return FontOpacity;
}
void SetFontColor(const char *x)
{
strcpy(FontColor, x);
}
const char *GetFontColor()
{
return FontColor;
}
bool IsHaloEnabled()
{
return HasHalo;
}
void EnableHalo(bool mode)
{
HasHalo = mode;
}
double GetHaloRadius()
{
return HaloRadius;
}
void SetHaloRadius(double x)
{
HaloRadius = x;
}
const char *GetHaloColor()
{
return HaloColor;
}
void SetHaloColor(const char *x)
{
strcpy(HaloColor, x);
}
double GetHaloOpacity()
{
return HaloOpacity;
}
void SetHaloOpacity(double x)
{
HaloOpacity = x;
}
void SetLabelRotation(double x)
{
LabelRotation = x;
}
double GetLabelRotation()
{
return LabelRotation;
}
void SetLabelAnchorX(double x)
{
LabelAnchorX = x;
}
double GetLabelAnchorX()
{
return LabelAnchorX;
}
void SetLabelAnchorY(double x)
{
LabelAnchorY = x;
}
double GetLabelAnchorY()
{
return LabelAnchorY;
}
void SetLabelDisplacementX(double x)
{
LabelDisplacementX = x;
}
double GetLabelDisplacementX()
{
return LabelDisplacementX;
}
void SetLabelDisplacementY(double x)
{
LabelDisplacementY = x;
}
double GetLabelDisplacementY()
{
return LabelDisplacementY;
}
void SetLabelPerpendicularOffset(double x)
{
LabelPerpendicularOffset = x;
}
double GetLabelPerpendicularOffset()
{
return LabelPerpendicularOffset;
}
void SetRepeatedLabel(bool mode)
{
RepeatedLabel = mode;
}
bool IsRepeatedLabel()
{
return RepeatedLabel;
}
void SetLabelInitialGap(double x)
{
LabelInitialGap = x;
}
double GetLabelInitialGap()
{
return LabelInitialGap;
}
void SetLabelGap(double x)
{
LabelGap = x;
}
double GetLabelGap()
{
return LabelGap;
}
void SetLabelIsAligned(bool mode)
{
LabelIsAligned = mode;
}
bool IsLabelAligned()
{
return LabelIsAligned;
}
void SetLabelGeneralizeLine(bool mode)
{
LabelGeneralizeLine = mode;
}
bool IsLabelGeneralizeLine()
{
return LabelGeneralizeLine;
}
char *CreateXmlStyle();
void UpdateXmlStyle();
const char *GetXmlStyle()
{
return XmlStyle;
}
unsigned char *CloneXmlStyle();
static int RandomWellKnownMark();
static void RandomColor(char *color);
static void DoGetUUID(char *uuid);
};
class QuickStyleTopologyObj
{
//
// a class wrapping a Quick Style - Topology
//
private:
char UUID[64];
int Type;
bool MinScaleEnabled;
bool MaxScaleEnabled;
double ScaleMin;
double ScaleMax;
double NodeOpacity;
double NodeSize;
double NodeRotation;
double NodeAnchorX;
double NodeAnchorY;
double NodeDisplacementX;
double NodeDisplacementY;
int NodeWellKnownMark;
char NodeFillColor[8];
char NodeStrokeColor[8];
double EdgeLinkOpacity;
double EdgeLinkPerpendicularOffset;
double EdgeLinkStrokeWidth;
char EdgeLinkStrokeColor[8];
int EdgeLinkDotStyle;
bool FaceFill;
bool FaceStroke;
double FaceDisplacementX;
double FaceDisplacementY;
double FacePerpendicularOffset;
double FaceFillOpacity;
char FaceFillColor[8];
double FaceStrokeOpacity;
double FaceStrokeWidth;
char FaceStrokeColor[8];
double EdgeLinkSeedOpacity;
double EdgeLinkSeedSize;
double EdgeLinkSeedRotation;
double EdgeLinkSeedAnchorX;
double EdgeLinkSeedAnchorY;
double EdgeLinkSeedDisplacementX;
double EdgeLinkSeedDisplacementY;
int EdgeLinkSeedWellKnownMark;
char EdgeLinkSeedFillColor[8];
char EdgeLinkSeedStrokeColor[8];
double FaceSeedOpacity;
double FaceSeedSize;
double FaceSeedRotation;
double FaceSeedAnchorX;
double FaceSeedAnchorY;
double FaceSeedDisplacementX;
double FaceSeedDisplacementY;
int FaceSeedWellKnownMark;
char FaceSeedFillColor[8];
char FaceSeedStrokeColor[8];
char *XmlStyle;
public:
QuickStyleTopologyObj(int Type);
~QuickStyleTopologyObj()
{
if (XmlStyle)
sqlite3_free(XmlStyle);
}
QuickStyleTopologyObj *Clone();
bool Compare(QuickStyleTopologyObj * style);
const char *GetUUID()
{
return UUID;
}
int GetType()
{
return Type;
}
char *DoCreateFaceXML(const char *indent, const char *prefix);
char *DoCreateFaceXML(const char *indent);
char *DoCreateEdgeLinkXML(const char *indent, const char *prefix);
char *DoCreateEdgeLinkXML(const char *indent);
char *DoCreateNodeXML(const char *indent, const char *prefix);
char *DoCreateNodeXML(const char *indent);
char *DoCreateEdgeLinkSeedXML(const char *indent, const char *prefix);
char *DoCreateEdgeLinkSeedXML(const char *indent);
char *DoCreateFaceSeedXML(const char *indent, const char *prefix);
char *DoCreateFaceSeedXML(const char *indent);
void EnableMinScale(bool mode)
{
MinScaleEnabled = mode;
}
bool IsMinScaleEnabled()
{
return MinScaleEnabled;
}
void EnableMaxScale(bool mode)
{
MaxScaleEnabled = mode;
}
bool IsMaxScaleEnabled()
{
return MaxScaleEnabled;
}
void SetScaleMin(double x)
{
ScaleMin = x;
}
double GetScaleMin()
{
return ScaleMin;
}
void SetScaleMax(double x)
{
ScaleMax = x;
}
double GetScaleMax()
{
return ScaleMax;
}
void SetNodeOpacity(double x)
{
NodeOpacity = x;
}
double GetNodeOpacity()
{
return NodeOpacity;
}
void SetNodeSize(double x)
{
NodeSize = x;
}
double GetNodeSize()
{
return NodeSize;
}
void SetNodeRotation(double x)
{
NodeRotation = x;
}
double GetNodeRotation()
{
return NodeRotation;
}
void SetNodeAnchorX(double x)
{
NodeAnchorX = x;
}
double GetNodeAnchorX()
{
return NodeAnchorX;
}
void SetNodeAnchorY(double x)
{
NodeAnchorY = x;
}
double GetNodeAnchorY()
{
return NodeAnchorY;
}
void SetNodeDisplacementX(double x)
{
NodeDisplacementX = x;
}
double GetNodeDisplacementX()
{
return NodeDisplacementX;
}
void SetNodeDisplacementY(double x)
{
NodeDisplacementY = x;
}
double GetNodeDisplacementY()
{
return NodeDisplacementY;
}
void SetNodeWellKnownMark(int x)
{
NodeWellKnownMark = x;
}
int GetNodeWellKnownMark()
{
return NodeWellKnownMark;
}
void SetNodeFillColor(const char *x)
{
strcpy(NodeFillColor, x);
}
const char *GetNodeFillColor()
{
return NodeFillColor;
}
void SetNodeStrokeColor(const char *x)
{
strcpy(NodeStrokeColor, x);
}
const char *GetNodeStrokeColor()
{
return NodeStrokeColor;
}
void SetEdgeLinkOpacity(double x)
{
EdgeLinkOpacity = x;
}
double GetEdgeLinkOpacity()
{
return EdgeLinkOpacity;
}
void SetEdgeLinkPerpendicularOffset(double x)
{
EdgeLinkPerpendicularOffset = x;
}
double GetEdgeLinkPerpendicularOffset()
{
return EdgeLinkPerpendicularOffset;
}
void SetEdgeLinkStrokeWidth(double x)
{
EdgeLinkStrokeWidth = x;
}
double GetEdgeLinkStrokeWidth()
{
return EdgeLinkStrokeWidth;
}
void SetEdgeLinkStrokeColor(const char *x)
{
strcpy(EdgeLinkStrokeColor, x);
}
const char *GetEdgeLinkStrokeColor()
{
return EdgeLinkStrokeColor;
}
void SetEdgeLinkDotStyle(int x)
{
EdgeLinkDotStyle = x;
}
int GetEdgeLinkDotStyle()
{
return EdgeLinkDotStyle;
}
void SetFaceFill(bool x)
{
FaceFill = x;
}
bool IsFaceFill()
{
return FaceFill;
}
void SetFaceStroke(bool x)
{
FaceStroke = x;
}
bool IsFaceStroke()
{
return FaceStroke;
}
void SetFaceDisplacementX(double x)
{
FaceDisplacementX = x;
}
double GetFaceDisplacementX()
{
return FaceDisplacementX;
}
void SetFaceDisplacementY(double x)
{
FaceDisplacementY = x;
}
double GetFaceDisplacementY()
{
return FaceDisplacementY;
}
void SetFacePerpendicularOffset(double x)
{
FacePerpendicularOffset = x;
}
double GetFacePerpendicularOffset()
{
return FacePerpendicularOffset;
}
void SetFaceFillOpacity(double x)
{
FaceFillOpacity = x;
}
double GetFaceFillOpacity()
{
return FaceFillOpacity;
}
void SetFaceFillColor(const char *x)
{
strcpy(FaceFillColor, x);
}
const char *GetFaceFillColor()
{
return FaceFillColor;
}
void SetFaceStrokeOpacity(double x)
{
FaceStrokeOpacity = x;
}
double GetFaceStrokeOpacity()
{
return FaceStrokeOpacity;
}
void SetFaceStrokeWidth(double x)
{
FaceStrokeWidth = x;
}
double GetFaceStrokeWidth()
{
return FaceStrokeWidth;
}
void SetFaceStrokeColor(const char *x)
{
strcpy(FaceStrokeColor, x);
}
const char *GetFaceStrokeColor()
{
return FaceStrokeColor;
}
void SetEdgeLinkSeedOpacity(double x)
{
EdgeLinkSeedOpacity = x;
}
double GetEdgeLinkSeedOpacity()
{
return EdgeLinkSeedOpacity;
}
void SetEdgeLinkSeedSize(double x)
{
EdgeLinkSeedSize = x;
}
double GetEdgeLinkSeedSize()
{
return EdgeLinkSeedSize;
}
void SetEdgeLinkSeedRotation(double x)
{
EdgeLinkSeedRotation = x;
}
double GetEdgeLinkSeedRotation()
{
return EdgeLinkSeedRotation;
}
void SetEdgeLinkSeedAnchorX(double x)
{
EdgeLinkSeedAnchorX = x;
}
double GetEdgeLinkSeedAnchorX()
{
return EdgeLinkSeedAnchorX;
}
void SetEdgeLinkSeedAnchorY(double x)
{
EdgeLinkSeedAnchorY = x;
}
double GetEdgeLinkSeedAnchorY()
{
return EdgeLinkSeedAnchorY;
}
void SetEdgeLinkSeedDisplacementX(double x)
{
EdgeLinkSeedDisplacementX = x;
}
double GetEdgeLinkSeedDisplacementX()
{
return EdgeLinkSeedDisplacementX;
}
void SetEdgeLinkSeedDisplacementY(double x)
{
EdgeLinkSeedDisplacementY = x;
}
double GetEdgeLinkSeedDisplacementY()
{
return EdgeLinkSeedDisplacementY;
}
void SetEdgeLinkSeedWellKnownMark(int x)
{
EdgeLinkSeedWellKnownMark = x;
}
int GetEdgeLinkSeedWellKnownMark()
{
return EdgeLinkSeedWellKnownMark;
}
void SetEdgeLinkSeedFillColor(const char *x)
{
strcpy(EdgeLinkSeedFillColor, x);
}
const char *GetEdgeLinkSeedFillColor()
{
return EdgeLinkSeedFillColor;
}
void SetEdgeLinkSeedStrokeColor(const char *x)
{
strcpy(EdgeLinkSeedStrokeColor, x);
}
const char *GetEdgeLinkSeedStrokeColor()
{
return EdgeLinkSeedStrokeColor;
}
void SetFaceSeedOpacity(double x)
{
FaceSeedOpacity = x;
}
double GetFaceSeedOpacity()
{
return FaceSeedOpacity;
}
void SetFaceSeedSize(double x)
{
FaceSeedSize = x;
}
double GetFaceSeedSize()
{
return FaceSeedSize;
}
void SetFaceSeedRotation(double x)
{
FaceSeedRotation = x;
}
double GetFaceSeedRotation()
{
return FaceSeedRotation;
}
void SetFaceSeedAnchorX(double x)
{
FaceSeedAnchorX = x;
}
double GetFaceSeedAnchorX()
{
return FaceSeedAnchorX;
}
void SetFaceSeedAnchorY(double x)
{
FaceSeedAnchorY = x;
}
double GetFaceSeedAnchorY()
{
return FaceSeedAnchorY;
}
void SetFaceSeedDisplacementX(double x)
{
FaceSeedDisplacementX = x;
}
double GetFaceSeedDisplacementX()
{
return FaceSeedDisplacementX;
}
void SetFaceSeedDisplacementY(double x)
{
FaceSeedDisplacementY = x;
}
double GetFaceSeedDisplacementY()
{
return FaceSeedDisplacementY;
}
void SetFaceSeedWellKnownMark(int x)
{
FaceSeedWellKnownMark = x;
}
int GetFaceSeedWellKnownMark()
{
return FaceSeedWellKnownMark;
}
void SetFaceSeedFillColor(const char *x)
{
strcpy(FaceSeedFillColor, x);
}
const char *GetFaceSeedFillColor()
{
return FaceSeedFillColor;
}
void SetFaceSeedStrokeColor(const char *x)
{
strcpy(FaceSeedStrokeColor, x);
}
const char *GetFaceSeedStrokeColor()
{
return FaceSeedStrokeColor;
}
char *CreateXmlStyle();
void UpdateXmlStyle();
const char *GetXmlStyle()
{
return XmlStyle;
}
unsigned char *CloneXmlStyle();
};
class QuickStyleRasterObj
{
//
// a class wrapping a Quick Style - Raster
//
private:
char UUID[64];
bool MinScaleEnabled;
bool MaxScaleEnabled;
double ScaleMin;
double ScaleMax;
double Opacity;
bool Normalize;
bool Histogram;
bool Gamma;
double GammaValue;
bool TripleBand;
bool SingleBand;
unsigned char RedBand;
unsigned char GreenBand;
unsigned char BlueBand;
unsigned char GrayBand;
bool SrtmColorMap;
bool TerrainColorMap;
bool NdviColorMap;
bool ColorRamp;
double MinValue;
char MinValueColor[8];
double MaxValue;
char MaxValueColor[8];
bool ShadedRelief;
double ShadedReliefFactor;
char *XmlStyle;
char *DoCreateRasterXML();
public:
QuickStyleRasterObj();
~QuickStyleRasterObj()
{
if (XmlStyle)
sqlite3_free(XmlStyle);
}
static char *DoCreatePredefinedSrtmStyle(const char *indent);
static char *DoCreatePredefinedTerrainStyle(const char *indent);
static char *DoCreatePredefinedNdviStyle(const char *indent);
QuickStyleRasterObj *Clone();
bool Compare(QuickStyleRasterObj * style);
const char *GetUUID()
{
return UUID;
}
void EnableMinScale(bool mode)
{
MinScaleEnabled = mode;
}
bool IsMinScaleEnabled()
{
return MinScaleEnabled;
}
void EnableMaxScale(bool mode)
{
MaxScaleEnabled = mode;
}
bool IsMaxScaleEnabled()
{
return MaxScaleEnabled;
}
void SetScaleMin(double x)
{
ScaleMin = x;
}
double GetScaleMin()
{
return ScaleMin;
}
void SetScaleMax(double x)
{
ScaleMax = x;
}
double GetScaleMax()
{
return ScaleMax;
}
void SetOpacity(double x)
{
Opacity = x;
}
double GetOpacity()
{
return Opacity;
}
void SetNormalize(bool mode)
{
Normalize = mode;
}
bool IsNormalize()
{
return Normalize;
}
void SetHistogram(bool mode)
{
Histogram = mode;
}
bool IsHistogram()
{
return Histogram;
}
void SetGamma(bool mode)
{
Gamma = mode;
}
bool IsGamma()
{
return Gamma;
}
void SetGammaValue(double value)
{
GammaValue = value;
}
double GetGammaValue()
{
return GammaValue;
}
void SetTripleBand(bool mode)
{
TripleBand = mode;
}
bool IsTripleBand()
{
return TripleBand;
}
void SetSingleBand(bool mode)
{
SingleBand = mode;
}
bool IsSingleBand()
{
return SingleBand;
}
void SetRedBand(unsigned char red)
{
RedBand = red;
}
unsigned char GetRedBand()
{
return RedBand;
}
void SetGreenBand(unsigned char green)
{
GreenBand = green;
}
unsigned char GetGreenBand()
{
return GreenBand;
}
void SetBlueBand(unsigned char blue)
{
BlueBand = blue;
}
unsigned char GetBlueBand()
{
return BlueBand;
}
void SetGrayBand(unsigned char gray)
{
GrayBand = gray;
}
unsigned char GetGrayBand()
{
return GrayBand;
}
void SetSrtmColorMap(bool mode)
{
SrtmColorMap = mode;
}
bool IsSrtmColorMap()
{
return SrtmColorMap;
}
void SetTerrainColorMap(bool mode)
{
TerrainColorMap = mode;
}
bool IsTerrainColorMap()
{
return TerrainColorMap;
}
void SetNdviColorMap(bool mode)
{
NdviColorMap = mode;
}
bool IsNdviColorMap()
{
return NdviColorMap;
}
void SetColorRamp(bool mode)
{
ColorRamp = mode;
}
bool IsColorRamp()
{
return ColorRamp;
}
void SetMinValue(double x)
{
MinValue = x;
}
double GetMinValue()
{
return MinValue;
}
void SetMinValueColor(const char *x)
{
strcpy(MinValueColor, x);
}
const char *GetMinValueColor()
{
return MinValueColor;
}
void SetMaxValue(double x)
{
MaxValue = x;
}
double GetMaxValue()
{
return MaxValue;
}
void SetMaxValueColor(const char *x)
{
strcpy(MaxValueColor, x);
}
const char *GetMaxValueColor()
{
return MaxValueColor;
}
void SetShadedRelief(bool mode)
{
ShadedRelief = mode;
}
bool IsShadedRelief()
{
return ShadedRelief;
}
void SetShadedReliefFactor(double x)
{
ShadedReliefFactor = x;
}
double GetShadedReliefFactor()
{
return ShadedReliefFactor;
}
char *CreateXmlStyle();
void UpdateXmlStyle();
const char *GetXmlStyle()
{
return XmlStyle;
}
unsigned char *CloneXmlStyle();
};
class QuickStyleWmsObj
{
//
// a class wrapping a Quick Style - WMS
//
private:
char UUID[64];
bool MinScaleEnabled;
bool MaxScaleEnabled;
double ScaleMin;
double ScaleMax;
public:
QuickStyleWmsObj();
~QuickStyleWmsObj()
{;
}
QuickStyleWmsObj *Clone();
bool Compare(QuickStyleWmsObj * style);
const char *GetUUID()
{
return UUID;
}
void EnableMinScale(bool mode)
{
MinScaleEnabled = mode;
}
bool IsMinScaleEnabled()
{
return MinScaleEnabled;
}
void EnableMaxScale(bool mode)
{
MaxScaleEnabled = mode;
}
bool IsMaxScaleEnabled()
{
return MaxScaleEnabled;
}
void SetScaleMin(double x)
{
ScaleMin = x;
}
double GetScaleMin()
{
return ScaleMin;
}
void SetScaleMax(double x)
{
ScaleMax = x;
}
double GetScaleMax()
{
return ScaleMax;
}
};
class QuickStyleVectorDialog:public wxPropertySheetDialog
{
//
// a dialog for configuring a Quick Style (Vector)
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
int Type;
wxString DbPrefix;
wxString LayerName;
bool HasStandardBrushes;
bool HasStandardBrushHorz;
bool HasStandardBrushVert;
bool HasStandardBrushCross;
bool HasStandardBrushDiag1;
bool HasStandardBrushDiag2;
bool HasStandardBrushCrossDiag;
bool HasStandardBrushDots;
QuickStyleObj *Style;
bool IsConfigChanged;
int PagePointIndex;
int PageLineIndex;
int PagePolygonIndex;
int PageTextPointIndex;
int PageTextLineIndex;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreatePointPage(wxWindow * book);
wxPanel *CreateLinePage(wxWindow * book);
wxPanel *CreatePolygonPage(wxWindow * book);
wxPanel *CreateTextPointPage(wxWindow * book);
wxPanel *CreateTextLinePage(wxWindow * book);
bool RetrieveMainPage();
bool RetrievePointPage(bool check = true);
bool RetrieveLinePage(bool check = true);
bool RetrievePolygonPage(bool check = true);
bool RetrieveTextPointPage(bool check = true);
bool RetrieveTextLinePage(bool check = true);
void UpdateMainPage();
void UpdatePointPage();
void UpdateLinePage();
void UpdatePolygonPage();
void UpdateTextPointPage();
void UpdateTextLinePage();
bool DoCheckDatasource(const char *prefix, const char *coverage, char *table,
char *geometry);
void InitializeComboColumns(wxComboBox * ctrl);
void InitializeComboFonts(wxComboBox * ctrl);
bool UpdateStyle();
void CheckStandardBrushes();
public:
QuickStyleVectorDialog()
{;
}
virtual ~ QuickStyleVectorDialog()
{
if (Style != NULL)
delete Style;
}
bool Create(MyMapPanel * parent, MapLayer * layer, int type);
void CreateButtons();
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnQuit(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnApply(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdMarkChanged(wxCommandEvent & event);
void OnCmdPointColorStrokeChanged(wxCommandEvent & event);
void OnCmdPointColorStrokePicker(wxCommandEvent & event);
void OnCmdPointColorFillChanged(wxCommandEvent & event);
void OnCmdPointColorFillPicker(wxCommandEvent & event);
void OnCmdLineColorChanged(wxCommandEvent & event);
void OnCmdLineColorPicker(wxCommandEvent & event);
void OnCmdLine2ColorChanged(wxCommandEvent & event);
void OnCmdLine2ColorPicker(wxCommandEvent & event);
void OnCmdSecondStrokEnableChanged(wxCommandEvent & event);
void OnCmdPolygonStrokeChanged(wxCommandEvent & event);
void OnCmdPolygonFillChanged(wxCommandEvent & event);
void OnCmdPolygonColorStrokeChanged(wxCommandEvent & event);
void OnCmdPolygonColorStrokePicker(wxCommandEvent & event);
void OnCmdPolygonColorFillChanged(wxCommandEvent & event);
void OnCmdPolygonColorFillPicker(wxCommandEvent & event);
void OnCmdPolygonFillStyleChanged(wxCommandEvent & event);
void OnCmdPolygonFillBrushChanged(wxCommandEvent & event);
void OnCmdLabel1Changed(wxCommandEvent & event);
void OnCmdLabel2Changed(wxCommandEvent & event);
void OnCmdDontPaintGeom1Changed(wxCommandEvent & event);
void OnCmdDontPaintGeom2Changed(wxCommandEvent & event);
void OnCmdFont1ColorPicker(wxCommandEvent & event);
void OnCmdFont1ColorChanged(wxCommandEvent & event);
void OnCmdFont2ColorPicker(wxCommandEvent & event);
void OnCmdFont2ColorChanged(wxCommandEvent & event);
void OnCmdHalo1EnableChanged(wxCommandEvent & event);
void OnCmdHalo2EnableChanged(wxCommandEvent & event);
void OnCmdColorHalo1Changed(wxCommandEvent & event);
void OnCmdColorHalo2Changed(wxCommandEvent & event);
void OnCmdColorHalo1Picker(wxCommandEvent & event);
void OnCmdColorHalo2Picker(wxCommandEvent & event);
void OnCmdIsRepeatedChanged(wxCommandEvent & event);
void OnCmdIsAlignedChanged(wxCommandEvent & event);
void OnCmdGeneralizeLineChanged(wxCommandEvent & event);
void OnFont1Changed(wxCommandEvent & event);
void OnFont2Changed(wxCommandEvent & event);
};
class QuickStyleRasterDialog:public wxPropertySheetDialog
{
//
// a dialog for configuring a Quick Style (Raster)
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
bool CanApplyContrastEnhancement;
bool IsMultiband;
unsigned char NumBands;
unsigned char RedBand;
unsigned char GreenBand;
unsigned char BlueBand;
unsigned char GrayBand;
bool CanApplyColorMap;
bool CanApplyNDVI;
double MinPixelValue;
double MaxPixelValue;
bool CanApplyShadedRelief;
QuickStyleRasterObj *Style;
bool IsConfigChanged;
int PageContrastEnhancementIndex;
int PageChannelSelectionIndex;
int PageColorMapIndex;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateContrastEnhancementPage(wxWindow * book);
wxPanel *CreateChannelSelectionPage(wxWindow * book);
wxPanel *CreateColorMapPage(wxWindow * book);
bool RetrieveMainPage();
bool RetrieveContrastEnhancementPage();
bool RetrieveChannelSelectionPage();
bool RetrieveColorMapPage();
void UpdateMainPage();
void UpdateContrastEnhancementPage();
void UpdateChannelSelectionPage();
void UpdateColorMapPage();
void GetCoverageInfos();
bool UpdateStyle();
public:
QuickStyleRasterDialog()
{;
}
virtual ~ QuickStyleRasterDialog()
{
if (Style != NULL)
delete Style;
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateButtons();
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnQuit(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnApply(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdContrastChanged(wxCommandEvent & event);
void OnCmdBandModeChanged(wxCommandEvent & event);
void OnCmdColorMapModeChanged(wxCommandEvent & event);
void OnCmdColorMinChanged(wxCommandEvent & event);
void OnCmdMinColorPicker(wxCommandEvent & event);
void OnCmdColorMaxChanged(wxCommandEvent & event);
void OnCmdMaxColorPicker(wxCommandEvent & event);
void OnShadedChanged(wxCommandEvent & event);
};
class QuickStyleTopologyDialog:public wxPropertySheetDialog
{
//
// a dialog for configuring a Quick Style (Topology)
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
int Type;
wxString DbPrefix;
wxString LayerName;
QuickStyleTopologyObj *Style;
bool IsConfigChanged;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateNodePage(wxWindow * book);
wxPanel *CreateEdgeLinkPage(wxWindow * book);
wxPanel *CreateFacePage(wxWindow * book);
wxPanel *CreateEdgeLinkSeedPage(wxWindow * book);
wxPanel *CreateFaceSeedPage(wxWindow * book);
bool RetrieveMainPage();
bool RetrieveNodePage(bool check = true);
bool RetrieveEdgeLinkPage(bool check = true);
bool RetrieveFacePage(bool check = true);
bool RetrieveEdgeLinkSeedPage(bool check = true);
bool RetrieveFaceSeedPage(bool check = true);
void UpdateMainPage();
void UpdateNodePage();
void UpdateEdgeLinkPage();
void UpdateFacePage();
void UpdateEdgeLinkSeedPage();
void UpdateFaceSeedPage();
bool UpdateStyle();
public:
QuickStyleTopologyDialog()
{;
}
virtual ~ QuickStyleTopologyDialog()
{
if (Style != NULL)
delete Style;
}
bool Create(MyMapPanel * parent, MapLayer * layer);
void CreateButtons();
bool ConfigChanged()
{
return IsConfigChanged;
}
void OnQuit(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnApply(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
void OnCmdNodeMarkChanged(wxCommandEvent & event);
void OnCmdNodeColorStrokeChanged(wxCommandEvent & event);
void OnCmdNodeColorStrokePicker(wxCommandEvent & event);
void OnCmdNodeColorFillChanged(wxCommandEvent & event);
void OnCmdNodeColorFillPicker(wxCommandEvent & event);
void OnCmdEdgeLinkColorChanged(wxCommandEvent & event);
void OnCmdEdgeLinkColorPicker(wxCommandEvent & event);
void OnCmdFaceStrokeChanged(wxCommandEvent & event);
void OnCmdFaceFillChanged(wxCommandEvent & event);
void OnCmdFaceColorStrokeChanged(wxCommandEvent & event);
void OnCmdFaceColorStrokePicker(wxCommandEvent & event);
void OnCmdFaceColorFillChanged(wxCommandEvent & event);
void OnCmdFaceColorFillPicker(wxCommandEvent & event);
void OnCmdEdgeLinkSeedMarkChanged(wxCommandEvent & event);
void OnCmdEdgeLinkSeedColorStrokeChanged(wxCommandEvent & event);
void OnCmdEdgeLinkSeedColorStrokePicker(wxCommandEvent & event);
void OnCmdEdgeLinkSeedColorFillChanged(wxCommandEvent & event);
void OnCmdEdgeLinkSeedColorFillPicker(wxCommandEvent & event);
void OnCmdFaceSeedMarkChanged(wxCommandEvent & event);
void OnCmdFaceSeedColorStrokeChanged(wxCommandEvent & event);
void OnCmdFaceSeedColorStrokePicker(wxCommandEvent & event);
void OnCmdFaceSeedColorFillChanged(wxCommandEvent & event);
void OnCmdFaceSeedColorFillPicker(wxCommandEvent & event);
};
class QuickStyleWmsDialog:public wxDialog
{
//
// a dialog for configuring a Quick Style (WMS)
//
private:
MyFrame * MainFrame;
MyMapPanel *MapPanel;
MapLayer *Layer;
wxString DbPrefix;
wxString LayerName;
QuickStyleWmsObj *Style;
void UpdateDialog();
bool ValidateDialog();
public:
QuickStyleWmsDialog()
{;
}
virtual ~ QuickStyleWmsDialog()
{
if (Style != NULL)
delete Style;
}
void CreateControls();
bool Create(MyMapPanel * parent, MapLayer * layer);
void OnQuit(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCmdScaleChanged(wxCommandEvent & event);
};
class ComposerMainPage:public wxPanel
{
//
// first page used by Query/View COMPOSER
//
private:
class ComposerDialog * Parent;
wxCheckBox *Table2Ctrl;
wxComboBox *Table1NameCtrl;
wxComboBox *Table2NameCtrl;
wxTextCtrl *Table1AliasCtrl;
wxTextCtrl *Table2AliasCtrl;
wxListBox *Table1ColumnsCtrl;
wxListBox *Table2ColumnsCtrl;
wxRadioBox *JoinModeCtrl;
wxCheckBox *Match2Ctrl;
wxCheckBox *Match3Ctrl;
wxComboBox *Match1Table1Ctrl;
wxComboBox *Match1Table2Ctrl;
wxComboBox *Match2Table1Ctrl;
wxComboBox *Match2Table2Ctrl;
wxComboBox *Match3Table1Ctrl;
wxComboBox *Match3Table2Ctrl;
public:
ComposerMainPage()
{;
}
bool Create(ComposerDialog * parent);
virtual ~ ComposerMainPage()
{;
}
void CreateControls();
void SelectGeometryColumn(wxString & column, bool table2);
void InitializeComboColumns(wxComboBox * ctrl, bool table2);
void InitializeListColumns(wxListBox * ctrl, bool table2);
void OnTable2Enabled(wxCommandEvent & event);
void OnTable1Selected(wxCommandEvent & event);
void OnTable2Selected(wxCommandEvent & event);
void OnColumns1Selected(wxCommandEvent & event);
void OnColumns2Selected(wxCommandEvent & event);
void OnTable1AliasChanged(wxCommandEvent & event);
void OnTable2AliasChanged(wxCommandEvent & event);
void OnJoinModeChanged(wxCommandEvent & event);
void OnMatch2Enabled(wxCommandEvent & event);
void OnMatch3Enabled(wxCommandEvent & event);
void OnMatch1Table1Selected(wxCommandEvent & event);
void OnMatch1Table2Selected(wxCommandEvent & event);
void OnMatch2Table1Selected(wxCommandEvent & event);
void OnMatch2Table2Selected(wxCommandEvent & event);
void OnMatch3Table1Selected(wxCommandEvent & event);
void OnMatch3Table2Selected(wxCommandEvent & event);
};
class ComposerFilterPage:public wxPanel
{
//
// second page used by Query/View COMPOSER
//
private:
class ComposerDialog * Parent;
wxCheckBox *Where1EnabledCtrl;
wxRadioBox *Where1TableCtrl;
wxComboBox *Where1ColumnCtrl;
wxComboBox *Where1OperatorCtrl;
wxTextCtrl *Where1ValueCtrl;
wxCheckBox *Where2EnabledCtrl;
wxRadioBox *Where2TableCtrl;
wxComboBox *Where2ColumnCtrl;
wxComboBox *Where2OperatorCtrl;
wxTextCtrl *Where2ValueCtrl;
wxCheckBox *Where3EnabledCtrl;
wxRadioBox *Where3TableCtrl;
wxComboBox *Where3ColumnCtrl;
wxComboBox *Where3OperatorCtrl;
wxTextCtrl *Where3ValueCtrl;
wxRadioBox *Connector12Ctrl;
wxRadioBox *Connector23Ctrl;
public:
ComposerFilterPage()
{;
}
bool Create(ComposerDialog * parent);
virtual ~ ComposerFilterPage()
{;
}
void CreateControls();
void Table1Status(bool ok);
void Table2Status(bool ok);
void InitializeColumns(wxComboBox * ctrl, bool table2);
void InitializeOperators(wxComboBox * ctrl);
void OnWhere1Enabled(wxCommandEvent & event);
void OnWhere1TableChanged(wxCommandEvent & event);
void OnWhere1ColumnSelected(wxCommandEvent & event);
void OnWhere1OperatorSelected(wxCommandEvent & event);
void OnWhere1ValueChanged(wxCommandEvent & event);
void OnWhere2Enabled(wxCommandEvent & event);
void OnWhere2TableChanged(wxCommandEvent & event);
void OnWhere2ColumnSelected(wxCommandEvent & event);
void OnWhere2OperatorSelected(wxCommandEvent & event);
void OnWhere2ValueChanged(wxCommandEvent & event);
void OnWhere3Enabled(wxCommandEvent & event);
void OnWhere3TableChanged(wxCommandEvent & event);
void OnWhere3ColumnSelected(wxCommandEvent & event);
void OnWhere3OperatorSelected(wxCommandEvent & event);
void OnWhere3ValueChanged(wxCommandEvent & event);
void OnConnector12Changed(wxCommandEvent & event);
void OnConnector23Changed(wxCommandEvent & event);
};
class ComposerOrderPage:public wxPanel
{
//
// third page used by Query/View COMPOSER
//
private:
class ComposerDialog * Parent;
wxCheckBox *Order1EnabledCtrl;
wxRadioBox *Order1TableCtrl;
wxComboBox *Order1ColumnCtrl;
wxRadioBox *Order1DescCtrl;
wxCheckBox *Order2EnabledCtrl;
wxRadioBox *Order2TableCtrl;
wxComboBox *Order2ColumnCtrl;
wxRadioBox *Order2DescCtrl;
wxCheckBox *Order3EnabledCtrl;
wxRadioBox *Order3TableCtrl;
wxComboBox *Order3ColumnCtrl;
wxRadioBox *Order3DescCtrl;
wxCheckBox *Order4EnabledCtrl;
wxRadioBox *Order4TableCtrl;
wxComboBox *Order4ColumnCtrl;
wxRadioBox *Order4DescCtrl;
public:
ComposerOrderPage()
{;
}
bool Create(ComposerDialog * parent);
virtual ~ ComposerOrderPage()
{;
}
void CreateControls();
void Table1Status(bool ok);
void Table2Status(bool ok);
void InitializeColumns(wxComboBox * ctrl, bool table2);
void OnOrder1Enabled(wxCommandEvent & event);
void OnOrder1TableChanged(wxCommandEvent & event);
void OnOrder1ColumnSelected(wxCommandEvent & event);
void OnOrder1DescChanged(wxCommandEvent & event);
void OnOrder2Enabled(wxCommandEvent & event);
void OnOrder2TableChanged(wxCommandEvent & event);
void OnOrder2ColumnSelected(wxCommandEvent & event);
void OnOrder2DescChanged(wxCommandEvent & event);
void OnOrder3Enabled(wxCommandEvent & event);
void OnOrder3TableChanged(wxCommandEvent & event);
void OnOrder3ColumnSelected(wxCommandEvent & event);
void OnOrder3DescChanged(wxCommandEvent & event);
void OnOrder4Enabled(wxCommandEvent & event);
void OnOrder4TableChanged(wxCommandEvent & event);
void OnOrder4ColumnSelected(wxCommandEvent & event);
void OnOrder4DescChanged(wxCommandEvent & event);
};
class ComposerViewPage:public wxPanel
{
//
// fourth page used by Query/View COMPOSER
//
private:
class ComposerDialog * Parent;
wxRadioBox *ViewTypeCtrl;
wxTextCtrl *ViewNameCtrl;
wxRadioBox *GeomTableCtrl;
wxComboBox *GeometryColumnCtrl;
wxCheckBox *Writable1Ctrl;
wxCheckBox *Writable2Ctrl;
public:
ComposerViewPage()
{;
}
bool Create(ComposerDialog * parent);
virtual ~ ComposerViewPage()
{;
}
void CreateControls();
void Table1Status(bool ok);
void Table2Status(bool ok);
void OnGeomTableChanged(wxCommandEvent & event);
void InitializeGeometries(bool table2);
void OnGeometryColumnSelected(wxCommandEvent & event);
void OnViewTypeChanged(wxCommandEvent & event);
void OnViewNameChanged(wxCommandEvent & event);
void OnWritable1Changed(wxCommandEvent & event);
void OnWritable2Changed(wxCommandEvent & event);
};
class ComposerDialog:public wxDialog
{
//
// a dialog used by Query/View COMPOSER
//
private:
MyFrame * MainFrame;
AuxTableList TableList;
AuxColumnList Column1List;
AuxColumnList Column2List;
bool IncompleteSql;
bool Table2Enabled;
wxString TableName1;
wxString TableName2;
wxString TableAlias1;
wxString TableAlias2;
bool LeftJoin;
bool Match2Enabled;
bool Match3Enabled;
wxString Match1Table1;
wxString Match1Table2;
wxString Match2Table1;
wxString Match2Table2;
wxString Match3Table1;
wxString Match3Table2;
bool Where1Enabled;
bool Where2Enabled;
bool Where3Enabled;
bool Where1Table2;
bool Where2Table2;
bool Where3Table2;
bool AndOr12;
bool AndOr23;
wxString Where1Column;
wxString Where2Column;
wxString Where3Column;
wxString Where1Operator;
wxString Where2Operator;
wxString Where3Operator;
wxString Where1Value;
wxString Where2Value;
wxString Where3Value;
bool Order1Enabled;
bool Order2Enabled;
bool Order3Enabled;
bool Order4Enabled;
bool Order1Table2;
bool Order2Table2;
bool Order3Table2;
bool Order4Table2;
wxString Order1Column;
wxString Order2Column;
wxString Order3Column;
wxString Order4Column;
bool Order1Desc;
bool Order2Desc;
bool Order3Desc;
bool Order4Desc;
bool PlainView;
bool SpatialView;
wxString ViewName;
bool ViewGeomTable2;
wxString GeometryColumn;
bool Writable1;
bool Writable2;
wxString GeometryColumnAlias;
wxString GeometryRowidAlias;
wxString SqlSample;
wxString SqlTriggerInsert;
wxString SqlTriggerUpdate;
wxString SqlTriggerDelete;
wxTextCtrl *SqlCtrl;
wxNotebook *TabCtrl;
ComposerMainPage *Page1;
ComposerFilterPage *Page2;
ComposerOrderPage *Page3;
ComposerViewPage *Page4;
public:
ComposerDialog()
{;
}
bool Create(MyFrame * parent);
virtual ~ ComposerDialog()
{;
}
void CreateControls();
AuxTableList *GetTableList()
{
return &TableList;
}
void PopulateColumnList1()
{
Column1List.Populate(MainFrame->GetSqlite(), TableName1);
}
void PopulateColumnList2()
{
Column2List.Populate(MainFrame->GetSqlite(), TableName2);
}
AuxColumnList *GetColumn1List()
{
return &Column1List;
}
AuxColumnList *GetColumn2List()
{
return &Column2List;
}
void SetTable2Enabled(bool mode)
{
Table2Enabled = mode;
}
bool IsTable2Enabled()
{
return Table2Enabled;
}
void SetTableName1(wxString name)
{
TableName1 = name;
}
wxString & GetTableName1()
{
return TableName1;
}
void SetTableName2(wxString name)
{
TableName2 = name;
}
wxString & GetTableAlias2()
{
return TableAlias2;
}
void SetTableAlias1(wxString alias)
{
TableAlias1 = alias;
}
wxString & GetTableAlias1()
{
return TableAlias1;
}
void SetTableAlias2(wxString alias)
{
TableAlias2 = alias;
}
wxString & GetTableName2()
{
return TableName2;
}
void SetLeftJoin(bool mode)
{
LeftJoin = mode;
}
bool IsLeftJoin()
{
return LeftJoin;
}
void SetMatch2Enabled(bool mode)
{
Match2Enabled = mode;
}
bool IsMatch2Enabled()
{
return Match2Enabled;
}
void SetMatch3Enabled(bool mode)
{
Match3Enabled = mode;
}
bool IsMatch3Enabled()
{
return Match3Enabled;
}
void SetMatch1Table1(wxString name)
{
Match1Table1 = name;
}
wxString & GetMatch1Table1()
{
return Match1Table1;
}
void SetMatch1Table2(wxString name)
{
Match1Table2 = name;
}
wxString & GetMatch1Table2()
{
return Match1Table2;
}
void SetMatch2Table1(wxString name)
{
Match2Table1 = name;
}
wxString & GetMatch2Table1()
{
return Match2Table1;
}
void SetMatch2Table2(wxString name)
{
Match2Table2 = name;
}
wxString & GetMatch2Table2()
{
return Match2Table2;
}
void SetMatch3Table1(wxString name)
{
Match3Table1 = name;
}
wxString & GetMatch3Table1()
{
return Match3Table1;
}
void SetMatch3Table2(wxString name)
{
Match3Table2 = name;
}
wxString & GetMatch3Table2()
{
return Match3Table2;
}
void SetWhere1Enabled(bool mode)
{
Where1Enabled = mode;
}
bool IsWhere1Enabled()
{
return Where1Enabled;
}
void SetWhere2Enabled(bool mode)
{
Where2Enabled = mode;
}
bool IsWhere2Enabled()
{
return Where2Enabled;
}
void SetWhere3Enabled(bool mode)
{
Where3Enabled = mode;
}
bool IsWhere3Enabled()
{
return Where3Enabled;
}
void SetWhere1Table2(bool mode)
{
Where1Table2 = mode;
}
bool IsWhere1Table2()
{
return Where1Table2;
}
void SetWhere2Table2(bool mode)
{
Where2Table2 = mode;
}
bool IsWhere2Table2()
{
return Where2Table2;
}
void SetWhere3Table2(bool mode)
{
Where3Table2 = mode;
}
bool IsWhere3Table2()
{
return Where3Table2;
}
void SetAndOr12(bool mode)
{
AndOr12 = mode;
}
bool IsAndOr12()
{
return AndOr12;
}
void SetAndOr23(bool mode)
{
AndOr23 = mode;
}
bool IsAndOr23()
{
return AndOr23;
}
void SetWhere1Column(wxString name)
{
Where1Column = name;
}
wxString & GetWhere1Column()
{
return Where1Column;
}
void SetWhere2Column(wxString name)
{
Where2Column = name;
}
wxString & GetWhere2Column()
{
return Where2Column;
}
void SetWhere3Column(wxString name)
{
Where3Column = name;
}
wxString & GetWhere3Column()
{
return Where3Column;
}
void SetWhere1Operator(wxString name)
{
Where1Operator = name;
}
wxString & GetWhere1Operator()
{
return Where1Operator;
}
void SetWhere2Operator(wxString name)
{
Where2Operator = name;
}
wxString & GetWhere2Operator()
{
return Where2Operator;
}
void SetWhere3Operator(wxString name)
{
Where3Operator = name;
}
wxString & GetWhere3Operator()
{
return Where3Operator;
}
void SetWhere1Value(wxString name)
{
Where1Value = name;
}
wxString & GetWhere1Value()
{
return Where1Value;
}
void SetWhere2Value(wxString name)
{
Where2Value = name;
}
wxString & GetWhere2Value()
{
return Where2Value;
}
void SetWhere3Value(wxString name)
{
Where3Value = name;
}
wxString & GetWhere3Value()
{
return Where3Value;
}
void SetOrder1Enabled(bool mode)
{
Order1Enabled = mode;
}
bool IsOrder1Enabled()
{
return Order1Enabled;
}
void SetOrder2Enabled(bool mode)
{
Order2Enabled = mode;
}
bool IsOrder2Enabled()
{
return Order2Enabled;
}
void SetOrder3Enabled(bool mode)
{
Order3Enabled = mode;
}
bool IsOrder3Enabled()
{
return Order3Enabled;
}
void SetOrder4Enabled(bool mode)
{
Order4Enabled = mode;
}
bool IsOrder4Enabled()
{
return Order4Enabled;
}
void SetOrder1Table2(bool mode)
{
Order1Table2 = mode;
}
bool IsOrder1Table2()
{
return Order1Table2;
}
void SetOrder2Table2(bool mode)
{
Order2Table2 = mode;
}
bool IsOrder2Table2()
{
return Order2Table2;
}
void SetOrder3Table2(bool mode)
{
Order3Table2 = mode;
}
bool IsOrder3Table2()
{
return Order3Table2;
}
void SetOrder4Table2(bool mode)
{
Order4Table2 = mode;
}
bool IsOrder4Table2()
{
return Order4Table2;
}
void SetOrder1Column(wxString name)
{
Order1Column = name;
}
wxString & GetOrder1Column()
{
return Order1Column;
}
void SetOrder2Column(wxString name)
{
Order2Column = name;
}
wxString & GetOrder2Column()
{
return Order2Column;
}
void SetOrder3Column(wxString name)
{
Order3Column = name;
}
wxString & GetOrder3Column()
{
return Order3Column;
}
void SetOrder4Column(wxString name)
{
Order4Column = name;
}
wxString & GetOrder4Column()
{
return Order4Column;
}
void SetOrder1Desc(bool mode)
{
Order1Desc = mode;
}
bool IsOrder1Desc()
{
return Order1Desc;
}
void SetOrder2Desc(bool mode)
{
Order2Desc = mode;
}
bool IsOrder2Desc()
{
return Order2Desc;
}
void SetOrder3Desc(bool mode)
{
Order3Desc = mode;
}
bool IsOrder3Desc()
{
return Order3Desc;
}
void SetOrder4Desc(bool mode)
{
Order4Desc = mode;
}
bool IsOrder4Desc()
{
return Order4Desc;
}
void SetPlainView(bool mode)
{
PlainView = mode;
}
bool IsPlainView()
{
return PlainView;
}
void SetSpatialView(bool mode)
{
SpatialView = mode;
}
bool IsSpatialView()
{
return SpatialView;
}
void SetViewName(wxString name)
{
ViewName = name;
}
wxString & GetViewName()
{
return ViewName;
}
void SetViewGeomTable2(bool mode)
{
ViewGeomTable2 = mode;
}
bool IsViewGeomTable2()
{
return ViewGeomTable2;
}
void SetGeometryColumn(wxString name)
{
GeometryColumn = name;
}
wxString & GetGeometryColumn()
{
return GeometryColumn;
}
void SetWritable1(bool value)
{
Writable1 = value;
}
void SetWritable2(bool value)
{
Writable2 = value;
}
bool IsWritable1()
{
return Writable1;
}
bool IsWritable2()
{
return Writable2;
}
bool IsDuplicateAlias(wxString & alias);
void SetAliases();
wxString & GetGeometryColumnAlias()
{
return GeometryColumnAlias;
}
wxString & GetGeometryRowidAlias()
{
return GeometryRowidAlias;
}
wxString & GetSqlSample()
{
return SqlSample;
}
wxString & GetSqlTriggerInsert()
{
return SqlTriggerInsert;
}
wxString & GetSqlTriggerUpdate()
{
return SqlTriggerUpdate;
}
wxString & GetSqlTriggerDelete()
{
return SqlTriggerDelete;
}
wxNotebook *GetTabCtrl()
{
return TabCtrl;
}
void Table1Status(bool ok);
void Table2Status(bool ok);
bool SqlCleanString(wxString & dirty, wxString & clean);
void SqlCleanList(wxString & list, wxString & clean, int *style, int *start,
int *stop, int *next, int base);
void SelectGeometryColumn();
void UpdateSqlSample();
void PrepareSqlTriggers();
bool GetCurrentlySelectedTable(wxString & table_name)
{
return MainFrame->GetCurrentlySelectedTable(table_name);
}
void OnOk(wxCommandEvent & event);
};
class SqlFiltersMainPage:public wxPanel
{
//
// first page used by SQL Filters COMPOSER
//
private:
class SqlFiltersDialog * Parent;
wxCheckBox *Where1EnabledCtrl;
wxComboBox *Where1ColumnCtrl;
wxComboBox *Where1OperatorCtrl;
wxTextCtrl *Where1ValueCtrl;
wxCheckBox *Where2EnabledCtrl;
wxComboBox *Where2ColumnCtrl;
wxComboBox *Where2OperatorCtrl;
wxTextCtrl *Where2ValueCtrl;
wxCheckBox *Where3EnabledCtrl;
wxComboBox *Where3ColumnCtrl;
wxComboBox *Where3OperatorCtrl;
wxTextCtrl *Where3ValueCtrl;
wxRadioBox *Connector12Ctrl;
wxRadioBox *Connector23Ctrl;
public:
SqlFiltersMainPage()
{;
}
bool Create(SqlFiltersDialog * parent);
virtual ~ SqlFiltersMainPage()
{;
}
void CreateControls();
void ResetWizard();
void UpdatePage();
void InitializeColumns(wxComboBox * ctrl);
void InitializeOperators(wxComboBox * ctrl);
void GetWhereOperator(wxString & value, wxString & compar);
void OnWhere1Enabled(wxCommandEvent & event);
void OnWhere1ColumnSelected(wxCommandEvent & event);
void OnWhere1OperatorSelected(wxCommandEvent & event);
void OnWhere1ValueChanged(wxCommandEvent & event);
void OnWhere2Enabled(wxCommandEvent & event);
void OnWhere2ColumnSelected(wxCommandEvent & event);
void OnWhere2OperatorSelected(wxCommandEvent & event);
void OnWhere2ValueChanged(wxCommandEvent & event);
void OnWhere3Enabled(wxCommandEvent & event);
void OnWhere3ColumnSelected(wxCommandEvent & event);
void OnWhere3OperatorSelected(wxCommandEvent & event);
void OnWhere3ValueChanged(wxCommandEvent & event);
void OnConnector12Changed(wxCommandEvent & event);
void OnConnector23Changed(wxCommandEvent & event);
};
class SqlFiltersOrderPage:public wxPanel
{
//
// second page used by SQL Filters COMPOSER
//
private:
class SqlFiltersDialog * Parent;
wxCheckBox *Order1EnabledCtrl;
wxComboBox *Order1ColumnCtrl;
wxRadioBox *Order1DescCtrl;
wxCheckBox *Order2EnabledCtrl;
wxComboBox *Order2ColumnCtrl;
wxRadioBox *Order2DescCtrl;
wxCheckBox *Order3EnabledCtrl;
wxComboBox *Order3ColumnCtrl;
wxRadioBox *Order3DescCtrl;
wxCheckBox *Order4EnabledCtrl;
wxComboBox *Order4ColumnCtrl;
wxRadioBox *Order4DescCtrl;
public:
SqlFiltersOrderPage()
{;
}
bool Create(SqlFiltersDialog * parent);
virtual ~ SqlFiltersOrderPage()
{;
}
void CreateControls();
void ResetWizard();
void UpdatePage();
void InitializeColumns(wxComboBox * ctrl);
void OnOrder1Enabled(wxCommandEvent & event);
void OnOrder1ColumnSelected(wxCommandEvent & event);
void OnOrder1DescChanged(wxCommandEvent & event);
void OnOrder2Enabled(wxCommandEvent & event);
void OnOrder2ColumnSelected(wxCommandEvent & event);
void OnOrder2DescChanged(wxCommandEvent & event);
void OnOrder3Enabled(wxCommandEvent & event);
void OnOrder3ColumnSelected(wxCommandEvent & event);
void OnOrder3DescChanged(wxCommandEvent & event);
void OnOrder4Enabled(wxCommandEvent & event);
void OnOrder4ColumnSelected(wxCommandEvent & event);
void OnOrder4DescChanged(wxCommandEvent & event);
};
class SqlFiltersFreeHandPage:public wxPanel
{
//
// third page used by SQL Filters COMPOSER
//
private:
class SqlFiltersDialog * Parent;
wxTextCtrl *FreeHandCtrl;
public:
SqlFiltersFreeHandPage()
{;
}
bool Create(SqlFiltersDialog * parent);
virtual ~ SqlFiltersFreeHandPage()
{;
}
void CreateControls();
void UpdatePage();
void OnFreeHandChanged(wxCommandEvent & event);
};
class SqlFiltersDialog:public wxDialog
{
//
// a dialog used by SQL Filters COMPOSER
//
private:
MyFrame * MainFrame;
wxString DbPrefix;
wxString TableName;
bool ReadOnly;
AuxColumnList ColumnList;
bool Where1Enabled;
bool Where2Enabled;
bool Where3Enabled;
bool AndOr12;
bool AndOr23;
wxString Where1Column;
wxString Where2Column;
wxString Where3Column;
wxString Where1Operator;
wxString Where2Operator;
wxString Where3Operator;
wxString Where1Value;
wxString Where2Value;
wxString Where3Value;
bool Order1Enabled;
bool Order2Enabled;
bool Order3Enabled;
bool Order4Enabled;
wxString Order1Column;
wxString Order2Column;
wxString Order3Column;
wxString Order4Column;
bool Order1Desc;
bool Order2Desc;
bool Order3Desc;
bool Order4Desc;
wxString FreeHand;
wxString SqlSample;
wxTextCtrl *SqlCtrl;
wxNotebook *TabCtrl;
SqlFiltersMainPage *Page1;
SqlFiltersOrderPage *Page2;
SqlFiltersFreeHandPage *Page3;
bool IgnoreEvent;
wxString Where1Clause;
wxString Where2Clause;
wxString Where3Clause;
wxString OrderBy1;
wxString OrderBy2;
wxString OrderBy3;
wxString OrderBy4;
void DoWhereClause(int index);
void DoOrderBy(int index);
void DoSqlSyntaxColor();
bool SqlCleanString(wxString & dirty, wxString & clean);
void SqlCleanList(wxString & list, wxString & clean);
public:
SqlFiltersDialog()
{;
}
bool Create(MyFrame * parent, CurrentSqlFilters & filters);
virtual ~ SqlFiltersDialog()
{;
}
void CreateControls();
void PopulateColumnList()
{
bool force_rowid = false;
if (ReadOnly == false)
force_rowid = true;
ColumnList.Populate(MainFrame->GetSqlite(), TableName, force_rowid);
}
void ResetFreeHand();
void ResetWizardClauses();
AuxColumnList *GetColumnList()
{
return &ColumnList;
}
void SetWhere1Enabled(bool mode)
{
Where1Enabled = mode;
}
bool IsWhere1Enabled()
{
return Where1Enabled;
}
void SetWhere2Enabled(bool mode)
{
Where2Enabled = mode;
}
bool IsWhere2Enabled()
{
return Where2Enabled;
}
void SetWhere3Enabled(bool mode)
{
Where3Enabled = mode;
}
bool IsWhere3Enabled()
{
return Where3Enabled;
}
void SetAndOr12(bool mode)
{
AndOr12 = mode;
}
bool IsAndOr12()
{
return AndOr12;
}
void SetAndOr23(bool mode)
{
AndOr23 = mode;
}
bool IsAndOr23()
{
return AndOr23;
}
void SetWhere1Column(wxString name)
{
Where1Column = name;
}
wxString & GetWhere1Column()
{
return Where1Column;
}
void SetWhere2Column(wxString name)
{
Where2Column = name;
}
wxString & GetWhere2Column()
{
return Where2Column;
}
void SetWhere3Column(wxString name)
{
Where3Column = name;
}
wxString & GetWhere3Column()
{
return Where3Column;
}
void SetWhere1Operator(wxString name)
{
Where1Operator = name;
}
wxString & GetWhere1Operator()
{
return Where1Operator;
}
void SetWhere2Operator(wxString name)
{
Where2Operator = name;
}
wxString & GetWhere2Operator()
{
return Where2Operator;
}
void SetWhere3Operator(wxString name)
{
Where3Operator = name;
}
wxString & GetWhere3Operator()
{
return Where3Operator;
}
void SetWhere1Value(wxString name)
{
Where1Value = name;
}
wxString & GetWhere1Value()
{
return Where1Value;
}
void SetWhere2Value(wxString name)
{
Where2Value = name;
}
wxString & GetWhere2Value()
{
return Where2Value;
}
void SetWhere3Value(wxString name)
{
Where3Value = name;
}
wxString & GetWhere3Value()
{
return Where3Value;
}
void SetOrder1Enabled(bool mode)
{
Order1Enabled = mode;
}
bool IsOrder1Enabled()
{
return Order1Enabled;
}
void SetOrder2Enabled(bool mode)
{
Order2Enabled = mode;
}
bool IsOrder2Enabled()
{
return Order2Enabled;
}
void SetOrder3Enabled(bool mode)
{
Order3Enabled = mode;
}
bool IsOrder3Enabled()
{
return Order3Enabled;
}
void SetOrder4Enabled(bool mode)
{
Order4Enabled = mode;
}
bool IsOrder4Enabled()
{
return Order4Enabled;
}
void SetOrder1Column(wxString name)
{
Order1Column = name;
}
wxString & GetOrder1Column()
{
return Order1Column;
}
void SetOrder2Column(wxString name)
{
Order2Column = name;
}
wxString & GetOrder2Column()
{
return Order2Column;
}
void SetOrder3Column(wxString name)
{
Order3Column = name;
}
wxString & GetOrder3Column()
{
return Order3Column;
}
void SetOrder4Column(wxString name)
{
Order4Column = name;
}
wxString & GetOrder4Column()
{
return Order4Column;
}
void SetOrder1Desc(bool mode)
{
Order1Desc = mode;
}
bool IsOrder1Desc()
{
return Order1Desc;
}
void SetOrder2Desc(bool mode)
{
Order2Desc = mode;
}
bool IsOrder2Desc()
{
return Order2Desc;
}
void SetOrder3Desc(bool mode)
{
Order3Desc = mode;
}
bool IsOrder3Desc()
{
return Order3Desc;
}
void SetOrder4Desc(bool mode)
{
Order4Desc = mode;
}
bool IsOrder4Desc()
{
return Order4Desc;
}
void SetFreeHand(wxString freeHand)
{
FreeHand = freeHand;
}
wxString & GetFreeHand()
{
return FreeHand;
}
wxString & GetSqlSample()
{
return SqlSample;
}
wxNotebook *GetTabCtrl()
{
return TabCtrl;
}
void UpdateSqlSample();
void OnOk(wxCommandEvent & event);
void OnSqlSyntaxColor(wxCommandEvent & event);
void OnPageChanged(wxNotebookEvent & event);
};
class GeomColumn
{
//
// a class representing a Geometry Column
//
private:
wxString GeometryName;
wxString GeometryType;
wxString CoordDims;
int SRID;
bool RTree;
bool MbrCache;
bool NotNull;
GeomColumn *Next;
public:
GeomColumn(wxString & name, wxString & type, wxString & dims, int srid,
int idx);
~GeomColumn()
{;
}
wxString & GetGeometryName()
{
return GeometryName;
}
wxString & GetGeometryType()
{
return GeometryType;
}
wxString & GetCoordDims()
{
return CoordDims;
}
int GetSRID()
{
return SRID;
}
bool IsRTree()
{
return RTree;
}
bool IsMbrCache()
{
return MbrCache;
}
void SetNotNull()
{
NotNull = true;
}
bool IsNotNull()
{
return NotNull;
}
void SetNext(GeomColumn * next)
{
Next = next;
}
GeomColumn *GetNext()
{
return Next;
}
};
class GeomColsList
{
//
// a class representing a Geometry Columns list
//
private:
GeomColumn * First;
GeomColumn *Last;
public:
GeomColsList();
~GeomColsList();
void Add(wxString & name, wxString & type, wxString & dims, int srid,
int idx);
GeomColumn *GetFirst()
{
return First;
}
void SetNotNull(wxString & geom);
};
class IndexColumn
{
//
// a class representing an Index Column
//
private:
wxString ColumnName;
bool Valid;
IndexColumn *Next;
public:
IndexColumn(wxString & name);
~IndexColumn()
{;
}
wxString & GetColumnName()
{
return ColumnName;
}
bool IsValid()
{
return Valid;
}
void Invalidate()
{
Valid = false;
}
void SetNext(IndexColumn * next)
{
Next = next;
}
IndexColumn *GetNext()
{
return Next;
}
};
class TblIndex
{
//
// a class representing a Table Index
//
private:
wxString IndexName;
bool Unique;
bool Valid;
IndexColumn *First;
IndexColumn *Last;
TblIndex *Next;
public:
TblIndex(wxString & name, bool unique);
~TblIndex();
void Add(wxString & column);
wxString & GetIndexName()
{
return IndexName;
}
bool IsUnique()
{
return Unique;
}
void Invalidate(wxString & colName);
bool IsValid()
{
return Valid;
}
void SetNext(TblIndex * next)
{
Next = next;
}
TblIndex *GetNext()
{
return Next;
}
IndexColumn *GetFirst()
{
return First;
}
};
class TblIndexList
{
//
// a class representing a Table Index list
//
private:
TblIndex * First;
TblIndex *Last;
public:
TblIndexList();
~TblIndexList();
void Add(wxString & name, bool unique);
TblIndex *GetFirst()
{
return First;
}
void Invalidate(wxString & colName);
};
class ResultSetShapefileGeometry
{
//
// a class wrapping a (possible) Shapefile Geometry
//
private:
int Type;
int Dims;
int SRID;
int Count;
ResultSetShapefileGeometry *Next;
public:
ResultSetShapefileGeometry(int type, int dims, int srid)
{
Type = type;
Dims = dims;
SRID = srid;
Count = 1;
Next = NULL;
}
~ResultSetShapefileGeometry()
{;
}
int GetType()
{
return Type;
}
int GetDims()
{
return Dims;
}
int GetSRID()
{
return SRID;
}
int GetCount()
{
return Count;
}
void Update()
{
Count++;
}
void SetNext(ResultSetShapefileGeometry * next)
{
Next = next;
}
ResultSetShapefileGeometry *GetNext()
{
return Next;
}
};
class ResultSetShapefileColumn
{
//
// a class wrapping a (possible) Shapefile column
//
private:
char *Name;
int NullCount;
int TextCount;
int MaxTextLen;
int IntCount;
int DoubleCount;
int BlobCount;
int DbfType;
ResultSetShapefileGeometry *First;
ResultSetShapefileGeometry *Last;
public:
ResultSetShapefileColumn();
~ResultSetShapefileColumn();
void SetName(const char *name);
char *GetName()
{
return Name;
}
void UpdateNull()
{
NullCount++;
}
void UpdateText(int len)
{
TextCount++;
if (len > MaxTextLen)
MaxTextLen = len;
}
void UpdateInteger()
{
IntCount++;
}
void UpdateDouble()
{
DoubleCount++;
}
void UpdateBlob()
{
BlobCount++;
}
void UpdateGeometry(gaiaGeomCollPtr geom);
bool Validate();
int GetDbfType()
{
return DbfType;
}
int GetMaxTextLen()
{
return MaxTextLen;
}
ResultSetShapefileGeometry *GetFirst()
{
return First;
}
};
class ResultSetShapefileAnalyzer
{
//
// a class representing a (possible) Shapefile
// corresponding to some generic ResultSet
//
private:
int ColumnCount;
int GeometryColumn;
ResultSetShapefileColumn *Columns;
public:
ResultSetShapefileAnalyzer()
{
ColumnCount = 0;
GeometryColumn = -1;
Columns = NULL;
}
~ResultSetShapefileAnalyzer();
bool Validate();
void SetColumnName(int column, const char *name);
void Init(int count);
int GetColumnCount()
{
return ColumnCount;
}
int GetGeometryColumn()
{
return GeometryColumn;
}
void UpdateNull(int column);
void UpdateText(int column, int len);
void UpdateInteger(int column);
void UpdateDouble(int column);
void UpdateGeometry(int column, gaiaGeomCollPtr geom);
void UpdateBlob(int column);
ResultSetShapefileColumn *GetColumn(int column);
ResultSetShapefileColumn *GetGeometry();
};
class PostGISColumn
{
//
// a class wrapping a PostGIS column
//
private:
wxString ColumnName; // the column name
bool PrimaryKey; // Primary Key column
bool Autoincrement; // Autoincrement Primary Key
bool Nullable; // IS NULL
int Null;
int Boolean;
int Int8;
int UInt8;
int Int16;
int UInt16;
int Int32;
int UInt32;
int Int64;
int Double;
int Text;
int MaxTextLen;
int Date;
int DateTime;
int Blob;
int Point;
int MultiPoint;
int LineString;
int MultiLineString;
int Polygon;
int MultiPolygon;
int GeometryCollection;
int Srid1;
int Srid2;
int CoordDims1;
int CoordDims2;
int DataType;
public:
PostGISColumn();
~PostGISColumn()
{;
}
void SetName(wxString & name)
{
ColumnName = name;
}
wxString & GetName()
{
return ColumnName;
}
void SetNotNull()
{
Nullable = false;
}
bool IsNotNull()
{
if (Nullable == true)
return false;
else
return true;
}
void SetPrimaryKey()
{
PrimaryKey = true;
}
bool IsPrimaryKey()
{
return PrimaryKey;
}
void IncrNull()
{
Null++;
}
void IncrBoolean()
{
Boolean++;
}
void IncrInt8()
{
Int8++;
}
void IncrUInt8()
{
UInt8++;
}
void IncrInt16()
{
Int16++;
}
void IncrUInt16()
{
UInt16++;
}
void IncrInt32()
{
Int32++;
}
void IncrUInt32()
{
UInt32++;
}
void IncrInt64()
{
Int64++;
}
void IncrDouble()
{
Double++;
}
void IncrText(int len)
{
Text++;
if (len > MaxTextLen)
MaxTextLen = len;
}
void IncrDate()
{
Date++;
}
void IncrDateTime()
{
DateTime++;
}
void IncrBlob()
{
Blob++;
}
void IncrPoint(int srid, int coord_dims);
void IncrMultiPoint(int srid, int coord_dims);
void IncrLineString(int srid, int coord_dims);
void IncrMultiLineString(int srid, int coord_dims);
void IncrPolygon(int srid, int coord_dims);
void IncrMultiPolygon(int srid, int coord_dims);
void IncrGeometryCollection(int srid, int coord_dims);
bool IsDate(const char *txt);
bool IsDateTime(const char *txt);
int GetMaxTextLen()
{
return MaxTextLen;
}
bool IsGeometry();
int GetDataType()
{
return DataType;
}
void Prepare();
int GetSrid()
{
return Srid1;
}
int GetCoordDims()
{
return CoordDims1;
}
};
class PostGISIndexField
{
//
// a class wrapping a PostGIS Index field
private:
int SeqNo;
PostGISColumn *ColumnRef;
PostGISIndexField *Next;
public:
PostGISIndexField(int seq, PostGISColumn * col)
{
SeqNo = seq;
ColumnRef = col;
Next = NULL;
}
~PostGISIndexField()
{;
}
int GetSeqNo()
{
return SeqNo;
}
PostGISColumn *GetColumnRef()
{
return ColumnRef;
}
void SetNext(PostGISIndexField * next)
{
Next = next;
}
PostGISIndexField *GetNext()
{
return Next;
}
};
class PostGISIndex
{
//
// a class wrapping a PostGIS Index
private:
bool PrimaryKey;
bool Unique;
wxString Name;
PostGISIndexField *First;
PostGISIndexField *Last;
PostGISIndex *Next;
public:
PostGISIndex(wxString & name)
{
Name = name;
PrimaryKey = true;
Unique = true;
First = NULL;
Last = NULL;
Next = NULL;
}
PostGISIndex(wxString & name, bool unique)
{
Name = name;
PrimaryKey = false;
Unique = unique;
First = NULL;
Last = NULL;
Next = NULL;
}
~PostGISIndex();
wxString & GetName()
{
return Name;
}
bool IsPrimaryKey()
{
return PrimaryKey;
}
bool IsUnique()
{
return Unique;
}
void AddField(int seq, PostGISColumn * column);
PostGISIndexField *GetFirst()
{
return First;
}
void SetNext(PostGISIndex * next)
{
Next = next;
}
PostGISIndex *GetNext()
{
return Next;
}
};
class PostGISHelper
{
//
// a class wrapping a PostGIS table
//
private:
wxString DumbName;
int Count; // how many columns
PostGISColumn *Columns; // array of columns
PostGISIndex *FirstIdx;
PostGISIndex *LastIdx;
bool Autoincrement;
public:
PostGISHelper();
~PostGISHelper();
void Alloc(int count);
int GetCount()
{
return Count;
}
PostGISIndex *AddIndex(wxString & name, bool unique);
PostGISIndex *AddIndex(wxString & name);
PostGISColumn *Find(wxString & name);
PostGISIndex *GetFirstIndex()
{
return FirstIdx;
}
void ExpandIndexFields(MyFrame * mother, PostGISIndex * index,
wxString & name);
bool IsSingleFieldPrimaryKey();
bool IsAutoincrement()
{
return Autoincrement;
}
void SetName(int pos, const char *name);
void Eval(int pos, sqlite3_int64 val);
void Eval(int pos, double val);
void Eval(int pos, const char *val);
void Eval(int pos, gaiaGeomCollPtr geom);
void EvalBlob(int pos);
void Eval(int pos);
wxString & GetName(int pos, bool to_lower);
bool IsGeometry(int pos);
int GetDataType(int pos);
void GetDataType(int pos, char *definition);
int GetSrid(int pos);
int GetCoordDims(int pos);
void SetColumn(wxString & name, bool isNull, bool pKey);
void GetKeys(MyFrame * mother, wxString & table);
void Prepare();
void OutputBooleanValue(FILE * out, sqlite3_int64 value);
void OutputValue(FILE * out, sqlite3_int64 value);
void OutputValue(FILE * out, double value);
void OutputValue(FILE * out, const char *value);
void OutputValue(FILE * out, gaiaGeomCollPtr value);
void OutputValue(FILE * out, const unsigned char *value, int len);
enum
{
// data types constants
DATA_TYPE_UNDEFINED = 0,
DATA_TYPE_BOOLEAN,
DATA_TYPE_INT8,
DATA_TYPE_UINT8,
DATA_TYPE_INT16,
DATA_TYPE_UINT16,
DATA_TYPE_INT32,
DATA_TYPE_UINT32,
DATA_TYPE_INT64,
DATA_TYPE_UINT64,
DATA_TYPE_DOUBLE,
DATA_TYPE_TEXT,
DATA_TYPE_DATE,
DATA_TYPE_DATETIME,
DATA_TYPE_BLOB,
DATA_TYPE_POINT,
DATA_TYPE_LINESTRING,
DATA_TYPE_POLYGON,
DATA_TYPE_MULTIPOINT,
DATA_TYPE_MULTILINESTRING,
DATA_TYPE_MULTIPOLYGON,
DATA_TYPE_GEOMETRYCOLLECTION,
DATA_TYPE_GEOMETRY
};
};
class LayerListItem
{
// a class wrapping a Layer
private:
const void *PrivData;
wxString DbPrefix;
wxString LayerPrefix;
int LayerType;
wxString LayerName;
wxString Title;
wxString Abstract;
wxString Copyright;
wxString DataLicense;
char *f_table_name;
char *f_geometry_column;
char *view_table_name;
char *view_geometry_column;
char *view_rowid_column;
char *topology_name;
char *network_name;
int GeometryType;
bool HasZ;
int NativeSRID;
bool Queryable;
bool Editable;
bool SpatialIndex;
LayerListItem *Next;
public:
LayerListItem(const void *priv_data, wxString & db_prefix, wxString & name,
wxString & title, wxString & abstract, wxString & copyright,
wxString & data_license, bool queryable, int srid);
LayerListItem(const void *priv_data, wxString & db_prefix, wxString & name,
wxString & title, wxString & abstract, wxString & copyright,
wxString & data_license, int srid, bool queryable);
LayerListItem(const void *priv_data, wxString & db_prefix,
wxString & layer_prefix, wxString & name, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, const char *f_table_name,
const char *f_geometry_column, int geom_type, int srid,
bool queryable, bool editable, bool spatial_index,
const char *view_table_name =
NULL, const char *view_geometry_column =
NULL, const char *view_rowid_column = NULL);
LayerListItem(const void *priv_data, wxString & db_prefix,
wxString & layer_prefix, wxString & name, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, const char *f_table_name,
const char *f_geometry_column, int geom_type, int srid,
bool queryable);
LayerListItem(const void *priv_data, wxString & db_prefix, int type,
wxString & name, wxString & title, wxString & abstract,
wxString & copyright, wxString & data_license,
const char *topo_name, bool has_z, int srid, bool queryable,
bool editable);
~LayerListItem();
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetLayerPrefix()
{
return LayerPrefix;
}
int GetLayerType()
{
return LayerType;
}
wxString & GetLayerName()
{
return LayerName;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
const char *GetTableName()
{
return f_table_name;
}
const char *GetGeometryColumn()
{
return f_geometry_column;
}
const char *GetViewMotherName()
{
return view_table_name;
}
const char *GetViewMotherGeometry()
{
return view_geometry_column;
}
const char *GetViewRowidColumn()
{
return view_rowid_column;
}
const char *GetTopologyName()
{
return topology_name;
}
const char *GetNetworkName()
{
return network_name;
}
int GetGeometryType()
{
return GeometryType;
}
bool GetHasZ()
{
return HasZ;
}
int GetSRID()
{
return NativeSRID;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
bool HasSpatialIndex()
{
return SpatialIndex;
}
void SetNext(LayerListItem * next)
{
Next = next;
}
LayerListItem *GetNext()
{
return Next;
}
};
class WmsLayerSettings
{
//
// a class for dynamically configuring WMS layers
//
private:
char *Version;
char *RefSys;
char *Style;
char *ImageFormat;
char *BgColor;
bool BgColorEnabled;
int Opaque;
int SwapXY;
int Cached;
int Tiled;
int TileWidth;
int TileHeight;
public:
WmsLayerSettings();
~WmsLayerSettings();
void SetVersion(const char *version);
const char *GetVersion()
{
return Version;
}
void AdjustMapSRID(sqlite3 * sqlite, class MyFrame * MainFrame,
const char *url, wxString & db_prefix, wxString & name,
int srid);
void SetRefSys(const char *ref_sys);
const char *GetRefSys()
{
return RefSys;
}
void SetStyle(const char *style);
const char *GetStyle()
{
return Style;
}
void SetImageFormat(const char *format);
const char *GetImageFormat()
{
return ImageFormat;
}
void SetBgColor(const char *color);
const char *GetBgColor()
{
return BgColor;
}
void SetBgColorEnabled(bool enabled)
{
BgColorEnabled = enabled;
}
bool IsBgColorEnabled()
{
return BgColorEnabled;
}
void SetOpaque(int mode)
{
Opaque = mode;
}
int IsOpaque()
{
return Opaque;
}
void SetSwapXY(int mode)
{
SwapXY = mode;
}
int IsSwapXY()
{
return SwapXY;
}
void SetCached(int mode)
{
Cached = mode;
}
int IsCached()
{
return Cached;
}
void SetTiled(int mode)
{
Tiled = mode;
}
int IsTiled()
{
return Tiled;
}
void SetTileWidth(int width)
{
TileWidth = width;
}
int GetTileWidth()
{
return TileWidth;
}
void SetTileHeight(int height)
{
TileHeight = height;
}
int GetTileHeight()
{
return TileHeight;
}
};
class RasterLayerConfig
{
//
// a class for dynamically configuring Raster layers
//
private:
wxString SampleType;
wxString PixelType;
int NumBands;
wxString Compression;
int Quality;
int TileWidth;
int TileHeight;
double HorzResolution;
double VertResolution;
char *Style;
public:
RasterLayerConfig();
~RasterLayerConfig();
void SetConfig(wxString & sample_type, wxString & pixel_type, int bands,
wxString & compression, int quality, int tile_width,
int tile_height, double horz_resolution,
double vert_resolution);
wxString & GetSampleType()
{
return SampleType;
}
wxString & GetPixelType()
{
return PixelType;
}
int GetNumBands()
{
return NumBands;
}
wxString GetCompression()
{
return Compression;
}
int GetQuality()
{
return Quality;
}
int GetTileWidth()
{
return TileWidth;
}
int GetTileHeight()
{
return TileHeight;
}
double GetHorzResolution()
{
return HorzResolution;
}
double GetVertResolution()
{
return VertResolution;
}
void SetStyle(const char *style);
const char *GetStyle()
{
return Style;
}
};
class VectorLayerConfig
{
//
// a class for dynamically configuring Vector layers
//
private:
int GeometryType;
char *Style;
bool ShowFaces;
bool ShowEdges;
bool ShowNodes;
bool ShowFaceSeeds;
bool ShowEdgeSeeds;
bool ShowLinks;
bool ShowLinkSeeds;
public:
VectorLayerConfig(int geom_type);
~VectorLayerConfig();
int GetGeometryType()
{
return GeometryType;
}
void SetStyle(const char *style);
const char *GetStyle()
{
return Style;
}
void SetFacesVisible(bool mode)
{
ShowFaces = mode;
}
bool AreFacesVisible()
{
return ShowFaces;
}
void SetEdgesVisible(bool mode)
{
ShowEdges = mode;
}
bool AreEdgesVisible()
{
return ShowEdges;
}
void SetNodesVisible(bool mode)
{
ShowNodes = mode;
}
bool AreNodesVisible()
{
return ShowNodes;
}
void SetFaceSeedsVisible(bool mode)
{
ShowFaceSeeds = mode;
}
bool AreFaceSeedsVisible()
{
return ShowFaceSeeds;
}
void SetEdgeSeedsVisible(bool mode)
{
ShowEdgeSeeds = mode;
}
bool AreEdgeSeedsVisible()
{
return ShowEdgeSeeds;
}
void SetLinksVisible(bool mode)
{
ShowLinks = mode;
}
bool AreLinksVisible()
{
return ShowLinks;
}
void SetLinkSeedsVisible(bool mode)
{
ShowLinkSeeds = mode;
}
bool AreLinkSeedsVisible()
{
return ShowLinkSeeds;
}
};
class CachedFrame
{
//
// a class for caching a Layer rendered frame
//
private:
const void *PrivData;
int Width;
int Height;
double MinX;
double MinY;
double MaxX;
double MaxY;
char *Style;
rl2GraphicsContextPtr Graphics;
bool Ok;
public:
CachedFrame(const void *priv_data);
~CachedFrame();
bool IsValid(int width, int height, double minx, double miny, double maxx,
double maxy, const char *style);
void Reset(int width, int height, double minx, double miny, double maxx,
double maxy, const char *style);
rl2GraphicsContextPtr GetGraphicsContext()
{
return Graphics;
}
bool IsOk()
{
return Ok;
}
void Validate()
{
Ok = true;
}
void Invalidate();
};
class MapLayer
{
//
// a class corresponding to a Map layer
//
private:
const void *PrivData;
int Type;
WmsLayerSettings *WmsConfig;
RasterLayerConfig *RasterConfig;
VectorLayerConfig *VectorConfig;
wxString DbPrefix;
wxString VectorPrefix;
wxString Name;
wxString Title;
wxString Abstract;
wxString Copyright;
wxString DataLicense;
char *f_table_name;
char *f_geometry_column;
char *view_table_name;
char *view_geometry_column;
char *view_rowid_column;
char *topology_name;
char *network_name;
char *getMap_url;
char *getFeatureInfo_url;
int GeometryType;
bool HasZ;
int NativeSRID;
bool AutoTransformEnabled;
int MapSRID;
double GeoMinX; // layer's BBOX - geographic coords
double GeoMinY;
double GeoMaxX;
double GeoMaxY;
double MinX; // layer's BBOX - native coords
double MinY;
double MaxX;
double MaxY;
double MapMinX; // layer's BBOX - Map coords
double MapMinY;
double MapMaxX;
double MapMaxY;
bool Queryable;
bool Editable;
bool SpatialIndex;
bool Visible;
CachedFrame *CachedBase;
CachedFrame *CachedLabels;
CachedFrame *CachedNodes;
CachedFrame *CachedEdges;
CachedFrame *CachedLinks;
CachedFrame *CachedFaces;
CachedFrame *CachedEdgeSeeds;
CachedFrame *CachedLinkSeeds;
CachedFrame *CachedFaceSeeds;
QuickStyleObj *QuickStyle;
QuickStyleTopologyObj *QuickStyleTopology;
QuickStyleRasterObj *QuickStyleRaster;
QuickStyleWmsObj *QuickStyleWms;
MapLayer *Prev;
MapLayer *Next;
public:
MapLayer(const void *priv_data, LayerListItem * layer);
~MapLayer();
int GetType()
{
return Type;
}
QuickStyleObj *GetQuickStyle()
{
return QuickStyle;
}
QuickStyleTopologyObj *GetQuickStyleTopology()
{
return QuickStyleTopology;
}
QuickStyleRasterObj *GetQuickStyleRaster()
{
return QuickStyleRaster;
}
QuickStyleWmsObj *GetQuickStyleWms()
{
return QuickStyleWms;
}
QuickStyleObj *CloneQuickStyle()
{
return QuickStyle->Clone();
}
QuickStyleTopologyObj *CloneQuickStyleTopology()
{
return QuickStyleTopology->Clone();
}
QuickStyleRasterObj *CloneQuickStyleRaster()
{
return QuickStyleRaster->Clone();
}
QuickStyleWmsObj *CloneQuickStyleWms()
{
return QuickStyleWms->Clone();
}
bool UpdateQuickStyle(QuickStyleObj * style);
bool UpdateQuickStyle(QuickStyleTopologyObj * style);
bool UpdateQuickStyle(QuickStyleRasterObj * style);
bool UpdateQuickStyle(QuickStyleWmsObj * style);
WmsLayerSettings *GetWmsConfig()
{
return WmsConfig;
}
RasterLayerConfig *GetRasterConfig()
{
return RasterConfig;
}
VectorLayerConfig *GetVectorConfig()
{
return VectorConfig;
}
wxString & GetDbPrefix()
{
return DbPrefix;
}
wxString & GetVectorPrefix()
{
return VectorPrefix;
}
wxString & GetName()
{
return Name;
}
wxString & GetTitle()
{
return Title;
}
wxString & GetAbstract()
{
return Abstract;
}
wxString & GetCopyright()
{
return Copyright;
}
wxString & GetDataLicense()
{
return DataLicense;
}
const char *GetTableName()
{
return f_table_name;
}
const char *GetGeometryColumn()
{
return f_geometry_column;
}
const char *GetViewMotherName()
{
return view_table_name;
}
const char *GetViewMotherGeometry()
{
return view_geometry_column;
}
const char *GetViewRowidColumn()
{
return view_rowid_column;
}
const char *GetTopologyName()
{
return topology_name;
}
const char *GetNetworkName()
{
return network_name;
}
void SetWmsGetMapURL(const char *url);
const char *GetWmsGetMapURL()
{
return getMap_url;
}
void SetWmsGetFeatureInfoURL(const char *url);
const char *GetWmsGetFeatureInfoURL()
{
return getFeatureInfo_url;
}
int GetGeometryType()
{
return GeometryType;
}
bool GetHasZ()
{
return HasZ;
}
void SetNativeSRID(const char *srs);
int GetNativeSRID()
{
return NativeSRID;
}
void SetMapSRID(int srid)
{
if (AutoTransformEnabled)
MapSRID = srid;
}
void UpdateMapExtent(sqlite3 * sqlite);
bool IsValidMapExtent();
int GetMapSRID()
{
return MapSRID;
}
void EnableAutoTransform(bool mode)
{
AutoTransformEnabled = mode;
}
bool IsAutoTransformEnabled()
{
return AutoTransformEnabled;
}
bool DoCheckSupportedSRID(sqlite3 * sqlite, int srid);
void AdjustMapSRID(sqlite3 * sqlite, MyFrame * MainFrame,
bool map_auto_transform_enabled, int srid);
void AdjustDefaultStyle(sqlite3 * sqlite);
void CreateQuickStyle();
void SetQuickStyle(QuickStyleObj * quickStyle);
void SetQuickStyle(QuickStyleTopologyObj * quickStyle);
void SetQuickStyle(QuickStyleRasterObj * quickStyle);
void SetQuickStyle(QuickStyleWmsObj * quickStyle);
char *DoFindVectorStyle(sqlite3 * sqlite);
char *DoFindRasterStyle(sqlite3 * sqlite);
void SetRasterInfos(wxString & sample_type, wxString pixel_type, int bands,
wxString & compression, int quality, int tile_width,
int tile_height, double horz_res, double vert_res);
void SetGeoExtent(double minx, double miny, double maxx, double maxy);
void SetExtent(double minx, double miny, double maxx, double maxy);
double GetGeoMinX()
{
return GeoMinX;
}
double GetGeoMinY()
{
return GeoMinY;
}
double GetGeoMaxX()
{
return GeoMaxX;
}
double GetGeoMaxY()
{
return GeoMaxY;
}
double GetMinX()
{
return MinX;
}
double GetMinY()
{
return MinY;
}
double GetMaxX()
{
return MaxX;
}
double GetMaxY()
{
return MaxY;
}
double GetMapMinX()
{
return MapMinX;
}
double GetMapMinY()
{
return MapMinY;
}
double GetMapMaxX()
{
return MapMaxX;
}
double GetMapMaxY()
{
return MapMaxY;
}
bool IsQueryable()
{
return Queryable;
}
bool IsEditable()
{
return Editable;
}
bool HasSpatialIndex()
{
return SpatialIndex;
}
bool IsSwapXY()
{
return false;
}
bool IsVisible()
{
return Visible;
}
bool IsReady();
void Hide()
{
Visible = false;
}
void Show()
{
Visible = true;
}
void PrepareGraphicsContext(int width, int height, double minx, double miny,
double maxx, double maxy, const char *style);
rl2CanvasPtr CreateCanvas();
void Validate();
void Validate(rl2CanvasPtr canvas);
void Invalidate();
rl2GraphicsContextPtr GetGraphicsContext();
rl2GraphicsContextPtr GetLabelsGraphicsContext();
void SetPrev(MapLayer * prev)
{
Prev = prev;
}
MapLayer *GetPrev()
{
return Prev;
}
void SetNext(MapLayer * next)
{
Next = next;
}
MapLayer *GetNext()
{
return Next;
}
};
class MapLayerXmlVector
{
//
// an helper class for XML MapLayer's Configuration
//
private:
char *Style;
QuickStyleObj *QuickStyle;
public:
MapLayerXmlVector(const char *style, QuickStyleObj * quick);
~MapLayerXmlVector();
const char *GetStyle()
{
return Style;
}
QuickStyleObj *GetQuickStyle()
{
return QuickStyle;
}
bool IsDontPaintGeometrySymbolizer();
};
class MapLayerXmlTopology
{
//
// an helper class for XML MapLayer's Configuration
//
private:
char *Style;
QuickStyleTopologyObj *QuickStyle;
bool ShowFaces;
bool ShowEdges;
bool ShowNodes;
bool ShowFaceSeeds;
bool ShowEdgeSeeds;
public:
MapLayerXmlTopology(const char *style, QuickStyleTopologyObj * quick,
bool faces, bool edges, bool nodes, bool face_seeds,
bool edge_seeds);
~MapLayerXmlTopology();
const char *GetStyle()
{
return Style;
}
QuickStyleTopologyObj *GetQuickStyle()
{
return QuickStyle;
}
bool GetShowFaces()
{
return ShowFaces;
}
bool GetShowEdges()
{
return ShowEdges;
}
bool GetShowNodes()
{
return ShowNodes;
}
bool GetShowFaceSeeds()
{
return ShowFaceSeeds;
}
bool GetShowEdgeSeeds()
{
return ShowEdgeSeeds;
}
};
class MapLayerXmlNetwork
{
//
// an helper class for XML MapLayer's Configuration
//
private:
char *Style;
QuickStyleTopologyObj *QuickStyle;
bool ShowLinks;
bool ShowNodes;
bool ShowLinkSeeds;
public:
MapLayerXmlNetwork(const char *style, QuickStyleTopologyObj * quick,
bool links, bool nodes, bool link_seeds);
~MapLayerXmlNetwork();
const char *GetStyle()
{
return Style;
}
QuickStyleTopologyObj *GetQuickStyle()
{
return QuickStyle;
}
bool GetShowLinks()
{
return ShowLinks;
}
bool GetShowNodes()
{
return ShowNodes;
}
bool GetShowLinkSeeds()
{
return ShowLinkSeeds;
}
};
class MapLayerXmlRaster
{
//
// an helper class for XML MapLayer's Configuration
//
private:
char *Style;
QuickStyleRasterObj *QuickStyle;
public:
MapLayerXmlRaster(const char *style, QuickStyleRasterObj * quick);
~MapLayerXmlRaster();
const char *GetStyle()
{
return Style;
}
QuickStyleRasterObj *GetQuickStyle()
{
return QuickStyle;
}
};
class MapLayerXmlWms
{
//
// an helper class for XML MapLayer's Configuration
//
private:
bool MinScaleEnabled;
bool MaxScaleEnabled;
double ScaleMin;
double ScaleMax;
char *getMapURL;
char *getFeatureInfoURL;
char *Version;
char *RefSys;
char *Style;
char *ImageFormat;
char *BgColor;
bool BgColorEnabled;
bool Opaque;
bool SwapXY;
bool Tiled;
int TileWidth;
int TileHeight;
public:
MapLayerXmlWms(bool min_scale_enabled, bool max_scale_enabled,
double min_scale, double max_scale, const char *getmap_url,
const char *getfeatureinfo_url, const char *version,
const char *ref_sys, const char *style,
const char *image_format, const char *bg_color,
bool bg_color_enabled, bool opaque, bool swap_xy, bool tiles,
int tile_w, int tile_h);
~MapLayerXmlWms();
bool IsMinScaleEnabled()
{
return MinScaleEnabled;
}
bool IsMaxScaleEnabled()
{
return MaxScaleEnabled;
}
double GetScaleMin()
{
return ScaleMin;
}
double GetScaleMax()
{
return ScaleMax;
}
const char *GetWmsGetMap_URL()
{
return getMapURL;
}
const char *GetWmsGetFeatureInfo_URL()
{
return getFeatureInfoURL;
}
const char *GetVersion()
{
return Version;
}
const char *GetRefSys()
{
return RefSys;
}
const char *GetStyle()
{
return Style;
}
const char *GetImageFormat()
{
return ImageFormat;
}
const char *GetBgColor()
{
return BgColor;
}
bool IsBgColorEnabled()
{
return BgColorEnabled;
}
bool IsOpaque()
{
return Opaque;
}
bool IsSwapXY()
{
return SwapXY;
}
bool IsTiled()
{
return Tiled;
}
int GetTileWidth()
{
return TileWidth;
}
int GetTileHeight()
{
return TileHeight;
}
};
class MapLayerXmlConfig
{
//
// an helper class for XML MapLayer's Configuration
//
private:
int Type;
char *TypeName;
char *DbPrefix;
char *Name;
bool Visible;
MapLayerXmlVector *Vector;
MapLayerXmlTopology *Topology;
MapLayerXmlNetwork *Network;
MapLayerXmlRaster *Raster;
MapLayerXmlWms *Wms;
MapLayerXmlConfig *Prev;
MapLayerXmlConfig *Next;
public:
MapLayerXmlConfig(int type, char *db_prefix, char *name, bool visible);
~MapLayerXmlConfig();
int GetType()
{
return Type;
}
const char *GetTypeName()
{
return TypeName;
}
const char *GetDbPrefix()
{
return DbPrefix;
}
const char *GetName()
{
return Name;
}
bool IsVisible()
{
return Visible;
}
MapLayerXmlVector *GetVector()
{
return Vector;
}
MapLayerXmlTopology *GetTopology()
{
return Topology;
}
MapLayerXmlNetwork *GetNetwork()
{
return Network;
}
MapLayerXmlRaster *GetRaster()
{
return Raster;
}
MapLayerXmlWms *GetWms()
{
return Wms;
}
void SetPrev(MapLayerXmlConfig * prev)
{
Prev = prev;
}
void AddVector(const char *style, QuickStyleObj * quick);
void AddTopology(const char *style, QuickStyleTopologyObj * quick, bool faces,
bool edges, bool nodes, bool face_seeds, bool edge_seeds);
void AddNetwork(const char *style, QuickStyleTopologyObj * quick, bool links,
bool nodes, bool link_seeds);
void AddRaster(const char *style, QuickStyleRasterObj * quick);
void AddWms(bool min_scale_enabled, bool max_scale_enabled, double min_scale,
double max_scale, const char *getMapUrl,
const char *getFeatureInfoUrl, const char *version,
const char *ref_sys, const char *image_format, const char *style,
const char *bg_color, bool bg_color_enabled, bool opaque,
bool swap_xy, bool tiles, int tile_w, int tile_h);
MapLayerXmlConfig *GetPrev()
{
return Prev;
}
void SetNext(MapLayerXmlConfig * next)
{
Next = next;
}
MapLayerXmlConfig *GetNext()
{
return Next;
}
};
class MapAttachedXmlConfig
{
//
// an helper class for XML Map Configuration - Attached DBs
//
private:
char *DbPrefix;
char *Path;
MapAttachedXmlConfig *Next;
public:
MapAttachedXmlConfig(const char *db_prefix);
~MapAttachedXmlConfig();
const char *GetDbPrefix()
{
return DbPrefix;
}
void SetPath(const char *path);
const char *GetPath()
{
return Path;
}
void SetNext(MapAttachedXmlConfig * next)
{
Next = next;
}
MapAttachedXmlConfig *GetNext()
{
return Next;
}
};
class MapXmlConfig
{
//
// an helper class for XML Map Configuration
//
private:
bool Attached;
MapAttachedXmlConfig *FirstDB;
MapAttachedXmlConfig *LastDB;
MapLayerXmlConfig *First;
MapLayerXmlConfig *Last;
public:
MapXmlConfig()
{
Attached = false;
FirstDB = NULL;
LastDB = NULL;
First = NULL;
Last = NULL;
}
~MapXmlConfig();
MapLayerXmlConfig *AddLayer(int type, char *db_prefix, char *name,
bool visible);
MapAttachedXmlConfig *AddAttached(const char *db_prefix);
MapAttachedXmlConfig *GetFirstDB()
{
return FirstDB;
}
bool HasAttached()
{
return Attached;
}
void SetDbPath(const char *db_prefix, const char *path);
MapLayerXmlConfig *GetFirst()
{
return First;
}
MapLayerXmlConfig *GetLast()
{
return Last;
}
};
class MyLayerTree:public wxTreeCtrl
{
//
// a tree-control used for Map Layers
//
private:
MyMapPanel * MapPanel;
bool Changed;
wxTreeItemId Root; // the root node
wxImageList *Images; // the images list
wxTreeItemId CurrentItem; // the tree item holding the current context menu
wxTreeItemId DraggedItem; // the tree item to be moved
void DoWmsSqlSample(MapLayer * lyr);
void DoWmsUrlSample(MapLayer * lyr);
void DoVectorSqlSample(MapLayer * lyr);
void DoRasterSqlSample(MapLayer * lyr);
void DoPrepareHexColor(char *color, wxColour & background);
public:
MyLayerTree()
{;
}
MyLayerTree(MyMapPanel * parent, wxWindowID id = wxID_ANY);
virtual ~ MyLayerTree();
void FlushAll()
{
DeleteChildren(Root);
Changed = true;
}
wxTreeItemId & GetRoot()
{
return Root;
}
void CleanUp();
void DoFetchWmsUrls(const char *db_prefix, const char *name, char **getMapUrl,
char **getFeatureInfoUrl);
char *PrintQuickStyleComplex(char *xml, class QuickStyleObj * quick);
char *PrintQuickStylePoint(char *xml, const char *extra,
class QuickStyleObj * quick);
char *PrintQuickStyleLine(char *xml, const char *extra,
QuickStyleObj * quick);
char *PrintQuickStylePolygon(char *xml, const char *extra,
QuickStyleObj * quick);
char *PrintQuickStyleTextPoint(QuickStyleObj * quick);
char *PrintQuickStyleTextLine(QuickStyleObj * quick);
char *PrintQuickStyleRaster(QuickStyleRasterObj * quick);
char *PrintQuickStyleTopology(QuickStyleTopologyObj * quick,
const char *indent);
char *PrintQuickStyleNetwork(QuickStyleTopologyObj * quick,
const char *indent);
char *XmlClean(const char *dirty);
void AddLayer(MapLayer * layer);
int GetIconIndex(MapLayer * layer);
void SetLayerIcons();
void MarkCurrentItem();
void SelectActiveItem(MapLayer * layer);
void UpdateDefault(wxTreeItemId item, wxImageList * imageList);
void OnSelChanged(wxTreeEvent & event);
void OnItemActivated(wxTreeEvent & event);
void OnRightClick(wxTreeEvent & event);
void OnCmdRemoveAll(wxCommandEvent & event);
void OnCmdShowAll(wxCommandEvent & event);
void OnCmdHideAll(wxCommandEvent & event);
void OnCmdMapConfigure(wxCommandEvent & event);
void OnCmdVisible(wxCommandEvent & event);
void OnCmdMapFullExtent(wxCommandEvent & event);
void OnCmdMapLayerFullExtent(wxCommandEvent & event);
void OnCmdMapSqlSample(wxCommandEvent & event);
void OnCmdMapUrlSample(wxCommandEvent & event);
void OnCmdSqlLayer(wxCommandEvent & event);
void OnCmdRemoveLayer(wxCommandEvent & event);
void OnCmdDeleteItem(wxCommandEvent & event);
void OnCmdLayerInfo(wxCommandEvent & event);
void OnCmdMapLayerConfigure(wxCommandEvent & event);
void OnCmdQuickStyleEdit(wxCommandEvent & event);
void OnDragStart(wxTreeEvent & event);
void OnDragEnd(wxTreeEvent & event);
};
class MapLayerObject:public wxTreeItemData
{
//
// a class to store TreeItemData - Map Layer wrapper
//
private:
MapLayer * Layer;
public:
MapLayerObject(MapLayer * lyr)
{
Layer = lyr;
}
virtual ~ MapLayerObject()
{;
}
MapLayer *GetLayer()
{
return Layer;
}
};
class LayerThreadParams
{
// a class wrapping Layer Paint arguments
private:
int ThreadIndex;
class SingleLayerPainter *Layer;
MyMapPanel *MapPanel;
class MyMapView *MapView;
class MultiLayerPainter *Canvas;
class MapViewPaintParams *Mother;
public:
LayerThreadParams(int index, SingleLayerPainter * lyr, MyMapPanel * panel,
MyMapView * view, MultiLayerPainter * canvas,
MapViewPaintParams * mother)
{
ThreadIndex = index;
Layer = lyr;
MapPanel = panel;
MapView = view;
Canvas = canvas;
Mother = mother;
}
~LayerThreadParams()
{;
}
int GetThreadIndex()
{
return ThreadIndex;
}
SingleLayerPainter *GetLayer()
{
return Layer;
}
MyMapPanel *GetMapPanel()
{
return MapPanel;
}
MyMapView *GetMapView()
{
return MapView;
}
MultiLayerPainter *GetCanvas()
{
return Canvas;
}
MapViewPaintParams *GetMother()
{
return Mother;
}
};
class MapViewPaintParams
{
// a class wrapping Map Paint arguments
private:
MyMapPanel * MapPanel;
MyMapView *MapView;
MultiLayerPainter *Canvas;
bool *UnusedThreads;
int NumThreads;
public:
MapViewPaintParams()
{
UnusedThreads = NULL;
NumThreads = 0;
}
~MapViewPaintParams()
{
ThreadsPoolCleanUp();
}
void Initialize(MyMapPanel * mother, MyMapView * map,
MultiLayerPainter * canvas)
{
MapPanel = mother;
MapView = map;
Canvas = canvas;
}
MyMapPanel *GetMapPanel()
{
return MapPanel;
}
MyMapView *GetMapView()
{
return MapView;
}
MultiLayerPainter *GetCanvas()
{
return Canvas;
}
void ThreadsPoolCleanUp()
{
if (UnusedThreads != NULL)
delete[]UnusedThreads;
UnusedThreads = NULL;
NumThreads = 0;
}
void PrepareThreadsPool(int count);
int FindUnusedThread();
void ReleaseThread(int index);
};
class MapConfigAttachedDb
{
//
// a class wrapping an ATTACHed DB for Map Config
//
private:
char *Prefix;
char *Remapped;
char *Path;
bool Valid;
bool DontDetach;
MapConfigAttachedDb *Next;
bool IsAlreadyAttached(sqlite3 * sqlite, const char *prefix,
const char *path);
bool NotAlreadyAttached(sqlite3 * sqlite, const char *alias);
bool CheckValidDbFile(const char *path);
public:
MapConfigAttachedDb(const char *prefix, const char *path);
~MapConfigAttachedDb();
const char *GetPrefix()
{
return Prefix;
}
const char *GetRemapped()
{
return Remapped;
}
const char *GetPath()
{
return Path;
}
bool IsValid()
{
return Valid;
}
bool IsDontDetach()
{
return DontDetach;
}
void Verify(sqlite3 * sqlite, MyFrame * parent);
void SetNext(MapConfigAttachedDb * next)
{
Next = next;
}
MapConfigAttachedDb *GetNext()
{
return Next;
}
};
class MapConfigAttached
{
//
// a list of ATTACHed DBs for Map Config
//
private:
MyFrame * Parent;
MapConfigAttachedDb *First;
MapConfigAttachedDb *Last;
public:
MapConfigAttached(MyFrame * parent);
~MapConfigAttached();
MapConfigAttachedDb *GetFirst()
{
return First;
}
void Add(const char *prefix, const char *path);
void Verify();
void DetachAll();
bool DoCheckPrefix(const char *prefix, const char **alias);
};
class MyMapView:public wxPanel
{
//
// a panel used to show the Map
//
private:
MyMapPanel * MapPanel;
wxBitmap MapBitmap;
wxBitmap ScreenBitmap;
wxBitmap BlinkBitmap;
int BitmapWidth;
int BitmapHeight;
MapFeaturesList *SelectedFeatures;
wxCursor CursorCross;
wxCursor CursorHand;
bool RasterWmsAutoSwitch;
bool LabelAntiCollision;
bool LabelWrapText;
bool LabelAutoRotate;
bool LabelShiftPosition;
bool GeographicCoordsDMS;
bool CheckeredMapBackground;
wxColour SolidMapBackground;
bool ValidMap;
int MapSRID;
bool MultiThreadingEnabled;
int MaxThreads;
bool AutoTransformEnabled;
double MapCX;
double MapCY;
double MapMinX;
double MapMaxX;
double MapMinY;
double MapMaxY;
double MapExtentX;
double MapExtentY;
double GeoMinX;
double GeoMaxX;
double GeoMinY;
double GeoMaxY;
int FrameWidth;
int FrameHeight;
double FrameCX;
double FrameCY;
double FrameExtentX;
double FrameExtentY;
double FrameMinX;
double FrameMinY;
double FrameMaxX;
double FrameMaxY;
double PixelRatio;
int DragStartX;
int DragStartY;
int LastDragX;
int LastDragY;
int WheelTics;
wxTimer *TimerMouseWheel;
wxTimer *TimerMapPaint;
wxTimer *TimerMapBlink;
wxTimer *TimerMapTip;
int CurrentScale;
int MapPaintPhase;
int MapBlinkCount;
bool DynamicBlink;
MapLayer *FirstLayer;
MapLayer *LastLayer;
MapLayer *ActiveLayer;
MultiLayerPainter *CurrentCanvas;
MapViewPaintParams MapThreadParams;
MapConfigAttached *AttachedList;
void DoPaintCheckeredBackground(wxMemoryDC * dc);
bool TestSelectedFeaturesBBox();
public:
MyMapView()
{;
}
MyMapView(MyMapPanel * parent, wxWindowID id = wxID_ANY);
virtual ~ MyMapView();
void ResetScreenBitmap();
void ResetMapBitmap(wxImage & img, unsigned int width, unsigned int height);
MyMapPanel *GetMapPanel()
{
return MapPanel;
}
MapConfigAttached *CreateAttachedList();
void DetachAll();
void SetMapSRID(int srid)
{
if (AutoTransformEnabled)
MapSRID = srid;
}
int GetMapSRID()
{
return MapSRID;
}
void EnableMultiThreading(bool mode)
{
MultiThreadingEnabled = mode;
}
int GetImageWidth();
int GetImageHeight();
double GetMapMinX()
{
return MapMinX;
}
double GetMapMinY()
{
return MapMinY;
}
double GetMapMaxX()
{
return MapMaxX;
}
double GetMapMaxY()
{
return MapMaxY;
}
double GetGeoMinX()
{
return GeoMinX;
}
double GetGeoMinY()
{
return GeoMinY;
}
double GetGeoMaxX()
{
return GeoMaxX;
}
double GetGeoMaxY()
{
return GeoMaxY;
}
void DoPrepareBBox(wxString & bbox);
void GetBBox(int *srid, double *minx, double *miny, double *maxx,
double *maxy);
MapLayer *GetFirstLayer()
{
return FirstLayer;
}
bool IsMultiThreadingEnabled()
{
return MultiThreadingEnabled;
}
void SetMaxThreads(int max)
{
MaxThreads = max;
}
int GetMaxThreads()
{
return MaxThreads;
}
void EnableAutoTransform(bool mode)
{
AutoTransformEnabled = mode;
}
bool IsAutoTransformEnabled()
{
return AutoTransformEnabled;
}
bool IsRasterWmsAutoSwitch()
{
return RasterWmsAutoSwitch;
}
void SetRasterWmsAutoSwitch(bool mode)
{
RasterWmsAutoSwitch = mode;
}
bool IsLabelAntiCollision()
{
return LabelAntiCollision;
}
void SetLabelAntiCollision(bool mode)
{
LabelAntiCollision = mode;
}
bool IsLabelWrapText()
{
return LabelWrapText;
}
void SetLabelWrapText(bool mode)
{
LabelWrapText = mode;
}
bool IsLabelAutoRotate()
{
return LabelAutoRotate;
}
void SetLabelAutoRotate(bool mode)
{
LabelAutoRotate = mode;
}
bool IsLabelShiftPosition()
{
return LabelShiftPosition;
}
void SetLabelShiftPosition(bool mode)
{
LabelShiftPosition = mode;
}
bool IsGeographicCoordsDMS()
{
return GeographicCoordsDMS;
}
void SetGeographicCoordsDMS(bool mode)
{
GeographicCoordsDMS = mode;
}
bool IsCheckeredMapBackground()
{
return CheckeredMapBackground;
}
void SetCheckeredMapBackground(bool mode)
{
CheckeredMapBackground = mode;
}
wxColour & GetSolidMapBackground()
{
return SolidMapBackground;
}
void SetSolidMapBackground(wxColour & color)
{
SolidMapBackground = color;
}
void AdjustLayersMapSRID();
int GetCurrentScale()
{
return CurrentScale;
}
void SetCurrentScale(int scale);
void ShowSelectedFeatures(MapFeaturesList * list, bool zoom_mode);
void Invalidate();
void PrepareMap();
void UpdateMapFullExtent();
void SetMapToFullExtent();
void SetMapLayerToFullExtent(MapLayer * lyr);
void UpdateMapViewPoint(int fromSrid, int toSrid);
void RebuildLayerTree(MyLayerTree * LayerTree);
void DoPaintMap();
void DoPaintLayer(SingleLayerPainter * layer);
void DoPaintLayerWms(SingleLayerPainter * layer);
void DoPaintLayerRaster(SingleLayerPainter * layer);
void DoPaintLayerVector(SingleLayerPainter * layer);
void RunMonoThreadPaintMap();
void RunMultiThreadPaintMap();
void DoFinalMapImage();
void DoPaintMapBlink(bool oddEven);
void DoPaintBlinkingPoint(rl2GraphicsContextPtr ctx, bool oddEven,
gaiaPointPtr pt);
void DoPaintBlinkingLinestring(rl2GraphicsContextPtr ctx, bool oddEven,
gaiaLinestringPtr ln);
void DoPaintBlinkingPolygon(rl2GraphicsContextPtr ctx, bool oddEven,
gaiaPolygonPtr pg);
void DoIdentify(int x, int y);
void DoIdentifyVector(double x, double y);
void DoIdentifyTopology(double x, double y);
void DoIdentifyNetwork(double x, double y);
void DoIdentifyRaster(double x, double y);
void SetActiveMapLayer(MapLayer * layer)
{
ActiveLayer = layer;
}
MapLayer *GetActiveLayer()
{
return ActiveLayer;
}
bool IsActiveLayer(MapLayer * layer)
{
if (ActiveLayer == layer)
return true;
return false;
}
bool IsValidMap()
{
return ValidMap;
}
void DragMap(int x, int y);
bool CanQueryTable();
bool CanIdentify();
void ResetMapLayers();
bool InsertMapLayer(LayerListItem * layer, MyFrame * MainFrame);
bool InsertMapLayer(MapLayer * layer);
void DoFetchRasterExtent(MapLayer * layer);
void DoFetchVectorExtent(MapLayer * layer);
void DoFetchWMSextent(MapLayer * layer);
void DoFetchWMSconfig(MapLayer * layer);
void DoFetchRasterInfos(MapLayer * layer);
void DoFetchGetMapURL(MapLayer * layer);
void RemoveMapLayer(MapLayer * layer);
void ReinsertMapLayer(MapLayer * layer);
bool IsAlreadyDefined(LayerListItem * layer);
void OnEraseBackground(wxEraseEvent & WXUNUSED(event))
{;
}
void OnSize(wxSizeEvent & event);
void OnPaint(wxPaintEvent & event);
void OnMapImagePaintStep(wxCommandEvent & event);
void OnThreadFinished(wxCommandEvent & event);
void OnMouseMove(wxMouseEvent & event);
void OnMouseDragStop(wxMouseEvent & event);
void OnMouseClick(wxMouseEvent & event);
void OnMouseWheel(wxMouseEvent & event);
void OnTimerMouseWheel(wxTimerEvent & event);
void OnTimerMapPaint(wxTimerEvent & event);
void OnTimerMapBlink(wxTimerEvent & event);
void OnTimerMapTip(wxTimerEvent & event);
void OnKeyCenter(wxCommandEvent & event);
void OnKeyUp(wxCommandEvent & event);
void OnKeyDown(wxCommandEvent & event);
void OnKeyLeft(wxCommandEvent & event);
void OnKeyRight(wxCommandEvent & event);
void OnKeyZoomIn(wxCommandEvent & event);
void OnKeyZoomOut(wxCommandEvent & event);
void OnKeyMicroUp(wxCommandEvent & event);
void OnKeyMicroDown(wxCommandEvent & event);
void OnKeyMicroLeft(wxCommandEvent & event);
void OnKeyMicroRight(wxCommandEvent & event);
void OnKeyMicroZoomIn(wxCommandEvent & event);
void OnKeyMicroZoomOut(wxCommandEvent & event);
};
class MyMapPanelStatusBar:public wxStatusBar
{
//
// a status bar supporting Map Mapel
//
private:
class MyMapPanel * Parent;
wxStaticBitmap *Semaphore;
public:
MyMapPanelStatusBar(MyMapPanel * parent);
virtual ~ MyMapPanelStatusBar()
{;
}
void SetRedLight();
void SetGreenLight();
void SetYellowLight();
void OnSize(wxSizeEvent & event);
};
class MyMapPanel:public wxFrame
{
//
// the main Map Panel
//
private:
MyFrame * Parent;
MyMapPanelStatusBar *StatusBar;
wxString MapName;
wxString Title;
wxString Abstract;
wxAuiManager Manager; // the GUI manager
wxString ConfigLayout; // PERSISTENCY - the layout configuration
int ConfigPaneX; // PERSISTENCY - the map pane screen origin X
int ConfigPaneY; // PERSISTENCY - the map pane screen origin Y
int ConfigPaneWidth; // PERSISTENCY - the map pane screen width
int ConfigPaneHeight; // PERSISTENCY - the map pane screen height
MyLayerTree *LayerTree; // the layer tree list
MyMapView *MapView; // the map panel
wxBitmap *BtnLoadMapConfig; // button icon for loading a Map Configuration
wxBitmap *BtnAddLayer; // button icon for adding a Map Layer
wxBitmap *BtnSqlLayer; // button icon for querying a Map Layer
wxBitmap *BtnIdentify; // buttom icon for Identify
wxBitmap *BtnZoomIn; // button icon for Zoom In
wxBitmap *BtnZoomOut; // buttom icon for Zoom Out
wxBitmap *BtnPan; // button icon for Pan
wxBitmap *BtnMapImage; // button icon for MapImage
wxBitmap *BtnPrinter; // button icon for Printer (PDF)
wxBitmap *BtnAbout; // button icon for ABOUT
wxBitmap *BtnExit; // button icon for EXIT
bool IsIdentify; // current map click is: Identify
bool IsZoomIn; // current map click is: ZoomIn
bool IsZoomOut; // current map click is: ZoomOut
bool IsPan; // current map click is: Pan
IncompleteLayersList *CheckIncompleteLayers();
MapLayer *DoFetchLayerVector(const char *prefix, const char *name);
MapLayer *DoFetchLayerVectorView(const char *prefix, const char *name);
MapLayer *DoFetchLayerVectorVirtual(const char *prefix, const char *name);
MapLayer *DoFetchLayerTopology(const char *prefix, const char *name);
MapLayer *DoFetchLayerNetwork(const char *prefix, const char *name);
MapLayer *DoFetchLayerWMS(const char *prefix, const char *name);
MapLayer *DoFetchLayerRaster(const char *prefix, const char *name);
void GenericVector(MapLayer * mapLyr, rl2MapLayerPtr lyr);
void TopologyLayer(MapLayer * mapLyr, rl2MapLayerPtr lyr);
void NetworkLayer(MapLayer * mapLyr, rl2MapLayerPtr lyr);
void DoWmsLayer(MapLayer * mapLyr, rl2MapLayerPtr lyr);
void RasterLayer(MapLayer * mapLyr, rl2MapLayerPtr lyr);
int DoFindBrushId(const char *resource);
public:
MyMapPanel(MyFrame * parent, const wxString & title, const wxPoint & pos,
const wxSize & size);
virtual ~ MyMapPanel();
void DetachAll();
MyFrame *GetParent()
{
return Parent;
}
void SetMapName(wxString & name)
{
MapName = name;
}
wxString & GetMapName()
{
return MapName;
}
void SetTitle(wxString & title)
{
Title = title;
}
wxString & GetTitle()
{
return Title;
}
void SetAbstract(wxString & abstract)
{
Abstract = abstract;
}
wxString & GetAbstract()
{
return Abstract;
}
void UpdateTools();
void UpdateMapScale();
void UpdateMapCoords(wxString & coords);
void UpdateMapMode(wxString & mode);
void UpdateCurrentMapMode();
char *DoFetchRefSysName();
void UpdateMapSRID();
void SetRedLight()
{
StatusBar->SetRedLight();
}
void SetGreenLight()
{
StatusBar->SetGreenLight();
}
void SetYellowLight()
{
StatusBar->SetYellowLight();
}
void ParentQuit();
bool IsValidMap()
{
return MapView->IsValidMap();
}
void UpdateMapFullExtent()
{
MapView->UpdateMapFullExtent();
}
void SetMapToFullExtent()
{
MapView->SetMapToFullExtent();
MapView->PrepareMap();
}
void SetMapLayerToFullExtent(MapLayer * lyr)
{
MapView->SetMapLayerToFullExtent(lyr);
MapView->PrepareMap();
}
void ShowSelectedFeatures(MapFeaturesList * list, bool zoom_mode)
{
MapView->ShowSelectedFeatures(list, zoom_mode);
}
void InitializeSqlFilters(wxString & db_prefix, wxString & table,
bool read_only, wxString & geom_column)
{
Parent->InitializeSqlFilters(db_prefix, table, read_only, geom_column);
}
void UpdateMapViewPoint(int fromSrid, int toSrid)
{
MapView->UpdateMapViewPoint(fromSrid, toSrid);
}
int GetImageWidth()
{
return MapView->GetImageWidth();
}
int GetImageHeight()
{
return MapView->GetImageHeight();
}
void DoPrepareBBox(wxString & bbox)
{
MapView->DoPrepareBBox(bbox);
}
void GetBBox(int *srid, double *minx, double *miny, double *maxx,
double *maxy)
{
MapView->GetBBox(srid, minx, miny, maxx, maxy);
}
double GetMapMinX()
{
return MapView->GetMapMinX();
}
double GetMapMinY()
{
return MapView->GetMapMinY();
}
double GetMapMaxX()
{
return MapView->GetMapMaxX();
}
double GetMapMaxY()
{
return MapView->GetMapMaxY();
}
double GetGeoMinX()
{
return MapView->GetGeoMinX();
}
double GetGeoMinY()
{
return MapView->GetGeoMinY();
}
double GetGeoMaxX()
{
return MapView->GetGeoMaxX();
}
double GetGeoMaxY()
{
return MapView->GetGeoMaxY();
}
void EnableMapMultiThreading(bool mode)
{
Parent->EnableMapMultiThreading(mode);
MapView->EnableMultiThreading(mode);
}
bool IsMapMultiThreadingEnabled()
{
return Parent->IsMapMultiThreadingEnabled();
}
void SetMapMaxThreads(int max)
{
Parent->SetMapMaxThreads(max);
MapView->SetMaxThreads(max);
}
int GetMapMaxThreads()
{
return Parent->GetMapMaxThreads();
}
void UpdateMaxThreads();
rl2WmsCachePtr GetWmsCache()
{
return Parent->GetWmsCache();
}
wxString & GetHttpProxy()
{
return Parent->GetHttpProxy();
}
void EnableMapAutoTransform(bool mode)
{
Parent->EnableMapAutoTransform(mode);
MapView->EnableAutoTransform(mode);
}
bool IsMapAutoTransformEnabled()
{
return Parent->IsMapAutoTransformEnabled();
}
bool IsRasterWmsAutoSwitch()
{
return MapView->IsRasterWmsAutoSwitch();
}
void SetRasterWmsAutoSwitch(bool mode)
{
MapView->SetRasterWmsAutoSwitch(mode);
}
bool IsLabelAntiCollision()
{
return MapView->IsLabelAntiCollision();
}
void SetLabelAntiCollision(bool mode)
{
MapView->SetLabelAntiCollision(mode);
}
bool IsLabelWrapText()
{
return MapView->IsLabelWrapText();
}
void SetLabelWrapText(bool mode)
{
MapView->SetLabelWrapText(mode);
}
bool IsLabelAutoRotate()
{
return MapView->IsLabelAutoRotate();
}
void SetLabelAutoRotate(bool mode)
{
MapView->SetLabelAutoRotate(mode);
}
bool IsLabelShiftPosition()
{
return MapView->IsLabelShiftPosition();
}
void SetLabelShiftPosition(bool mode)
{
MapView->SetLabelShiftPosition(mode);
}
bool IsGeographicCoordsDMS()
{
return MapView->IsGeographicCoordsDMS();
}
void SetGeographicCoordsDMS(bool mode)
{
MapView->SetGeographicCoordsDMS(mode);
}
void SetSql(wxString & str, bool execute)
{
wxString dummy;
return Parent->SetSql(str, execute, false, dummy, dummy, true);
}
bool IsCheckeredMapBackground()
{
return MapView->IsCheckeredMapBackground();
}
void SetCheckeredMapBackground(bool mode)
{
MapView->SetCheckeredMapBackground(mode);
}
wxColour & GetSolidMapBackground()
{
return MapView->GetSolidMapBackground();
}
void SetSolidMapBackground(wxColour & color)
{
MapView->SetSolidMapBackground(color);
}
void SetRasterWmwAutoSwitch(bool mode)
{
MapView->SetRasterWmsAutoSwitch(mode);
}
MapConfigAttached *CreateAttachedList()
{
return MapView->CreateAttachedList();
}
bool IsModeIdentify()
{
return IsIdentify;
}
bool IsModeZoomIn()
{
return IsZoomIn;
}
bool IsModeZoomOut()
{
return IsZoomOut;
}
bool IsModePan()
{
return IsPan;
}
void SetMapSRID(int srid)
{
MapView->SetMapSRID(srid);
}
int GetMapSRID()
{
return MapView->GetMapSRID();
}
void AdjustLayersMapSRID()
{
MapView->AdjustLayersMapSRID();
}
bool IsGeographicSRID(int srid);
void ResetMapLayers()
{
MapView->ResetMapLayers();
}
MapLayer *GetFirstMapLayer()
{
return MapView->GetFirstLayer();
}
void ReinsertMapLayer(MapLayer * layer)
{
MapView->ReinsertMapLayer(layer);
}
MapLayer *GetActiveLayer()
{
return MapView->GetActiveLayer();
}
void SetActiveMapLayer(MapLayer * layer)
{
MapView->SetActiveMapLayer(layer);
UpdateTools();
}
bool IsActiveLayer(MapLayer * layer)
{
return MapView->IsActiveLayer(layer);
}
void RemoveMapLayer(MapLayer * layer)
{
MapView->RemoveMapLayer(layer);
}
bool InsertMapLayer(LayerListItem * layer, MyFrame * MainFrame)
{
return MapView->InsertMapLayer(layer, MainFrame);
}
MyLayerTree *GetLayerTree()
{
return LayerTree;
}
void RebuildLayerTree()
{
MapView->RebuildLayerTree(LayerTree);
}
bool IsAlreadyDefined(LayerListItem * layer)
{
return MapView->IsAlreadyDefined(layer);
}
void RefreshMap()
{
MapView->PrepareMap();
}
sqlite3 *GetSqlite()
{
return Parent->GetSqlite();
}
void *GetRL2PrivateData()
{
return Parent->GetRL2PrivateData();
}
void ResolveAttachedDbPaths(MapXmlConfig * cfg);
void OnLoadMapConfig(wxCommandEvent & event);
void OnAddLayer(wxCommandEvent & event);
void OnSqlLayer(wxCommandEvent & event);
void OnIdentify(wxCommandEvent & event);
void OnZoomIn(wxCommandEvent & event);
void OnZoomOut(wxCommandEvent & event);
void OnPan(wxCommandEvent & event);
void OnMapImage(wxCommandEvent & event);
void OnPrinter(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
void OnAbout(wxCommandEvent & event);
};
class AddMapLayerDialog:public wxDialog
{
//
// a Dialog for adding a Map Layer
//
private:
MyMapPanel * MapPanel;
LayerListItem *First;
LayerListItem *Last;
wxGrid *Layers;
int NumRows;
void FlushList();
void AddLayer2List(wxString & db_prefix, wxString & name, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, bool queryable, int srid);
void AddLayer2List(wxString & db_prefix, wxString & name, wxString & title,
wxString & abstract, wxString & copyright,
wxString & data_license, int srid, bool queryable);
void AddLayer2List(wxString & db_prefix, wxString & layer_prefix,
wxString & name, wxString & title, wxString & abstract,
wxString & copyright, wxString & data_license,
const char *f_table_name, const char *f_geometry_column,
int geom_type, int srid, bool queryable, bool editable,
bool spatial_index, const char *view_table_name =
NULL, const char *view_geometry_column =
NULL, const char *view_rowid_column = NULL);
void AddLayer2List(wxString & db_prefix, int type, wxString & name,
wxString & title, wxString & abstract,
wxString & copyright, wxString & data_license,
const char *topo_name, bool has_z, int srid,
bool queryable, bool editable);
void DoLoadVectorCoverages();
void DoLoadTopologyCoverages();
void DoLoadNetworkCoverages();
void DoLoadRasterCoverages();
void DoLoadWmsCoverages();
char *QueryVectorCoverages(const char *db_prefix, const char *old_sql);
char *QuerySpatialViewCoverages(const char *db_prefix, const char *old_sql);
char *QueryVirtualTableCoverages(const char *db_prefix, const char *old_sql);
char *QueryTopologyCoverages(const char *db_prefix, const char *old_sql);
char *QueryNetworkCoverages(const char *db_prefix, const char *old_sql);
char *QueryRasterCoverages(const char *db_prefix, const char *old_sql);
char *QueryWmsCoverages(const char *db_prefix, const char *old_sql);
bool DoCheckGeometryColumns(const char *db_prefix);
bool DoCheckViewsGeometryColumns(const char *db_prefix);
bool DoCheckVirtsGeometryColumns(const char *db_prefix);
bool DoCheckTopologies(const char *db_prefix);
bool DoCheckNetworks(const char *db_prefix);
bool DoCheckVectorCoverages(const char *db_prefix);
bool DoCheckTopoGeoCoverages(const char *db_prefix);
bool DoCheckTopoNetCoverages(const char *db_prefix);
bool DoCheckRasterCoverages(const char *db_prefix);
bool DoCheckWmsCoverages(const char *db_prefix);
void DoSplitMultilines(wxString & in, wxString & out);
public:
AddMapLayerDialog()
{
MapPanel = NULL;
First = NULL;
Last = NULL;
}
AddMapLayerDialog(MyMapPanel * parent)
{
Create(parent);
}
bool Create(MyMapPanel * parent);
virtual ~ AddMapLayerDialog()
{
FlushList();
}
void CreateControls();
static int ParseSRID(const char *crs);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class MapLayerInfoDialog:public wxDialog
{
//
// a Dialog for showing Map Layer Metadata
//
private:
MyMapPanel * MapPanel;
MapLayer *Layer;
wxGrid *Extents;
void DoFetchRefSysName(int srid, wxString & name);
public:
MapLayerInfoDialog()
{
MapPanel = NULL;
Layer = NULL;
}
MapLayerInfoDialog(MyMapPanel * parent, MapLayer * layer)
{
Create(parent, layer);
}
bool Create(MyMapPanel * parent, MapLayer * layer);
virtual ~ MapLayerInfoDialog()
{;
}
void CreateControls();
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class MapConfigDialog:public wxPropertySheetDialog
{
//
// a Dialog for setting global Map Options
//
private:
MyMapPanel * MapPanel;
wxString MapName;
wxString Title;
wxString Abstract;
bool MultiThreadingEnabled;
int MaxThreads;
bool AutoTransformEnabled;
int OldMapSRID;
int MapSRID;
wxGrid *Extents;
bool RasterWmsAutoSwitch;
bool LabelAntiCollision;
bool LabelWrapText;
bool LabelAutoRotate;
bool LabelShiftPosition;
bool GeographicCoordsDMS;
bool CheckeredMapBackground;
wxColour SolidMapBackground;
bool IsConfigChanged;
wxPanel *CreateMainPage(wxWindow * book);
wxPanel *CreateSrsPage(wxWindow * book);
wxPanel *CreateOptionsPage(wxWindow * book);
bool RetrieveMainPage();
bool RetrieveSrsPage(bool check = true);
bool RetrieveOptionsPage(bool check = true);
void UpdateMainPage();
void UpdateSrsPage();
void UpdateOptionsPage();
bool UpdateRefSysName();
void GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp);
void DoUpdateMapExtent();
char *DoCreateMapConfigXML();
bool FinalValidityCheck();
bool CheckExistingMapConfiguration(const char *name, int *id);
public:
MapConfigDialog()
{
MapPanel = NULL;
}
MapConfigDialog(MyMapPanel * parent)
{
Create(parent);
}
bool Create(MyMapPanel * parent);
virtual ~ MapConfigDialog()
{;
}
void CreateButtons();
void OnPageChanging(wxNotebookEvent & event);
void OnPageChanged(wxNotebookEvent & event);
void OnMultiThreadChanged(wxCommandEvent & event);
void OnAutoTransformChanged(wxCommandEvent & event);
void OnMapSridChanged(wxCommandEvent & event);
void OnMapBackgroundChanged(wxCommandEvent & event);
void OnMapBackgroundColorChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnQuit(wxCommandEvent & event);
void OnInsert(wxCommandEvent & event);
void OnExport(wxCommandEvent & event);
void OnCopy(wxCommandEvent & event);
};
class MapImageDialog:public wxDialog
{
//
// a Dialog for creating map images
//
private:
MyMapPanel * MapPanel;
int HorzPixels;
int VertPixels;
int ImageFormat;
int CompressionMethod;
int Quality;
bool WorldFile;
bool GeoTiff;
public:
MapImageDialog()
{
MapPanel = NULL;
}
MapImageDialog(MyMapPanel * parent)
{
Create(parent);
}
bool Create(MyMapPanel * parent);
virtual ~ MapImageDialog()
{;
}
void CreateControls();
int GetHorzPixels()
{
return HorzPixels;
}
int GetVertPixels()
{
return VertPixels;
}
int GetImageFormat()
{
return ImageFormat;
}
int GetCompressionMethos()
{
return CompressionMethod;
}
int GetQuality()
{
return Quality;
}
bool HasWorldFile()
{
return WorldFile;
}
bool IsGeoTiff()
{
return GeoTiff;
}
void OnImageFormatChanged(wxCommandEvent & event);
void OnCompressionChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class PrinterDialog:public wxDialog
{
//
// a Dialog for Printing PDF maps
//
private:
MyMapPanel * MapPanel;
int HorzPixels;
int VertPixels;
int MarginWidth;
int PaperFormat;
int Dpi;
bool Portrait;
void DoUpdateSize();
public:
PrinterDialog()
{
MapPanel = NULL;
}
PrinterDialog(MyMapPanel * parent)
{
Create(parent);
}
bool Create(MyMapPanel * parent);
virtual ~ PrinterDialog()
{;
}
void CreateControls();
int GetHorzPixels()
{
return HorzPixels;
}
int GetVertPixels()
{
return VertPixels;
}
int GetMarginWidth()
{
return MarginWidth;
}
void OnPaperFormatChanged(wxCommandEvent & event);
void OnDpiChanged(wxCommandEvent & event);
void OnPortraitChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class AddAllRastersSridDialog:public wxDialog
{
//
// a Dialog for adding multiple alternative SRIDs
//
private:
MyFrame * MainFrame;
bool FetchRefSysName(int srid, wxString & name);
public:
AddAllRastersSridDialog()
{
MainFrame = NULL;
}
AddAllRastersSridDialog(MyFrame * parent)
{
Create(parent);
}
bool Create(MyFrame * parent);
virtual ~ AddAllRastersSridDialog()
{;
}
void CreateControls();
void OnNewSridChanged(wxCommandEvent & event);
void OnOldSridChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class AddAllVectorsSridDialog:public wxDialog
{
//
// a Dialog for adding multiple alternative SRIDs
//
private:
MyFrame * MainFrame;
bool FetchRefSysName(int srid, wxString & name);
public:
AddAllVectorsSridDialog()
{
MainFrame = NULL;
}
AddAllVectorsSridDialog(MyFrame * parent)
{
Create(parent);
}
bool Create(MyFrame * parent);
virtual ~ AddAllVectorsSridDialog()
{;
}
void CreateControls();
void OnNewSridChanged(wxCommandEvent & event);
void OnOldSridChanged(wxCommandEvent & event);
void OnOk(wxCommandEvent & event);
void OnCancel(wxCommandEvent & event);
};
class SingleLayerPainter
{
//
// an helper class to paint a MapLayer image
//
private:
bool Locked;
bool OnScreen;
int Retry;
unsigned int Width;
unsigned int Height;
MapLayer *Layer;
SingleLayerPainter *Next;
public:
SingleLayerPainter(unsigned int width, unsigned int height,
MapLayer * layer);
~SingleLayerPainter()
{;
}
int GetRetryCount()
{
return Retry;
}
void IncrementRetryCount()
{
Retry++;
}
bool IsOnScreen()
{
return OnScreen;
}
void SetOnScreen(bool mode)
{
OnScreen = mode;
}
bool IsLocked()
{
return Locked;
}
void SetLocked(bool mode)
{
Locked = mode;
}
unsigned int GetWidth()
{
return Width;
}
unsigned int GetHeight()
{
return Height;
}
MapLayer *GetLayer()
{
return Layer;
}
bool IsReady();
void SetNext(SingleLayerPainter * next)
{
Next = next;
}
SingleLayerPainter *GetNext()
{
return Next;
}
};
class MultiLayerPainter
{
//
// an helper class to paint a Map image
//
private:
MyMapView * Map;
unsigned int Width;
unsigned int Height;
rl2GraphicsContextPtr Graphics;
bool Changed;
SingleLayerPainter *First;
SingleLayerPainter *Last;
public:
MultiLayerPainter(MyMapView * map, unsigned int width, unsigned int height);
~MultiLayerPainter();
unsigned int GetWidth()
{
return Width;
}
unsigned int GetHeight()
{
return Height;
}
bool IsChanged()
{
return Changed;
}
void SetChanged(bool mode)
{
Changed = mode;
}
bool IsReady();
bool IsExhausted();
void InsertLayer(MapLayer * layer);
void ResetGraphics();
rl2GraphicsContextPtr GetGraphicsContext()
{
return Graphics;
}
unsigned char *GetRGB();
unsigned char *GetAlpha();
SingleLayerPainter *GetFirst()
{
return First;
}
};
class MapFeatureGeom
{
//
// a class storing a Geometry (selected Map Feature)
//
private:
gaiaGeomCollPtr Geometry;
MapFeatureGeom *Next;
public:
MapFeatureGeom(gaiaGeomCollPtr geom)
{
Geometry = geom;
Next = NULL;
}
~MapFeatureGeom()
{
gaiaFreeGeomColl(Geometry);
}
gaiaGeomCollPtr GetGeometry()
{
return Geometry;
}
MapFeatureGeom *GetNext()
{
return Next;
}
void SetNext(MapFeatureGeom * next)
{
Next = next;
}
};
class MapFeaturesList
{
//
// a class storing a list of Geometries (selected Map Features)
//
private:
int Srid;
double MinX;
double MinY;
double MaxX;
double MaxY;
MapFeatureGeom *First;
MapFeatureGeom *Last;
public:
MapFeaturesList(int srid)
{
Srid = srid;
First = NULL;
Last = NULL;
}
~MapFeaturesList();
void Add(gaiaGeomCollPtr geom);
MapFeatureGeom *GetFirst()
{
return First;
}
void UpdateBBox();
int GetSRID()
{
return Srid;
}
double GetMinX()
{
return MinX;
}
double GetMinY()
{
return MinY;
}
double GetMaxX()
{
return MaxX;
}
double GetMaxY()
{
return MaxY;
}
};
spatialite_gui-2.1.0-beta1/QuickStylesVector.cpp 0000664 0001750 0001750 00000663744 13711576502 016634 0000000 0000000 /*
/ QuickStylesVector.cpp
/ Quick Styles wizards (Vector layers)
/
/ version 2.0, 2017 May 26
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2017 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include "Classdef.h"
#include "wx/spinctrl.h"
#include "wx/imaglist.h"
#include "wx/colordlg.h"
#include "wx/filename.h"
#include "wx/clipbrd.h"
QuickStyleObj::QuickStyleObj(int type)
{
// ctor
DoGetUUID(UUID);
Type = type;
MinScaleEnabled = false;
MaxScaleEnabled = false;
ScaleMin = 0.0;
ScaleMax = 0.0;
SymbolOpacity = 1.0;
SymbolSize = 16;
SymbolRotation = 0.0;
SymbolAnchorX = 0.5;
SymbolAnchorY = 0.5;
SymbolDisplacementX = 0.0;
SymbolDisplacementY = 0.0;
SymbolWellKnownMark = RandomWellKnownMark();
RandomColor(SymbolFillColor);
RandomColor(SymbolStrokeColor);
LineOpacity = 1.0;
LinePerpendicularOffset = 0.0;
LineStrokeWidth = 1.0;
RandomColor(LineStrokeColor);
LineDotStyle = QUICK_STYLE_SOLID_LINE;
Line2Enabled = false;
Line2StrokeWidth = 1.0;
RandomColor(Line2StrokeColor);
Line2DotStyle = QUICK_STYLE_SOLID_LINE;
PolygonFill = true;
PolygonStroke = true;
PolygonDisplacementX = 0.0;
PolygonDisplacementY = 0.0;
PolygonPerpendicularOffset = 0.0;
PolygonFillOpacity = 1.0;
RandomColor(PolygonFillColor);
PolygonSolidFill = true;
PolygonFillBrushId = 0;
PolygonStrokeOpacity = 1.0;
PolygonStrokeWidth = 1.0;
RandomColor(PolygonStrokeColor);
LabelLinePlacement = true;
LabelPrint = false;
DontPaintGeomSymbolizer = false;
LabelColumn = NULL;
FontFacename = NULL;
FontSize = 10.0;
FontStyle = RL2_FONTSTYLE_NORMAL;
FontWeight = RL2_FONTWEIGHT_NORMAL;
FontOpacity = 1.0;
strcpy(FontColor, "#000000");
HasHalo = false;
HaloRadius = 1.0;
HaloOpacity = 1.0;
strcpy(HaloColor, "#ffffff");
LabelAnchorX = 0.5;
LabelAnchorY = 0.5;
LabelDisplacementX = 0.0;
LabelDisplacementY = 0.0;
LabelRotation = 0.0;
LabelPerpendicularOffset = 0.0;
RepeatedLabel = false;
LabelInitialGap = 0.0;
LabelGap = 0.0;
LabelIsAligned = false;
LabelGeneralizeLine = false;
XmlStyle = NULL;
}
QuickStyleObj *QuickStyleObj::Clone()
{
//
// cloning a Quick Style
//
QuickStyleObj *Style = new QuickStyleObj(this->Type);
strcpy(Style->UUID, this->UUID);
Style->MinScaleEnabled = this->MinScaleEnabled;
Style->MaxScaleEnabled = this->MaxScaleEnabled;
Style->ScaleMin = this->ScaleMin;
Style->ScaleMax = this->ScaleMax;
Style->SymbolOpacity = this->SymbolOpacity;
Style->SymbolSize = this->SymbolSize;
Style->SymbolRotation = this->SymbolRotation;
Style->SymbolAnchorX = this->SymbolAnchorX;
Style->SymbolAnchorY = this->SymbolAnchorY;
Style->SymbolDisplacementX = this->SymbolDisplacementX;
Style->SymbolDisplacementY = this->SymbolDisplacementY;
Style->SymbolWellKnownMark = this->SymbolWellKnownMark;
strcpy(Style->SymbolFillColor, this->SymbolFillColor);
strcpy(Style->SymbolStrokeColor, this->SymbolStrokeColor);
Style->LineOpacity = this->LineOpacity;
Style->LinePerpendicularOffset = this->LinePerpendicularOffset;
Style->LineStrokeWidth = this->LineStrokeWidth;
strcpy(Style->LineStrokeColor, this->LineStrokeColor);
Style->LineDotStyle = this->LineDotStyle;
Style->Line2Enabled = this->Line2Enabled;
Style->Line2StrokeWidth = this->Line2StrokeWidth;
strcpy(Style->Line2StrokeColor, this->Line2StrokeColor);
Style->Line2DotStyle = this->Line2DotStyle;
Style->PolygonFill = this->PolygonFill;
Style->PolygonStroke = this->PolygonStroke;
Style->PolygonDisplacementX = this->PolygonDisplacementX;
Style->PolygonDisplacementY = this->PolygonDisplacementY;
Style->PolygonPerpendicularOffset = this->PolygonPerpendicularOffset;
Style->PolygonFillOpacity = this->PolygonFillOpacity;
strcpy(Style->PolygonFillColor, this->PolygonFillColor);
Style->PolygonSolidFill = this->PolygonSolidFill;
Style->PolygonFillBrushId = this->PolygonFillBrushId;
Style->PolygonStrokeOpacity = this->PolygonStrokeOpacity;
Style->PolygonStrokeWidth = this->PolygonStrokeWidth;
strcpy(Style->PolygonStrokeColor, this->PolygonStrokeColor);
Style->LabelLinePlacement = this->LabelLinePlacement;
Style->LabelPrint = this->LabelPrint;
Style->DontPaintGeomSymbolizer = this->DontPaintGeomSymbolizer;
if (this->LabelColumn == NULL)
Style->LabelColumn = NULL;
else
{
int len = strlen(this->LabelColumn);
Style->LabelColumn = (char *) malloc(len + 1);
strcpy(Style->LabelColumn, this->LabelColumn);
}
if (this->FontFacename == NULL)
Style->FontFacename = NULL;
else
{
int len = strlen(this->FontFacename);
Style->FontFacename = (char *) malloc(len + 1);
strcpy(Style->FontFacename, this->FontFacename);
}
Style->FontSize = this->FontSize;
Style->FontStyle = this->FontStyle;
Style->FontWeight = this->FontWeight;
Style->FontOpacity = this->FontOpacity;
strcpy(Style->FontColor, this->FontColor);
Style->HasHalo = this->HasHalo;
Style->HaloRadius = this->HaloRadius;
Style->HaloOpacity = this->HaloOpacity;
strcpy(Style->HaloColor, this->HaloColor);
Style->LabelAnchorX = this->LabelAnchorX;
Style->LabelAnchorY = this->LabelAnchorY;
Style->LabelDisplacementX = this->LabelDisplacementX;
Style->LabelDisplacementY = this->LabelDisplacementY;
Style->LabelRotation = this->LabelRotation;
Style->LabelPerpendicularOffset = this->LabelPerpendicularOffset;
Style->RepeatedLabel = this->RepeatedLabel;
Style->LabelInitialGap = this->LabelInitialGap;
Style->LabelGap = this->LabelGap;
Style->LabelIsAligned = this->LabelIsAligned;
Style->LabelGeneralizeLine = this->LabelGeneralizeLine;
Style->XmlStyle = NULL;
return Style;
}
bool QuickStyleObj::Compare(QuickStyleObj * Style)
{
//
// comparing two Quick Style objects
//
if (Style == NULL)
return false;
if (strcmp(Style->UUID, this->UUID) != 0)
return false;
if (Style->MinScaleEnabled != this->MinScaleEnabled)
return false;
if (Style->MaxScaleEnabled != this->MaxScaleEnabled)
return false;
if (Style->ScaleMin != this->ScaleMin)
return false;
if (Style->ScaleMax != this->ScaleMax)
return false;
if (Style->SymbolOpacity != this->SymbolOpacity)
return false;
if (Style->SymbolSize != this->SymbolSize)
return false;
if (Style->SymbolRotation != this->SymbolRotation)
return false;
if (Style->SymbolAnchorX != this->SymbolAnchorX)
return false;
if (Style->SymbolAnchorY != this->SymbolAnchorY)
return false;
if (Style->SymbolDisplacementX != this->SymbolDisplacementX)
return false;
if (Style->SymbolDisplacementY != this->SymbolDisplacementY)
return false;
if (Style->SymbolWellKnownMark != this->SymbolWellKnownMark)
return false;
if (strcmp(Style->SymbolFillColor, this->SymbolFillColor) != 0)
return false;
if (strcmp(Style->SymbolStrokeColor, this->SymbolStrokeColor) != 0)
return false;
if (Style->LineOpacity != this->LineOpacity)
return false;
if (Style->LinePerpendicularOffset != this->LinePerpendicularOffset)
return false;
if (Style->LineStrokeWidth != this->LineStrokeWidth)
return false;
if (strcmp(Style->LineStrokeColor, this->LineStrokeColor) != 0)
return false;
if (Style->LineDotStyle != this->LineDotStyle)
return false;
if (Style->Line2Enabled != this->Line2Enabled)
return false;
if (Style->Line2StrokeWidth != this->Line2StrokeWidth)
return false;
if (strcmp(Style->Line2StrokeColor, this->Line2StrokeColor) != 0)
return false;
if (Style->Line2DotStyle != this->Line2DotStyle)
return false;
if (Style->PolygonFill != this->PolygonFill)
return false;
if (Style->PolygonStroke != this->PolygonStroke)
return false;
if (Style->PolygonDisplacementX != this->PolygonDisplacementX)
return false;
if (Style->PolygonDisplacementY != this->PolygonDisplacementY)
return false;
if (Style->PolygonPerpendicularOffset != this->PolygonPerpendicularOffset)
return false;
if (Style->PolygonFillOpacity != this->PolygonFillOpacity)
return false;
if (strcmp(Style->PolygonFillColor, this->PolygonFillColor) != 0)
return false;
if (Style->PolygonSolidFill != this->PolygonSolidFill)
return false;
if (Style->PolygonSolidFill == false && this->PolygonSolidFill == false)
{
if (Style->PolygonFillBrushId != this->PolygonFillBrushId)
return false;
}
if (Style->PolygonStrokeOpacity != this->PolygonStrokeOpacity)
return false;
if (Style->PolygonStrokeWidth != this->PolygonStrokeWidth)
return false;
if (strcmp(Style->PolygonStrokeColor, this->PolygonStrokeColor) != 0)
return false;
if (Style->LabelLinePlacement != this->LabelLinePlacement)
return false;
if (Style->LabelPrint != this->LabelPrint)
return false;
if (Style->DontPaintGeomSymbolizer != this->DontPaintGeomSymbolizer)
return false;
if (Style->LabelColumn == NULL && this->LabelColumn == NULL)
;
else if (Style->LabelColumn == NULL && this->LabelColumn != NULL)
return false;
else if (Style->LabelColumn != NULL && this->LabelColumn == NULL)
return false;
else if (strcmp(Style->LabelColumn, this->LabelColumn) != 0)
return false;
if (Style->FontFacename == NULL && this->FontFacename == NULL)
;
else if (Style->FontFacename == NULL && this->FontFacename != NULL)
return false;
else if (Style->FontFacename != NULL && this->FontFacename == NULL)
return false;
else if (strcmp(Style->FontFacename, this->FontFacename) != 0)
return false;
if (Style->FontSize != this->FontSize)
return false;
if (Style->FontStyle != this->FontStyle)
return false;
if (Style->FontWeight != this->FontWeight)
return false;
if (Style->FontOpacity != this->FontOpacity)
return false;
if (strcmp(Style->FontColor, this->FontColor) != 0)
return false;
if (Style->HasHalo != this->HasHalo)
return false;
if (Style->HaloRadius != this->HaloRadius)
return false;
if (Style->HaloOpacity != this->HaloOpacity)
return false;
if (strcmp(Style->HaloColor, this->HaloColor) != 0)
return false;
if (Style->LabelAnchorX != this->LabelAnchorX)
return false;
if (Style->LabelAnchorY != this->LabelAnchorY)
return false;
if (Style->LabelDisplacementX != this->LabelDisplacementX)
return false;
if (Style->LabelDisplacementY != this->LabelDisplacementY)
return false;
if (Style->LabelRotation != this->LabelRotation)
return false;
if (Style->LabelPerpendicularOffset != this->LabelPerpendicularOffset)
return false;
if (Style->RepeatedLabel != this->RepeatedLabel)
return false;
if (Style->LabelInitialGap != this->LabelInitialGap)
return false;
if (Style->LabelGap != this->LabelGap)
return false;
if (Style->LabelIsAligned != this->LabelIsAligned)
return false;
if (Style->LabelGeneralizeLine != this->LabelGeneralizeLine)
return false;
return true;
}
void QuickStyleObj::SetLabelColumn(const char *x)
{
//
// setting the Label Column
//
int len;
if (LabelColumn != NULL)
free(LabelColumn);
LabelColumn = NULL;
if (x == NULL)
return;
len = strlen(x);
LabelColumn = (char *) malloc(len + 1);
strcpy(LabelColumn, x);
}
void QuickStyleObj::SetFontFacename(const char *x)
{
//
// setting the Font Facename
//
int len;
if (FontFacename != NULL)
free(FontFacename);
FontFacename = NULL;
if (x == NULL)
return;
len = strlen(x);
FontFacename = (char *) malloc(len + 1);
strcpy(FontFacename, x);
}
void QuickStyleObj::UpdateXmlStyle()
{
//
// updating the XML Style
//
if (XmlStyle != NULL)
sqlite3_free(XmlStyle);
XmlStyle = CreateXmlStyle();
}
char *QuickStyleObj::CreateXmlStyle()
{
//
// creating the XML Style
//
char *xml;
if ((MinScaleEnabled == true || MaxScaleEnabled == true) || LabelPrint == true
|| Type == QUICK_STYLE_GEOMETRY || Line2Enabled == true)
xml = DoCreateFeatureTypeXML();
else
xml = DoCreateSymbolizerXML(false);
return xml;
}
char *QuickStyleObj::DoCreateFeatureTypeXML()
{
//
// creating a FeatureType XML Style
//
char *prev;
char *xml2;
char *xml = sqlite3_mprintf("\r\n");
prev = xml;
xml = sqlite3_mprintf("%s\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t%s\r\n", prev, UUID);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, "Quick Style");
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Created by SpatialiteGUI");
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
if (MinScaleEnabled == true)
{
xml =
sqlite3_mprintf
("%s\t\t%1.2f\r\n", prev,
ScaleMin);
sqlite3_free(prev);
prev = xml;
}
if (MaxScaleEnabled == true)
{
xml =
sqlite3_mprintf
("%s\t\t%1.2f\r\n", prev,
ScaleMax);
sqlite3_free(prev);
prev = xml;
}
xml2 = NULL;
if (Type == QUICK_STYLE_POINT)
xml2 = DoCreatePointSymbolizerXML(true);
else if (Type == QUICK_STYLE_LINE)
xml2 = DoCreateLineSymbolizerXML(true);
else if (Type == QUICK_STYLE_POLYGON)
xml2 = DoCreatePolygonSymbolizerXML(true);
else
{
// mixed-type Symbolizers
xml2 = DoCreatePointSymbolizerXML(true);
if (xml2 != NULL)
{
xml = sqlite3_mprintf("%s%s", prev, xml2);
sqlite3_free(prev);
sqlite3_free(xml2);
prev = xml;
}
xml2 = DoCreateLineSymbolizerXML(true);
if (xml2 != NULL)
{
xml = sqlite3_mprintf("%s%s", prev, xml2);
sqlite3_free(prev);
sqlite3_free(xml2);
prev = xml;
}
xml2 = DoCreatePolygonSymbolizerXML(true);
if (xml2 != NULL)
{
xml = sqlite3_mprintf("%s%s", prev, xml2);
sqlite3_free(prev);
sqlite3_free(xml2);
xml2 = NULL;
prev = xml;
}
}
if (xml2 != NULL)
{
xml = sqlite3_mprintf("%s%s", prev, xml2);
sqlite3_free(prev);
sqlite3_free(xml2);
prev = xml;
}
if (LabelPrint == true)
{
// adding a Text Symbolizer
xml2 = NULL;
if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_POLYGON)
xml2 = DoCreateTextPointSymbolizerXML();
if (Type == QUICK_STYLE_LINE)
xml2 = DoCreateTextLineSymbolizerXML();
if (xml2 != NULL)
{
xml = sqlite3_mprintf("%s%s", prev, xml2);
sqlite3_free(prev);
sqlite3_free(xml2);
prev = xml;
}
}
xml = sqlite3_mprintf("%s\t\r\n\r\n", prev);
sqlite3_free(prev);
return xml;
}
char *QuickStyleObj::DoCreateSymbolizerXML(bool subordered)
{
//
// creating a Symbolizer XML Style
//
if (Type == QUICK_STYLE_POINT)
return DoCreatePointSymbolizerXML(subordered);
if (Type == QUICK_STYLE_LINE)
return DoCreateLineSymbolizerXML(subordered);
if (Type == QUICK_STYLE_POLYGON)
return DoCreatePolygonSymbolizerXML(subordered);
return NULL;
}
char *QuickStyleObj::DoCreatePointSymbolizerXML(bool subordered)
{
//
// creating a Point Symbolizer XML Style
//
const char *cstr;
char *prev;
const char *extra = "";
char *xml = sqlite3_mprintf("\r\n");
if (subordered == true)
{
extra = "\t\t";
sqlite3_free(xml);
prev = (char *) "";
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
} else
{
prev = xml;
xml = sqlite3_mprintf("%s\r\n",
prev, cstr);
sqlite3_free(prev);
}
prev = xml;
if (subordered != true)
{
xml = sqlite3_mprintf("%s\t%s\r\n", prev, UUID);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Quick Style - PointSymbolizer");
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Created by SpatialiteGUI");
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
// mark symbol
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
switch (SymbolWellKnownMark)
{
case RL2_GRAPHIC_MARK_CIRCLE:
cstr = "circle";
break;
case RL2_GRAPHIC_MARK_TRIANGLE:
cstr = "triangle";
break;
case RL2_GRAPHIC_MARK_STAR:
cstr = "star";
break;
case RL2_GRAPHIC_MARK_CROSS:
cstr = "cross";
break;
case RL2_GRAPHIC_MARK_X:
cstr = "x";
break;
default:
cstr = "square";
break;
};
xml =
sqlite3_mprintf("%s%s\t\t\t%s\r\n", prev,
extra, cstr);
sqlite3_free(prev);
prev = xml;
// Mark Fill
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t%s\r\n",
prev, extra, SymbolFillColor);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
// Mark Stroke
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t%s\r\n",
prev, extra, SymbolStrokeColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t%1.2f\r\n",
prev, extra, 1.0);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
if (SymbolOpacity != 1.0)
{
xml =
sqlite3_mprintf("%s%s\t\t%1.2f\r\n", prev, extra,
SymbolOpacity);
sqlite3_free(prev);
prev = xml;
}
xml =
sqlite3_mprintf("%s%s\t\t%1.2f\r\n", prev, extra, SymbolSize);
sqlite3_free(prev);
prev = xml;
if (SymbolRotation != 0.0)
{
xml =
sqlite3_mprintf("%s%s\t\t%1.2f\r\n", prev, extra,
SymbolRotation);
sqlite3_free(prev);
prev = xml;
}
if (SymbolAnchorX != 0.5 || SymbolAnchorY != 0.5)
{
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t%1.4f\r\n",
prev, extra, SymbolAnchorX);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t%1.4f\r\n",
prev, extra, SymbolAnchorY);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
if (SymbolDisplacementX != 0.0 || SymbolDisplacementY != 0.0)
{
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t%1.4f\r\n",
prev, extra, SymbolDisplacementX);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t%1.4f\r\n",
prev, extra, SymbolDisplacementY);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t
\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
sqlite3_free(prev);
return xml;
}
char *QuickStyleObj::DoCreateLineSymbolizerXML(bool subordered)
{
//
// creating a Line Symbolizer XML Style
//
const char *cstr;
char *prev;
const char *extra = "";
char *xml = sqlite3_mprintf("\r\n");
prev = xml;
if (subordered == true)
{
extra = "\t\t";
sqlite3_free(xml);
prev = (char *) "";
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
} else
{
xml = sqlite3_mprintf("%s\r\n",
prev, cstr);
sqlite3_free(prev);
}
prev = xml;
if (subordered != true)
{
xml = sqlite3_mprintf("%s\t%s\r\n", prev, UUID);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Quick Style - LineSymbolizer");
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Created by SpatialiteGUI");
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
// using a Solid Color
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n", prev, extra,
LineStrokeColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, LineOpacity);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, LineStrokeWidth);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
const char *dashArray;
switch (LineDotStyle)
{
case QUICK_STYLE_DOT_LINE:
dashArray = "5.0, 10.0";
break;
case QUICK_STYLE_DASH_LINE:
dashArray = "20.0, 20.0";
break;
case QUICK_STYLE_DASH_DOT_LINE:
dashArray = "20.0, 10.0, 5.0, 10.0";
break;
default:
dashArray = NULL;
break;
};
if (dashArray != NULL)
{
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n",
prev, extra, dashArray);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
if (LinePerpendicularOffset != 0.0)
{
xml =
sqlite3_mprintf
("%s%s\t%1.2f\r\n", prev,
extra, LinePerpendicularOffset);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
sqlite3_free(prev);
if (Line2Enabled == true && subordered == true)
{
// defining a second LineSymbolizer - double pass style
extra = "\t\t";
prev = xml;
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
// using a Solid Color
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n", prev,
extra, Line2StrokeColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, LineOpacity);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, Line2StrokeWidth);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
const char *dashArray;
switch (Line2DotStyle)
{
case QUICK_STYLE_DOT_LINE:
dashArray = "5.0, 10.0";
break;
case QUICK_STYLE_DASH_LINE:
dashArray = "20.0, 20.0";
break;
case QUICK_STYLE_DASH_DOT_LINE:
dashArray = "20.0, 10.0, 5.0, 10.0";
break;
default:
dashArray = NULL;
break;
};
if (dashArray != NULL)
{
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n",
prev, extra, dashArray);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
if (LinePerpendicularOffset != 0.0)
{
xml =
sqlite3_mprintf
("%s%s\t%1.2f\r\n", prev,
extra, LinePerpendicularOffset);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
sqlite3_free(prev);
}
return xml;
}
char *QuickStyleObj::DoCreatePolygonSymbolizerXML(bool subordered)
{
//
// creating a Polygon Symbolizer XML Style
//
const char *cstr;
char *prev;
const char *extra = "";
char *xml = sqlite3_mprintf("\r\n");
prev = xml;
if (subordered == true)
{
extra = "\t\t";
sqlite3_free(xml);
prev = (char *) "";
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
} else
{
xml = sqlite3_mprintf("%s\r\n",
prev, cstr);
sqlite3_free(prev);
}
prev = xml;
if (subordered != true)
{
xml = sqlite3_mprintf("%s\t%s\r\n", prev, UUID);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Quick Style - Polygon Symbolizer");
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t%s\r\n", prev,
"Created by SpatialiteGUI");
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
if (PolygonFill == true)
{
// Polygon Fill
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
if (PolygonSolidFill)
{
// using a Solid Color
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n", prev,
extra, PolygonFillColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, PolygonFillOpacity);
sqlite3_free(prev);
prev = xml;
} else
{
// using a pattern brush
const char *brush_name;
switch (PolygonFillBrushId)
{
case GRAPHIC_BRUSH_VERT:
brush_name = "vert";
break;
case GRAPHIC_BRUSH_CROSS:
brush_name = "cross";
break;
case GRAPHIC_BRUSH_DIAG1:
brush_name = "diag1";
break;
case GRAPHIC_BRUSH_DIAG2:
brush_name = "diag2";
break;
case GRAPHIC_BRUSH_CROSS_DIAG:
brush_name = "crossdiag";
break;
case GRAPHIC_BRUSH_DOTS:
brush_name = "dots";
break;
default:
brush_name = "horz";
break;
};
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t\t\r\n",
prev, extra, brush_name);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\timage/png\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\t\r\n", prev,
extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t\t\t\r\n", prev,
extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t\t\t\t\t\tExternalGraphic\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\t\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\t\t\t\t1\r\n", prev,
extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\t\t\t\t%s\r\n", prev,
extra, PolygonFillColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\t\r\n", prev,
extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t
\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
if (PolygonStroke == true)
{
// Polygon Stroke
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
// using a Solid Color
xml =
sqlite3_mprintf
("%s%s\t\t%s\r\n", prev,
extra, PolygonStrokeColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, PolygonStrokeOpacity);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\t%1.2f\r\n",
prev, extra, PolygonStrokeWidth);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s%s\t\tround\r\n",
prev, extra);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
if (PolygonDisplacementX != 0.0 || PolygonDisplacementY != 0.0)
{
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t%1.4f\r\n",
prev, extra, PolygonDisplacementX);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s%s\t\t%1.4f\r\n",
prev, extra, PolygonDisplacementY);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\r\n", prev, extra);
sqlite3_free(prev);
prev = xml;
}
if (PolygonPerpendicularOffset != 0.0)
{
xml =
sqlite3_mprintf
("%s%s\t%1.4f\r\n", prev,
extra, PolygonPerpendicularOffset);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s%s\r\n", prev, extra);
sqlite3_free(prev);
return xml;
}
char *QuickStyleObj::DoCreateTextPointSymbolizerXML()
{
//
// creating a Text Symbolizer (Point Placement)
//
char *xml;
char *prev;
xml = sqlite3_mprintf("\t\t\r\n");
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev, LabelColumn);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
const char *font;
if (strcmp(FontFacename, "ToyFont: serif") == 0)
font = "serif";
else if (strcmp(FontFacename, "ToyFont: sans-serif") == 0)
font = "sans serif";
else if (strcmp(FontFacename, "ToyFont: monospace") == 0)
font = "monospace";
else
font = FontFacename;
xml =
sqlite3_mprintf
("%s\t\t\t\t%s\r\n", prev,
font);
sqlite3_free(prev);
prev = xml;
if (FontStyle == RL2_FONTSTYLE_ITALIC)
xml =
sqlite3_mprintf
("%s\t\t\t\titalic\r\n",
prev);
else if (FontStyle == RL2_FONTSTYLE_OBLIQUE)
xml =
sqlite3_mprintf
("%s\t\t\t\toblique\r\n",
prev);
else
xml =
sqlite3_mprintf
("%s\t\t\t\tnormal\r\n",
prev);
sqlite3_free(prev);
prev = xml;
if (FontWeight == RL2_FONTWEIGHT_BOLD)
xml =
sqlite3_mprintf
("%s\t\t\t\tbold\r\n",
prev);
else
xml =
sqlite3_mprintf
("%s\t\t\t\tnormal\r\n",
prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%1.2f\r\n",
prev, FontSize);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\n", prev);
sqlite3_free(prev);
prev = xml;
// PointPlacement
xml = sqlite3_mprintf("%s\t\t\t\t\n", prev);
sqlite3_free(prev);
prev = xml;
if (LabelAnchorX != 0.5 || LabelAnchorY != 0.5)
{
xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t\t%1.4f\r\n", prev,
LabelAnchorX);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t\t%1.4f\r\n", prev,
LabelAnchorY);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
if (LabelDisplacementX != 0.0 || LabelDisplacementY != 0.0)
{
xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t\t%1.4f\r\n", prev,
LabelDisplacementX);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t\t%1.4f\r\n", prev,
LabelDisplacementY);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
if (LabelRotation != 0.0)
{
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%1.2f\r\n", prev, LabelRotation);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
if (HasHalo == true)
{
// Halo
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev,
HaloRadius);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%s\r\n",
prev, HaloColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%1.2f\r\n",
prev, HaloOpacity);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%s\r\n", prev,
FontColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%1.2f\r\n",
prev, FontOpacity);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\r\n", prev);
sqlite3_free(prev);
return xml;
}
char *QuickStyleObj::DoCreateTextLineSymbolizerXML()
{
//
// creating a Text Symbolizer (Line Placement)
//
char *xml;
char *prev;
xml = sqlite3_mprintf("\t\t\r\n");
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev, LabelColumn);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
const char *font;
if (strcmp(FontFacename, "ToyFont: serif") == 0)
font = "serif";
else if (strcmp(FontFacename, "ToyFont: sans-serif") == 0)
font = "sans serif";
else if (strcmp(FontFacename, "ToyFont: monospace") == 0)
font = "monospace";
else
font = FontFacename;
xml =
sqlite3_mprintf
("%s\t\t\t\t%s\r\n", prev,
font);
sqlite3_free(prev);
prev = xml;
if (FontStyle == RL2_FONTSTYLE_ITALIC)
xml =
sqlite3_mprintf
("%s\t\t\t\titalic\r\n",
prev);
else if (FontStyle == RL2_FONTSTYLE_OBLIQUE)
xml =
sqlite3_mprintf
("%s\t\t\t\toblique\r\n",
prev);
else
xml =
sqlite3_mprintf
("%s\t\t\t\tnormal\r\n",
prev);
sqlite3_free(prev);
prev = xml;
if (FontWeight == RL2_FONTWEIGHT_BOLD)
xml =
sqlite3_mprintf
("%s\t\t\t\tbold\r\n",
prev);
else
xml =
sqlite3_mprintf
("%s\t\t\t\tnormal\r\n",
prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%1.2f\r\n",
prev, FontSize);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\n", prev);
sqlite3_free(prev);
prev = xml;
// LinePlacement
xml = sqlite3_mprintf("%s\t\t\t\t\n", prev);
sqlite3_free(prev);
prev = xml;
if (LabelPerpendicularOffset != 0.0)
{
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%1.4f\r\n",
prev, LabelPerpendicularOffset);
sqlite3_free(prev);
prev = xml;
}
if (RepeatedLabel == true)
{
// Repeated: InitialGap and Gap
xml =
sqlite3_mprintf("%s\t\t\t\t\ttrue\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%1.4f\r\n", prev,
LabelInitialGap);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, LabelGap);
sqlite3_free(prev);
prev = xml;
}
if (LabelIsAligned == true)
{
xml =
sqlite3_mprintf("%s\t\t\t\t\ttrue\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
if (LabelGeneralizeLine == true)
{
xml =
sqlite3_mprintf
("%s\t\t\t\t\ttrue\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
if (HasHalo == true)
{
// Halo
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev,
HaloRadius);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%s\r\n",
prev, HaloColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t\t%1.2f\r\n",
prev, HaloOpacity);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
}
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%s\r\n", prev,
FontColor);
sqlite3_free(prev);
prev = xml;
xml =
sqlite3_mprintf
("%s\t\t\t\t%1.2f\r\n",
prev, FontOpacity);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\t\r\n", prev);
sqlite3_free(prev);
prev = xml;
xml = sqlite3_mprintf("%s\t\t\r\n", prev);
sqlite3_free(prev);
return xml;
}
unsigned char *QuickStyleObj::CloneXmlStyle()
{
//
// cloning the XML Style definition
//
if (XmlStyle == NULL)
XmlStyle = CreateXmlStyle();
if (XmlStyle == NULL)
return NULL;
int len = strlen(XmlStyle);
char *cloned = (char *) malloc(len + 1);
strcpy(cloned, XmlStyle);
return (unsigned char *) cloned;
}
void QuickStyleObj::DoGetUUID(char *uuid)
{
//
// creating an UUID value
//
unsigned char rnd[16];
char *p = uuid;
int i;
sqlite3_randomness(16, rnd);
for (i = 0; i < 16; i++)
{
if (i == 4 || i == 6 || i == 8 || i == 10)
*p++ = '-';
sprintf(p, "%02x", rnd[i]);
p += 2;
}
*p = '\0';
uuid[14] = '4';
uuid[19] = '8';
}
int QuickStyleObj::RandomWellKnownMark()
{
//
// returning a random Symbol Well Known Mark
//
int wkt;
int mod = rand() % 6;
switch (mod)
{
case 0:
wkt = RL2_GRAPHIC_MARK_SQUARE;
break;
case 1:
wkt = RL2_GRAPHIC_MARK_CIRCLE;
break;
case 2:
wkt = RL2_GRAPHIC_MARK_TRIANGLE;
break;
case 3:
wkt = RL2_GRAPHIC_MARK_STAR;
break;
case 4:
wkt = RL2_GRAPHIC_MARK_CROSS;
break;
default:
wkt = RL2_GRAPHIC_MARK_X;
break;
};
return wkt;
}
void QuickStyleObj::RandomColor(char *color)
{
//
// setting a random Color
//
unsigned char red = rand() % 256;
unsigned char green = rand() % 256;
unsigned char blue = rand() % 256;
sprintf(color, "#%02x%02x%02x", red, green, blue);
}
bool QuickStyleVectorDialog::Create(MyMapPanel * parent, MapLayer * layer,
int type)
{
//
// creating the dialog
//
MainFrame = parent->GetParent();
MapPanel = parent;
Layer = layer;
Type = type;
DbPrefix = layer->GetDbPrefix();
LayerName = layer->GetName();
IsConfigChanged = false;
CheckStandardBrushes();
if (wxPropertySheetDialog::Create
(parent, wxID_ANY, wxT("QuickStyle (Vector) Edit")) == false)
return false;
if (Layer->GetQuickStyle() != NULL)
Style = Layer->CloneQuickStyle();
else
Style = new QuickStyleObj(Type);
wxBookCtrlBase *book = GetBookCtrl();
// creates individual panels
int next = 1;
PagePointIndex = 0;
PageLineIndex = 0;
PagePolygonIndex = 0;
PageTextPointIndex = 0;
PageTextLineIndex = 0;
wxPanel *mainPage = CreateMainPage(book);
book->AddPage(mainPage, wxT("General"), true);
if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_GEOMETRY)
{
wxPanel *pointPage = CreatePointPage(book);
book->AddPage(pointPage, wxT("Point Symbolizer"), false);
PagePointIndex = next++;
}
if (Type == QUICK_STYLE_LINE || Type == QUICK_STYLE_GEOMETRY)
{
wxPanel *linePage = CreateLinePage(book);
book->AddPage(linePage, wxT("Line Symbolyzer"), false);
PageLineIndex = next++;
}
if (Type == QUICK_STYLE_POLYGON || Type == QUICK_STYLE_GEOMETRY)
{
wxPanel *polygonPage = CreatePolygonPage(book);
book->AddPage(polygonPage, wxT("Polygon Symbolizer"), false);
PagePolygonIndex = next++;
}
if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_POLYGON)
{
wxPanel *textPointPage = CreateTextPointPage(book);
book->AddPage(textPointPage, wxT("Text Symbolizer"), false);
PageTextPointIndex = next++;
}
if (Type == QUICK_STYLE_LINE)
{
wxPanel *textLinePage = CreateTextLinePage(book);
book->AddPage(textLinePage, wxT("Text Symbolizer"), false);
PageTextLineIndex = next++;
}
CreateButtons();
LayoutDialog();
// appends event handler for TAB/PAGE changing
Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanging);
Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanged);
// appends event handler for buttons
Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnQuit);
Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnOk);
Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnApply);
Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnExport);
Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnCopy);
// centers the dialog window
Centre();
UpdateMainPage();
return true;
}
void QuickStyleVectorDialog::CreateButtons()
{
//
// adding the common Buttons
//
wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer());
wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL);
topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply"));
btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxButton *exp =
new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file"));
btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy"));
btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
btnBox->AddSpacer(100);
wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok"));
btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel"));
btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
}
wxPanel *QuickStyleVectorDialog::CreateMainPage(wxWindow * parent)
{
//
// creating the MAIN page
//
wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// First row: Layer name
boxSizer->AddSpacer(50);
wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL);
boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL);
lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY,
wxT("Layer FullName"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL);
nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString fullName = DbPrefix + wxT(".") + LayerName;
wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName,
wxDefaultPosition, wxSize(370, 22),
wxTE_READONLY);
nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *typeBox = new wxStaticBox(panel, wxID_ANY,
wxT("Geometry Type"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *typeBoxSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL);
nameSizer->Add(typeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString typeName = wxT("UNKNOWN");
if (Type == QUICK_STYLE_POINT)
typeName = wxT("POINT-Type Geometries");
if (Type == QUICK_STYLE_LINE)
typeName = wxT("LINE-Type Geometries");
if (Type == QUICK_STYLE_POLYGON)
typeName = wxT("POLYGON-Type Geometries");
if (Type == QUICK_STYLE_GEOMETRY)
typeName = wxT("MIXED-Type Geometries");
wxTextCtrl *typeCtrl = new wxTextCtrl(panel, ID_VECTOR_TYPE, typeName,
wxDefaultPosition, wxSize(370, 22),
wxTE_READONLY);
typeBoxSizer->Add(typeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY,
wxT("QuickStyle Name"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL);
nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString uuid = wxString::FromUTF8(Style->GetUUID());
wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid,
wxDefaultPosition, wxSize(370, 22),
wxTE_READONLY);
uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
boxSizer->AddSpacer(25);
// second row: Visibility Range
wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL);
miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Visibility Range"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *visibilitySizer =
new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL);
visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL,
5);
wxString range[4];
range[0] = wxT("&None");
range[1] = wxT("&Min");
range[2] = wxT("&Max");
range[3] = wxT("&Both");
wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE,
wxT("&Range Type"),
wxDefaultPosition,
wxDefaultSize, 4,
range, 2,
wxRA_SPECIFY_COLS);
visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
rangeBox->SetSelection(0);
visibilitySizer->AddSpacer(20);
wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL);
visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL);
scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5);
wxStaticText *minScaleLabel =
new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:"));
scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *minScaleCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
minScaleCtrl->Enable(false);
scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL);
scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0);
wxStaticText *maxScaleLabel =
new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:"));
scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *maxScaleCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"),
wxDefaultPosition, wxSize(100, 22));
maxScaleCtrl->Enable(false);
scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdScaleChanged);
return panel;
}
void QuickStyleVectorDialog::
OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Visibility Range selection changed
//
wxRadioBox *scaleModeCtrl =
(wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE);
wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE);
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE);
switch (scaleModeCtrl->GetSelection())
{
case 0:
Style->EnableMinScale(false);
Style->EnableMaxScale(false);
minCtrl->SetValue(wxT("0.0"));
minCtrl->Enable(false);
maxCtrl->SetValue(wxT("+Infinite"));
maxCtrl->Enable(false);
break;
case 1:
Style->EnableMinScale(true);
Style->EnableMaxScale(false);
minCtrl->SetValue(wxT(""));
minCtrl->Enable(true);
maxCtrl->SetValue(wxT("+Infinite"));
maxCtrl->Enable(false);
break;
case 2:
Style->EnableMinScale(false);
Style->EnableMaxScale(true);
minCtrl->SetValue(wxT("0.0"));
minCtrl->Enable(false);
maxCtrl->SetValue(wxT(""));
maxCtrl->Enable(true);
break;
case 3:
Style->EnableMinScale(true);
Style->EnableMaxScale(true);
minCtrl->SetValue(wxT(""));
minCtrl->Enable(true);
maxCtrl->SetValue(wxT(""));
maxCtrl->Enable(true);
break;
};
}
wxPanel *QuickStyleVectorDialog::CreatePointPage(wxWindow * parent)
{
//
// creating the Point Symbolizer page
//
wxString StrokeColor = wxT("#000000");
wxString FillColor = wxT("#808080");
wxPanel *panel = new wxPanel(parent, ID_PANE_POINT);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// first row A: Opacity
wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL);
opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxSlider *opacityCtrl =
new wxSlider(panel, ID_SYMBOLIZER_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(600, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Well Known Mark Name
wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5);
wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL);
box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxString mark[6];
mark[0] = wxT("&Square");
mark[1] = wxT("&Circle");
mark[2] = wxT("&Triangle");
mark[3] = wxT("&Star");
mark[4] = wxT("&Cross");
mark[5] = wxT("&X");
wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_MARK,
wxT("&Mark"),
wxDefaultPosition,
wxDefaultSize, 6,
mark, 1,
wxRA_SPECIFY_COLS);
markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
markBox->SetSelection(0);
// second row: Size and Rotation
wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL);
box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL);
box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// second row A: Size
wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Size"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL);
sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20);
wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL);
sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_SIZE, wxT("16.0"),
wxDefaultPosition, wxSize(100, 22));
size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row B: Rotation
wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Rotation"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL);
sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20);
wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL);
rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *rotCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_ROTATION, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// third row: AnchorPoint and Displacement
wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL);
box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// third row A: Anchor Point
wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Anchor Point"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL);
anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20);
wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL);
anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X"));
anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *anchorXCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_X, wxT("0.5"),
wxDefaultPosition, wxSize(100, 22));
anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL);
anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y"));
anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *anchorYCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_Y, wxT("0.5"),
wxDefaultPosition, wxSize(100, 22));
anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// third row B: Displacement
wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Displacement"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *displacementSizer =
new wxStaticBoxSizer(displacementBox, wxVERTICAL);
anchorBoxSizer->Add(displacementSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 20);
wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X"));
displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *displacementXCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_X, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y"));
displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *displacementYCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_Y, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// fourth row: colors
wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// first row A: Fill Color
wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL);
box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Fill Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL);
box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL);
colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxTextCtrl *fillColorCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_COLOR, FillColor,
wxDefaultPosition, wxSize(80, 22));
fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBitmap bmp;
wxColour color(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleFillCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxButton *pickFill =
new wxButton(panel, ID_SYMBOLIZER_FILL_PICKER_BTN, wxT("&Pick a color"));
fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row B: Stroke Color
box3Sizer->AddSpacer(30);
wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *colorStrokeSizer =
new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL);
box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL);
colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxTextCtrl *strokeColorCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_COLOR, StrokeColor,
wxDefaultPosition, wxSize(80, 22));
stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBitmap *sampleStrokeCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxButton *pickStroke =
new wxButton(panel, ID_SYMBOLIZER_STROKE_PICKER_BTN, wxT("&Pick a color"));
stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdMarkChanged);
Connect(ID_SYMBOLIZER_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPointColorFillPicker);
Connect(ID_SYMBOLIZER_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPointColorFillChanged);
Connect(ID_SYMBOLIZER_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPointColorStrokePicker);
Connect(ID_SYMBOLIZER_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPointColorStrokeChanged);
return panel;
}
void QuickStyleVectorDialog::OnCmdMarkChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Mark selection changed
//
wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK);
switch (markCtrl->GetSelection())
{
case 1:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE);
break;
case 2:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE);
break;
case 3:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_STAR);
break;
case 4:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CROSS);
break;
case 5:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_X);
break;
default:
Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_SQUARE);
break;
};
}
void QuickStyleVectorDialog::CheckStandardBrushes()
{
//
// testing which of the standard brushes are currently available
//
int ret;
char **results;
int rows;
int columns;
int i;
HasStandardBrushes = false;
HasStandardBrushHorz = false;
HasStandardBrushVert = false;
HasStandardBrushCross = false;
HasStandardBrushDiag1 = false;
HasStandardBrushDiag2 = false;
HasStandardBrushCrossDiag = false;
HasStandardBrushDots = false;
const char *sql = "SELECT xlink_href FROM main.SE_external_graphics "
"WHERE xlink_href LIKE 'http://www.utopia.gov/stdbrush_%.png'";
ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results,
&rows, &columns, NULL);
if (ret != SQLITE_OK)
return;
if (rows < 1)
;
else
{
for (i = 1; i <= rows; i++)
{
const char *value = results[(i * columns) + 0];
if (value != NULL)
{
if (strcmp(value, "http://www.utopia.gov/stdbrush_horz.png") == 0)
{
HasStandardBrushes = true;
HasStandardBrushHorz = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_vert.png") == 0)
{
HasStandardBrushes = true;
HasStandardBrushVert = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_cross.png") ==
0)
{
HasStandardBrushes = true;
HasStandardBrushCross = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_diag1.png") ==
0)
{
HasStandardBrushes = true;
HasStandardBrushDiag1 = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_diag2.png") ==
0)
{
HasStandardBrushes = true;
HasStandardBrushDiag2 = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_crossdiag.png")
== 0)
{
HasStandardBrushes = true;
HasStandardBrushCrossDiag = true;
}
if (strcmp(value, "http://www.utopia.gov/stdbrush_dots.png") == 0)
{
HasStandardBrushes = true;
HasStandardBrushDots = true;
}
}
}
}
sqlite3_free_table(results);
}
void QuickStyleVectorDialog::
OnCmdPointColorFillChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Fill color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdPointColorFillPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdPointColorStrokeChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Stroke color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdPointColorStrokePicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
wxPanel *QuickStyleVectorDialog::CreateLinePage(wxWindow * parent)
{
//
// creating the Line Symbolizer page
//
wxString StrokeColor = wxT("#000000");
wxPanel *panel = new wxPanel(parent, ID_PANE_LINE);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// first row A: the Stroke #1 Opacity and Perpendicular Offset
//boxSizer->AddSpacer(50);
wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxVERTICAL);
boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxHORIZONTAL);
opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxSlider *opacityCtrl =
new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(600, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// first row B: PerpendicularOffset
wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL);
opacityBoxSizer->Add(perpendicularBoxSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Perpendicular Offset"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *perpendicularSizer =
new wxStaticBoxSizer(perpendicularBox, wxVERTICAL);
perpendicularBoxSizer->Add(perpendicularSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL);
perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *perpendicularCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Draw lines in parallel to the original geometry."));
perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Positive to the left-hand side. Negative numbers mean right."));
perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// second row: Stroke color or Graphic - Pass #1
wxBoxSizer *stroke0BoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(stroke0BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *stroke0Box = new wxStaticBox(panel, wxID_STATIC,
wxT("First pass"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *stroke0Sizer = new wxStaticBoxSizer(stroke0Box, wxVERTICAL);
stroke0BoxSizer->Add(stroke0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// second row B: Stroke Color - Pass #1
wxBoxSizer *color0BoxSizer = new wxBoxSizer(wxHORIZONTAL);
stroke0Sizer->Add(color0BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *color0Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *color0Sizer = new wxStaticBoxSizer(color0Box, wxVERTICAL);
color0BoxSizer->Add(color0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *color01Sizer = new wxBoxSizer(wxHORIZONTAL);
color0Sizer->Add(color01Sizer, 0, wxALIGN_RIGHT | wxALL, 0);
wxTextCtrl *color0Ctrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, StrokeColor,
wxDefaultPosition, wxSize(80, 22));
color01Sizer->Add(color0Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBitmap bmp;
wxColour color(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sample0Ctrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
color01Sizer->Add(sample0Ctrl, 0, wxALIGN_RIGHT | wxALL, 5);
wxBoxSizer *picker0Sizer = new wxBoxSizer(wxHORIZONTAL);
color0Sizer->Add(picker0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *pick0 =
new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color"));
picker0Sizer->Add(pick0, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row: Stroke-Width
wxBoxSizer *misc0Sizer = new wxBoxSizer(wxHORIZONTAL);
color0BoxSizer->Add(misc0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row A: StrokeWidth
wxBoxSizer *width0BoxSizer = new wxBoxSizer(wxHORIZONTAL);
misc0Sizer->Add(width0BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *width0Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Width"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *width0Sizer = new wxStaticBoxSizer(width0Box, wxVERTICAL);
width0BoxSizer->Add(width0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxTextCtrl *width0Ctrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"),
wxDefaultPosition, wxSize(100, 22));
width0Sizer->Add(width0Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// third row D: DashArray and DashOffset
wxBoxSizer *dash0BoxSizer = new wxBoxSizer(wxHORIZONTAL);
misc0Sizer->Add(dash0BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxString dot[4];
dot[0] = wxT("&Solid Line");
dot[1] = wxT("&Dotted Line");
dot[2] = wxT("&Dashed Line");
dot[3] = wxT("&Dashed/Dotted Line");
wxRadioBox *dot0Box = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT,
wxT("&Dash/Dot Style"),
wxDefaultPosition,
wxDefaultSize, 4,
dot, 2,
wxRA_SPECIFY_COLS);
dot0Box->SetSelection(0);
dash0BoxSizer->Add(dot0Box, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row: Stroke color or Graphic - Pass #2
wxBoxSizer *stroke1BoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(stroke1BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *stroke1Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Second pass"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *stroke1Sizer = new wxStaticBoxSizer(stroke1Box, wxHORIZONTAL);
stroke1BoxSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL);
stroke1Sizer->Add(enableSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *enableCtrl =
new wxCheckBox(panel, ID_SYMBOLIZER_SECOND_STROKE_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
enableCtrl->SetValue(false);
// second row B: Stroke Color - Pass #2
wxBoxSizer *color1BoxSizer = new wxBoxSizer(wxHORIZONTAL);
stroke1Sizer->Add(color1BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *color1Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *color1Sizer = new wxStaticBoxSizer(color1Box, wxVERTICAL);
color1BoxSizer->Add(color1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *color11Sizer = new wxBoxSizer(wxHORIZONTAL);
color1Sizer->Add(color11Sizer, 0, wxALIGN_RIGHT | wxALL, 0);
wxTextCtrl *color1Ctrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor,
wxDefaultPosition, wxSize(80, 22));
color1Ctrl->Enable(false);
color11Sizer->Add(color1Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
color = wxColour(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sample1Ctrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
color11Sizer->Add(sample1Ctrl, 0, wxALIGN_RIGHT | wxALL, 5);
wxBoxSizer *picker1Sizer = new wxBoxSizer(wxHORIZONTAL);
color1Sizer->Add(picker1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *pick1 =
new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color"));
pick1->Enable(false);
picker1Sizer->Add(pick1, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row: Stroke-Width
wxBoxSizer *misc1Sizer = new wxBoxSizer(wxHORIZONTAL);
color1BoxSizer->Add(misc1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row A: StrokeWidth
wxBoxSizer *width1BoxSizer = new wxBoxSizer(wxHORIZONTAL);
misc1Sizer->Add(width1BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *width1Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Width"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *width1Sizer = new wxStaticBoxSizer(width1Box, wxVERTICAL);
width1BoxSizer->Add(width1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxTextCtrl *width1Ctrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"),
wxDefaultPosition, wxSize(100, 22));
width1Ctrl->Enable(false);
width1Sizer->Add(width1Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// third row D: DashArray and DashOffset
wxBoxSizer *dash1BoxSizer = new wxBoxSizer(wxHORIZONTAL);
misc1Sizer->Add(dash1BoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxRadioBox *dot1Box = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT_2,
wxT("&Dash/Dot Style"),
wxDefaultPosition,
wxDefaultSize, 4,
dot, 1,
wxRA_SPECIFY_COLS);
dot1Box->SetSelection(0);
dot1Box->Enable(false);
dash1BoxSizer->Add(dot1Box, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdLineColorChanged);
Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdLineColorPicker);
Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdLine2ColorChanged);
Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdLine2ColorPicker);
Connect(ID_SYMBOLIZER_SECOND_STROKE_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdSecondStrokEnableChanged);
return panel;
}
void QuickStyleVectorDialog::
OnCmdSecondStrokEnableChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Enable double stroke changed
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_SECOND_STROKE_ENABLE);
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN);
wxTextCtrl *widthCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH);
wxRadioBox *dotBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT_2);
if (enableCtrl->IsChecked() == true)
{
colorCtrl->Enable(true);
pick->Enable(true);
widthCtrl->Enable(true);
dotBox->Enable(true);
} else
{
colorCtrl->Enable(false);
pick->Enable(false);
widthCtrl->Enable(false);
dotBox->Enable(false);
}
}
void QuickStyleVectorDialog::
OnCmdLineColorChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Stroke color changed: updating the visual sample
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdLine2ColorChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Stroke color changed: updating the visual sample
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdLineColorPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdLine2ColorPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
wxPanel *QuickStyleVectorDialog::CreatePolygonPage(wxWindow * parent)
{
//
// creating the Polygon Symbolizer page
//
wxString StrokeColor = wxT("#000000");
wxString FillColor = wxT("#808080");
wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// first row: the Polygon Displacement and Perpendicular Offset
wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
// first row A: Displacement
wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL);
polygonBoxSizer->Add(displacementBoxSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Displacement"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *displacementSizer =
new wxStaticBoxSizer(displacementBox, wxVERTICAL);
displacementBoxSizer->Add(displacementSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X"));
displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxTextCtrl *displacementXCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y"));
displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxTextCtrl *displacementYCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
// first row B: PerpendicularOffset
wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL);
polygonBoxSizer->Add(perpendicularBoxSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Perpendicular Offset"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *perpendicularSizer =
new wxStaticBoxSizer(perpendicularBox, wxVERTICAL);
perpendicularBoxSizer->Add(perpendicularSizer, 0,
wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL);
perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *perpendicularCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Positive: larger. / Negative: smaller."));
perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Drawing polygons smaller or larger than their actual geometry (Buffer)."));
perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// second row: Fill Opacity
wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Polygon Fill"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *aux0Sizer = new wxStaticBoxSizer(auxBox, wxVERTICAL);
auxBoxSizer->Add(aux0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *auxSizer = new wxBoxSizer(wxHORIZONTAL);
aux0Sizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableCtrl->SetValue(Style->IsPolygonFill());
enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL);
enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL);
opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxSlider *opacityCtrl =
new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(275, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacityCtrl->Enable(Style->IsPolygonFill());
opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// third row B: Fill Color
wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL);
auxSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Fill Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL);
colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL);
colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 2);
wxTextCtrl *colorCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, FillColor,
wxDefaultPosition, wxSize(80, 22));
color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBitmap bmp;
wxColour color(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
sampleCtrl->Enable(Style->IsPolygonFill());
color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 0);
wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL);
colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *pick =
new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color"));
pick->Enable(Style->IsPolygonFill());
pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// FILL Style
wxString style[2];
style[0] = wxT("&Solid");
style[1] = wxT("&Brush");
wxRadioBox *styleBox = new wxRadioBox(panel, ID_SYMBOLIZER_FILL1_TYPE,
wxT("&Fill Style"),
wxDefaultPosition,
wxDefaultSize, 2,
style, 1,
wxRA_SPECIFY_COLS);
auxSizer->Add(styleBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 15);
styleBox->SetSelection(0);
if (HasStandardBrushes == false)
styleBox->Enable(false);
// FILL Brush selection
wxString brush[7];
brush[0] = wxT("&Horizontal");
brush[1] = wxT("&Vertical");
brush[2] = wxT("&Cross");
brush[3] = wxT("&Diag 1");
brush[4] = wxT("&Diag 2");
brush[5] = wxT("&Cross Diag");
brush[6] = wxT("&Dots");
wxRadioBox *brushBox = new wxRadioBox(panel, ID_SYMBOLIZER_FILL2_TYPE,
wxT("&Brush Style"),
wxDefaultPosition,
wxDefaultSize, 7,
brush, 1,
wxRA_SPECIFY_ROWS);
aux0Sizer->Add(brushBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
brushBox->SetSelection(0);
brushBox->Enable(false);
// first row A: the Stroke #1 Opacity
wxBoxSizer *opacity2BoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(opacity2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Polygon Stroke"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *enable2Sizer = new wxStaticBoxSizer(enableBox, wxHORIZONTAL);
opacity2BoxSizer->Add(enable2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *enable2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enable2Ctrl->SetValue(Style->IsPolygonStroke());
enable2Sizer->Add(enable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *opacity2Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacity2Sizer = new wxStaticBoxSizer(opacity2Box, wxVERTICAL);
enable2Sizer->Add(opacity2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxSlider *opacity2Ctrl =
new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(250, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacity2Ctrl->Enable(Style->IsPolygonStroke());
opacity2Sizer->Add(opacity2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row B: Stroke Color
wxStaticBox *color2Box = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *color2Sizer = new wxStaticBoxSizer(color2Box, wxVERTICAL);
enable2Sizer->Add(color2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *color3Sizer = new wxBoxSizer(wxHORIZONTAL);
color2Sizer->Add(color3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *color2Ctrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor,
wxDefaultPosition, wxSize(80, 22));
color2Ctrl->Enable(Style->IsPolygonStroke());
color3Sizer->Add(color2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBitmap *sample2Ctrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
sample2Ctrl->Enable(Style->IsPolygonStroke());
color3Sizer->Add(sample2Ctrl, 0, wxALIGN_RIGHT | wxALL, 5);
wxBoxSizer *picker2Sizer = new wxBoxSizer(wxHORIZONTAL);
color2Sizer->Add(picker2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxButton *pick2 =
new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color"));
pick2->Enable(Style->IsPolygonStroke());
picker2Sizer->Add(pick2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row: Stroke-Width,
wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL);
enable2Sizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// third row A: StrokeWidth
wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL);
miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Stroke Width"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL);
widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *widthCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"),
wxDefaultPosition, wxSize(100, 22));
widthCtrl->Enable(false);
widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonStrokeChanged);
Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonFillChanged);
Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonColorFillChanged);
Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonColorFillPicker);
Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonColorStrokeChanged);
Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonColorStrokePicker);
Connect(ID_SYMBOLIZER_FILL1_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonFillStyleChanged);
Connect(ID_SYMBOLIZER_FILL2_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdPolygonFillBrushChanged);
return panel;
}
void QuickStyleVectorDialog::
OnCmdPolygonStrokeChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Stroke enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE);
if (enableCtrl->IsChecked() == true)
Style->SetPolygonStroke(true);
else
Style->SetPolygonStroke(false);
RetrievePolygonPage(false);
UpdatePolygonPage();
}
void QuickStyleVectorDialog::
OnCmdPolygonFillChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Fill enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE);
if (enableCtrl->IsChecked() == true)
Style->SetPolygonFill(true);
else
Style->SetPolygonFill(false);
RetrievePolygonPage(false);
UpdatePolygonPage();
}
void QuickStyleVectorDialog::
OnCmdPolygonColorFillChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Fill color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdPolygonFillStyleChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Fill style changed
//
wxRadioBox *styleBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL1_TYPE);
if (styleBox->GetSelection() == 0)
Style->SetPolygonSolidFill(true);
else
Style->SetPolygonSolidFill(false);
RetrievePolygonPage(false);
UpdatePolygonPage();
}
void QuickStyleVectorDialog::
OnCmdPolygonFillBrushChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Fill brush changed
//
wxRadioBox *brushBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL2_TYPE);
Style->SetPolygonFillBrushId(brushBox->GetSelection());
RetrievePolygonPage(false);
UpdatePolygonPage();
}
void QuickStyleVectorDialog::
OnCmdPolygonColorFillPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdPolygonColorStrokeChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Stroke color changed: updating the visual sample
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdPolygonColorStrokePicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
bool QuickStyleVectorDialog::DoCheckDatasource(const char *prefix,
const char *coverage,
char *table, char *geometry)
{
//
// retrieving the real table and geometry column names
//
sqlite3 *sqlite = MainFrame->GetSqlite();
char *sql;
int ret;
char **results;
int rows;
int columns;
int i;
char *qprefix;
bool ok = false;
qprefix = gaiaDoubleQuotedSql(prefix);
sql = sqlite3_mprintf("SELECT f_table_name, f_geometry_column, view_name, "
"view_geometry, virt_name, virt_geometry "
"FROM \"%s\".vector_coverages WHERE coverage_name = %Q",
qprefix, coverage);
free(qprefix);
ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL);
sqlite3_free(sql);
if (ret != SQLITE_OK)
return false;
if (rows < 1)
;
else
{
for (i = 1; i <= rows; i++)
{
const char *t = results[(i * columns) + 0];
const char *g = results[(i * columns) + 1];
if (t != NULL && g != NULL)
{
strcpy(table, t);
strcpy(geometry, g);
ok = true;
}
t = results[(i * columns) + 2];
g = results[(i * columns) + 3];
if (t != NULL && g != NULL)
{
strcpy(table, t);
strcpy(geometry, g);
ok = true;
}
t = results[(i * columns) + 4];
g = results[(i * columns) + 5];
if (t != NULL && g != NULL)
{
strcpy(table, t);
strcpy(geometry, g);
ok = true;
}
}
}
sqlite3_free_table(results);
return ok;
}
void QuickStyleVectorDialog::InitializeComboColumns(wxComboBox * ctrl)
{
//
// initializing a Column list ComboBox
//
sqlite3 *sqlite = MainFrame->GetSqlite();
char *sql;
int ret;
char **results;
int rows;
int columns;
int i;
char prefix[1024];
char coverage[1024];
char table[1024];
char geometry[1024];
char *qprefix;
char *qtable;
if (DbPrefix.Len() == 0)
strcpy(prefix, "MAIN");
else
strcpy(prefix, DbPrefix.ToUTF8());
strcpy(coverage, LayerName.ToUTF8());
if (DoCheckDatasource(prefix, coverage, table, geometry) != true)
return;
qprefix = gaiaDoubleQuotedSql(prefix);
qtable = gaiaDoubleQuotedSql(table);
sql = sqlite3_mprintf("PRAGMA \"%s\".table_info(\"%s\")", qprefix, qtable);
free(qprefix);
free(qtable);
ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL);
sqlite3_free(sql);
if (ret != SQLITE_OK)
return;
if (rows < 1)
;
else
{
for (i = 1; i <= rows; i++)
{
const char *value = results[(i * columns) + 1];
if (strcasecmp(value, geometry) == 0)
continue; // skipping the Geometry column
wxString col = wxString::FromUTF8(value);
ctrl->Append(col);
}
}
sqlite3_free_table(results);
}
void QuickStyleVectorDialog::InitializeComboFonts(wxComboBox * ctrl)
{
//
// initializing a Font list ComboBox
//
sqlite3 *sqlite = MainFrame->GetSqlite();
char *sql;
int ret;
char **results;
int rows;
int columns;
int i;
char prefix[1024];
char *qprefix;
// inserting the default TOY FONTS
wxString font = wxT("ToyFont: serif");
ctrl->Append(font);
font = wxT("ToyFont: sans-serif");
ctrl->Append(font);
font = wxT("ToyFont: monospace");
ctrl->Append(font);
if (DbPrefix.Len() == 0)
strcpy(prefix, "MAIN");
else
strcpy(prefix, DbPrefix.ToUTF8());
qprefix = gaiaDoubleQuotedSql(prefix);
sql =
sqlite3_mprintf
("SELECT font_facename FROM \"%s\".SE_fonts ORDER BY font_facename",
qprefix);
free(qprefix);
ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL);
sqlite3_free(sql);
if (ret != SQLITE_OK)
return;
if (rows < 1)
;
else
{
for (i = 1; i <= rows; i++)
{
const char *value = results[(i * columns) + 0];
wxString col = wxString::FromUTF8(value);
ctrl->Append(col);
}
}
sqlite3_free_table(results);
}
wxPanel *QuickStyleVectorDialog::CreateTextPointPage(wxWindow * parent)
{
//
// creating the Text Symbolizer page (Point Placement)
//
wxString FillColor = wxT("#808080");
wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// enable/disable Labels
wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Labels"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL);
auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5);
wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableCtrl->SetValue(Style->IsLabelPrint());
enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
wxStaticText *columnLabel =
new wxStaticText(panel, wxID_STATIC, wxT("&Column:"));
enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxComboBox *columnList =
new wxComboBox(panel, ID_SYMBOLIZER_TEXT1_LABEL, wxT(""), wxDefaultPosition,
wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
InitializeComboColumns(columnList);
enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxString noGeom =
wxT("Don't paint the Geometry Symbolizer; Text Symbolizer alone");
if (Type == QUICK_STYLE_POINT)
noGeom = wxT("Don't paint the Point Symbolizer; Text Symbolizer alone");
if (Type == QUICK_STYLE_POLYGON)
noGeom = wxT("Don't paint the Polygon Symbolizer; Text Symbolizer alone");
wxCheckBox *noGeomSymbolizerCtrl =
new wxCheckBox(panel, ID_LABEL_NO_GEOM_SYMBOLIZER, noGeom,
wxDefaultPosition, wxDefaultSize);
noGeomSymbolizerCtrl->SetValue(Style->IsDontPaintGeomSymbolizer());
wxBoxSizer *noGeomSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(noGeomSizer, 0, wxALIGN_LEFT | wxALL, 5);
noGeomSizer->Add(noGeomSymbolizerCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL);
auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Second row: Font Name, Size and Fill
wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL);
font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL);
fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// Font Name
wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL);
font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxComboBox *fontList =
new wxComboBox(panel, ID_SYMBOLIZER_FONT1_NAME, wxT(""), wxDefaultPosition,
wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
InitializeComboFonts(fontList);
fontList->Select(0);
fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Font Size
wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL);
fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Size"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxHORIZONTAL);
fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *sizeCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_SIZE, wxT("15.0"),
wxDefaultPosition, wxSize(100, 22));
sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxVERTICAL);
fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Style"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxVERTICAL);
boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *italicSizer = new wxBoxSizer(wxVERTICAL);
boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5);
wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ITALIC,
wxT("Italic"),
wxDefaultPosition, wxDefaultSize);
italicCtrl->SetValue(false);
italicCtrl->Enable(false);
italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_BOLD,
wxT("Bold"),
wxDefaultPosition, wxDefaultSize);
boldCtrl->SetValue(false);
boldCtrl->Enable(false);
italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// Font Opacity
wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacityFontSizer =
new wxStaticBoxSizer(opacityFontBox, wxVERTICAL);
fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxSlider *opacityFontCtrl =
new wxSlider(panel, ID_SYMBOLIZER_FONT1_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(150, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Font color
wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxVERTICAL);
fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *font2Sizer = new wxBoxSizer(wxHORIZONTAL);
fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0);
wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_COLOR,
FillColor,
wxDefaultPosition, wxSize(80, 22));
font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBitmap bmp;
wxColour color(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleFontCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT1_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
font2Sizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT1_PICKER_BTN,
wxT("&Pick a color"));
fontColorSizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
// first row: PointPlacement
wxBoxSizer *pointBoxSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(pointBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *pointBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Label Point Placement"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *pointSizer = new wxStaticBoxSizer(pointBox, wxHORIZONTAL);
pointBoxSizer->Add(pointSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// first row A: Anchor Point
wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Anchor Point"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL);
pointSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL);
anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X"));
anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *anchorXCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_X, wxT("0.5"),
wxDefaultPosition, wxSize(60, 22));
anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL);
anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y"));
anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *anchorYCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_Y, wxT("0.5"),
wxDefaultPosition, wxSize(60, 22));
anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// first row B: Displacement
wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Displacement"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *displacementSizer =
new wxStaticBoxSizer(displacementBox, wxVERTICAL);
pointSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X"));
displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *displacementXCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_X, wxT("0.0"),
wxDefaultPosition, wxSize(60, 22));
displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL);
displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y"));
displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *displacementYCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y, wxT("0.0"),
wxDefaultPosition, wxSize(60, 22));
displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// first row C: Rotation
wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Rotation"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL);
pointSizer->Add(rotSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL);
rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *rotCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ROTATION, wxT("0.0"),
wxDefaultPosition, wxSize(60, 22));
rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Font Halo
wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Halo"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL);
pointBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxBoxSizer *halo1Sizer = new wxBoxSizer(wxHORIZONTAL);
haloSizer->Add(halo1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO1_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableHaloCtrl->SetValue(Style->IsHaloEnabled());
enableHaloCtrl->Enable(false);
halo1Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Halo Radius
wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Radius"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL);
halo1Sizer->Add(radiusSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *radiusCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_RADIUS, wxT("1.0"),
wxDefaultPosition, wxSize(50, 22));
radiusCtrl->Enable(false);
radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Halo Opacity
wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacityHaloSizer =
new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL);
halo1Sizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxSlider *opacityHaloCtrl =
new wxSlider(panel, ID_SYMBOLIZER_HALO1_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(75, 50),
wxSL_HORIZONTAL | wxSL_LABELS);
opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
opacityHaloCtrl->Enable(false);
// Halo color
wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL);
haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_COLOR,
FillColor,
wxDefaultPosition, wxSize(80, 22));
haloColorSizer->Add(haloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
haloCtrl->Enable(false);
color = wxColour(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleHaloCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO1_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO1_PICKER_BTN,
wxT("&Pick a color"));
haloColorSizer->Add(pickHalo, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
pickHalo->Enable(false);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_TEXT1_ENABLE,
wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel1Changed);
Connect(ID_LABEL_NO_GEOM_SYMBOLIZER,
wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdDontPaintGeom1Changed);
Connect(ID_SYMBOLIZER_FONT1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdFont1ColorPicker);
Connect(ID_SYMBOLIZER_FONT1_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdFont1ColorChanged);
Connect(ID_SYMBOLIZER_FONT1_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnFont1Changed);
Connect(ID_SYMBOLIZER_HALO1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdHalo1EnableChanged);
Connect(ID_SYMBOLIZER_HALO1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdColorHalo1Picker);
Connect(ID_SYMBOLIZER_HALO1_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdColorHalo1Changed);
return panel;
}
void QuickStyleVectorDialog::
OnCmdLabel1Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Label enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE);
if (enableCtrl->IsChecked() == true)
{
Style->SetLabelPrint(true);
Style->SetLabelLinePlacement(false);
} else
Style->SetLabelPrint(false);
RetrieveTextPointPage(false);
UpdateTextPointPage();
}
void QuickStyleVectorDialog::
OnCmdDontPaintGeom1Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Don't Paint Point Symbolizer: enable/disable
//
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
if (noGeomCtrl->IsChecked() == true)
Style->SetDontPaintGeomSymbolizer(true);
else
Style->SetDontPaintGeomSymbolizer(false);
RetrieveTextPointPage(false);
UpdateTextPointPage();
}
void QuickStyleVectorDialog::OnFont1Changed(wxCommandEvent & WXUNUSED(event))
{
//
// the Font is changed
//
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC);
wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME);
wxString font = fontList->GetValue();
char facename[1024];
strcpy(facename, font.ToUTF8());
if (strncmp(facename, "ToyFont: ", 9) == 0)
{
boldCtrl->Enable(true);
italicCtrl->Enable(true);
} else
{
bool bold = false;
bool italic = false;
MainFrame->CheckTTFont(facename, &bold, &italic);
boldCtrl->SetValue(bold);
italicCtrl->SetValue(italic);
boldCtrl->Enable(false);
italicCtrl->Enable(false);
}
}
void QuickStyleVectorDialog::
OnCmdFont1ColorPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdFont1ColorChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Font Color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdColorHalo1Picker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdColorHalo1Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Halo Color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdHalo1EnableChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Graphic Halo enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE);
if (enableCtrl->IsChecked() == true)
Style->EnableHalo(true);
else
Style->EnableHalo(false);
RetrieveTextPointPage(false);
UpdateTextPointPage();
}
wxPanel *QuickStyleVectorDialog::CreateTextLinePage(wxWindow * parent)
{
//
// creating the Text Symbolizer page (Line Placement)
//
wxString FillColor = wxT("#808080");
wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1);
wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
panel->SetSizer(topSizer);
wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5);
// enable/disable Labels
wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL);
boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Labels"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL);
auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5);
wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableCtrl->SetValue(Style->IsLabelPrint());
enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
enableSizer->AddSpacer(20);
wxStaticText *columnLabel =
new wxStaticText(panel, wxID_STATIC, wxT("&Column:"));
enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxComboBox *columnList =
new wxComboBox(panel, ID_SYMBOLIZER_TEXT2_LABEL, wxT(""), wxDefaultPosition,
wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
InitializeComboColumns(columnList);
enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxString noGeom =
wxT("Don't paint the Line Symbolizer; Text Symbolizer alone");
wxCheckBox *noGeomSymbolizerCtrl =
new wxCheckBox(panel, ID_LABEL_NO_GEOM_SYMBOLIZER, noGeom,
wxDefaultPosition, wxDefaultSize);
noGeomSymbolizerCtrl->SetValue(Style->IsDontPaintGeomSymbolizer());
wxBoxSizer *noGeomSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(noGeomSizer, 0, wxALIGN_LEFT | wxALL, 5);
noGeomSizer->Add(noGeomSymbolizerCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL);
auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Second row: Font Name, Size and Fill
wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL);
font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL);
fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// Font Name
wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL);
font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxComboBox *fontList =
new wxComboBox(panel, ID_SYMBOLIZER_FONT2_NAME, wxT(""), wxDefaultPosition,
wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
InitializeComboFonts(fontList);
fontList->Select(0);
fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Font Size
wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL);
fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Size"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL);
fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxTextCtrl *sizeCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_SIZE, wxT("15.0"),
wxDefaultPosition, wxSize(100, 22));
sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxHORIZONTAL);
fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Style"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxHORIZONTAL);
boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxBoxSizer *italicSizer = new wxBoxSizer(wxHORIZONTAL);
boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5);
wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ITALIC,
wxT("Italic"),
wxDefaultPosition, wxDefaultSize);
italicCtrl->SetValue(false);
italicCtrl->Enable(false);
italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_BOLD,
wxT("Bold"),
wxDefaultPosition, wxDefaultSize);
boldCtrl->SetValue(false);
boldCtrl->Enable(false);
italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
// Font Opacity
wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacityFontSizer =
new wxStaticBoxSizer(opacityFontBox, wxVERTICAL);
fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxSlider *opacityFontCtrl =
new wxSlider(panel, ID_SYMBOLIZER_FONT2_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(150, 35),
wxSL_HORIZONTAL | wxSL_LABELS);
opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Font color
wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxHORIZONTAL);
fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxBoxSizer *font2Sizer = new wxBoxSizer(wxVERTICAL);
fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0);
wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_COLOR,
FillColor,
wxDefaultPosition, wxSize(80, 22));
font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
wxBitmap bmp;
wxColour color(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleFontCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT2_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
fontColorSizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT2_PICKER_BTN,
wxT("&Pick a color"));
font2Sizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
// second row: LinePlacement
wxBoxSizer *lineBoxSizer = new wxBoxSizer(wxHORIZONTAL);
auxSizer->Add(lineBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *lineBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Label Line Placement"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *lineSizer = new wxStaticBoxSizer(lineBox, wxVERTICAL);
lineBoxSizer->Add(lineSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row A: PerpendicularOffset
wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL);
lineSizer->Add(perpendicularBoxSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Perpendicular Offset"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *perpendicularSizer =
new wxStaticBoxSizer(perpendicularBox, wxVERTICAL);
perpendicularBoxSizer->Add(perpendicularSizer, 0,
wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL);
perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *perpendicularCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_PERPENDICULAR, wxT("0.0"),
wxDefaultPosition, wxSize(100, 22));
perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
perpendicularCtrl->Enable(false);
wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Draw lines in parallel to the original geometry."));
perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC,
wxT
("Positive to the left-hand side. Negative numbers mean right."));
perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
// second row B: IsRepeated, InitialGap and Gap
wxBoxSizer *repeatedBoxSizer = new wxBoxSizer(wxHORIZONTAL);
lineSizer->Add(repeatedBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxStaticBox *repeatedBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Repeated Label"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *repeatedSizer = new wxStaticBoxSizer(repeatedBox, wxHORIZONTAL);
repeatedBoxSizer->Add(repeatedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxCheckBox *isRepeatedCtrl =
new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_REPEATED,
wxT("Repeated"),
wxDefaultPosition, wxDefaultSize);
isRepeatedCtrl->SetValue(false);
isRepeatedCtrl->Enable(false);
repeatedSizer->Add(isRepeatedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *inigapBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Initial Gap"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *inigapSizer = new wxStaticBoxSizer(inigapBox, wxVERTICAL);
repeatedSizer->Add(inigapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxTextCtrl *inigapCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_INITIAL_GAP, wxT("0.0"),
wxDefaultPosition, wxSize(60, 22));
inigapCtrl->Enable(false);
inigapSizer->Add(inigapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxStaticBox *gapBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Gap"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *gapSizer = new wxStaticBoxSizer(gapBox, wxVERTICAL);
repeatedSizer->Add(gapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxTextCtrl *gapCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_GAP, wxT("0.0"),
wxDefaultPosition, wxSize(60, 22));
gapCtrl->Enable(false);
gapSizer->Add(gapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// second row C: IsAligned and Generalize
wxBoxSizer *optBoxSizer = new wxBoxSizer(wxHORIZONTAL);
repeatedBoxSizer->Add(optBoxSizer, 0, wxALIGN_LEFT | wxALL, 0);
wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Options"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL);
optBoxSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 5);
wxCheckBox *isAlignedCtrl =
new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_ALIGNED,
wxT("Aligned"),
wxDefaultPosition, wxDefaultSize);
isAlignedCtrl->SetValue(false);
isAlignedCtrl->Enable(false);
optSizer->Add(isAlignedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxCheckBox *generalizeCtrl =
new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_GENERALIZE,
wxT("Generalize"),
wxDefaultPosition, wxDefaultSize);
generalizeCtrl->SetValue(false);
generalizeCtrl->Enable(false);
optSizer->Add(generalizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Halo
wxBoxSizer *haloBoxSizer = new wxBoxSizer(wxVERTICAL);
lineBoxSizer->Add(haloBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Font Halo"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL);
haloBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
wxBoxSizer *halo0Sizer = new wxBoxSizer(wxHORIZONTAL);
haloSizer->Add(halo0Sizer, 0, wxALIGN_LEFT | wxALL, 0);
wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO2_ENABLE,
wxT("Enable"),
wxDefaultPosition, wxDefaultSize);
enableHaloCtrl->SetValue(Style->IsHaloEnabled());
enableHaloCtrl->Enable(false);
halo0Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
// Halo Radius
wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Radius"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL);
halo0Sizer->Add(radiusSizer, 0, wxALIGN_RIGHT | wxALL, 2);
wxTextCtrl *radiusCtrl =
new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_RADIUS, wxT("1.0"),
wxDefaultPosition, wxSize(50, 22));
radiusCtrl->Enable(false);
radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
// Halo Opacity
wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Opacity"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *opacityHaloSizer =
new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL);
haloSizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
wxSlider *opacityHaloCtrl =
new wxSlider(panel, ID_SYMBOLIZER_HALO2_OPACITY, 100, 0, 100,
wxDefaultPosition, wxSize(130, 35),
wxSL_HORIZONTAL | wxSL_LABELS);
opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
opacityHaloCtrl->Enable(false);
// Halo color
wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC,
wxT("Color"),
wxDefaultPosition,
wxDefaultSize);
wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL);
haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
wxBoxSizer *halo2Sizer = new wxBoxSizer(wxVERTICAL);
haloColorSizer->Add(halo2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_COLOR,
FillColor,
wxDefaultPosition, wxSize(80, 22));
halo2Sizer->Add(haloCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
haloCtrl->Enable(false);
color = wxColour(0, 0, 0);
ColorMapEntry::DoPaintColorSample(32, 32, color, bmp);
wxStaticBitmap *sampleHaloCtrl =
new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO2_PICKER_HEX, bmp,
wxDefaultPosition, wxSize(32, 32));
haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO2_PICKER_BTN,
wxT("&Pick a color"));
halo2Sizer->Add(pickHalo, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2);
pickHalo->Enable(false);
panel->SetSizer(topSizer);
topSizer->Fit(panel);
// appends event handlers
Connect(ID_SYMBOLIZER_TEXT2_ENABLE,
wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel2Changed);
Connect(ID_LABEL_NO_GEOM_SYMBOLIZER,
wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdDontPaintGeom2Changed);
Connect(ID_SYMBOLIZER_FONT2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdFont2ColorPicker);
Connect(ID_SYMBOLIZER_FONT2_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdFont2ColorChanged);
Connect(ID_SYMBOLIZER_TEXT_IS_REPEATED, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdIsRepeatedChanged);
Connect(ID_SYMBOLIZER_TEXT_IS_ALIGNED, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdIsAlignedChanged);
Connect(ID_SYMBOLIZER_TEXT_GENERALIZE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdGeneralizeLineChanged);
Connect(ID_SYMBOLIZER_FONT2_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED,
(wxObjectEventFunction) & QuickStyleVectorDialog::OnFont2Changed);
Connect(ID_SYMBOLIZER_HALO2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdHalo2EnableChanged);
Connect(ID_SYMBOLIZER_HALO2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdColorHalo2Picker);
Connect(ID_SYMBOLIZER_HALO2_COLOR, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &
QuickStyleVectorDialog::OnCmdColorHalo2Changed);
return panel;
}
void QuickStyleVectorDialog::
OnCmdLabel2Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Label enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE);
if (enableCtrl->IsChecked() == true)
{
Style->SetLabelPrint(true);
Style->SetLabelLinePlacement(true);
} else
Style->SetLabelPrint(false);
RetrieveTextLinePage(false);
UpdateTextLinePage();
}
void QuickStyleVectorDialog::
OnCmdDontPaintGeom2Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Don't Paint Line Symbolizer: enable/disable
//
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
if (noGeomCtrl->IsChecked() == true)
Style->SetDontPaintGeomSymbolizer(true);
else
Style->SetDontPaintGeomSymbolizer(false);
RetrieveTextLinePage(false);
UpdateTextLinePage();
}
void QuickStyleVectorDialog::OnFont2Changed(wxCommandEvent & WXUNUSED(event))
{
//
// the Font is changed
//
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC);
wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME);
wxString font = fontList->GetValue();
char facename[1024];
strcpy(facename, font.ToUTF8());
if (strncmp(facename, "ToyFont: ", 9) == 0)
{
boldCtrl->Enable(true);
italicCtrl->Enable(true);
} else
{
bool bold = false;
bool italic = false;
MainFrame->CheckTTFont(facename, &bold, &italic);
boldCtrl->SetValue(bold);
italicCtrl->SetValue(italic);
boldCtrl->Enable(false);
italicCtrl->Enable(false);
}
}
void QuickStyleVectorDialog::
OnCmdFont2ColorPicker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdFont2ColorChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Font Color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdIsRepeatedChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Label IsRepeated enable/disable
//
wxCheckBox *repeatedCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED);
if (repeatedCtrl->IsChecked() == true)
Style->SetRepeatedLabel(true);
else
Style->SetRepeatedLabel(false);
RetrieveTextLinePage(false);
UpdateTextLinePage();
}
void QuickStyleVectorDialog::
OnCmdIsAlignedChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Label IsAligned enable/disable
//
wxCheckBox *alignedCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED);
if (alignedCtrl->IsChecked() == true)
Style->SetLabelIsAligned(true);
else
Style->SetLabelIsAligned(false);
}
void QuickStyleVectorDialog::
OnCmdGeneralizeLineChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Label GeneralizeLine enable/disable
//
wxCheckBox *generalizeCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE);
if (generalizeCtrl->IsChecked() == true)
Style->SetLabelGeneralizeLine(true);
else
Style->SetLabelGeneralizeLine(false);
}
void QuickStyleVectorDialog::
OnCmdColorHalo2Picker(wxCommandEvent & WXUNUSED(event))
{
//
// color picker
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR);
wxColour clr = wxNullColour;
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, clr);
wxColour color = wxGetColourFromUser(this, clr);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
}
void QuickStyleVectorDialog::
OnCmdColorHalo2Changed(wxCommandEvent & WXUNUSED(event))
{
//
// Halo Color changed: updating the visual sample
//
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR);
wxStaticBitmap *sampleCtrl =
(wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_HEX);
wxColour back = wxColour(255, 255, 255);
wxString str = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(str) == true)
ColorMapEntry::GetWxColor(str, back);
wxBitmap bmp;
ColorMapEntry::DoPaintColorSample(32, 32, back, bmp);
sampleCtrl->SetBitmap(bmp);
sampleCtrl->Refresh();
sampleCtrl->Update();
}
void QuickStyleVectorDialog::
OnCmdHalo2EnableChanged(wxCommandEvent & WXUNUSED(event))
{
//
// Graphic Halo enable/disable
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE);
if (enableCtrl->IsChecked() == true)
Style->EnableHalo(true);
else
Style->EnableHalo(false);
RetrieveTextLinePage(false);
UpdateTextLinePage();
}
bool QuickStyleVectorDialog::RetrieveMainPage()
{
//
// retrieving params from the MAIN page
//
double min = Style->GetScaleMin();
double max = Style->GetScaleMax();
if (Style->IsMinScaleEnabled() == true)
{
wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE);
wxString value = minCtrl->GetValue();
if (value.ToDouble(&min) != true)
{
wxMessageBox(wxT
("MIN_SCALE isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
if (min < 0.0)
{
wxMessageBox(wxT
("MIN_SCALE must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (Style->IsMaxScaleEnabled() == true)
{
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE);
wxString value = maxCtrl->GetValue();
if (value.ToDouble(&max) != true)
{
wxMessageBox(wxT
("MAX_SCALE isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
if (max < 0.0)
{
wxMessageBox(wxT
("MAX_SCALE must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true)
{
if (min >= max)
{
wxMessageBox(wxT
("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
Style->SetScaleMin(min);
Style->SetScaleMax(max);
return true;
}
void QuickStyleVectorDialog::UpdateMainPage()
{
//
// updating the MAIN page
//
wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE);
if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true)
rangeBox->SetSelection(0);
else if (Style->IsMinScaleEnabled() == true
&& Style->IsMaxScaleEnabled() != true)
rangeBox->SetSelection(1);
else if (Style->IsMinScaleEnabled() != true
&& Style->IsMaxScaleEnabled() == true)
rangeBox->SetSelection(2);
else
rangeBox->SetSelection(3);
wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE);
char dummy[64];
wxString str;
if (Style->IsMinScaleEnabled() == true)
{
sprintf(dummy, "%1.2f", Style->GetScaleMin());
str = wxString::FromUTF8(dummy);
minCtrl->SetValue(str);
minCtrl->Enable(true);
} else
{
str = wxT("0.0");
minCtrl->SetValue(str);
minCtrl->Enable(false);
}
wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE);
if (Style->IsMaxScaleEnabled() == true)
{
sprintf(dummy, "%1.2f", Style->GetScaleMax());
str = wxString::FromUTF8(dummy);
maxCtrl->SetValue(str);
maxCtrl->Enable(true);
} else
{
str = wxT("+Infinite");
maxCtrl->SetValue(str);
maxCtrl->Enable(false);
}
}
bool QuickStyleVectorDialog::RetrievePointPage(bool check)
{
//
// retrieving params from the Point Symbolizer page
//
double opacity;
double size;
double rotation;
double anchorPointX;
double anchorPointY;
double displacementX;
double displacementY;
char fillColor[8];
char strokeColor[8];
wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY);
opacity = opacityCtrl->GetValue() / 100.0;
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE);
wxString value = sizeCtrl->GetValue();
if (value.ToDouble(&size) != true)
{
if (check == true)
{
wxMessageBox(wxT
("SIZE isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (size < 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("SIZE must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION);
value = rotationCtrl->GetValue();
if (value.ToDouble(&rotation) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ROTATION isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X);
value = anchorXCtrl->GetValue();
if (value.ToDouble(&anchorPointX) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-X isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (anchorPointX < 0.0 || anchorPointX > 1.0)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y);
value = anchorYCtrl->GetValue();
if (value.ToDouble(&anchorPointY) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-Y isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (anchorPointY < 0.0 || anchorPointY > 1.0)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X);
value = displXCtrl->GetValue();
if (value.ToDouble(&displacementX) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-X isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y);
value = displYCtrl->GetValue();
if (value.ToDouble(&displacementY) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-Y isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR);
wxString color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FILL-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(fillColor, color.ToUTF8());
colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR);
color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(strokeColor, color.ToUTF8());
Style->SetSymbolOpacity(opacity);
Style->SetSymbolSize(size);
Style->SetSymbolAnchorX(anchorPointX);
Style->SetSymbolAnchorY(anchorPointY);
Style->SetSymbolRotation(rotation);
Style->SetSymbolDisplacementX(displacementX);
Style->SetSymbolDisplacementY(displacementY);
Style->SetSymbolFillColor(fillColor);
Style->SetSymbolStrokeColor(strokeColor);
return true;
}
void QuickStyleVectorDialog::UpdatePointPage()
{
//
// updating the Point Symbolizer page
//
wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY);
opacityCtrl->SetValue(Style->GetSymbolOpacity() * 100.0);
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE);
char dummy[64];
sprintf(dummy, "%1.2f", Style->GetSymbolSize());
wxString str = wxString::FromUTF8(dummy);
sizeCtrl->SetValue(str);
wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION);
sprintf(dummy, "%1.2f", Style->GetSymbolRotation());
str = wxString::FromUTF8(dummy);
rotationCtrl->SetValue(str);
wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X);
sprintf(dummy, "%1.2f", Style->GetSymbolAnchorX());
str = wxString::FromUTF8(dummy);
anchorXCtrl->SetValue(str);
wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y);
sprintf(dummy, "%1.2f", Style->GetSymbolAnchorY());
str = wxString::FromUTF8(dummy);
anchorYCtrl->SetValue(str);
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X);
sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementX());
str = wxString::FromUTF8(dummy);
displXCtrl->SetValue(str);
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y);
sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementY());
str = wxString::FromUTF8(dummy);
displYCtrl->SetValue(str);
wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK);
switch (Style->GetSymbolWellKnownMark())
{
case RL2_GRAPHIC_MARK_CIRCLE:
markCtrl->SetSelection(1);
break;
case RL2_GRAPHIC_MARK_TRIANGLE:
markCtrl->SetSelection(2);
break;
case RL2_GRAPHIC_MARK_STAR:
markCtrl->SetSelection(3);
break;
case RL2_GRAPHIC_MARK_CROSS:
markCtrl->SetSelection(4);
break;
case RL2_GRAPHIC_MARK_X:
markCtrl->SetSelection(5);
break;
default:
markCtrl->SetSelection(0);
break;
};
wxTextCtrl *colorFillCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR);
wxString fillColor = wxString::FromUTF8(Style->GetSymbolFillColor());
colorFillCtrl->SetValue(fillColor);
wxTextCtrl *colorStrokeCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR);
wxString strokeColor = wxString::FromUTF8(Style->GetSymbolStrokeColor());
colorStrokeCtrl->SetValue(strokeColor);
}
bool QuickStyleVectorDialog::RetrieveLinePage(bool check)
{
//
// retrieving params from the Line Symbolizer page
//
double opacity;
double perpendicularOffset;
char strokeColor[8];
double strokeWidth;
char stroke2Color[8];
double stroke2Width;
wxSlider *opacityCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY);
opacity = opacityCtrl->GetValue() / 100.0;
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR);
wxString value = perpCtrl->GetValue();
if (value.ToDouble(&perpendicularOffset) != true)
{
if (check == true)
{
wxMessageBox(wxT
("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR);
wxString color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-COLOR #1 isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(strokeColor, color.ToUTF8());
wxTextCtrl *widthCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH);
value = widthCtrl->GetValue();
if (value.ToDouble(&strokeWidth) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH #1 isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (strokeWidth <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH #1 must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT);
switch (dotCtrl->GetSelection())
{
case 1:
Style->SetLineDotStyle(QUICK_STYLE_DOT_LINE);
break;
case 2:
Style->SetLineDotStyle(QUICK_STYLE_DASH_LINE);
break;
case 3:
Style->SetLineDotStyle(QUICK_STYLE_DASH_DOT_LINE);
break;
default:
Style->SetLineDotStyle(QUICK_STYLE_SOLID_LINE);
break;
};
Style->SetLineOpacity(opacity);
Style->SetLinePerpendicularOffset(perpendicularOffset);
Style->SetLineStrokeWidth(strokeWidth);
Style->SetLineStrokeColor(strokeColor);
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_SECOND_STROKE_ENABLE);
bool line2Enabled = enableCtrl->IsChecked();
Style->SetLine2Enabled(line2Enabled);
// Double stroke - second pass
wxTextCtrl *color2Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
color = color2Ctrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-COLOR #2 isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(stroke2Color, color.ToUTF8());
wxTextCtrl *width2Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH);
value = width2Ctrl->GetValue();
if (value.ToDouble(&stroke2Width) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH #2 isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (stroke2Width <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH #2 must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxRadioBox *dot1Ctrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT_2);
switch (dot1Ctrl->GetSelection())
{
case 1:
Style->SetLine2DotStyle(QUICK_STYLE_DOT_LINE);
break;
case 2:
Style->SetLine2DotStyle(QUICK_STYLE_DASH_LINE);
break;
case 3:
Style->SetLine2DotStyle(QUICK_STYLE_DASH_DOT_LINE);
break;
default:
Style->SetLine2DotStyle(QUICK_STYLE_SOLID_LINE);
break;
};
Style->SetLine2StrokeWidth(stroke2Width);
Style->SetLine2StrokeColor(stroke2Color);
return true;
}
void QuickStyleVectorDialog::UpdateLinePage()
{
//
// updating the Line Symbolizer page
//
wxSlider *opacityCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY);
opacityCtrl->SetValue(Style->GetLineOpacity() * 100.0);
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR);
char dummy[64];
sprintf(dummy, "%1.2f", Style->GetLinePerpendicularOffset());
wxString str = wxString::FromUTF8(dummy);
perpCtrl->SetValue(str);
wxTextCtrl *colorCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR);
wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN);
colorCtrl->Enable(true);
pick->Enable(true);
wxString strokeColor = wxString::FromUTF8(Style->GetLineStrokeColor());
colorCtrl->SetValue(strokeColor);
wxTextCtrl *widthCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH);
sprintf(dummy, "%1.2f", Style->GetLineStrokeWidth());
str = wxString::FromUTF8(dummy);
widthCtrl->SetValue(str);
wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT);
switch (Style->GetLineDotStyle())
{
case QUICK_STYLE_DOT_LINE:
dotCtrl->SetSelection(1);
break;
case QUICK_STYLE_DASH_LINE:
dotCtrl->SetSelection(2);
break;
case QUICK_STYLE_DASH_DOT_LINE:
dotCtrl->SetSelection(3);
break;
default:
dotCtrl->SetSelection(0);
break;
};
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_SECOND_STROKE_ENABLE);
enableCtrl->SetValue(Style->IsLine2Enabled());
wxTextCtrl *color1Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxString stroke1Color = wxString::FromUTF8(Style->GetLine2StrokeColor());
color1Ctrl->SetValue(stroke1Color);
wxButton *pick1 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN);
wxTextCtrl *width1Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH);
sprintf(dummy, "%1.2f", Style->GetLine2StrokeWidth());
str = wxString::FromUTF8(dummy);
width1Ctrl->SetValue(str);
wxRadioBox *dot1Box = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT_2);
switch (Style->GetLine2DotStyle())
{
case QUICK_STYLE_DOT_LINE:
dot1Box->SetSelection(1);
break;
case QUICK_STYLE_DASH_LINE:
dot1Box->SetSelection(2);
break;
case QUICK_STYLE_DASH_DOT_LINE:
dot1Box->SetSelection(3);
break;
default:
dot1Box->SetSelection(0);
break;
};
if (Style->IsLine2Enabled() == true)
{
color1Ctrl->Enable(true);
pick1->Enable(true);
width1Ctrl->Enable(true);
dot1Box->Enable(true);
} else
{
color1Ctrl->Enable(false);
pick1->Enable(false);
width1Ctrl->Enable(false);
dot1Box->Enable(false);
}
}
bool QuickStyleVectorDialog::RetrievePolygonPage(bool check)
{
//
// retrieving params from the Polygon Synbolizer page
//
double fillOpacity;
double displacementX;
double displacementY;
double perpendicularOffset;
char fillColor[8];
double strokeOpacity;
char strokeColor[8];
double strokeWidth;
bool solidFill;
int brushId;
wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY);
fillOpacity = opacityCtrl->GetValue() / 100.0;
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X);
wxString value = displXCtrl->GetValue();
if (Style->IsPolygonFill() != true && Style->IsPolygonStroke() != true)
{
if (check == true)
{
wxMessageBox(wxT
("You can't disable both FILL and STROKE at the same time !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (value.ToDouble(&displacementX) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-X isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y);
value = displYCtrl->GetValue();
if (value.ToDouble(&displacementY) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-Y isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR);
value = perpCtrl->GetValue();
if (value.ToDouble(&perpendicularOffset) != true)
{
if (check == true)
{
wxMessageBox(wxT
("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR);
wxString color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FILL-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(fillColor, color.ToUTF8());
wxSlider *opacity2Ctrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY);
strokeOpacity = opacity2Ctrl->GetValue() / 100.0;
wxTextCtrl *color2Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
color = color2Ctrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(strokeColor, color.ToUTF8());
wxTextCtrl *widthCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH);
value = widthCtrl->GetValue();
if (value.ToDouble(&strokeWidth) != true)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (strokeWidth <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("STROKE-WIDTH must be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxRadioBox *styleBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL1_TYPE);
if (styleBox->GetSelection() == 0)
solidFill = true;
else
solidFill = false;
wxRadioBox *brushBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL2_TYPE);
brushId = brushBox->GetSelection();
Style->SetPolygonFillOpacity(fillOpacity);
Style->SetPolygonDisplacementX(displacementX);
Style->SetPolygonDisplacementY(displacementY);
Style->SetPolygonPerpendicularOffset(perpendicularOffset);
Style->SetPolygonFillColor(fillColor);
Style->SetPolygonSolidFill(solidFill);
Style->SetPolygonFillBrushId(brushId);
Style->SetPolygonStrokeOpacity(strokeOpacity);
Style->SetPolygonStrokeColor(strokeColor);
Style->SetPolygonStrokeWidth(strokeWidth);
return true;
}
void QuickStyleVectorDialog::UpdatePolygonPage()
{
//
// updating the Polygon Symbolizer page
//
wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE);
enableBox->SetValue(Style->IsPolygonFill());
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X);
char dummy[64];
sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementX());
wxString str = wxString::FromUTF8(dummy);
displXCtrl->SetValue(str);
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y);
sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementY());
str = wxString::FromUTF8(dummy);
displYCtrl->SetValue(str);
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR);
sprintf(dummy, "%1.2f", Style->GetPolygonPerpendicularOffset());
str = wxString::FromUTF8(dummy);
perpCtrl->SetValue(str);
wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY);
opacityCtrl->SetValue(Style->GetPolygonFillOpacity() * 100.0);
opacityCtrl->Enable(Style->IsPolygonFill());
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR);
wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN);
wxColour color = wxNullColour;
str = wxString::FromUTF8(Style->GetPolygonFillColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorCtrl->SetValue(str);
}
colorCtrl->Enable(Style->IsPolygonFill());
pick->Enable(Style->IsPolygonFill());
wxRadioBox *styleBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL1_TYPE);
styleBox->Enable(true);
if (Style->IsPolygonSolidFill() == true)
styleBox->SetSelection(0);
else
styleBox->SetSelection(1);
if (HasStandardBrushes == false)
styleBox->Enable(false);
else
styleBox->Enable(true);
wxRadioBox *brushBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL2_TYPE);
brushBox->SetSelection(Style->GetPolygonFillBrushId());
if (HasStandardBrushes == false || Style->IsPolygonSolidFill() == true)
brushBox->Enable(false);
else
brushBox->Enable(true);
wxCheckBox *enable2Box =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE);
enable2Box->SetValue(Style->IsPolygonStroke());
wxSlider *opacity2Ctrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY);
opacity2Ctrl->SetValue(Style->GetPolygonStrokeOpacity() * 100.0);
opacity2Ctrl->Enable(Style->IsPolygonStroke());
wxTextCtrl *color2Ctrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR);
wxButton *pick2 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN);
color = wxNullColour;
str = wxString::FromUTF8(Style->GetPolygonStrokeColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
color2Ctrl->SetValue(str);
}
color2Ctrl->Enable(Style->IsPolygonStroke());
pick2->Enable(Style->IsPolygonStroke());
wxTextCtrl *widthCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH);
sprintf(dummy, "%1.2f", Style->GetPolygonStrokeWidth());
str = wxString::FromUTF8(dummy);
widthCtrl->SetValue(str);
widthCtrl->Enable(Style->IsPolygonStroke());
}
bool QuickStyleVectorDialog::RetrieveTextPointPage(bool check)
{
//
// retrieving params from the Text Symbolizer page - Point Placement
//
wxString column;
bool noGeom;
wxString font;
double fontSize;
int fontStyle;
int fontWeight;
double opacity;
char fontColor[8];
double haloRadius;
double haloOpacity;
char haloColor[8];
double rotation;
double anchorPointX;
double anchorPointY;
double displacementX;
double displacementY;
if (Style->IsLabelPrint() == false)
return true;
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
noGeom = noGeomCtrl->GetValue();
wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL);
int idSel = columnCtrl->GetSelection();
if (idSel == wxNOT_FOUND)
{
if (check == true)
{
wxMessageBox(wxT
("You must select some Column !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
column = columnCtrl->GetValue();
wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME);
idSel = fontCtrl->GetSelection();
if (idSel == wxNOT_FOUND)
{
if (check == true)
{
wxMessageBox(wxT
("You must select some Font !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
font = fontCtrl->GetValue();
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE);
wxString value = sizeCtrl->GetValue();
if (value.ToDouble(&fontSize) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-SIZE isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (fontSize <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-SIZE should be a positive numberr !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC);
if (boldCtrl->GetValue() == true)
fontWeight = RL2_FONTWEIGHT_BOLD;
else
fontWeight = RL2_FONTWEIGHT_NORMAL;
if (italicCtrl->GetValue() == true)
fontStyle = RL2_FONTSTYLE_ITALIC;
else
fontStyle = RL2_FONTSTYLE_NORMAL;
wxSlider *opacityFontCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY);
opacity = opacityFontCtrl->GetValue() / 100.0;
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR);
wxString color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(fontColor, color.ToUTF8());
// Point Placement
wxTextCtrl *rotationCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION);
value = rotationCtrl->GetValue();
if (value.ToDouble(&rotation) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ROTATION isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *anchorXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X);
value = anchorXCtrl->GetValue();
if (value.ToDouble(&anchorPointX) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-X isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (anchorPointX < 0.0 || anchorPointX > 1.0)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *anchorYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y);
value = anchorYCtrl->GetValue();
if (value.ToDouble(&anchorPointY) != true)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-Y isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (anchorPointY < 0.0 || anchorPointY > 1.0)
{
if (check == true)
{
wxMessageBox(wxT
("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X);
value = displXCtrl->GetValue();
if (value.ToDouble(&displacementX) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-X isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y);
value = displYCtrl->GetValue();
if (value.ToDouble(&displacementY) != true)
{
if (check == true)
{
wxMessageBox(wxT
("DISPLACEMENT-Y isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (Style->IsHaloEnabled() == true)
{
wxSlider *opacityHaloCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY);
haloOpacity = opacityHaloCtrl->GetValue() / 100.0;
wxTextCtrl *radiusCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS);
wxString value = radiusCtrl->GetValue();
if (value.ToDouble(&haloRadius) != true)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-RADIUS isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (haloRadius <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-RADIUS should be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *colorHaloCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR);
wxString color = colorHaloCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(haloColor, color.ToUTF8());
}
Style->SetLabelColumn(column.ToUTF8());
Style->SetDontPaintGeomSymbolizer(noGeom);
Style->SetFontFacename(font.ToUTF8());
Style->SetFontOpacity(opacity);
Style->SetFontSize(fontSize);
Style->SetFontStyle(fontStyle);
Style->SetFontWeight(fontWeight);
Style->SetFontColor(fontColor);
Style->SetLabelRotation(rotation);
Style->SetLabelAnchorX(anchorPointX);
Style->SetLabelAnchorY(anchorPointY);
Style->SetLabelDisplacementX(displacementX);
Style->SetLabelDisplacementY(displacementY);
if (Style->IsHaloEnabled() == true)
{
Style->SetHaloRadius(haloRadius);
Style->SetHaloOpacity(haloOpacity);
Style->SetHaloColor(haloColor);
}
return true;
}
void QuickStyleVectorDialog::UpdateTextPointPage()
{
//
// updating the Text Symbolizer page - Point Placement
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE);
enableCtrl->SetValue(Style->IsLabelPrint());
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
noGeomCtrl->SetValue(Style->IsDontPaintGeomSymbolizer());
noGeomCtrl->Enable(Style->IsLabelPrint());
wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL);
wxString str = wxString::FromUTF8(Style->GetLabelColumn());
int idSel = columnCtrl->FindString(str);
columnCtrl->SetSelection(idSel);
columnCtrl->Enable(Style->IsLabelPrint());
wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME);
str = wxString::FromUTF8(Style->GetFontFacename());
idSel = fontCtrl->FindString(str);
fontCtrl->SetSelection(idSel);
fontCtrl->Enable(Style->IsLabelPrint());
wxSlider *opacityFontCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY);
opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0);
opacityFontCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *colorFontCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR);
wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_BTN);
wxColour color = wxNullColour;
str = wxString::FromUTF8(Style->GetFontColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorFontCtrl->SetValue(str);
}
colorFontCtrl->Enable(Style->IsLabelPrint());
pickFont->Enable(Style->IsLabelPrint());
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE);
char dummy[64];
sprintf(dummy, "%1.2f", Style->GetFontSize());
str = wxString::FromUTF8(dummy);
sizeCtrl->SetValue(str);
sizeCtrl->Enable(Style->IsLabelPrint());
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC);
if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD)
boldCtrl->SetValue(true);
else
boldCtrl->SetValue(false);
if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC)
italicCtrl->SetValue(true);
else
italicCtrl->SetValue(false);
if (Style->GetFontFacename() != NULL)
{
if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0)
{
boldCtrl->Enable(Style->IsLabelPrint());
italicCtrl->Enable(Style->IsLabelPrint());
} else
{
bool bold = false;
bool italic = false;
MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic);
boldCtrl->SetValue(bold);
italicCtrl->SetValue(italic);
boldCtrl->Enable(false);
italicCtrl->Enable(false);
}
}
// Point Placement
wxTextCtrl *rotationCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION);
sprintf(dummy, "%1.2f", Style->GetLabelRotation());
str = wxString::FromUTF8(dummy);
rotationCtrl->SetValue(str);
rotationCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *anchorXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X);
sprintf(dummy, "%1.2f", Style->GetLabelAnchorX());
str = wxString::FromUTF8(dummy);
anchorXCtrl->SetValue(str);
anchorXCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *anchorYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y);
sprintf(dummy, "%1.2f", Style->GetLabelAnchorY());
str = wxString::FromUTF8(dummy);
anchorYCtrl->SetValue(str);
anchorYCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *displXCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X);
sprintf(dummy, "%1.2f", Style->GetLabelDisplacementX());
str = wxString::FromUTF8(dummy);
displXCtrl->SetValue(str);
displXCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *displYCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y);
sprintf(dummy, "%1.2f", Style->GetLabelDisplacementY());
str = wxString::FromUTF8(dummy);
displYCtrl->SetValue(str);
displYCtrl->Enable(Style->IsLabelPrint());
wxCheckBox *enableHaloBox =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE);
if (Style->IsHaloEnabled() == true)
enableHaloBox->SetValue(true);
else
enableHaloBox->SetValue(false);
enableHaloBox->Enable(Style->IsLabelPrint());
bool enable = false;
if (Style->IsLabelPrint() == true)
enable = Style->IsHaloEnabled();
wxTextCtrl *radiusCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS);
radiusCtrl->Enable(enable);
wxTextCtrl *colorHaloCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR);
colorHaloCtrl->Enable(enable);
wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_BTN);
pickHalo->Enable(enable);
wxSlider *opacityHaloCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY);
opacityHaloCtrl->Enable(enable);
opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0);
sprintf(dummy, "%1.2f", Style->GetHaloRadius());
str = wxString::FromUTF8(dummy);
radiusCtrl->SetValue(str);
color = wxNullColour;
str = wxString::FromUTF8(Style->GetHaloColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorHaloCtrl->SetValue(str);
}
if (Style->IsHaloEnabled() == false)
{
opacityHaloCtrl->Enable(false);
pickHalo->Enable(false);
colorHaloCtrl->Enable(false);
radiusCtrl->Enable(false);
} else
{
opacityHaloCtrl->Enable(true);
pickHalo->Enable(true);
colorHaloCtrl->Enable(true);
radiusCtrl->Enable(true);
}
}
bool QuickStyleVectorDialog::RetrieveTextLinePage(bool check)
{
//
// retrieving params from the Text Symbolizer page - Line Placement
//
wxString column;
bool noGeom;
wxString font;
double fontSize;
int fontStyle;
int fontWeight;
double opacity;
char fontColor[8];
double haloRadius;
double haloOpacity;
char haloColor[8];
double perpendicularOffset;
double initialGap;
double gap;
if (Style->IsLabelPrint() == false)
return true;
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
noGeom = noGeomCtrl->GetValue();
wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL);
int idSel = columnCtrl->GetSelection();
if (idSel == wxNOT_FOUND)
{
if (check == true)
{
wxMessageBox(wxT
("You must select some Column !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
column = columnCtrl->GetValue();
wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME);
idSel = fontCtrl->GetSelection();
if (idSel == wxNOT_FOUND)
{
if (check == true)
{
wxMessageBox(wxT
("You must select some Font !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
font = fontCtrl->GetValue();
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE);
wxString value = sizeCtrl->GetValue();
if (value.ToDouble(&fontSize) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-SIZE isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (fontSize <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-SIZE should be a positive numberr !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC);
if (boldCtrl->GetValue() == true)
fontWeight = RL2_FONTWEIGHT_BOLD;
else
fontWeight = RL2_FONTWEIGHT_NORMAL;
if (italicCtrl->GetValue() == true)
fontStyle = RL2_FONTSTYLE_ITALIC;
else
fontStyle = RL2_FONTSTYLE_NORMAL;
wxSlider *opacityFontCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY);
opacity = opacityFontCtrl->GetValue() / 100.0;
wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR);
wxString color = colorCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("FONT-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(fontColor, color.ToUTF8());
// Line Placement
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR);
value = perpCtrl->GetValue();
if (value.ToDouble(&perpendicularOffset) != true)
{
if (check == true)
{
wxMessageBox(wxT
("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *inigapCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP);
value = inigapCtrl->GetValue();
if (value.ToDouble(&initialGap) != true)
{
if (check == true)
{
wxMessageBox(wxT
("INITIAL-GAP isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (initialGap < 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("INITIAL-GAP should be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP);
value = gapCtrl->GetValue();
if (value.ToDouble(&gap) != true)
{
if (check == true)
{
wxMessageBox(wxT
("GAP isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (gap < 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("GAP should be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (Style->IsHaloEnabled() == true)
{
wxSlider *opacityHaloCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY);
haloOpacity = opacityHaloCtrl->GetValue() / 100.0;
wxTextCtrl *radiusCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS);
wxString value = radiusCtrl->GetValue();
if (value.ToDouble(&haloRadius) != true)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-RADIUS isn't a valid decimal number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
if (haloRadius <= 0.0)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-RADIUS should be a positive number !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
wxTextCtrl *colorHaloCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR);
wxString color = colorHaloCtrl->GetValue();
if (ColorMapEntry::IsValidColor(color) != true)
{
if (check == true)
{
wxMessageBox(wxT
("HALO-COLOR isn't a valid HexRGB color !!!"),
wxT("spatialite_gui"), wxOK | wxICON_WARNING, this);
return false;
}
}
strcpy(haloColor, color.ToUTF8());
}
Style->SetDontPaintGeomSymbolizer(noGeom);
Style->SetLabelColumn(column.ToUTF8());
Style->SetFontFacename(font.ToUTF8());
Style->SetFontOpacity(opacity);
Style->SetFontSize(fontSize);
Style->SetFontStyle(fontStyle);
Style->SetFontWeight(fontWeight);
Style->SetFontColor(fontColor);
Style->SetLabelPerpendicularOffset(perpendicularOffset);
Style->SetLabelInitialGap(initialGap);
Style->SetLabelGap(gap);
if (Style->IsHaloEnabled() == true)
{
Style->SetHaloRadius(haloRadius);
Style->SetHaloOpacity(haloOpacity);
Style->SetHaloColor(haloColor);
}
return true;
}
void QuickStyleVectorDialog::UpdateTextLinePage()
{
//
// updating the Text Symbolizer page - Line Placement
//
wxCheckBox *enableCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE);
enableCtrl->SetValue(Style->IsLabelPrint());
wxCheckBox *noGeomCtrl =
(wxCheckBox *) FindWindow(ID_LABEL_NO_GEOM_SYMBOLIZER);
noGeomCtrl->SetValue(Style->IsDontPaintGeomSymbolizer());
noGeomCtrl->Enable(Style->IsLabelPrint());
wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL);
wxString str = wxString::FromUTF8(Style->GetLabelColumn());
int idSel = columnCtrl->FindString(str);
columnCtrl->SetSelection(idSel);
columnCtrl->Enable(Style->IsLabelPrint());
wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME);
str = wxString::FromUTF8(Style->GetFontFacename());
idSel = fontCtrl->FindString(str);
fontCtrl->SetSelection(idSel);
fontCtrl->Enable(Style->IsLabelPrint());
wxSlider *opacityFontCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY);
opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0);
opacityFontCtrl->Enable(Style->IsLabelPrint());
wxTextCtrl *colorFontCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR);
wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_BTN);
wxColour color = wxNullColour;
str = wxString::FromUTF8(Style->GetFontColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorFontCtrl->SetValue(str);
}
colorFontCtrl->Enable(Style->IsLabelPrint());
pickFont->Enable(Style->IsLabelPrint());
wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE);
char dummy[64];
sprintf(dummy, "%1.2f", Style->GetFontSize());
str = wxString::FromUTF8(dummy);
sizeCtrl->SetValue(str);
sizeCtrl->Enable(Style->IsLabelPrint());
wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD);
wxCheckBox *italicCtrl =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC);
if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD)
{
boldCtrl->SetValue(true);
} else
boldCtrl->SetValue(false);
if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC)
italicCtrl->SetValue(true);
else
italicCtrl->SetValue(false);
if (Style->GetFontFacename() != NULL)
{
if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0)
{
boldCtrl->Enable(Style->IsLabelPrint());
italicCtrl->Enable(Style->IsLabelPrint());
} else
{
bool bold = false;
bool italic = false;
MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic);
boldCtrl->SetValue(bold);
italicCtrl->SetValue(italic);
boldCtrl->Enable(false);
italicCtrl->Enable(false);
}
}
// Line Placement
wxTextCtrl *perpCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR);
sprintf(dummy, "%1.2f", Style->GetLabelPerpendicularOffset());
str = wxString::FromUTF8(dummy);
perpCtrl->SetValue(str);
perpCtrl->Enable(Style->IsLabelPrint());
wxCheckBox *repeatBox =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED);
repeatBox->SetValue(Style->IsRepeatedLabel());
repeatBox->Enable(Style->IsLabelPrint());
wxTextCtrl *inigapCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP);
sprintf(dummy, "%1.2f", Style->GetLabelInitialGap());
str = wxString::FromUTF8(dummy);
inigapCtrl->SetValue(str);
wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP);
sprintf(dummy, "%1.2f", Style->GetLabelGap());
str = wxString::FromUTF8(dummy);
gapCtrl->SetValue(str);
if (Style->IsLabelPrint() && Style->IsRepeatedLabel())
{
inigapCtrl->Enable(true);
gapCtrl->Enable(true);
} else
{
inigapCtrl->Enable(false);
gapCtrl->Enable(false);
}
wxCheckBox *alignBox =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED);
alignBox->SetValue(Style->IsLabelAligned());
alignBox->Enable(Style->IsLabelPrint());
wxCheckBox *generalizeBox =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE);
generalizeBox->SetValue(Style->IsLabelGeneralizeLine());
generalizeBox->Enable(Style->IsLabelPrint());
wxCheckBox *enableHaloBox =
(wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE);
if (Style->IsHaloEnabled() == true)
enableHaloBox->SetValue(true);
else
enableHaloBox->SetValue(false);
enableHaloBox->Enable(Style->IsLabelPrint());
bool enable = false;
if (Style->IsLabelPrint() == true)
enable = Style->IsHaloEnabled();
wxTextCtrl *radiusCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS);
radiusCtrl->Enable(enable);
wxTextCtrl *colorHaloCtrl =
(wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR);
colorHaloCtrl->Enable(enable);
wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_BTN);
pickHalo->Enable(enable);
wxSlider *opacityHaloCtrl =
(wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY);
opacityHaloCtrl->Enable(enable);
opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0);
sprintf(dummy, "%1.2f", Style->GetHaloRadius());
str = wxString::FromUTF8(dummy);
radiusCtrl->SetValue(str);
color = wxNullColour;
str = wxString::FromUTF8(Style->GetHaloColor());
ColorMapEntry::GetWxColor(str, color);
if (color.IsOk() == true)
{
char hex[16];
sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue());
wxString str = wxString::FromUTF8(hex);
colorHaloCtrl->SetValue(str);
}
if (Style->IsHaloEnabled() == false)
{
opacityHaloCtrl->Enable(false);
pickHalo->Enable(false);
colorHaloCtrl->Enable(false);
radiusCtrl->Enable(false);
} else
{
opacityHaloCtrl->Enable(true);
pickHalo->Enable(true);
colorHaloCtrl->Enable(true);
radiusCtrl->Enable(true);
}
}
void QuickStyleVectorDialog::OnPageChanging(wxNotebookEvent & event)
{
//
// TAB/PAGE selection changing
//
bool ret = false;
int idx = event.GetOldSelection();
if (idx == 0)
ret = RetrieveMainPage();
else
{
if (idx == PagePointIndex)
ret = RetrievePointPage();
if (idx == PageLineIndex)
ret = RetrieveLinePage();
if (idx == PagePolygonIndex)
ret = RetrievePolygonPage();
if (idx == PageTextPointIndex)
ret = RetrieveTextPointPage();
if (idx == PageTextLineIndex)
ret = RetrieveTextLinePage();
}
if (ret != true)
event.Veto();
}
void QuickStyleVectorDialog::OnPageChanged(wxNotebookEvent & event)
{
//
// TAB/PAGE selection changed
//
int idx = event.GetSelection();
if (idx == 0)
UpdateMainPage();
else
{
if (idx == PagePointIndex)
UpdatePointPage();
if (idx == PageLineIndex)
UpdateLinePage();
if (idx == PagePolygonIndex)
UpdatePolygonPage();
if (idx == PageTextPointIndex)
UpdateTextPointPage();
if (idx == PageTextLineIndex)
UpdateTextLinePage();
}
}
bool QuickStyleVectorDialog::UpdateStyle()
{
//
// updating the QuickStyle
//
bool ret = false;
int idx = GetBookCtrl()->GetSelection();
if (idx == 0)
ret = RetrieveMainPage();
else
{
if (idx == PagePointIndex)
ret = RetrievePointPage();
if (idx == PageLineIndex)
ret = RetrieveLinePage();
if (idx == PagePolygonIndex)
ret = RetrievePolygonPage();
if (idx == PageTextPointIndex)
ret = RetrieveTextPointPage();
if (idx == PageTextLineIndex)
ret = RetrieveTextLinePage();
}
if (ret == false)
return false;
VectorLayerConfig *config = Layer->GetVectorConfig();
bool setCurrentStyle = false;
if (config->GetStyle() == NULL)
setCurrentStyle = true;
else
{
if (strcmp(Style->GetUUID(), config->GetStyle()) != 0)
setCurrentStyle = true;
}
if (setCurrentStyle == true)
{
config->SetStyle(Style->GetUUID());
IsConfigChanged = true;
}
IsConfigChanged = Layer->UpdateQuickStyle(Style);
return true;
}
void QuickStyleVectorDialog::OnOk(wxCommandEvent & WXUNUSED(event))
{
//
// permanently saving the QuickStyle and quitting
//
if (UpdateStyle() == true)
wxDialog::EndModal(wxID_OK);
}
void QuickStyleVectorDialog::OnApply(wxCommandEvent & WXUNUSED(event))
{
//
// applying the QuickStyle and continuing
//
if (UpdateStyle() == true)
{
if (IsConfigChanged == true)
MapPanel->RefreshMap();
}
}
void QuickStyleVectorDialog::OnExport(wxCommandEvent & WXUNUSED(event))
{
//
// exporting the Quick Style as an external file
//
bool xret = false;
int ret;
wxString path;
wxString lastDir;
int idx = GetBookCtrl()->GetSelection();
if (idx == 0)
xret = RetrieveMainPage();
else
{
if (idx == PagePointIndex)
xret = RetrievePointPage();
if (idx == PageLineIndex)
xret = RetrieveLinePage();
if (idx == PagePolygonIndex)
xret = RetrievePolygonPage();
if (idx == PageTextPointIndex)
xret = RetrieveTextPointPage();
if (idx == PageTextLineIndex)
xret = RetrieveTextLinePage();
}
if (xret == false)
return;
wxFileDialog fileDialog(this,
wxT("Exporting an SLD/SE QuickStyle to a file"),
wxT(""), wxT("style.xml"),
wxT("XML Document|*.xml|All files (*.*)|*.*"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition,
wxDefaultSize, wxT("filedlg"));
lastDir = MainFrame->GetLastDirectory();
if (lastDir.Len() >= 1)
fileDialog.SetDirectory(lastDir);
ret = fileDialog.ShowModal();
if (ret == wxID_OK)
{
wxFileName file(fileDialog.GetPath());
path = file.GetPath();
path += file.GetPathSeparator();
path += file.GetName();
lastDir = file.GetPath();
path = fileDialog.GetPath();
FILE *out = fopen(path.ToUTF8(), "wb");
if (out == NULL)
wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""),
wxT("spatialite_gui"), wxOK | wxICON_ERROR, this);
else
{
char *xml = Style->CreateXmlStyle();
fwrite(xml, 1, strlen(xml), out);
sqlite3_free(xml);
fclose(out);
wxMessageBox(wxT
("SLD/SE QuickStyle successfully saved into:\n\n\"")
+ path + wxT("\""), wxT("spatialite_gui"),
wxOK | wxICON_INFORMATION, this);
}
}
}
void QuickStyleVectorDialog::OnCopy(wxCommandEvent & WXUNUSED(event))
{
//
// Copying the Quick Style into the Clipboard
//
bool ret = false;
int idx = GetBookCtrl()->GetSelection();
if (idx == 0)
ret = RetrieveMainPage();
else
{
if (idx == PagePointIndex)
ret = RetrievePointPage();
if (idx == PageLineIndex)
ret = RetrieveLinePage();
if (idx == PagePolygonIndex)
ret = RetrievePolygonPage();
if (idx == PageTextPointIndex)
ret = RetrieveTextPointPage();
if (idx == PageTextLineIndex)
ret = RetrieveTextLinePage();
}
if (ret == false)
return;
char *xml = Style->CreateXmlStyle();
wxString XMLstring = wxString::FromUTF8(xml);
sqlite3_free(xml);
if (wxTheClipboard->Open())
{
wxTheClipboard->SetData(new wxTextDataObject(XMLstring));
wxTheClipboard->Close();
}
}
void QuickStyleVectorDialog::OnQuit(wxCommandEvent & WXUNUSED(event))
{
//
// all done:
//
wxDialog::EndModal(wxID_CANCEL);
}
spatialite_gui-2.1.0-beta1/configure 0000775 0001750 0001750 00002372614 13711576502 014367 0000000 0000000 #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for spatialite_gui 2.1.0-beta1.
#
# Report bugs to .
#
#
# Copyright (C) 1992-1996, 1998-2012 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.
as_myself=
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
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
# 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.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
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
test -x / || 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
|| test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || 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 :
export CONFIG_SHELL
# 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.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
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 and a.furieri@lqt.it
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
$0: 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_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_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; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# 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 -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
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
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# 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'"
SHELL=${CONFIG_SHELL-/bin/sh}
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='spatialite_gui'
PACKAGE_TARNAME='spatialite_gui'
PACKAGE_VERSION='2.1.0-beta1'
PACKAGE_STRING='spatialite_gui 2.1.0-beta1'
PACKAGE_BUGREPORT='a.furieri@lqt.it'
PACKAGE_URL=''
# 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
OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS
PG_LIB
PG_LDFLAGS
PG_CFLAGS
PGCONFIG
LIBCURL_LIBS
LIBCURL_CFLAGS
LIBVIRTUALPG_LIBS
LIBVIRTUALPG_CFLAGS
LIBRASTERLITE2_LIBS
LIBRASTERLITE2_CFLAGS
LIBSPATIALITE_LIBS
LIBSPATIALITE_CFLAGS
LIBLZMA_LIBS
LIBLZMA_CFLAGS
LIBWEBP_LIBS
LIBWEBP_CFLAGS
LIBOPENJP2_LIBS
LIBOPENJP2_CFLAGS
LIBZSTD_LIBS
LIBZSTD_CFLAGS
LIBLZ4_LIBS
LIBLZ4_CFLAGS
LIBXML2_LIBS
LIBXML2_CFLAGS
LIBFREEXL_LIBS
LIBFREEXL_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
GEOS_CPPFLAGS
GEOS_LDFLAGS
GEOSCONFIG
LIBOBJS
WX_LIBS
WXCONFIG
CXXCPP
OTOOL64
OTOOL
LIPO
NMEDIT
DSYMUTIL
MANIFEST_TOOL
RANLIB
ac_ct_AR
AR
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
LN_S
CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
ac_ct_CC
CFLAGS
CC
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
am__include
DEPDIR
OBJEXT
EXEEXT
ac_ct_CXX
CPPFLAGS
LDFLAGS
CXXFLAGS
CXX
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
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
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
am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
enable_maintainer_mode
enable_dependency_tracking
enable_shared
enable_static
with_pic
enable_fast_install
with_gnu_ld
with_sysroot
enable_libtool_lock
with_wxconfig
with_geosconfig
enable_freexl
enable_libxml2
enable_minizip
enable_xlsxwriter
enable_lz4
enable_zstd
enable_openjpeg
enable_webp
with_pgconfig
with_libpq_deferred
enable_sqlite_stmtstatus_autoindex
'
ac_precious_vars='build_alias
host_alias
target_alias
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CC
CFLAGS
CPP
CXXCPP
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
LIBFREEXL_CFLAGS
LIBFREEXL_LIBS
LIBXML2_CFLAGS
LIBXML2_LIBS
LIBLZ4_CFLAGS
LIBLZ4_LIBS
LIBZSTD_CFLAGS
LIBZSTD_LIBS
LIBOPENJP2_CFLAGS
LIBOPENJP2_LIBS
LIBWEBP_CFLAGS
LIBWEBP_LIBS
LIBLZMA_CFLAGS
LIBLZMA_LIBS
LIBSPATIALITE_CFLAGS
LIBSPATIALITE_LIBS
LIBRASTERLITE2_CFLAGS
LIBRASTERLITE2_LIBS
LIBVIRTUALPG_CFLAGS
LIBVIRTUALPG_LIBS
LIBCURL_CFLAGS
LIBCURL_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_TARNAME}'
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
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 spatialite_gui 2.1.0-beta1 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/spatialite_gui]
--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
case $ac_init_help in
short | recursive ) echo "Configuration of spatialite_gui 2.1.0-beta1:";;
esac
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]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--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-freexl enables FreeXL inclusion [default=yes]
--enable-libxml2 enables libxml2 inclusion [default=yes]
--enable-minizip enables MiniZIP inclusion [default=yes]
--enable-xlsxwriter enables XlsxWriter inclusion [default=yes]
--enable-lz4 enables LZ4 inclusion [default=yes]
--enable-zstd enables ZSTD inclusion [default=yes]
--enable-openjpeg enables OpenJpeg inclusion [default=yes]
--enable-webp enables WebP inclusion [default=yes]
--enable-sqlite_stmtstatus_autoindex
enables SQLITE_STMTSTATUS_AUTOINDEX [default=yes]
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-sysroot=DIR Search for dependent libraries within DIR
(or the compiler's sysroot if not specified).
--with-wxconfig=FILE specify an alternative wx-config file
--with-geosconfig=FILE specify an alternative geos-config file
--with-pgconfig=FILE specify an alternative pg_config file
--with-libpq_deferred enables libpq late binding [default=no]
Some influential environment variables:
CXX C++ compiler command
CXXFLAGS 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
CC C compiler command
CFLAGS 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
LIBFREEXL_CFLAGS
C compiler flags for LIBFREEXL, overriding pkg-config
LIBFREEXL_LIBS
linker flags for LIBFREEXL, overriding pkg-config
LIBXML2_CFLAGS
C compiler flags for LIBXML2, overriding pkg-config
LIBXML2_LIBS
linker flags for LIBXML2, overriding pkg-config
LIBLZ4_CFLAGS
C compiler flags for LIBLZ4, overriding pkg-config
LIBLZ4_LIBS linker flags for LIBLZ4, overriding pkg-config
LIBZSTD_CFLAGS
C compiler flags for LIBZSTD, overriding pkg-config
LIBZSTD_LIBS
linker flags for LIBZSTD, overriding pkg-config
LIBOPENJP2_CFLAGS
C compiler flags for LIBOPENJP2, overriding pkg-config
LIBOPENJP2_LIBS
linker flags for LIBOPENJP2, overriding pkg-config
LIBWEBP_CFLAGS
C compiler flags for LIBWEBP, overriding pkg-config
LIBWEBP_LIBS
linker flags for LIBWEBP, overriding pkg-config
LIBLZMA_CFLAGS
C compiler flags for LIBLZMA, overriding pkg-config
LIBLZMA_LIBS
linker flags for LIBLZMA, overriding pkg-config
LIBSPATIALITE_CFLAGS
C compiler flags for LIBSPATIALITE, overriding pkg-config
LIBSPATIALITE_LIBS
linker flags for LIBSPATIALITE, overriding pkg-config
LIBRASTERLITE2_CFLAGS
C compiler flags for LIBRASTERLITE2, overriding pkg-config
LIBRASTERLITE2_LIBS
linker flags for LIBRASTERLITE2, overriding pkg-config
LIBVIRTUALPG_CFLAGS
C compiler flags for LIBVIRTUALPG, overriding pkg-config
LIBVIRTUALPG_LIBS
linker flags for LIBVIRTUALPG, overriding pkg-config
LIBCURL_CFLAGS
C compiler flags for LIBCURL, overriding pkg-config
LIBCURL_LIBS
linker flags for LIBCURL, 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 .
_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
spatialite_gui configure 2.1.0-beta1
generated by GNU Autoconf 2.69
Copyright (C) 2012 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_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; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
# 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; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_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; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
# 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 ||
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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
# 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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} 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; ${as_lineno_stack:+:} 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 ||
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; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
# ac_fn_c_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_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; 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_c_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_c_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_c_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;}
( $as_echo "## ------------------------------- ##
## Report this to a.furieri@lqt.it ##
## ------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
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 \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof ($2))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof (($2)))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
eval "$3=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
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
#ifndef $as_decl_name
#ifdef __cplusplus
(void) $as_decl_use;
#else
(void) $as_decl_name;
#endif
#endif
;
return 0;
}
_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; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
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 spatialite_gui $as_me 2.1.0-beta1, which was
generated by GNU Autoconf 2.69. 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_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
am__api_version='1.16'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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.
# 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 ${ac_cv_path_install+:} false; 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 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
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; }
# 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 (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
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
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
if test "$2" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
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; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
rm -f conftest.file
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 --is-lightweight"; then
am_missing_run="$MISSING "
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+set}" != 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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_mkdir+:} false; 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
as_fn_executable_p "$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; }
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 ${ac_cv_prog_AWK+:} false; 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 as_fn_executable_p "$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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
if ${am_cv_make_support_nested_variables+:} false; then :
$as_echo_n "(cached) " >&6
else
if $as_echo 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
$as_echo "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'
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='spatialite_gui'
VERSION='2.1.0-beta1'
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"}
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
#
#
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar pax cpio none'
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard:
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: .
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
$as_echo "$USE_MAINTAINER_MODE" >&6; }
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
ac_config_headers="$ac_config_headers config.h"
# supporting SPATIALITE_AMALGAMATION
# Checks for programs.
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 ${ac_cv_prog_CXX+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_CXX+:} false; 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 as_fn_executable_p "$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
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 ${ac_cv_objext+:} false; 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 ${ac_cv_cxx_compiler_gnu+:} false; 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 ${ac_cv_prog_cxx_g+:} false; 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
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
cat > confinc.mk << 'END'
am__doit:
@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
am__include="#"
am__quote=
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
{ echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
(${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
case $?:`cat confinc.out 2>/dev/null` in #(
'0:this is the am__doit target') :
case $s in #(
BSD) :
am__include='.include' am__quote='"' ;; #(
*) :
am__include='include' am__quote='' ;;
esac ;; #(
*) :
;;
esac
if test "$am__include" != "#"; then
_am_result="yes ($s style)"
break
fi
done
rm -f confinc.* confmf.*
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
$as_echo "${_am_result}" >&6; }
# 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='\'
am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
AMDEP_TRUE='#'
AMDEP_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 ${am_cv_CXX_dependencies_compiler_type+:} false; 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".
rm -rf conftest.dir
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 10 /bin/sh.
echo '/* dummy */' > 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
;;
msvc7 | msvc7msys | 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
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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$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
{ $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 ${ac_cv_c_compiler_gnu+:} false; 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 ${ac_cv_prog_cc_g+:} false; 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 ${ac_cv_prog_cc_c89+:} false; 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
struct stat;
/* 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=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 whether $CC understands -c and -o together" >&5
$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
if ${am_cv_prog_cc_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
$as_echo "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
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
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 ${am_cv_CC_dependencies_compiler_type+:} false; 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".
rm -rf conftest.dir
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 10 /bin/sh.
echo '/* dummy */' > 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
;;
msvc7 | msvc7msys | 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
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 ${ac_cv_prog_CPP+:} false; 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 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
{ $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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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
# 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 ${ac_cv_build+:} false; 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 ${ac_cv_host+:} false; 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 ${ac_cv_prog_AS+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_AS+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; 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 as_fn_executable_p "$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.4'
macro_revision='1.3293'
ltmain="$ac_aux_dir/ltmain.sh"
# Backslashify 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'
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='printf %s\n'
else
# Use this function as a fallback that always works.
func_fallback_echo ()
{
eval 'cat <<_LTECHO_EOF
$1
_LTECHO_EOF'
}
ECHO='func_fallback_echo'
fi
# func_echo_all arg...
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
$ECHO ""
}
case "$ECHO" in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
$as_echo "print -r" >&6; } ;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
$as_echo "cat" >&6; } ;;
esac
{ $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 ${ac_cv_path_SED+:} false; 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"
as_fn_executable_p "$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 ${ac_cv_path_GREP+:} false; 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"
as_fn_executable_p "$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 ${ac_cv_path_EGREP+:} false; 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"
as_fn_executable_p "$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 ${ac_cv_path_FGREP+:} false; 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"
as_fn_executable_p "$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 ${lt_cv_path_LD+:} false; 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 ${lt_cv_prog_gnu_ld+:} false; 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 ${lt_cv_path_NM+:} false; 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 "$DUMPBIN"; then :
# Let the user override the test.
else
if test -n "$ac_tool_prefix"; then
for ac_prog in dumpbin "link -dump"
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 ${ac_cv_prog_DUMPBIN+:} false; 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 as_fn_executable_p "$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 "link -dump"
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 ${ac_cv_prog_ac_ct_DUMPBIN+:} false; 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 as_fn_executable_p "$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
case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols"
;;
*)
DUMPBIN=:
;;
esac
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 ${lt_cv_nm_interface+:} false; 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:$LINENO: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:$LINENO: 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; }
# 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 ${lt_cv_sys_max_cmd_len+:} false; 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;
;;
mint*)
# On MiNT this can take a long time and run out of memory.
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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
= "X$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%"$_lt_dummy"}, \
= c,a/b,b/c, \
&& 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 how to convert $build file names to $host format" >&5
$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
if ${lt_cv_to_host_file_cmd+:} false; then :
$as_echo_n "(cached) " >&6
else
case $host in
*-*-mingw* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
;;
* ) # otherwise, assume *nix
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
;;
esac
;;
*-*-cygwin* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
* ) # otherwise, assume *nix
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
;;
esac
;;
* ) # unhandled hosts (and "normal" native builds)
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
$as_echo "$lt_cv_to_host_file_cmd" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
if ${lt_cv_to_tool_file_cmd+:} false; then :
$as_echo_n "(cached) " >&6
else
#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
*-*-mingw* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
;;
esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
{ $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 ${lt_cv_ld_reload_flag+:} false; 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
cygwin* | mingw* | pw32* | cegcc*)
if test "$GCC" != yes; then
reload_cmds=false
fi
;;
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 ${ac_cv_prog_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${lt_cv_deplibs_check_method+:} false; 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.
# func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
if ( test "$lt_cv_nm_interface" = "BSD nm" && 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
# Keep this pattern in sync with the one in func_win32_libid.
lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
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
;;
haiku*)
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])(-bit)?( [LM]SB)? 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*)
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_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
mingw* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
fi
;;
esac
fi
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}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 ${ac_cv_prog_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DLLTOOL+:} false; 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 as_fn_executable_p "$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
test -z "$DLLTOOL" && DLLTOOL=dlltool
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh
# decide which to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
;;
*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
;;
esac
;;
*)
# fallback: assume linklib IS sharedlib
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
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 ${ac_cv_prog_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$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
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
test -n "$AR" && break
done
fi
if test -z "$AR"; then
ac_ct_AR=$AR
for ac_prog in ar
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 ${ac_cv_prog_ac_ct_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$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_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
test -n "$ac_ct_AR" && break
done
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
fi
: ${AR=ar}
: ${AR_FLAGS=cru}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
$as_echo_n "checking for archiver @FILE support... " >&6; }
if ${lt_cv_ar_at_file+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -eq 0; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -ne 0; then
lt_cv_ar_at_file=@
fi
fi
rm -f conftest.* libconftest.a
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
if test "x$lt_cv_ar_at_file" = xno; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_RANLIB+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_RANLIB+:} false; 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 as_fn_executable_p "$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
case $host_os in
darwin*)
lock_old_archive_extraction=yes ;;
*)
lock_old_archive_extraction=no ;;
esac
# 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 ${lt_cv_sys_global_symbol_pipe+:} false; 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
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
# 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
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
#elif defined(__osf__)
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
# define LT_DLSYM_CONST const
#endif
#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. */
LT_DLSYM_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_globsym_save_LIBS=$LIBS
lt_globsym_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_globsym_save_LIBS
CFLAGS=$lt_globsym_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
# Response file support.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
nm_file_list_spec='@'
elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
nm_file_list_spec='@'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
# Check whether --with-sysroot was given.
if test "${with_sysroot+set}" = set; then :
withval=$with_sysroot;
else
with_sysroot=no
fi
lt_sysroot=
case ${with_sysroot} in #(
yes)
if test "$GCC" = yes; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
/*)
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
$as_echo "${with_sysroot}" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
$as_echo "${lt_sysroot:-no}" >&6; }
# 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 '$LINENO' "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 ${lt_cv_cc_needs_belf+:} false; 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"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
set dummy ${ac_tool_prefix}mt; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$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
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
$as_echo "$MANIFEST_TOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
# Extract the first word of "mt", so it can be a program name with args.
set dummy mt; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$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_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_MANIFEST_TOOL" = x; then
MANIFEST_TOOL=":"
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
MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
fi
else
MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
if ${lt_cv_path_mainfest_tool+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_path_mainfest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&5
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
lt_cv_path_mainfest_tool=yes
fi
rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
if test "x$lt_cv_path_mainfest_tool" != xyes; then
MANIFEST_TOOL=:
fi
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 ${ac_cv_prog_DSYMUTIL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_NMEDIT+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_NMEDIT+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_LIPO+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_LIPO+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OTOOL64+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OTOOL64+:} false; 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 as_fn_executable_p "$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 ${lt_cv_apple_cc_single_mod+:} false; 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 ${lt_cv_ld_exported_symbols_list+:} false; 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; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
$as_echo_n "checking for -force_load linker flag... " >&6; }
if ${lt_cv_ld_force_load+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
_lt_result=$?
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
fi
rm -f conftest.err libconftest.a conftest conftest.c
rm -rf conftest.dSYM
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
$as_echo "$lt_cv_ld_force_load" >&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" != ":" && test "$lt_cv_ld_force_load" = "no"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
fi
;;
esac
{ $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 ${ac_cv_header_stdc+:} false; 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" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF
fi
done
func_stripname_cnf ()
{
case ${2} in
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
esac
} # func_stripname_cnf
# Set options
enable_dlopen=no
# 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 ${lt_cv_objdir+:} false; 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
# 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 "$cc_temp" | $SED "s%.*/%%; 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 ${lt_cv_path_MAGIC_CMD+:} false; 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 ${lt_cv_path_MAGIC_CMD+:} false; 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*
## 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...
if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
if test "$GCC" = yes; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
*)
lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
esac
{ $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 ${lt_cv_prog_compiler_rtti_exceptions+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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=
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'
;;
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static=
;;
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
case $cc_basename in
nvcc*) # Cuda Compiler Driver 2.2
lt_prog_compiler_wl='-Xlinker '
lt_prog_compiler_pic='-Xcompiler -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'
;;
nagfor*)
# NAG Fortran compiler
lt_prog_compiler_wl='-Wl,-Wl,,'
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# 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* | bgxl* | bgf* | mpixl*)
# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-qpic'
lt_prog_compiler_static='-qstaticlink'
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ F* | *Sun*Fortran*)
# 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=''
;;
*Sun\ C*)
# Sun C 5.9
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
lt_prog_compiler_wl='-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* | sunf77* | sunf90* | sunf95*)
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}: checking for $compiler option to produce PIC" >&5
$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if ${lt_cv_prog_compiler_pic+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
$as_echo "$lt_cv_prog_compiler_pic" >&6; }
lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# 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 ${lt_cv_prog_compiler_pic_works+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_static_works+:} false; 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 "$_lt_linker_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_c_o+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_c_o+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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
;;
esac
ld_shlibs=yes
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
if test "$with_gnu_ld" = yes; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
# with the native linker. However, as the warning in the GNU ld
# block says, versions before 2.19.5* couldn't really create working
# shared libraries, regardless of the interface used.
case `$LD -v 2>&1` in
*\ \(GNU\ Binutils\)\ 2.19.5*) ;;
*\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
*\ \(GNU\ Binutils\)\ [3-9]*) ;;
*)
lt_use_gnu_ld_interface=yes
;;
esac
;;
*)
lt_use_gnu_ld_interface=yes
;;
esac
fi
if test "$lt_use_gnu_ld_interface" = 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.19, 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 install binutils
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
*** You will then need to restart the configuration process.
_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'
export_dynamic_flag_spec='${wl}--export-all-symbols'
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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
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
;;
haiku*)
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
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=' $pic_flag'
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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# 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; func_echo_all \"$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]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object=yes
;;
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; func_echo_all \"$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* | bgf* | bgxlf* | mpixlf*)
# 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 $linker_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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
else
ld_shlibs=no
fi
;;
netbsd*)
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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $pic_flag $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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $pic_flag $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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $pic_flag $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
# Also, AIX nm treats weak defined symbols like other global
# defined symbols, whereas GNU nm marks them as "W".
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") || (\$ 2 == "W")) && (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
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.
if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
$as_echo_n "(cached) " >&6
else
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
}
}'
lt_cv_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 "$lt_cv_aix_libpath_"; then
lt_cv_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 "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_="/usr/lib:/lib"
fi
fi
aix_libpath=$lt_cv_aix_libpath_
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 func_echo_all "${wl}${allow_undefined_flag}"; 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.
if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
$as_echo_n "(cached) " >&6
else
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
}
}'
lt_cv_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 "$lt_cv_aix_libpath_"; then
lt_cv_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 "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_="/usr/lib:/lib"
fi
fi
aix_libpath=$lt_cv_aix_libpath_
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'
if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
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.
case $cc_basename in
cl*)
# Native MSVC
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
always_export_symbols=yes
file_list_spec='@'
# 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
fi~
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
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'
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
lt_tool_outputfile="@TOOL_OUTPUT@"~
case $lt_outputfile in
*.exe|*.EXE) ;;
*)
lt_outputfile="$lt_outputfile.exe"
lt_tool_outputfile="$lt_tool_outputfile.exe"
;;
esac~
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
$RM "$lt_outputfile.manifest";
fi'
;;
*)
# Assume MSVC wrapper
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 `func_echo_all "$deplibs" | $SED '\''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'
enable_shared_with_static_runtimes=yes
;;
esac
;;
darwin* | rhapsody*)
archive_cmds_need_lc=no
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
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=func_echo_all
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 $pic_flag -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 $pic_flag ${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 && test "$with_gnu_ld" = no; then
archive_cmds='$CC -shared $pic_flag ${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 && test "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
archive_cmds='$CC -shared $pic_flag ${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'
;;
*)
# Older versions of the 11.00 compiler do not understand -b yet
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
$as_echo_n "checking if $CC understands -b... " >&6; }
if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -b"
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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler__b=yes
fi
else
lt_cv_prog_compiler__b=yes
fi
fi
$RM -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
if test x"$lt_cv_prog_compiler__b" = xyes; then
archive_cmds='$CC -b ${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
;;
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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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.
# This should be the same for all languages, so no per-tag cache variable.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
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) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
lt_cv_irix_exported_symbol=yes
else
lt_cv_irix_exported_symbol=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_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
if test "$lt_cv_irix_exported_symbol" = yes; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
fi
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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*)
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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "-set_version $verstring"` -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} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; 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 "-set_version $verstring"` -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 $pic_flag ${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 $pic_flag ${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; }
if ${lt_cv_archive_cmds_need_lc+:} false; then :
$as_echo_n "(cached) " >&6
else
$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
lt_cv_archive_cmds_need_lc=no
else
lt_cv_archive_cmds_need_lc=yes
fi
allow_undefined_flag=$lt_save_allow_undefined_flag
else
cat conftest.err 1>&5
fi
$RM conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
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
case $host_os in
mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
*) lt_sed_strip_eq="s,=/,/,g" ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
*\;*)
# 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 's/;/ /g'`
;;
*)
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
;;
esac
# 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; }
}'`
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's,/\([A-Za-z]:\),\1,g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
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=`func_echo_all "$lib" | $SED '\''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,$cc_basename in
yes,*)
# gcc
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="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
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
dynamic_linker='Win32 ld.exe'
;;
*,cl*)
# Native MSVC
libname_spec='$name'
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
for lt_path in $LIB
do
IFS=$lt_save_ifs
# Let DOS variable expansion print the short 8.3 style file name.
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
done
IFS=$lt_save_ifs
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
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
# FIXME: find the short name or the path components, as spaces are
# common. (e.g. "Program Files" -> "PROGRA~1")
;;
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
shlibpath_overrides_runpath=yes
dynamic_linker='Win32 link.exe'
;;
*)
# Assume MSVC wrapper
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
# 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
;;
haiku*)
version_type=linux
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
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=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
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'
# or fails outright, so override atomically:
install_override_mode=555
;;
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
if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_shlibpath_overrides_runpath=no
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 :
lt_cv_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
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
# 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
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
# 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;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
;;
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 ${ac_cv_lib_dl_dlopen+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_dld_shl_load+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_dl_dlopen+:} false; 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" = xyes; 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 ${ac_cv_lib_svld_dlopen+:} false; 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" = xyes; 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 ${ac_cv_lib_dld_dld_link+:} false; 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" = xyes; 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 ${lt_cv_dlopen_self+:} false; 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 $LINENO "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
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
int fnord () { return 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;
else puts (dlerror ());
}
/* 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 ${lt_cv_dlopen_self_static+:} false; 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 $LINENO "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
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
int fnord () { return 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;
else puts (dlerror ());
}
/* 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"
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 ${ac_cv_prog_CXXCPP+:} false; 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;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" 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
else
_lt_caught_CXX_error=yes
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
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
reload_flag_CXX=$reload_flag
reload_cmds_CXX=$reload_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_CFLAGS=$CFLAGS
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++"}
CFLAGS=$CXXFLAGS
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 "$cc_temp" | $SED "s%.*/%%; 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 ${lt_cv_path_LD+:} false; 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 ${lt_cv_prog_gnu_ld+:} false; 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 $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds_CXX='$CC $pic_flag -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 -v "^Configured with:" | $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.
if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
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
}
}'
lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX="/usr/lib:/lib"
fi
fi
aix_libpath=$lt_cv_aix_libpath__CXX
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 func_echo_all "${wl}${allow_undefined_flag}"; 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.
if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
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
}
}'
lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX="/usr/lib:/lib"
fi
fi
aix_libpath=$lt_cv_aix_libpath__CXX
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'
if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec_CXX='$convenience'
fi
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*)
case $GXX,$cc_basename in
,cl* | no,cl*)
# Native MSVC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec_CXX=' '
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=yes
file_list_spec_CXX='@'
# 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_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
fi~
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
enable_shared_with_static_runtimes_CXX=yes
# Don't use ranlib
old_postinstall_cmds_CXX='chmod 644 $oldlib'
postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
lt_tool_outputfile="@TOOL_OUTPUT@"~
case $lt_outputfile in
*.exe|*.EXE) ;;
*)
lt_outputfile="$lt_outputfile.exe"
lt_tool_outputfile="$lt_tool_outputfile.exe"
;;
esac~
func_to_tool_file "$lt_outputfile"~
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
$RM "$lt_outputfile.manifest";
fi'
;;
*)
# g++
# _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'
export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
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
;;
esac
;;
darwin* | rhapsody*)
archive_cmds_need_lc_CXX=no
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec_CXX=''
fi
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=func_echo_all
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*)
;;
haiku*)
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs_CXX=yes
;;
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; func_echo_all "$list"'
;;
*)
if test "$GXX" = yes; then
archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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; func_echo_all "$list"'
;;
*)
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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${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" && func_echo_all "-set_version $verstring"` -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 $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
fi
fi
link_all_deplibs_CXX=yes
;;
esac
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
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; func_echo_all "$list"'
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
;;
icpc* | 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 | sort | $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 | sort | $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 | sort | $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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
;;
*) # Version 6 and above 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; func_echo_all \"$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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# 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; func_echo_all \"$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='func_echo_all'
# 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=func_echo_all
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" && func_echo_all "${wl}-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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 -v "^Configured with:" | $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* | sunCC*)
# 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='func_echo_all'
# 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 $pic_flag -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 $pic_flag -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 -v "^Configured with:" | $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 -v "^Configured with:" | $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'
old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
'"$old_archive_cmds_CXX"
reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
'"$reload_cmds_CXX"
;;
*)
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
_lt_libdeps_save_CFLAGS=$CFLAGS
case "$CC $CFLAGS " in #(
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
esac
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 ${prev}${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
fi
# Expand the sysroot to ease extracting the directories later.
if test -z "$prev"; then
case $p in
-L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
-R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
-l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
esac
fi
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
if test "$pre_test_object_deps_done" = no; then
case ${prev} 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
prev=
;;
*.lto.$objext) ;; # Ignore GCC LTO objects
*.$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
CFLAGS=$_lt_libdeps_save_CFLAGS
# 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* | sunCC*)
# 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=
# 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=
;;
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static_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
;;
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).
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
;;
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* | bgxl[cC]* | mpixl[cC]*)
# IBM XL 8.0, 9.0 on PPC and BlueGene
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*)
;;
*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* | sunCC*)
# 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}: checking for $compiler option to produce PIC" >&5
$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
#
# 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 ${lt_cv_prog_compiler_pic_works_CXX+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_static_works_CXX+:} false; 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 "$_lt_linker_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_c_o_CXX+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_c_o_CXX+:} false; 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:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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'
exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
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
# Also, AIX nm treats weak defined symbols like other global defined
# symbols, whereas GNU nm marks them as "W".
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") || (\$ 2 == "W")) && (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*)
case $cc_basename in
cl*) ;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
;;
esac
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
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
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; }
if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
$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
lt_cv_archive_cmds_need_lc_CXX=no
else
lt_cv_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*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
;;
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=`func_echo_all "$lib" | $SED '\''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,$cc_basename in
yes,*)
# gcc
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}'
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
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
dynamic_linker='Win32 ld.exe'
;;
*,cl*)
# Native MSVC
libname_spec='$name'
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
for lt_path in $LIB
do
IFS=$lt_save_ifs
# Let DOS variable expansion print the short 8.3 style file name.
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
done
IFS=$lt_save_ifs
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
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
# FIXME: find the short name or the path components, as spaces are
# common. (e.g. "Program Files" -> "PROGRA~1")
;;
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
shlibpath_overrides_runpath=yes
dynamic_linker='Win32 link.exe'
;;
*)
# Assume MSVC wrapper
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
# 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
;;
haiku*)
version_type=linux
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
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=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
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'
# or fails outright, so override atomically:
install_override_mode=555
;;
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
if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_shlibpath_overrides_runpath=no
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 :
lt_cv_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
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
# 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
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
# 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;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
;;
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
CFLAGS=$lt_save_CFLAGS
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:
# Check whether --with-wxconfig was given.
if test "${with_wxconfig+set}" = set; then :
withval=$with_wxconfig; WXCONFIG="$withval"
else
WXCONFIG=""
fi
if test "x$WXCONFIG" = "x"; then
# WXCONFIG was not specified, so search within the current path
# Extract the first word of "wx-config", so it can be a program name with args.
set dummy wx-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 ${ac_cv_path_WXCONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $WXCONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_WXCONFIG="$WXCONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_WXCONFIG="$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
WXCONFIG=$ac_cv_path_WXCONFIG
if test -n "$WXCONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WXCONFIG" >&5
$as_echo "$WXCONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# If we couldn't find wx-config, display an error
if test "x$WXCONFIG" = "x"; then
as_fn_error $? "could not find wx-config within the current path. You may need to try re-running configure with a --with-wxconfig parameter." "$LINENO" 5
fi
else
# WXCONFIG was specified; display a message to the user
if test "x$WXCONFIG" = "xyes"; then
as_fn_error $? "you must specify a parameter to --with-wxconfig, e.g. --with-wxconfig=/path/to/wx-config" "$LINENO" 5
else
if test -f $WXCONFIG; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified wx-config file: $WXCONFIG" >&5
$as_echo "Using user-specified wx-config file: $WXCONFIG" >&6; }
else
as_fn_error $? "the user-specified wx-config file $WXCONFIG does not exist" "$LINENO" 5
fi
fi
fi
CXXFLAGS=`$WXCONFIG --cxxflags`
AM_CXXFLAGS=`$WXCONFIG --cxxflags`
WX_LIBS=`$WXCONFIG --libs std,aui`
# Checks for header files.
for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
if test "x$ac_cv_header_stdlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
else
as_fn_error $? "cannot find stdlib.h, bailing out" "$LINENO" 5
fi
done
for ac_header in stdio.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
if test "x$ac_cv_header_stdio_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDIO_H 1
_ACEOF
else
as_fn_error $? "cannot find stdio.h, bailing out" "$LINENO" 5
fi
done
for ac_header in string.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
if test "x$ac_cv_header_string_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRING_H 1
_ACEOF
else
as_fn_error $? "cannot find string.h, bailing out" "$LINENO" 5
fi
done
for ac_header in memory.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
if test "x$ac_cv_header_memory_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MEMORY_H 1
_ACEOF
else
as_fn_error $? "cannot find memory.h, bailing out" "$LINENO" 5
fi
done
for ac_header in math.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
if test "x$ac_cv_header_math_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MATH_H 1
_ACEOF
else
as_fn_error $? "cannot find math.h, bailing out" "$LINENO" 5
fi
done
for ac_header in float.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
if test "x$ac_cv_header_float_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FLOAT_H 1
_ACEOF
else
as_fn_error $? "cannot find float.h, bailing out" "$LINENO" 5
fi
done
for ac_header in fcntl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
if test "x$ac_cv_header_fcntl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FCNTL_H 1
_ACEOF
else
as_fn_error $? "cannot find fcntl.h, bailing out" "$LINENO" 5
fi
done
for ac_header in inttypes.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
if test "x$ac_cv_header_inttypes_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_INTTYPES_H 1
_ACEOF
else
as_fn_error $? "cannot find inttypes.h, bailing out" "$LINENO" 5
fi
done
for ac_header in stddef.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
if test "x$ac_cv_header_stddef_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDDEF_H 1
_ACEOF
else
as_fn_error $? "cannot find stddef.h, bailing out" "$LINENO" 5
fi
done
for ac_header in stdint.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
if test "x$ac_cv_header_stdint_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDINT_H 1
_ACEOF
else
as_fn_error $? "cannot find stdint.h, bailing out" "$LINENO" 5
fi
done
for ac_header in sys/time.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_time_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_TIME_H 1
_ACEOF
else
as_fn_error $? "cannot find sys/time.h, bailing out" "$LINENO" 5
fi
done
for ac_header in unistd.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
if test "x$ac_cv_header_unistd_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UNISTD_H 1
_ACEOF
else
as_fn_error $? "cannot find unistd.h, bailing out" "$LINENO" 5
fi
done
for ac_header in sqlite3.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SQLITE3_H 1
_ACEOF
else
as_fn_error $? "cannot find sqlite3.h, bailing out" "$LINENO" 5
fi
done
for ac_header in sqlite3ext.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3ext.h" "ac_cv_header_sqlite3ext_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3ext_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SQLITE3EXT_H 1
_ACEOF
else
as_fn_error $? "cannot find sqlite3ext.h, bailing out" "$LINENO" 5
fi
done
# Checks for typedefs, structures, and compiler characteristics.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#ifndef __cplusplus
/* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this sort of thing. */
char tx;
char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
if (s) return 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
if (!foo) return 0;
}
return !cs[0] && !zero.x;
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_const=yes
else
ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
$as_echo "#define const /**/" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = xyes; then :
else
cat >>confdefs.h <<_ACEOF
#define off_t long int
_ACEOF
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = xyes; then :
else
cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
if ${ac_cv_header_time+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#include
int
main ()
{
if ((struct tm *) 0)
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_time=yes
else
ac_cv_header_time=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
$as_echo "$ac_cv_header_time" >&6; }
if test $ac_cv_header_time = yes; then
$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if ${ac_cv_struct_tm+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
int
main ()
{
struct tm tm;
int *p = &tm.tm_sec;
return !p;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_struct_tm=time.h
else
ac_cv_struct_tm=sys/time.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
$as_echo "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then
$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
$as_echo_n "checking for working volatile... " >&6; }
if ${ac_cv_c_volatile+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
volatile int x;
int * volatile y = (int *) 0;
return !x && !y;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_volatile=yes
else
ac_cv_c_volatile=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
$as_echo "$ac_cv_c_volatile" >&6; }
if test $ac_cv_c_volatile = no; then
$as_echo "#define volatile /**/" >>confdefs.h
fi
# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_dereferences_slashed_symlink=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail, as required by POSIX.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f conftest.sym conftest.file
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5
$as_echo_n "checking whether lstat accepts an empty string... " >&6; }
if ${ac_cv_func_lstat_empty_string_bug+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_empty_string_bug=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
return lstat ("", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_empty_string_bug=no
else
ac_cv_func_lstat_empty_string_bug=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5
$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; }
if test $ac_cv_func_lstat_empty_string_bug = yes; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
cat >>confdefs.h <<_ACEOF
#define HAVE_LSTAT_EMPTY_STRING_BUG 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
if test "$cross_compiling" = yes; then :
ac_cv_func_lstat_dereferences_slashed_symlink=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail, as required by POSIX.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f conftest.sym conftest.file
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
case " $LIBOBJS " in
*" lstat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
if ${ac_cv_func_memcmp_working+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_memcmp_working=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
/* Some versions of memcmp are not 8-bit clean. */
char c0 = '\100', c1 = '\200', c2 = '\201';
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
return 1;
/* The Next x86 OpenStep bug shows up only when comparing 16 bytes
or more and with at least one buffer not starting on a 4-byte boundary.
William Lewis provided this test program. */
{
char foo[21];
char bar[21];
int i;
for (i = 0; i < 4; i++)
{
char *a = foo + i;
char *b = bar + i;
strcpy (a, "--------01111111");
strcpy (b, "--------10000000");
if (memcmp (a, b, 16) >= 0)
return 1;
}
return 0;
}
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_memcmp_working=yes
else
ac_cv_func_memcmp_working=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
$as_echo "$ac_cv_func_memcmp_working" >&6; }
test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
*" memcmp.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
$as_echo_n "checking whether stat accepts an empty string... " >&6; }
if ${ac_cv_func_stat_empty_string_bug+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_stat_empty_string_bug=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
struct stat sbuf;
return stat ("", &sbuf) == 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_stat_empty_string_bug=no
else
ac_cv_func_stat_empty_string_bug=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
if test $ac_cv_func_stat_empty_string_bug = yes; then
case " $LIBOBJS " in
*" stat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS stat.$ac_objext"
;;
esac
cat >>confdefs.h <<_ACEOF
#define HAVE_STAT_EMPTY_STRING_BUG 1
_ACEOF
fi
for ac_func in strftime
do :
ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
if test "x$ac_cv_func_strftime" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRFTIME 1
_ACEOF
else
# strftime is in -lintl on SCO UNIX.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
$as_echo_n "checking for strftime in -lintl... " >&6; }
if ${ac_cv_lib_intl_strftime+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $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 strftime ();
int
main ()
{
return strftime ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_intl_strftime=yes
else
ac_cv_lib_intl_strftime=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_intl_strftime" >&5
$as_echo "$ac_cv_lib_intl_strftime" >&6; }
if test "x$ac_cv_lib_intl_strftime" = xyes; then :
$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
LIBS="-lintl $LIBS"
fi
fi
done
for ac_func in memset sqrt strcasecmp strerror strncasecmp strstr fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
# Checks for installed libraries
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_prepare_v2 in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_prepare_v2 in -lsqlite3... " >&6; }
if ${ac_cv_lib_sqlite3_sqlite3_prepare_v2+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 -lm $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 sqlite3_prepare_v2 ();
int
main ()
{
return sqlite3_prepare_v2 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_sqlite3_sqlite3_prepare_v2=yes
else
ac_cv_lib_sqlite3_sqlite3_prepare_v2=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_sqlite3_sqlite3_prepare_v2" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_prepare_v2" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSQLITE3 1
_ACEOF
LIBS="-lsqlite3 $LIBS"
else
as_fn_error $? "'libsqlite3' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
for ac_header in proj.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "proj.h" "ac_cv_header_proj_h" "$ac_includes_default"
if test "x$ac_cv_header_proj_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PROJ_H 1
_ACEOF
proj_new_incl=1
else
for ac_header in proj_api.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default"
if test "x$ac_cv_header_proj_api_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PROJ_API_H 1
_ACEOF
proj_new_incl=0
else
as_fn_error $? "cannot find proj_api.h, bailing out" "$LINENO" 5
fi
done
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing proj_normalize_for_visualization" >&5
$as_echo_n "checking for library containing proj_normalize_for_visualization... " >&6; }
if ${ac_cv_search_proj_normalize_for_visualization+:} false; 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 proj_normalize_for_visualization ();
int
main ()
{
return proj_normalize_for_visualization ();
;
return 0;
}
_ACEOF
for ac_lib in '' proj; 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_proj_normalize_for_visualization=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_proj_normalize_for_visualization+:} false; then :
break
fi
done
if ${ac_cv_search_proj_normalize_for_visualization+:} false; then :
else
ac_cv_search_proj_normalize_for_visualization=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_proj_normalize_for_visualization" >&5
$as_echo "$ac_cv_search_proj_normalize_for_visualization" >&6; }
ac_res=$ac_cv_search_proj_normalize_for_visualization
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
proj_new_lib=1
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pj_init_plus" >&5
$as_echo_n "checking for library containing pj_init_plus... " >&6; }
if ${ac_cv_search_pj_init_plus+:} false; 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 pj_init_plus ();
int
main ()
{
return pj_init_plus ();
;
return 0;
}
_ACEOF
for ac_lib in '' proj; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib -lm -lpthread -lsqlite3 $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_pj_init_plus=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_pj_init_plus+:} false; then :
break
fi
done
if ${ac_cv_search_pj_init_plus+:} false; then :
else
ac_cv_search_pj_init_plus=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pj_init_plus" >&5
$as_echo "$ac_cv_search_pj_init_plus" >&6; }
ac_res=$ac_cv_search_pj_init_plus
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
proj_new_lib=0
else
as_fn_error $? "'libproj' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
fi
if test $proj_new_incl -eq 1 && test $proj_new_lib -eq 1; then
$as_echo "#define PROJ_NEW 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --with-geosconfig
#
# Check whether --with-geosconfig was given.
if test "${with_geosconfig+set}" = set; then :
withval=$with_geosconfig; GEOSCONFIG="$withval"
else
GEOSCONFIG=""
fi
if test "x$GEOSCONFIG" = "x"; then
# GEOSCONFIG was not specified, so search within the current path
# Extract the first word of "geos-config", so it can be a program name with args.
set dummy geos-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 ${ac_cv_path_GEOSCONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GEOSCONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_GEOSCONFIG="$GEOSCONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GEOSCONFIG="$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
GEOSCONFIG=$ac_cv_path_GEOSCONFIG
if test -n "$GEOSCONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEOSCONFIG" >&5
$as_echo "$GEOSCONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# If we couldn't find geos-config, display an error
if test "x$GEOSCONFIG" = "x"; then
as_fn_error $? "could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter." "$LINENO" 5
fi
else
# GEOSCONFIG was specified; display a message to the user
if test "x$GEOSCONFIG" = "xyes"; then
as_fn_error $? "you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config" "$LINENO" 5
else
if test -f $GEOSCONFIG; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified geos-config file: $GEOSCONFIG" >&5
$as_echo "Using user-specified geos-config file: $GEOSCONFIG" >&6; }
else
as_fn_error $? "the user-specified geos-config file $GEOSCONFIG does not exist" "$LINENO" 5
fi
fi
fi
# Extract the linker and include flags
GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes`
# Ensure that we can parse geos_c.h
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$GEOS_CPPFLAGS"
for ac_header in geos_c.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "geos_c.h" "ac_cv_header_geos_c_h" "$ac_includes_default"
if test "x$ac_cv_header_geos_c_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GEOS_C_H 1
_ACEOF
else
as_fn_error $? "could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig" "$LINENO" 5
fi
done
CPPFLAGS="$CPPFLAGS_SAVE"
# Ensure we can link against libgeos_c
LIBS_SAVE="$LIBS"
LIBS="$GEOS_LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GEOSTopologyPreserveSimplify" >&5
$as_echo_n "checking for library containing GEOSTopologyPreserveSimplify... " >&6; }
if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; 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 GEOSTopologyPreserveSimplify ();
int
main ()
{
return GEOSTopologyPreserveSimplify ();
;
return 0;
}
_ACEOF
for ac_lib in '' geos_c; 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_GEOSTopologyPreserveSimplify=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; then :
break
fi
done
if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; then :
else
ac_cv_search_GEOSTopologyPreserveSimplify=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GEOSTopologyPreserveSimplify" >&5
$as_echo "$ac_cv_search_GEOSTopologyPreserveSimplify" >&6; }
ac_res=$ac_cv_search_GEOSTopologyPreserveSimplify
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig" "$LINENO" 5
fi
LIBS="$LIBS_SAVE"
LIBS=$LIBS$GEOS_LDFLAGS' -lgeos_c'
#-----------------------------------------------------------------------
# --enable-freexl
#
# Check whether --enable-freexl was given.
if test "${enable_freexl+set}" = set; then :
enableval=$enable_freexl;
else
enable_freexl=yes
fi
if test x"$enable_freexl" != "xno"; then
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 ${ac_cv_path_PKG_CONFIG+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; 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 as_fn_executable_p "$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 LIBFREEXL" >&5
$as_echo_n "checking for LIBFREEXL... " >&6; }
if test -n "$LIBFREEXL_CFLAGS"; then
pkg_cv_LIBFREEXL_CFLAGS="$LIBFREEXL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freexl\""; } >&5
($PKG_CONFIG --exists --print-errors "freexl") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBFREEXL_CFLAGS=`$PKG_CONFIG --cflags "freexl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBFREEXL_LIBS"; then
pkg_cv_LIBFREEXL_LIBS="$LIBFREEXL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freexl\""; } >&5
($PKG_CONFIG --exists --print-errors "freexl") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBFREEXL_LIBS=`$PKG_CONFIG --libs "freexl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBFREEXL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freexl" 2>&1`
else
LIBFREEXL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freexl" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBFREEXL_PKG_ERRORS" >&5
as_fn_error $? "'libfreexl' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libfreexl' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBFREEXL_CFLAGS=$pkg_cv_LIBFREEXL_CFLAGS
LIBFREEXL_LIBS=$pkg_cv_LIBFREEXL_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
else
$as_echo "#define OMIT_FREEXL 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-libxml2
#
# Check whether --enable-libxml2 was given.
if test "${enable_libxml2+set}" = set; then :
enableval=$enable_libxml2;
else
enable_libxml2=yes
fi
if test x"$enable_libxml2" != "xno"; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5
$as_echo_n "checking for LIBXML2... " >&6; }
if test -n "$LIBXML2_CFLAGS"; then
pkg_cv_LIBXML2_CFLAGS="$LIBXML2_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.0\""; } >&5
($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBXML2_LIBS"; then
pkg_cv_LIBXML2_LIBS="$LIBXML2_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.0\""; } >&5
($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1`
else
LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBXML2_PKG_ERRORS" >&5
as_fn_error $? "'libxml2' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libxml2' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS
LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
$as_echo "#define ENABLE_LIBXML2 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-minizip
#
# Check whether --enable-minizip was given.
if test "${enable_minizip+set}" = set; then :
enableval=$enable_minizip;
else
enable_minizip=yes
fi
if test x"$enable_minizip" != "xno"; then
for ac_header in minizip/unzip.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "minizip/unzip.h" "ac_cv_header_minizip_unzip_h" "$ac_includes_default"
if test "x$ac_cv_header_minizip_unzip_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MINIZIP_UNZIP_H 1
_ACEOF
else
as_fn_error $? "cannot find minizip/unzip.h, bailing out" "$LINENO" 5
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing unzLocateFile" >&5
$as_echo_n "checking for library containing unzLocateFile... " >&6; }
if ${ac_cv_search_unzLocateFile+:} false; 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 unzLocateFile ();
int
main ()
{
return unzLocateFile ();
;
return 0;
}
_ACEOF
for ac_lib in '' minizip; 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_unzLocateFile=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_unzLocateFile+:} false; then :
break
fi
done
if ${ac_cv_search_unzLocateFile+:} false; then :
else
ac_cv_search_unzLocateFile=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_unzLocateFile" >&5
$as_echo "$ac_cv_search_unzLocateFile" >&6; }
ac_res=$ac_cv_search_unzLocateFile
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "'libminizip' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
$as_echo "#define ENABLE_MINIZIP 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-xlsxwriter
#
# Check whether --enable-xlsxwriter was given.
if test "${enable_xlsxwriter+set}" = set; then :
enableval=$enable_xlsxwriter;
else
enable_xlsxwriter=yes
fi
if test x"$enable_xlsxwriter" != "xno"; then
for ac_header in xlsxwriter.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "xlsxwriter.h" "ac_cv_header_xlsxwriter_h" "$ac_includes_default"
if test "x$ac_cv_header_xlsxwriter_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_XLSXWRITER_H 1
_ACEOF
else
as_fn_error $? "cannot find xlsxwriter.h, bailing out" "$LINENO" 5
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing worksheet_write_string" >&5
$as_echo_n "checking for library containing worksheet_write_string... " >&6; }
if ${ac_cv_search_worksheet_write_string+:} false; 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 worksheet_write_string ();
int
main ()
{
return worksheet_write_string ();
;
return 0;
}
_ACEOF
for ac_lib in '' xlsxwriter; 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_worksheet_write_string=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_worksheet_write_string+:} false; then :
break
fi
done
if ${ac_cv_search_worksheet_write_string+:} false; then :
else
ac_cv_search_worksheet_write_string=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_worksheet_write_string" >&5
$as_echo "$ac_cv_search_worksheet_write_string" >&6; }
ac_res=$ac_cv_search_worksheet_write_string
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "'libxlsxwriter' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
$as_echo "#define ENABLE_XLSXWRITER 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-lz4
#
# Check whether --enable-lz4 was given.
if test "${enable_lz4+set}" = set; then :
enableval=$enable_lz4;
else
enable_lz4=yes
fi
if test x"$enable_lz4" != "xno"; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZ4" >&5
$as_echo_n "checking for LIBLZ4... " >&6; }
if test -n "$LIBLZ4_CFLAGS"; then
pkg_cv_LIBLZ4_CFLAGS="$LIBLZ4_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBLZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBLZ4_LIBS"; then
pkg_cv_LIBLZ4_LIBS="$LIBLZ4_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBLZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBLZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
else
LIBLZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBLZ4_PKG_ERRORS" >&5
as_fn_error $? "'liblz4' is required but it doesn't seems to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'liblz4' is required but it doesn't seems to be installed on this system." "$LINENO" 5
else
LIBLZ4_CFLAGS=$pkg_cv_LIBLZ4_CFLAGS
LIBLZ4_LIBS=$pkg_cv_LIBLZ4_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
else
$as_echo "#define OMIT_LZ4 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-zstd
#
# Check whether --enable-zstd was given.
if test "${enable_zstd+set}" = set; then :
enableval=$enable_zstd;
else
enable_zstd=yes
fi
if test x"$enable_zstd" != "xno"; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBZSTD" >&5
$as_echo_n "checking for LIBZSTD... " >&6; }
if test -n "$LIBZSTD_CFLAGS"; then
pkg_cv_LIBZSTD_CFLAGS="$LIBZSTD_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBZSTD_LIBS"; then
pkg_cv_LIBZSTD_LIBS="$LIBZSTD_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBZSTD_LIBS=`$PKG_CONFIG --libs "libzstd" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd" 2>&1`
else
LIBZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBZSTD_PKG_ERRORS" >&5
as_fn_error $? "'libzstd' is required but it doesn't seems to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libzstd' is required but it doesn't seems to be installed on this system." "$LINENO" 5
else
LIBZSTD_CFLAGS=$pkg_cv_LIBZSTD_CFLAGS
LIBZSTD_LIBS=$pkg_cv_LIBZSTD_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
else
$as_echo "#define OMIT_ZSTD 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# --enable-openjpeg
#
# Check whether --enable-openjpeg was given.
if test "${enable_openjpeg+set}" = set; then :
enableval=$enable_openjpeg;
else
enable_openjpeg=yes
fi
if test x"$enable_openjpeg" != "xno"; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBOPENJP2" >&5
$as_echo_n "checking for LIBOPENJP2... " >&6; }
if test -n "$LIBOPENJP2_CFLAGS"; then
pkg_cv_LIBOPENJP2_CFLAGS="$LIBOPENJP2_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjp2\""; } >&5
($PKG_CONFIG --exists --print-errors "libopenjp2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBOPENJP2_CFLAGS=`$PKG_CONFIG --cflags "libopenjp2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBOPENJP2_LIBS"; then
pkg_cv_LIBOPENJP2_LIBS="$LIBOPENJP2_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjp2\""; } >&5
($PKG_CONFIG --exists --print-errors "libopenjp2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBOPENJP2_LIBS=`$PKG_CONFIG --libs "libopenjp2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBOPENJP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenjp2" 2>&1`
else
LIBOPENJP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenjp2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBOPENJP2_PKG_ERRORS" >&5
as_fn_error $? "'libopenjp2' (v2.1 or later) is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libopenjp2' (v2.1 or later) is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBOPENJP2_CFLAGS=$pkg_cv_LIBOPENJP2_CFLAGS
LIBOPENJP2_LIBS=$pkg_cv_LIBOPENJP2_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
else
$as_echo "#define OMIT_OPENJPEG 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
# --enable-webp
#
# Check whether --enable-webp was given.
if test "${enable_webp+set}" = set; then :
enableval=$enable_webp;
else
enable_webp=yes
fi
if test x"$enable_webp" != "xno"; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBWEBP" >&5
$as_echo_n "checking for LIBWEBP... " >&6; }
if test -n "$LIBWEBP_CFLAGS"; then
pkg_cv_LIBWEBP_CFLAGS="$LIBWEBP_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5
($PKG_CONFIG --exists --print-errors "libwebp") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBWEBP_CFLAGS=`$PKG_CONFIG --cflags "libwebp" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBWEBP_LIBS"; then
pkg_cv_LIBWEBP_LIBS="$LIBWEBP_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5
($PKG_CONFIG --exists --print-errors "libwebp") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBWEBP_LIBS=`$PKG_CONFIG --libs "libwebp" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwebp" 2>&1`
else
LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwebp" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBWEBP_PKG_ERRORS" >&5
as_fn_error $? "'libwebp' is required but it doesn't seems to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libwebp' is required but it doesn't seems to be installed on this system." "$LINENO" 5
else
LIBWEBP_CFLAGS=$pkg_cv_LIBWEBP_CFLAGS
LIBWEBP_LIBS=$pkg_cv_LIBWEBP_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
else
$as_echo "#define OMIT_WEBP 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5
$as_echo_n "checking for LIBLZMA... " >&6; }
if test -n "$LIBLZMA_CFLAGS"; then
pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBLZMA_LIBS"; then
pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1`
else
LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBLZMA_PKG_ERRORS" >&5
as_fn_error $? "'liblzma' is required but it doesn't seems to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'liblzma' is required but it doesn't seems to be installed on this system." "$LINENO" 5
else
LIBLZMA_CFLAGS=$pkg_cv_LIBLZMA_CFLAGS
LIBLZMA_LIBS=$pkg_cv_LIBLZMA_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSPATIALITE" >&5
$as_echo_n "checking for LIBSPATIALITE... " >&6; }
if test -n "$LIBSPATIALITE_CFLAGS"; then
pkg_cv_LIBSPATIALITE_CFLAGS="$LIBSPATIALITE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"spatialite\""; } >&5
($PKG_CONFIG --exists --print-errors "spatialite") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBSPATIALITE_CFLAGS=`$PKG_CONFIG --cflags "spatialite" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBSPATIALITE_LIBS"; then
pkg_cv_LIBSPATIALITE_LIBS="$LIBSPATIALITE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"spatialite\""; } >&5
($PKG_CONFIG --exists --print-errors "spatialite") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBSPATIALITE_LIBS=`$PKG_CONFIG --libs "spatialite" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBSPATIALITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "spatialite" 2>&1`
else
LIBSPATIALITE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "spatialite" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSPATIALITE_PKG_ERRORS" >&5
as_fn_error $? "'libspatialite' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libspatialite' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBSPATIALITE_CFLAGS=$pkg_cv_LIBSPATIALITE_CFLAGS
LIBSPATIALITE_LIBS=$pkg_cv_LIBSPATIALITE_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
# testing for libspatialite-amalgamation
if test "x$(pkg-config --cflags spatialite|grep "DSPATIALITE_AMALGAMATION=1")" != "x"; then
$as_echo "#define SPATIALITE_AMALGAMATION 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gaia_sql_proc_execute in -lspatialite" >&5
$as_echo_n "checking for gaia_sql_proc_execute in -lspatialite... " >&6; }
if ${ac_cv_lib_spatialite_gaia_sql_proc_execute+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lspatialite -lm $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 gaia_sql_proc_execute ();
int
main ()
{
return gaia_sql_proc_execute ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_spatialite_gaia_sql_proc_execute=yes
else
ac_cv_lib_spatialite_gaia_sql_proc_execute=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_spatialite_gaia_sql_proc_execute" >&5
$as_echo "$ac_cv_lib_spatialite_gaia_sql_proc_execute" >&6; }
if test "x$ac_cv_lib_spatialite_gaia_sql_proc_execute" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSPATIALITE 1
_ACEOF
LIBS="-lspatialite $LIBS"
else
as_fn_error $? "'libspatialite >= 5.0.0' is required but it doesn't seems to be installed on this system." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gaiaTopoGeo_FromGeoTableNoFaceExtended in -lspatialite" >&5
$as_echo_n "checking for gaiaTopoGeo_FromGeoTableNoFaceExtended in -lspatialite... " >&6; }
if ${ac_cv_lib_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lspatialite -lm $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 gaiaTopoGeo_FromGeoTableNoFaceExtended ();
int
main ()
{
return gaiaTopoGeo_FromGeoTableNoFaceExtended ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended=yes
else
ac_cv_lib_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended=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_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended" >&5
$as_echo "$ac_cv_lib_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended" >&6; }
if test "x$ac_cv_lib_spatialite_gaiaTopoGeo_FromGeoTableNoFaceExtended" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSPATIALITE 1
_ACEOF
LIBS="-lspatialite $LIBS"
else
as_fn_error $? "'libspatialite (with Topology support enabled)' is required but it doesn't seems to be installed on this system." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gaiaCreateControlPoints in -lspatialite" >&5
$as_echo_n "checking for gaiaCreateControlPoints in -lspatialite... " >&6; }
if ${ac_cv_lib_spatialite_gaiaCreateControlPoints+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lspatialite -lm $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 gaiaCreateControlPoints ();
int
main ()
{
return gaiaCreateControlPoints ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_spatialite_gaiaCreateControlPoints=yes
else
ac_cv_lib_spatialite_gaiaCreateControlPoints=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_spatialite_gaiaCreateControlPoints" >&5
$as_echo "$ac_cv_lib_spatialite_gaiaCreateControlPoints" >&6; }
if test "x$ac_cv_lib_spatialite_gaiaCreateControlPoints" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSPATIALITE 1
_ACEOF
LIBS="-lspatialite $LIBS"
else
as_fn_error $? "'libspatialite (with GCP support enebled)' is required but it doesn't seems to be installed on this system." "$LINENO" 5
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBRASTERLITE2" >&5
$as_echo_n "checking for LIBRASTERLITE2... " >&6; }
if test -n "$LIBRASTERLITE2_CFLAGS"; then
pkg_cv_LIBRASTERLITE2_CFLAGS="$LIBRASTERLITE2_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasterlite2\""; } >&5
($PKG_CONFIG --exists --print-errors "rasterlite2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBRASTERLITE2_CFLAGS=`$PKG_CONFIG --cflags "rasterlite2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBRASTERLITE2_LIBS"; then
pkg_cv_LIBRASTERLITE2_LIBS="$LIBRASTERLITE2_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasterlite2\""; } >&5
($PKG_CONFIG --exists --print-errors "rasterlite2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBRASTERLITE2_LIBS=`$PKG_CONFIG --libs "rasterlite2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBRASTERLITE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rasterlite2" 2>&1`
else
LIBRASTERLITE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rasterlite2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBRASTERLITE2_PKG_ERRORS" >&5
as_fn_error $? "'librasterlite2' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'librasterlite2' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBRASTERLITE2_CFLAGS=$pkg_cv_LIBRASTERLITE2_CFLAGS
LIBRASTERLITE2_LIBS=$pkg_cv_LIBRASTERLITE2_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl2_drape_geometries in -lrasterlite2" >&5
$as_echo_n "checking for rl2_drape_geometries in -lrasterlite2... " >&6; }
if ${ac_cv_lib_rasterlite2_rl2_drape_geometries+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lrasterlite2 -lm $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 rl2_drape_geometries ();
int
main ()
{
return rl2_drape_geometries ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_rasterlite2_rl2_drape_geometries=yes
else
ac_cv_lib_rasterlite2_rl2_drape_geometries=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_rasterlite2_rl2_drape_geometries" >&5
$as_echo "$ac_cv_lib_rasterlite2_rl2_drape_geometries" >&6; }
if test "x$ac_cv_lib_rasterlite2_rl2_drape_geometries" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBRASTERLITE2 1
_ACEOF
LIBS="-lrasterlite2 $LIBS"
else
as_fn_error $? "'librasterlite2 >= 1.1.0' is required but it doesn't seems to be installed on this system." "$LINENO" 5
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBVIRTUALPG" >&5
$as_echo_n "checking for LIBVIRTUALPG... " >&6; }
if test -n "$LIBVIRTUALPG_CFLAGS"; then
pkg_cv_LIBVIRTUALPG_CFLAGS="$LIBVIRTUALPG_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"virtualpg\""; } >&5
($PKG_CONFIG --exists --print-errors "virtualpg") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBVIRTUALPG_CFLAGS=`$PKG_CONFIG --cflags "virtualpg" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBVIRTUALPG_LIBS"; then
pkg_cv_LIBVIRTUALPG_LIBS="$LIBVIRTUALPG_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"virtualpg\""; } >&5
($PKG_CONFIG --exists --print-errors "virtualpg") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBVIRTUALPG_LIBS=`$PKG_CONFIG --libs "virtualpg" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBVIRTUALPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "virtualpg" 2>&1`
else
LIBVIRTUALPG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "virtualpg" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBVIRTUALPG_PKG_ERRORS" >&5
as_fn_error $? "'libvirtualpg' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libvirtualpg' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBVIRTUALPG_CFLAGS=$pkg_cv_LIBVIRTUALPG_CFLAGS
LIBVIRTUALPG_LIBS=$pkg_cv_LIBVIRTUALPG_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCURL" >&5
$as_echo_n "checking for LIBCURL... " >&6; }
if test -n "$LIBCURL_CFLAGS"; then
pkg_cv_LIBCURL_CFLAGS="$LIBCURL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBCURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBCURL_LIBS"; then
pkg_cv_LIBCURL_LIBS="$LIBCURL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBCURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
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
LIBCURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1`
else
LIBCURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBCURL_PKG_ERRORS" >&5
as_fn_error $? "'libcurl' is required but it doesn't seem to be installed on this system." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "'libcurl' is required but it doesn't seem to be installed on this system." "$LINENO" 5
else
LIBCURL_CFLAGS=$pkg_cv_LIBCURL_CFLAGS
LIBCURL_LIBS=$pkg_cv_LIBCURL_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curl_url_get" >&5
$as_echo_n "checking for library containing curl_url_get... " >&6; }
if ${ac_cv_search_curl_url_get+:} false; 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 curl_url_get ();
int
main ()
{
return curl_url_get ();
;
return 0;
}
_ACEOF
for ac_lib in '' curl; 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_curl_url_get=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_curl_url_get+:} false; then :
break
fi
done
if ${ac_cv_search_curl_url_get+:} false; then :
else
ac_cv_search_curl_url_get=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curl_url_get" >&5
$as_echo "$ac_cv_search_curl_url_get" >&6; }
ac_res=$ac_cv_search_curl_url_get
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
curl_new_lib=1
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curl_easy_init" >&5
$as_echo_n "checking for library containing curl_easy_init... " >&6; }
if ${ac_cv_search_curl_easy_init+:} false; 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 curl_easy_init ();
int
main ()
{
return curl_easy_init ();
;
return 0;
}
_ACEOF
for ac_lib in '' curl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_curl_easy_init=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_curl_easy_init+:} false; then :
break
fi
done
if ${ac_cv_search_curl_easy_init+:} false; then :
else
ac_cv_search_curl_easy_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curl_easy_init" >&5
$as_echo "$ac_cv_search_curl_easy_init" >&6; }
ac_res=$ac_cv_search_curl_easy_init
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
curl_new_lib=0
else
as_fn_error $? "'libcurlj' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
fi
if test $curl_new_lib -eq 1; then
$as_echo "#define CURL_URL_GET 1" >>confdefs.h
fi
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# --with-pgconfig
#
# Check whether --with-pgconfig was given.
if test "${with_pgconfig+set}" = set; then :
withval=$with_pgconfig; PGCONFIG="$withval"
else
PGCONFIG=""
fi
if test "x$PGCONFIG" = "x"; then
# PGCONFIG was not specified, so search within the current path
# Extract the first word of "pg_config", so it can be a program name with args.
set dummy pg_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 ${ac_cv_path_PGCONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PGCONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PGCONFIG="$PGCONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PGCONFIG="$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
PGCONFIG=$ac_cv_path_PGCONFIG
if test -n "$PGCONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGCONFIG" >&5
$as_echo "$PGCONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# If we couldn't find pg_config, display an error
if test "x$PGCONFIG" = "x"; then
as_fn_error $? "could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter." "$LINENO" 5
fi
else
# PGCONFIG was specified; display a message to the user
if test "x$PGSCONFIG" = "xyes"; then
as_fn_error $? "you must specify a parameter to --with-pgconfig, e.g. --with-pgconfig=/path/to/pg_config" "$LINENO" 5
else
if test -f $PGCONFIG; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified pg_config file: $PGCONFIG" >&5
$as_echo "Using user-specified pg_config file: $PGCONFIG" >&6; }
else
as_fn_error $? "the user-specified pg_config file $PGCONFIG does not exist" "$LINENO" 5
fi
fi
fi
PG_CFLAGS=-I`$PGCONFIG --includedir`
PG_LDFLAGS=-L`$PGCONFIG --libdir`
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# --with-libpq_deferred
#
# Check whether --with-libpq_deferred was given.
if test "${with_libpq_deferred+set}" = set; then :
withval=$with_libpq_deferred;
else
with_libpq_deferred=no
fi
if test x"$with_libpq_deferred" != "xno"; then
$as_echo "#define LIBPQ_DEFERRED 1" >>confdefs.h
libpq_deferred=1
fi
#-----------------------------------------------------------------------
# Ensure that we can parse libpq-fe.h
CFLAGS_SAVE="$CFLAGS"
CFLAGS="$PG_CFLAGS"
for ac_header in libpq-fe.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPQ_FE_H 1
_ACEOF
else
as_fn_error $? "cannot find libpq-fe.h, bailing out" "$LINENO" 5
fi
done
CFLAGS="$CFLAGS_SAVE"
if test x"$libpq_deferred" != "x1"; then
# Ensure we can link against libpq
LDFLAGS_SAVE="$LDFLAGS"
LDFLAGS="$PG_LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5
$as_echo_n "checking for PQconnectdb in -lpq... " >&6; }
if ${ac_cv_lib_pq_PQconnectdb+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq $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 PQconnectdb ();
int
main ()
{
return PQconnectdb ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_pq_PQconnectdb=yes
else
ac_cv_lib_pq_PQconnectdb=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_pq_PQconnectdb" >&5
$as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; }
if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then :
PG_LIB=-lpq
else
as_fn_error $? "'libpq' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi
LDFLAGS="$LDFLAGS_SAVE"
fi
ac_config_files="$ac_config_files Makefile icons/Makefile win_resource/Makefile gnome_resource/Makefile mac_resource/Makefile"
#-----------------------------------------------------------------------
# --enable-sqlite_stmtstatus_autoindex
#
# Check whether --enable-sqlite_stmtstatus_autoindex was given.
if test "${enable_sqlite_stmtstatus_autoindex+set}" = set; then :
enableval=$enable_sqlite_stmtstatus_autoindex;
else
sqlite_stmtstatus_autoindex=yes
fi
if test x"$enable_sqlite_stmtstatus_autoindex" != "xno"; then
OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS=
else
OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS=-DOMIT_SQLITE_STMTSTATUS_AUTOINXED
fi
# checks for SQLite version-depending constants
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_USED" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_USED" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_HIT" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_HIT" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_HIT" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_USED" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_USED" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_USED 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_HIT" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_HIT" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_HIT" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_MISS" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_MISS" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_MISS" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_WRITE" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_WRITE" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_WRITE" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_SCHEMA_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_SCHEMA_USED" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_SCHEMA_USED" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_STMT_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_STMT_USED" "#include
"
if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_STMT_USED" = xyes; then :
$as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_STMT_USED 1" >>confdefs.h
fi
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
if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
case $cache_file in #(
*/* | ?:*)
mv -f confcache "$cache_file"$$ &&
mv -f "$cache_file"$$ "$cache_file" ;; #(
*)
mv -f confcache "$cache_file" ;;
esac
fi
fi
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=
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
$as_echo_n "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
else
am__EXEEXT_TRUE='#'
am__EXEEXT_FALSE=
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
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__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 -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
: "${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.
as_myself=
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 -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
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
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# 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 spatialite_gui $as_me 2.1.0-beta1, which was
generated by GNU Autoconf 2.69. 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_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 commands:
$config_commands
Report bugs to ."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
spatialite_gui config.status 2.1.0-beta1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Copyright (C) 2012 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" MAKE="${MAKE-make}"
# 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 "$AS" | $SED "$delay_single_quote_subst"`'
DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
LTCC='$LTCC'
LTCFLAGS='$LTCFLAGS'
compiler='$compiler_DEFAULT'
# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
eval 'cat <<_LTECHO_EOF
\$1
_LTECHO_EOF'
}
# Quote evaled strings.
for var in AS \
DLLTOOL \
OBJDUMP \
SHELL \
ECHO \
SED \
GREP \
EGREP \
FGREP \
LD \
NM \
LN_S \
lt_SP2NL \
lt_NL2SP \
reload_flag \
deplibs_check_method \
file_magic_cmd \
file_magic_glob \
want_nocaseglob \
sharedlib_from_linklib_cmd \
AR \
AR_FLAGS \
archiver_list_spec \
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 \
nm_file_list_spec \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
lt_prog_compiler_static \
lt_cv_prog_compiler_c_o \
need_locks \
MANIFEST_TOOL \
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 \
exclude_expsyms \
include_expsyms \
file_list_spec \
variables_saved_for_relink \
libname_spec \
library_names_spec \
soname_spec \
install_override_mode \
finish_eval \
old_striplib \
striplib \
compiler_lib_search_dirs \
predep_objects \
postdep_objects \
predeps \
postdeps \
compiler_lib_search_path \
LD_CXX \
reload_flag_CXX \
compiler_CXX \
lt_prog_compiler_no_builtin_flag_CXX \
lt_prog_compiler_pic_CXX \
lt_prog_compiler_wl_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 \
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 \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$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 \
postlink_cmds \
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
sys_lib_dlsearch_path_spec \
reload_cmds_CXX \
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 \
postlink_cmds_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
;;
esac
done
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" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"icons/Makefile") CONFIG_FILES="$CONFIG_FILES icons/Makefile" ;;
"win_resource/Makefile") CONFIG_FILES="$CONFIG_FILES win_resource/Makefile" ;;
"gnome_resource/Makefile") CONFIG_FILES="$CONFIG_FILES gnome_resource/Makefile" ;;
"mac_resource/Makefile") CONFIG_FILES="$CONFIG_FILES mac_resource/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_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= ac_tmp=
trap 'exit_status=$?
: "${ac_tmp:=$tmp}"
{ test ! -d "$ac_tmp" || rm -fr "$ac_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 -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp
# 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 {' >"$ac_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 >>"\$ac_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 >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_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 >"$ac_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_tt=`sed -n "/$ac_delim/p" confdefs.h`
if test -z "$ac_tt"; 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 :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="$ac_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 >"$ac_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 "$ac_tmp/subs.awk" \
>$ac_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' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_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 "$ac_tmp/stdin"
case $ac_file in
-) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
*) rm -f "$ac_file" && mv "$ac_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 "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_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 "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_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
;;
: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"" || {
# Older Autoconf 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.
# TODO: see whether this extra hack can be removed once we start
# requiring Autoconf 2.70 or later.
case $CONFIG_FILES in #(
*\'*) :
eval set x "$CONFIG_FILES" ;; #(
*) :
set x $CONFIG_FILES ;; #(
*) :
;;
esac
shift
# Used to flag and report bootstrapping failures.
am_rc=0
for am_mf
do
# Strip MF so we end up with the name of the file.
am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile which includes
# dependency-tracking related rules and includes.
# Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|| continue
am_dirpart=`$as_dirname -- "$am_mf" ||
$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$am_mf" : 'X\(//\)[^/]' \| \
X"$am_mf" : 'X\(//\)$' \| \
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
am_filepart=`$as_basename -- "$am_mf" ||
$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
X"$am_mf" : 'X\(//\)$' \| \
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$am_mf" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
{ echo "$as_me:$LINENO: cd "$am_dirpart" \
&& sed -e '/# am--include-marker/d' "$am_filepart" \
| $MAKE -f - am--depfiles" >&5
(cd "$am_dirpart" \
&& sed -e '/# am--include-marker/d' "$am_filepart" \
| $MAKE -f - am--depfiles) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } || am_rc=$?
done
if test $am_rc -ne 0; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
fi
{ am_dirpart=; unset am_dirpart;}
{ am_filepart=; unset am_filepart;}
{ am_mf=; unset am_mf;}
{ am_rc=; unset am_rc;}
rm -f conftest-deps.mk
}
;;
"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, 2009, 2010 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=$lt_AS
# DLL creation program.
DLLTOOL=$lt_DLLTOOL
# Object dumper program.
OBJDUMP=$lt_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
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
# An echo program that protects backslashes.
ECHO=$lt_ECHO
# 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
# convert \$build file names to \$host format.
to_host_file_cmd=$lt_cv_to_host_file_cmd
# convert \$build files to toolchain format.
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
# 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
# How to find potential files when deplibs_check_method = "file_magic".
file_magic_glob=$lt_file_magic_glob
# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
want_nocaseglob=$lt_want_nocaseglob
# Command to associate shared and link libraries.
sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
# The archiver.
AR=$lt_AR
# Flags to create an archive.
AR_FLAGS=$lt_AR_FLAGS
# How to feed a file listing to the archiver.
archiver_list_spec=$lt_archiver_list_spec
# 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
# Whether to use a lock for old archive extraction.
lock_old_archive_extraction=$lock_old_archive_extraction
# 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
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
# The root where to search for dependent libraries,and in which our libraries should be installed.
lt_sysroot=$lt_sysroot
# The name of the directory that contains temporary libtool files.
objdir=$objdir
# 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
# Manifest tool.
MANIFEST_TOOL=$lt_MANIFEST_TOOL
# 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
# Permission mode override for installation of shared libraries.
install_override_mode=$lt_install_override_mode
# 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
# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# 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
# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic
# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl
# 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
# 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
# Commands necessary for finishing linking programs.
postlink_cmds=$lt_postlink_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 '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
if test x"$xsi_shell" = xyes; then
sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
func_dirname ()\
{\
\ case ${1} in\
\ */*) func_dirname_result="${1%/*}${2}" ;;\
\ * ) func_dirname_result="${3}" ;;\
\ esac\
} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_basename ()$/,/^} # func_basename /c\
func_basename ()\
{\
\ func_basename_result="${1##*/}"\
} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
func_dirname_and_basename ()\
{\
\ case ${1} in\
\ */*) func_dirname_result="${1%/*}${2}" ;;\
\ * ) func_dirname_result="${3}" ;;\
\ esac\
\ func_basename_result="${1##*/}"\
} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
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}"}\
} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
func_split_long_opt ()\
{\
\ func_split_long_opt_name=${1%%=*}\
\ func_split_long_opt_arg=${1#*=}\
} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
func_split_short_opt ()\
{\
\ func_split_short_opt_arg=${1#??}\
\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
func_lo2o ()\
{\
\ case ${1} in\
\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
\ *) func_lo2o_result=${1} ;;\
\ esac\
} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_xform ()$/,/^} # func_xform /c\
func_xform ()\
{\
func_xform_result=${1%.*}.lo\
} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_arith ()$/,/^} # func_arith /c\
func_arith ()\
{\
func_arith_result=$(( $* ))\
} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_len ()$/,/^} # func_len /c\
func_len ()\
{\
func_len_result=${#1}\
} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
fi
if test x"$lt_shell_append" = xyes; then
sed -e '/^func_append ()$/,/^} # func_append /c\
func_append ()\
{\
eval "${1}+=\\${2}"\
} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
func_append_quoted ()\
{\
\ func_quote_for_eval "${2}"\
\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
# Save a `func_append' function call where possible by direct use of '+='
sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
else
# Save a `func_append' function call even when '+=' is not available
sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
fi
if test x"$_lt_function_replace_fail" = x":"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
fi
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
# How to create reloadable object files.
reload_flag=$lt_reload_flag_CXX
reload_cmds=$lt_reload_cmds_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
# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic_CXX
# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl_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
# 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
# Commands necessary for finishing linking programs.
postlink_cmds=$lt_postlink_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
spatialite_gui-2.1.0-beta1/AuxCurl.cpp 0000664 0001750 0001750 00000035522 13711576502 014537 0000000 0000000 /*
/ AuxCurl.cpp
/ implementing operations based on Curl
/
/ version 2.1, 2018 August 1
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2018 Alessandro Furieri
/
/ 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 3 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, see .
/
*/
#include
#include
#include
#include "Classdef.h"
#include
#include "config.h"
#ifdef SPATIALITE_AMALGAMATION
#include
#else
#include
#endif
#include
#include "AuxCurl.h"
typedef struct curlMemBufferStruct
{
/* a struct handling a dynamically growing output buffer */
unsigned char *Buffer;
size_t WriteOffset;
size_t BufferSize;
int Error;
} curlMemBuffer;
typedef curlMemBuffer *curlMemBufferPtr;
static void curlMemBufferInitialize(curlMemBufferPtr buf)
{
// initializing a dynamically growing output buffer
buf->Buffer = NULL;
buf->WriteOffset = 0;
buf->BufferSize = 0;
buf->Error = 0;
}
static void curlMemBufferReset(curlMemBufferPtr buf)
{
// cleaning a dynamically growing output buffer
if (buf->Buffer)
free(buf->Buffer);
buf->Buffer = NULL;
buf->WriteOffset = 0;
buf->BufferSize = 0;
buf->Error = 0;
}
static void
curlMemBufferAppend(curlMemBufferPtr buf, const unsigned char *payload,
size_t size)
{
// appending into the buffer
size_t free_size = buf->BufferSize - buf->WriteOffset;
if (size > free_size)
{
// we must allocate a bigger buffer
size_t new_size;
unsigned char *new_buf;
if (buf->BufferSize == 0)
new_size = size + 1024;
else if (buf->BufferSize <= 4196)
new_size = buf->BufferSize + size + 4196;
else if (buf->BufferSize <= 65536)
new_size = buf->BufferSize + size + 65536;
else
new_size = buf->BufferSize + size + (1024 * 1024);
new_buf = (unsigned char *) malloc(new_size);
if (!new_buf)
{
buf->Error = 1;
return;
}
if (buf->Buffer)
{
memcpy(new_buf, buf->Buffer, buf->WriteOffset);
free(buf->Buffer);
}
buf->Buffer = new_buf;
buf->BufferSize = new_size;
}
memcpy(buf->Buffer + buf->WriteOffset, payload, size);
buf->WriteOffset += size;
}
static size_t
curlStoreData(char *ptr, size_t size, size_t nmemb, void *userdata)
{
// updating the dynamic buffer
size_t total = size * nmemb;
curlMemBufferAppend((curlMemBufferPtr) userdata, (unsigned char *) ptr,
total);
return total;
}
static void
curlCheckHttpHeader(curlMemBufferPtr buf, int *http_status, char **http_code)
{
// checking the HTTP header
unsigned char *p_in;
unsigned char *base_status;
unsigned char *base_code;
int size_status = 0;
int size_code = 0;
char *tmp;
*http_status = -1;
*http_code = NULL;
if (buf->Buffer == NULL)
return;
if (buf->WriteOffset < 10)
return;
if (memcmp(buf->Buffer, "HTTP/1.1 ", 9) != 0
&& memcmp(buf->Buffer, "HTTP/1.0 ", 9) != 0)
return;
// attempting to retrieve the HTTP status
p_in = buf->Buffer + 9;
base_status = p_in;
while ((size_t) (p_in - buf->Buffer) < buf->WriteOffset)
{
if (*p_in == ' ')
break;
size_status++;
p_in++;
}
if (size_status <= 0)
return;
tmp = (char *) malloc(size_status + 1);
memcpy(tmp, base_status, size_status);
*(tmp + size_status) = '\0';
*http_status = atoi(tmp);
free(tmp);
// attempting to retrieve the HTTP code
p_in = buf->Buffer + 10 + size_status;
base_code = p_in;
while ((size_t) (p_in - buf->Buffer) < buf->WriteOffset)
{
if (*p_in == '\r')
break;
size_code++;
p_in++;
}
if (size_code <= 0)
return;
tmp = (char *) malloc(size_code + 1);
memcpy(tmp, base_code, size_code);
*(tmp + size_code) = '\0';
*http_code = tmp;
}
extern char *GetUpdateVersion()
{
//
// checking if there is an updated version
//
CURL *curl = NULL;
CURLcode res;
int http_status;
char *http_code;
char *text = NULL;
curlMemBuffer headerBuf;
curlMemBuffer bodyBuf;
char *request;
int windows;
#ifdef _WIN32
windows = 1;
#else
windows = 0;
#endif
request =
sqlite3_mprintf
("http://www.gaia-gis.it/cgi-bin/splitegui_update?windows=%d&cpu=%s&version=%s",
windows, spatialite_target_cpu(), VERSION);
curl = curl_easy_init();
if (curl)
{
/* setting the URL */
curl_easy_setopt(curl, CURLOPT_URL, request);
/* no progress meter please */
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
/* setting the output callback function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlStoreData);
/* initializes the buffers */
curlMemBufferInitialize(&headerBuf);
curlMemBufferInitialize(&bodyBuf);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, &headerBuf);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &bodyBuf);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if (res != CURLE_OK)
{
fprintf(stderr, "CURL error: %s\n", curl_easy_strerror(res));
goto stop;
}
/* verifying the HTTP status code */
curlCheckHttpHeader(&headerBuf, &http_status, &http_code);
if (http_status != 200)
{
fprintf(stderr, "Invalid HTTP status code: %d %s\n",
http_status, http_code);
if (http_code != NULL)
free(http_code);
goto stop;
}
if (http_code != NULL)
free(http_code);
curlMemBufferReset(&headerBuf);
text = (char *) malloc(bodyBuf.WriteOffset + 1);
memcpy(text, (const char *) (bodyBuf.Buffer), bodyBuf.WriteOffset);
*(text + bodyBuf.WriteOffset) = '\0';
stop:
curlMemBufferReset(&headerBuf);
curlMemBufferReset(&bodyBuf);
curl_easy_cleanup(curl);
}
sqlite3_free(request);
return text;
}
extern bool DoDownloadUpdatedPackage(const char *download_url,
unsigned char **data, int *data_len)
{
//
// downloading the updated version package
//
CURL *curl = NULL;
CURLcode res;
int http_status;
char *http_code;
curlMemBuffer headerBuf;
curlMemBuffer bodyBuf;
bool retcode = false;
*data = NULL;
*data_len = 0;
curl = curl_easy_init();
if (curl)
{
/* setting the URL */
curl_easy_setopt(curl, CURLOPT_URL, download_url);
/* no progress meter please */
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
/* setting the output callback function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlStoreData);
/* initializes the buffers */
curlMemBufferInitialize(&headerBuf);
curlMemBufferInitialize(&bodyBuf);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, &headerBuf);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &bodyBuf);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if (res != CURLE_OK)
{
fprintf(stderr, "CURL error: %s\n", curl_easy_strerror(res));
goto stop;
}
/* verifying the HTTP status code */
curlCheckHttpHeader(&headerBuf, &http_status, &http_code);
if (http_status != 200)
{
fprintf(stderr, "Invalid HTTP status code: %d %s\n",
http_status, http_code);
if (http_code != NULL)
free(http_code);
goto stop;
}
if (http_code != NULL)
free(http_code);
curlMemBufferReset(&headerBuf);
*data_len = bodyBuf.WriteOffset;
*data = (unsigned char *) malloc(*data_len);
memcpy(*data, (const unsigned char *) (bodyBuf.Buffer), *data_len);
retcode = true;
stop:
curlMemBufferReset(&headerBuf);
curlMemBufferReset(&bodyBuf);
curl_easy_cleanup(curl);
}
return retcode;
}
#ifdef CURL_URL_GET // only if recent Curl support is available
static void
do_check_query_url(const char *query, int *add_service, int *add_version,
int *add_request)
{
//
// checking if URL arguments SERVICE=, VERSION= or REQUEST= are alredy set
//
int max = 64;
char arg_name[64];
char *p_out = arg_name;
const char *p_in = query;
int ignore = 0;
*add_service = 1;
*add_version = 1;
*add_request = 1;
// it there are no args defined we surely need to add them
if (query == NULL)
return;
while (1)
{
// parsing all URL arguments
if (*p_in == '&')
{
p_in++;
ignore = 0;
continue;
}
if (*p_in == '=')
{
*p_out = '\0';
if (strcasecmp(arg_name, "service") == 0)
*add_service = 0;
if (strcasecmp(arg_name, "version") == 0)
*add_version = 0;
if (strcasecmp(arg_name, "request") == 0)
*add_request = 0;
p_out = arg_name;
p_in++;
ignore = 1;
continue;
}
if (*p_in == '\0')
{
*p_out = '\0';
if (strcasecmp(arg_name, "service") == 0)
*add_service = 0;
if (strcasecmp(arg_name, "version") == 0)
*add_version = 0;
if (strcasecmp(arg_name, "request") == 0)
*add_request = 0;
break;
}
if (ignore)
p_in++;
else
{
if (p_out - arg_name < max - 1)
*p_out++ = *p_in++;
else
p_in++;
}
}
}
static char *do_normalize_url(CURLU * h_in, const char *url_in)
{
//
// attempting to rewrite a normalized URL supporting
// SERVICE=WMS&VERSION=9.9.9&REQUEST=GetCapabilities
//
char *url_out = NULL;
char *host = NULL;
char *scheme = NULL;
char *user = NULL;
char *password = NULL;
char *port = NULL;
char *path = NULL;
char *query = NULL;
char *fragment = NULL;
int ok_host = 0;
int ok_scheme = 0;
int ok_user = 0;
int ok_password = 0;
int ok_port = 0;
int ok_path = 0;
int ok_query = 0;
int ok_fragment = 0;
int add_service = 1;
int add_version = 1;
int add_request = 1;
int retval = 1;
CURLU *h_out;
CURLUcode uc;
// binding the input URL to its handle
uc = curl_url_set(h_in, CURLUPART_URL, url_in, 0);
if (uc)
return NULL;
// breaking the input URL in its elementary elements
uc = curl_url_get(h_in, CURLUPART_HOST, &host, 0);
if (!uc)
ok_host = 1;
uc = curl_url_get(h_in, CURLUPART_SCHEME, &scheme, 0);
if (!uc)
ok_scheme = 1;
uc = curl_url_get(h_in, CURLUPART_USER, &user, 0);
if (!uc)
ok_user = 1;
uc = curl_url_get(h_in, CURLUPART_PASSWORD, &password, 0);
if (!uc)
ok_password = 1;
uc = curl_url_get(h_in, CURLUPART_PORT, &port, 0);
if (!uc)
ok_port = 1;
uc = curl_url_get(h_in, CURLUPART_PATH, &path, 0);
if (!uc)
ok_path = 1;
uc = curl_url_get(h_in, CURLUPART_QUERY, &query, 0);
if (!uc)
ok_query = 1;
uc = curl_url_get(h_in, CURLUPART_FRAGMENT, &fragment, 0);
if (!uc)
ok_fragment = 1;
// creating a Curl handle supporting the output URL
h_out = curl_url();
if (!h_out)
{
retval = 0;
goto cleanup;
}
// checking if SERVICE=, VERSION= and REQUEST= are actually defined
do_check_query_url(query, &add_service, &add_version, &add_request);
// rewriting the output URL
if (ok_host)
{
uc = curl_url_set(h_out, CURLUPART_HOST, host, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_scheme)
{
uc = curl_url_set(h_out, CURLUPART_SCHEME, scheme, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_user)
{
uc = curl_url_set(h_out, CURLUPART_USER, user, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_password)
{
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_port)
{
uc = curl_url_set(h_out, CURLUPART_PORT, port, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_path)
{
uc = curl_url_set(h_out, CURLUPART_PATH, path, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_query)
{
uc = curl_url_set(h_out, CURLUPART_QUERY, query, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (ok_fragment)
{
uc = curl_url_set(h_out, CURLUPART_FRAGMENT, fragment, 0);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (add_service)
{
uc =
curl_url_set(h_out, CURLUPART_QUERY, "SERVICE=WMS", CURLU_APPENDQUERY);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (add_version)
{
uc =
curl_url_set(h_out, CURLUPART_QUERY, "VERSION=9.9.9",
CURLU_APPENDQUERY);
if (uc)
{
retval = 0;
goto cleanup;
}
}
if (add_request)
{
uc =
curl_url_set(h_out, CURLUPART_QUERY, "REQUEST=GetCapabilities",
CURLU_APPENDQUERY);
if (uc)
{
retval = 0;
goto cleanup;
}
}
// extracting the normalized output URL
uc = curl_url_get(h_out, CURLUPART_URL, &url_out, 0);
if (!uc)
retval = 1;
else
retval = 0;
curl_url_cleanup(h_out);
cleanup:
if (host != NULL)
curl_free(host);
if (scheme != NULL)
curl_free(scheme);
if (user != NULL)
curl_free(user);
if (password != NULL)
curl_free(password);
if (port != NULL)
curl_free(port);
if (path != NULL)
curl_free(path);
if (query != NULL)
curl_free(query);
if (fragment != NULL)
curl_free(fragment);
if (!retval)
{
if (url_out != NULL)
curl_free(url_out);
url_out = NULL;
}
return url_out;
}
#endif // end Curl conditional
char *WmsDialog::NormalizeUrl(char const *url)
{
//
// attempting to normalize/complete a WMS GetCapabilities URL
//
#ifdef CURL_URL_GET // only if recent Curl support is available
char *norm_url;
CURLU *h = curl_url(); // get a handle to the input URL
if (!h)
return NULL;
norm_url = do_normalize_url(h, url);
curl_url_cleanup(h);
return norm_url;
#else
return NULL;
#endif
}
void WmsDialog::DestroyNormalizedUrl(char *url)
{
//
// memory cleanup
//
if (url != NULL)
curl_free(url);
}
spatialite_gui-2.1.0-beta1/win_resource/ 0000775 0001750 0001750 00000000000 13711576732 015232 5 0000000 0000000 spatialite_gui-2.1.0-beta1/win_resource/Makefile.am 0000664 0001750 0001750 00000000067 13711576502 017204 0000000 0000000
EXTRA_DIST = icon.ico resource.rc spatialite-icon.png
spatialite_gui-2.1.0-beta1/win_resource/Makefile.in 0000664 0001750 0001750 00000032117 13711576502 017216 0000000 0000000 # Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 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@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 = win_resource
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
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@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CPPFLAGS = @GEOS_CPPFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@
LIBFREEXL_LIBS = @LIBFREEXL_LIBS@
LIBLZ4_CFLAGS = @LIBLZ4_CFLAGS@
LIBLZ4_LIBS = @LIBLZ4_LIBS@
LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@
LIBLZMA_LIBS = @LIBLZMA_LIBS@
LIBOBJS = @LIBOBJS@
LIBOPENJP2_CFLAGS = @LIBOPENJP2_CFLAGS@
LIBOPENJP2_LIBS = @LIBOPENJP2_LIBS@
LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@
LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@
LIBS = @LIBS@
LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@
LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@
LIBTOOL = @LIBTOOL@
LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@
LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@
LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
LIBWEBP_LIBS = @LIBWEBP_LIBS@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIBZSTD_CFLAGS = @LIBZSTD_CFLAGS@
LIBZSTD_LIBS = @LIBZSTD_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@
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@
PGCONFIG = @PGCONFIG@
PG_CFLAGS = @PG_CFLAGS@
PG_LDFLAGS = @PG_LDFLAGS@
PG_LIB = @PG_LIB@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WXCONFIG = @WXCONFIG@
WX_LIBS = @WX_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
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@
exec_prefix = @exec_prefix@
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@
mandir = @mandir@
mkdir_p = @mkdir_p@
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 = icon.ico resource.rc spatialite-icon.png
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign win_resource/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign win_resource/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__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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:
ctags CTAGS:
cscope cscopelist:
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(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:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
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 \
cscopelist-am ctags-am 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 \
tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# 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:
spatialite_gui-2.1.0-beta1/win_resource/spatialite-icon.png 0000664 0001750 0001750 00000561717 13711576502 020761 0000000 0000000 ‰PNG
IHDR µ e Äž
n CiCCPICC Profile xXwT˳îÙ@\rÌ’s–,9(A–]¢°àA‚(A¢ˆ‚d%* Š$½
"¨ˆ"‚
’ö7zïçž÷Ïësfû믫ª{ºfª¶ 6|XX0 BŠ ãöc]¸aiÇp&@