quickplot-0.10.6/0000755000175000017500000000000012245423272010615 500000000000000quickplot-0.10.6/plot.c0000644000175000017500000002124212244565775011676 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "channel.h" #include "channel_double.h" #include "qp.h" #include "plot.h" #include "color_gen.h" #ifdef DMALLOC # include "dmalloc.h" #endif static inline void free_x11_colors(struct qp_plot *p, struct qp_graph *gr) { ASSERT(gr->x11); if(gr->x11) { if(!gr->x11->dsp) gr->x11->dsp = gdk_x11_get_default_xdisplay(); XFreeColors(gr->x11->dsp, DefaultColormap(gr->x11->dsp, DefaultScreen(gr->x11->dsp)), &p->l.x, 1, 0); XFreeColors(gr->x11->dsp, DefaultColormap(gr->x11->dsp, DefaultScreen(gr->x11->dsp)), &p->p.x, 1, 0); } } void qp_plot_set_X11_color(struct qp_plot *p, struct qp_color *c) { XColor x; x.pixel = 0; x.red = 65535 * c->c.r; x.green = 65535 * c->c.g; x.blue = 65535 * c->c.b; x.flags = 0; XAllocColor(p->gr->x11->dsp, DefaultColormap(p->gr->x11->dsp, DefaultScreen(p->gr->x11->dsp)), &x); ASSERT(x.pixel); c->x = x.pixel; } static inline void make_x11_colors(struct qp_plot *p, struct qp_graph *gr) { ASSERT(gr->x11); if(gr->x11) { /* Turn the cairo rgba colors into XColors */ if(!gr->x11->dsp) gr->x11->dsp = gdk_x11_get_default_xdisplay(); qp_plot_set_X11_color(p, &p->l); qp_plot_set_X11_color(p, &p->p); } } void qp_plot_set_cairo_draw_mode(struct qp_plot *p, struct qp_graph *gr) { free_x11_colors(p, gr); } void qp_plot_set_x11_draw_mode(struct qp_plot *p, struct qp_graph *gr) { make_x11_colors(p, gr); } struct qp_plot *qp_plot_copy_create(struct qp_graph *gr, struct qp_plot *old_p) { struct qp_plot *p; struct qp_graph_x11 *x11_save; ASSERT(gr != old_p->gr); x11_save = gr->x11; if(x11_save) /* We cannot let the X11 colors be allocated since * they may change after the plot is made. */ gr->x11 = NULL; p = qp_plot_create(gr, old_p->x, old_p->y, old_p->name, 1.0, -1.0, 1.0, -1.0); /* Here we may be changing the colors * to match the plot we are copying */ memcpy(&p->p,&old_p->p, sizeof(p->p)); memcpy(&p->l,&old_p->l, sizeof(p->l)); /* now that we have the colors set we can * allocate the X11 colors. */ gr->x11 = x11_save; if(gr->x11) make_x11_colors(p, gr); p->lines = old_p->lines; p->points = old_p->points; p->gaps = old_p->gaps; p->xscale = old_p->xscale; p->yscale = old_p->yscale; p->xshift = old_p->xshift; p->yshift = old_p->yshift; p->xscale0 = old_p->xscale0; p->yscale0 = old_p->yscale0; p->xshift0 = old_p->xshift0; p->yshift0 = old_p->yshift0; p->line_width = old_p->line_width; p->point_size = old_p->point_size; return p; } qp_plot_t qp_plot_create(qp_graph_t gr, qp_channel_t x, qp_channel_t y, const char *name, double xmin, double xmax, double ymin, double ymax) { struct qp_plot *p; size_t num_points = (size_t) -1; ASSERT(gr); ASSERT(x); ASSERT(y); ASSERT(name); p = (struct qp_plot*) qp_malloc(sizeof(*p)); memset(p, 0, sizeof(*p)); p->plot_num = ++gr->plot_create_count; qp_sllist_append(gr->plots, p); p->name = qp_strdup(name); p->gr = gr; gr->current_plot = p; p->gaps = gr->gaps; p->x_entry = NULL; p->y_entry = NULL; p->x_picker = NULL; p->y_picker = NULL; /* get default point and line colors */ qp_color_gen_next(gr->color_gen, &p->p.c.r, &p->p.c.g, &p->p.c.b, -1); qp_color_gen_next(gr->color_gen, &p->l.c.r, &p->l.c.g, &p->l.c.b, -1); p->p.c.a = 0.95; p->l.c.a = 0.85; if(gr->x11) make_x11_colors(p, gr); switch(x->form) { case QP_CHANNEL_FORM_SERIES: { if(xmax < xmin) { xmin = x->series.min; xmax = x->series.max; } p->x = qp_channel_series_create(x, 0); p->x_is_reading = qp_channel_series_is_reading; switch(x->value_type) { case QP_TYPE_DOUBLE: /* now these functions will not be inlined, oh well */ p->channel_x_begin = qp_channel_series_double_begin; p->channel_x_end = qp_channel_series_double_end; p->channel_x_next = qp_channel_series_double_next; p->channel_x_prev = qp_channel_series_double_prev; p->channel_series_x_index = qp_channel_series_double_index; p->channel_series_x_get_index = qp_channel_series_double_get_index; break; default: VASSERT(0, "write more code here"); break; } } break; /* TODO: add more cases */ default: VASSERT(0, "write more code here"); break; } switch(y->form) { case QP_CHANNEL_FORM_SERIES: { if(ymax < ymin) { ymin = y->series.min; ymax = y->series.max; } p->y = qp_channel_series_create(y, 0); p->y_is_reading = qp_channel_series_is_reading; switch(y->value_type) { case QP_TYPE_DOUBLE: /* now these functions will not be inlined, oh well */ p->channel_y_begin = qp_channel_series_double_begin; p->channel_y_end = qp_channel_series_double_end; p->channel_y_next = qp_channel_series_double_next; p->channel_y_prev = qp_channel_series_double_prev; p->channel_series_y_index = qp_channel_series_double_index; break; default: VASSERT(0, "write more code here"); break; } } break; /* TODO: add more cases */ default: VASSERT(0, "write more code here"); break; } /* find the number of points if we can */ if(p->x->form == QP_CHANNEL_FORM_SERIES) num_points = qp_channel_series_length(p->x); if(p->y->form == QP_CHANNEL_FORM_SERIES) { size_t len; len = qp_channel_series_length(p->y); if(len < num_points) num_points = len; } if(gr->lines == -1) { if(num_points > 1000000) p->lines = 0; else p->lines = 1; } else p->lines = gr->lines; p->points = gr->points; DEBUG("line_width=%d\n", gr->line_width); if(gr->line_width != -1) p->line_width = gr->line_width; else /* AUTO line_width */ { if(num_points > 100000) p->line_width = 2; else if(num_points > 100) p->line_width = 4; else if(num_points > 10) p->line_width = 6; else p->line_width = 8; if((gr->grid_line_width%2)) ++(p->line_width); } if(gr->point_size != -1) p->point_size = gr->point_size; else { if(num_points > 1000000) p->point_size = 2; else if(num_points > 10000) p->point_size = 4; else if(num_points > 100) p->point_size = 6; else if(num_points > 10) p->point_size = 8; else p->point_size = 10; if((gr->grid_line_width%2)) ++(p->point_size); } p->xscale0 = 1.0/(xmax - xmin); p->xshift0 = -xmin/(xmax - xmin); p->yscale0 = 1.0/(ymax - ymin); p->yshift0 = -ymin/(ymax - ymin); p->xscale = 0.0; p->xshift = 0.0; p->yscale = 0.0; p->yshift = 0.0; p->sig_fig_x = 0; p->sig_fig_y = 0; return p; } void qp_plot_destroy(qp_plot_t plot, struct qp_graph *gr) { ASSERT(plot); ASSERT(plot->name); if(plot) { struct qp_plot *p; struct qp_sllist *l; l = qp_sllist_create(gr->plots); for(p=qp_sllist_begin(l);p;p=qp_sllist_next(l)) if(p != plot) gr->current_plot = p; qp_sllist_destroy(l, 0); /* if the channels are series we must free * resources */ if(plot->x->form == QP_CHANNEL_FORM_SERIES) qp_channel_destroy(plot->x); if(plot->y->form == QP_CHANNEL_FORM_SERIES) qp_channel_destroy(plot->y); if(plot->x_picker && plot->x_picker->form == QP_CHANNEL_FORM_SERIES) qp_channel_destroy(plot->x_picker); if(plot->y_picker && plot->y_picker->form == QP_CHANNEL_FORM_SERIES) qp_channel_destroy(plot->y_picker); /* If using X11 to draw we need to free the X11 colors */ if(gr->x11) free_x11_colors(plot, gr); free(plot->name); free(plot); } } quickplot-0.10.6/term_color.h0000644000175000017500000000300612244565775013070 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #ifndef _QP_TERM_COLOR_H_ #define _QP_TERM_COLOR_H_ /* for quickplot developer spew colors */ extern char *gry; extern char *red; extern char *grn; extern char *yel; extern char *blu; extern char *vil; extern char *tur; extern char *bld; extern char *bgry; extern char *bred; extern char *bgrn; extern char *byel; extern char *bblu; extern char *bvil; extern char *btur; extern char *rgry; extern char *rred; extern char *rgrn; extern char *ryel; extern char *rblu; extern char *rvil; extern char *rtur; extern char *rbld; extern char *trm; extern char *nul; /* on returns 1, off returns 0 */ extern int qp_term_color_on(void); extern int qp_term_color_init(void); #else /* #ifndef _QP_TERM_COLOR_H_ */ #error "You included this file twice." #endif /* #ifndef _QP_TERM_COLOR_H_ */ quickplot-0.10.6/graph.c0000644000175000017500000005575412244565775012040 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "channel.h" #include "channel_double.h" #include "callbacks.h" #include "qp.h" #include "plot.h" #include "zoom.h" #include "color_gen.h" #ifdef DMALLOC # include "dmalloc.h" #endif static size_t gr_create_count = 0; /* drawing area minimal size restriction are * required so that the graph drawing algorithms do not fail. */ const gint EDGE_BUF_MIN = 10; /* returns a molloc() allocated string * Return a unique name for the qp */ static inline char *unique_name(struct qp_win *qp, const char *name) { char buf[32]; char *test_name = NULL; size_t len = 0; int i = 1; ++gr_create_count; if(!name || !name[0]) { snprintf(buf, 32, "graph %zu", gr_create_count); name = buf; } test_name = (char*) (name= qp_strdup(name)); while(1) { struct qp_graph *gr; /* We compare with the name of all graphs * in the qp main window. */ for(gr=qp_sllist_begin(qp->graphs); gr; gr=qp_sllist_next(qp->graphs)) if(strcmp(test_name, gr->name) == 0) break; if(gr) { if(test_name == name) test_name = (char*) qp_malloc(len = (strlen(name)+16)); snprintf(test_name, len, "%s[%d]", name, ++i); } else { if(test_name != name) free((char*) name); return test_name; } } } void add_graph_close_button(struct qp_graph *gr) { GtkWidget *close_button, *image; ASSERT(gr->close_button == NULL); gr->close_button = (close_button = gtk_button_new()); gtk_widget_set_size_request(close_button, 5, 5); image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); gtk_button_set_image(GTK_BUTTON(close_button), image); gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); gtk_widget_show(image); gtk_box_pack_start(GTK_BOX(gr->tab_label_hbox), close_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(close_button), "clicked", G_CALLBACK(cb_close_tab), gr); gtk_widget_set_name(close_button, "tab_close_button"); gtk_widget_set_tooltip_text(close_button,"Close tab"); gtk_widget_show(close_button); } /* the gr is assumed to be a gr that was just created and * has not been drawn yet. */ void qp_graph_copy(struct qp_graph *gr, struct qp_graph *old_gr) { struct qp_plot *p; ASSERT(gr->qp != old_gr->qp); ASSERT(gr->name); free(gr->name); gr->name = qp_strdup(old_gr->name); gtk_label_set_text(GTK_LABEL(gr->tab_label), gr->name); if(!old_gr->x11 && gr->x11) { free(gr->x11); gr->x11 = NULL; } else if(old_gr->x11 && !gr->x11) { gr->x11 = qp_malloc(sizeof(*(gr->x11))); gr->x11->gc = 0; gr->x11->pixmap = 0; gr->x11->dsp = 0; gr->x11->background = 0; gr->x11->background_set = 0; } for(p=qp_sllist_begin(old_gr->plots);p;p=qp_sllist_next(old_gr->plots)) qp_plot_copy_create(gr, p)->plot_num = p->plot_num; memcpy(gr->color_gen, old_gr->color_gen, sizeof(*(gr->color_gen))); memcpy(&gr->background_color, &old_gr->background_color, sizeof(gr->background_color)); memcpy(&gr->grid_line_color, &old_gr->grid_line_color, sizeof(gr->grid_line_color)); memcpy(&gr->grid_text_color, &old_gr->grid_text_color, sizeof(gr->grid_text_color)); gr->same_x_limits = old_gr->same_x_limits; gr->same_y_limits = old_gr->same_y_limits; gr->show_grid = old_gr->show_grid; gr->grid_numbers = old_gr->grid_numbers; gr->grid_line_width = old_gr->grid_line_width; gr->grid_on_top = old_gr->grid_on_top; gr->grid_x_space = old_gr->grid_x_space; gr->grid_y_space = old_gr->grid_y_space; gr->gaps = old_gr->gaps; gr->lines = old_gr->lines; gr->points = old_gr->points; gr->line_width = old_gr->line_width; gr->point_size = old_gr->point_size; gr->grab_x = old_gr->grab_x; gr->grab_y = old_gr->grab_y; gr->pixbuf_x = old_gr->pixbuf_x; gr->pixbuf_y = old_gr->pixbuf_y; gr->value_mode = old_gr->value_mode; qp_zoom_copy(gr->z, old_gr->z); gr->zoom_level = old_gr->zoom_level; gr->value_pick_x = old_gr->value_pick_x; gr->value_pick_y = old_gr->value_pick_y; if(old_gr->grid_font) { if(gr->grid_font) free(gr->grid_font); gr->grid_font = qp_strdup(old_gr->grid_font); } /* TODO: copy pangolayout?? May save memory by adding another * reference to it. Also copying the pangolayout maybe * better incase the old_gr->grid_font is not a valid font. */ /* does not copy the X11 shape mode */ if(gr->qp != old_gr->qp) { if(gr->qp->graph_create_count < old_gr->qp->graph_create_count) gr->qp->graph_create_count = old_gr->qp->graph_create_count; gr->graph_num = old_gr->graph_num; } } qp_graph_t qp_graph_create(qp_win_t qp, const char *name) { struct qp_graph *gr; if(!qp) qp = default_qp; ASSERT(qp); ASSERT(qp->graphs); ASSERT(qp->window); /* graphs do not exist unless they are * in a qp_win with a gtk window. */ if(!qp || !qp->window) return NULL; gr = (struct qp_graph *) qp_malloc(sizeof(*gr)); memset(gr, 0, sizeof(*gr)); gr->ref_count = 1; gr->graph_num = ++qp->graph_create_count; gr->name = unique_name(qp, name); gr->color_gen = qp_color_gen_create(); gr->zoom_level = 0; gr->plots = qp_sllist_create(NULL); qp_sllist_append(qp->graphs, gr); gr->gaps = qp->gaps; gr->lines = qp->lines; gr->points = qp->points; gr->line_width = qp->line_width; gr->point_size = qp->point_size; gr->show_grid = qp->grid; gr->grid_numbers = qp->grid_numbers; gr->grid_x_space = qp->grid_x_space; gr->grid_y_space = qp->grid_y_space; gr->grid_line_width = qp->grid_line_width; gr->qp = qp; gr->pangolayout = NULL; gr->grid_font = qp_strdup(qp->grid_font); gr->drawing_area = NULL; gr->close_button = NULL; gr->pixbuf_surface = NULL; gr->same_x_scale = 1; gr->same_y_scale = 1; gr->same_x_limits = 1; gr->same_y_limits = 1; gr->value_mode = (2<<2) | 1; gr->draw_value_pick = 0; /* the first configure event will fix the struct qp_graph * xscale, yscale, xshift, and yshift. We initialize * xscale to 0 so we can tell it is not initialized. */ gr->xscale = 0; gr->yscale = 0; /* This is the initial zoom in normalized units */ /* qp_zoom_create(xscale, xshift, yscale, yshift) */ gr->z = qp_zoom_create(0.95,0.025,0.92,0.04); memcpy(&gr->background_color, &qp->background_color, sizeof(gr->background_color)); memcpy(&gr->grid_line_color, &qp->grid_line_color, sizeof(gr->grid_line_color)); memcpy(&gr->grid_text_color, &qp->grid_text_color, sizeof(gr->grid_text_color)); gr->bg_alpha_preshape = gr->background_color.a; if(gr->qp->shape) { /* must be like in cb_view_shape() in callbacks.c */ if(gr->background_color.a >= 0.5) gr->background_color.a = 0.4; } gr->grab_x = 0; gr->grab_y = 0; if(qp->x11_draw) { gr->x11 = qp_malloc(sizeof(*(gr->x11))); gr->x11->gc = 0; gr->x11->pixmap = 0; gr->x11->dsp = 0; gr->x11->background = 0; gr->x11->background_set = 0; } else gr->x11 = NULL; gr->pixbuf_width = 0; gr->pixbuf_height = 0; gr->draw_zoom_box = 0; gr->draw_value_pick = 0; /* cairo/pango set antialiasing by default * we need this flag for when we unset * antialiasing in X11 shape drawing mode. */ gr->font_antialias_set = 1; /* boolean */ ASSERT(app->root_window_width > 10); gr->drawing_area = gtk_drawing_area_new(); gtk_widget_set_app_paintable(gr->drawing_area, TRUE); g_object_set_data(G_OBJECT(gr->drawing_area), "qp_graph", gr); gtk_widget_set_events(gr->drawing_area, gtk_widget_get_events(gr->drawing_area) | GDK_EXPOSURE_MASK | GDK_SCROLL_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK); /* We will do our own version of double buffering. * Not that it is better than GTK, but we add an additional * user interaction at the same time we copy image buffers. * Before we found this we were inadvertently triple * buffering the drawing of the graph. */ gtk_widget_set_double_buffered(gr->drawing_area, FALSE); #if 1 { const GdkRGBA rgba = QP_DA_BG_RGBA; gtk_widget_override_background_color(gr->drawing_area, GTK_STATE_FLAG_NORMAL, &rgba); } #endif gr->tab_label_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); gtk_box_set_homogeneous(GTK_BOX(gr->tab_label_hbox), FALSE); g_object_set(G_OBJECT(gr->tab_label_hbox), "border-width", 0, NULL); { /************************************************************ * Tab Label * ************************************************************/ GtkWidget *image; size_t num_graphs; image = gtk_image_new_from_stock(GTK_STOCK_DND, GTK_ICON_SIZE_MENU); gtk_box_pack_start(GTK_BOX(gr->tab_label_hbox), image, FALSE, FALSE, 0); gtk_widget_show(image); gr->tab_label = gtk_label_new(gr->name); //gtk_label_set_selectable(GTK_LABEL(gr->tab_label), TRUE); //gtk_widget_set_size_request(gr->tab_label, 60, 24); gtk_box_pack_start(GTK_BOX(gr->tab_label_hbox), gr->tab_label, FALSE, FALSE, 0); gtk_widget_show(gr->tab_label); num_graphs = qp_sllist_length(qp->graphs); if(num_graphs > 1) add_graph_close_button(gr); if(num_graphs == 2) { ASSERT(qp_sllist_first(qp->graphs) != (void *)gr); add_graph_close_button((struct qp_graph*)qp_sllist_first(qp->graphs)); } } gtk_notebook_append_page(GTK_NOTEBOOK(qp->notebook), gr->drawing_area, gr->tab_label_hbox); #if 0 gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(qp->notebook), gr->drawing_area, FALSE, /* expand */ FALSE, /* fill */ GTK_PACK_START); // GTK_PACK_START or GTK_PACK_END #endif gtk_widget_set_size_request(gr->drawing_area, 2*EDGE_BUF_MIN+1, 2*EDGE_BUF_MIN+1); g_signal_connect(G_OBJECT(gr->drawing_area), "draw", G_CALLBACK(ecb_graph_draw), gr); g_signal_connect(G_OBJECT(gr->drawing_area),"configure-event", G_CALLBACK(ecb_graph_configure), gr); g_signal_connect(G_OBJECT(gr->drawing_area), "button-press-event", G_CALLBACK(ecb_graph_button_press), gr); g_signal_connect(G_OBJECT(gr->drawing_area), "button-release-event", G_CALLBACK(ecb_graph_button_release), gr); g_signal_connect(G_OBJECT(gr->drawing_area), "motion-notify-event", G_CALLBACK(ecb_graph_pointer_motion), gr); g_signal_connect(G_OBJECT(gr->drawing_area), "scroll-event", G_CALLBACK(ecb_graph_scroll), qp); //g_object_set_data(G_OBJECT(gr->drawing_area), "Graph", &wrapper); // Give gr->drawing_area a minimum size so things do not fail. gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), gtk_notebook_page_num(GTK_NOTEBOOK(qp->notebook), gr->drawing_area)); if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs))) gtk_widget_show(gr->tab_label_hbox); gtk_widget_show(gr->drawing_area); /* GtkNotebook refuses to switch to a page unless the child * widget is visible. So this is after the show */ gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), gtk_notebook_get_n_pages(GTK_NOTEBOOK(qp->notebook)) - 1); return gr; } static inline void set_x11_draw_mode(struct qp_graph *gr) { struct qp_plot *p; ASSERT(gr->x11 == NULL); gr->x11 = qp_malloc(sizeof(*(gr->x11))); gr->x11->gc = 0; gr->x11->pixmap = 0; gr->x11->dsp = 0; gr->x11->background = 0; gr->x11->background_set = 0; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) /* gr->x11 needs to be set so the X11 colors * may be made */ qp_plot_set_x11_draw_mode(p, gr); } static inline void set_cairo_draw_mode(struct qp_graph *gr) { struct qp_plot *p; ASSERT(gr->x11); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) /* gr->x11 needs to be set so the X11 colors * may be freed */ qp_plot_set_cairo_draw_mode(p, gr); if(gr->x11) { if(gr->x11->gc) XFreeGC(gr->x11->dsp, gr->x11->gc); if(gr->x11->pixmap) XFreePixmap(gr->x11->dsp, gr->x11->pixmap); free(gr->x11); gr->x11 = NULL; } } void qp_graph_switch_draw_mode(struct qp_graph *gr) { if((gr->x11 && gr->qp->x11_draw) || (!gr->x11 && !gr->qp->x11_draw)) return; if(gr->qp->x11_draw) set_x11_draw_mode(gr); else set_cairo_draw_mode(gr); if(gr->pixbuf_surface) { /* This gets recreated in the drawing */ cairo_surface_destroy(gr->pixbuf_surface); gr->pixbuf_surface = NULL; } gr->pixbuf_needs_draw = 1; } void qp_graph_destroy(qp_graph_t gr) { struct qp_win *qp; ASSERT(gr); ASSERT(gr->qp); ASSERT(gr->qp->graphs); ASSERT(gr->name); ASSERT(gr->plots); if(!gr) return; if(gr->ref_count != 1) { ASSERT(gr->ref_count > 1); /* We cannot use just a counter because there could be an * arbitary number of button destroying clicks that * we wish to delay acting on. */ gr->destroy_called = 1; return; } qp = gr->qp; ASSERT(qp); ASSERT(qp->window); { struct qp_plot *p; p = qp_sllist_begin(gr->plots); for(; p; p = qp_sllist_next(gr->plots)) qp_plot_destroy(p, gr); qp_sllist_destroy(gr->plots, 0); } /* this will remove the tab */ gtk_widget_destroy(gr->drawing_area); qp_color_gen_destroy(gr->color_gen); free(gr->name); qp_sllist_remove(gr->qp->graphs, gr, 0); qp_zoom_destroy(gr->z); if(gr->pixbuf_surface) cairo_surface_destroy(gr->pixbuf_surface); if(gr->x11) { /* TODO: Not sure how to free X11 colors that * may be still in use by other graphs. There * is not likely much client side memory used * and the X Server will likely free the colors * when the program exits. Adding a list to manage * the X colors may use more memory than it * saves. ??? */ if(gr->x11->gc) XFreeGC(gr->x11->dsp, gr->x11->gc); if(gr->x11->pixmap) XFreePixmap(gr->x11->dsp, gr->x11->pixmap); free(gr->x11); } ASSERT(gr->grid_font); free(gr->grid_font); if(gr->pangolayout) g_object_unref(G_OBJECT(gr->pangolayout)); free(gr); /* done with this graph */ if(qp_sllist_length(qp->graphs) == 1) { /* Reusing the gr pointer */ /* Remove the tab close button */ gr = qp_sllist_first(qp->graphs); ASSERT(gr->close_button); gtk_widget_destroy(gr->close_button); gr->close_button = NULL; } } void qp_graph_zoom_out(struct qp_graph *gr, int all) { if(gr->zoom_level == 0 && !gr->grab_x && !gr->grab_y) return; if(all) { /* zoom all the way out */ if(gr->zoom_level) gr->pixbuf_needs_draw = 1; gr->zoom_level = 0; qp_zoom_pop_all(&(gr->z)); gr->grab_x = gr->grab_y = 0; gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); } else if(gr->grab_x || gr->grab_y) { gr->grab_x = gr->grab_y = 0; } else { /* zoom out one level */ --gr->zoom_level; gr->pixbuf_needs_draw = 1; qp_zoom_pop(&(gr->z)); gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); } qp_win_set_status(gr->qp); gtk_widget_queue_draw(gr->drawing_area); } static void _qp_graph_rescale_plots(struct qp_graph *gr) { /* We must rescale all the plots */ /* TODO: make this code suck less */ double dx_min = INFINITY, xmin = INFINITY, xmax = -INFINITY, dy_min = INFINITY, ymin = INFINITY, ymax = -INFINITY; struct qp_channel_series *csx0, *csy0; struct qp_plot *p; p=qp_sllist_begin(gr->plots); ASSERT(p->x->form == QP_CHANNEL_FORM_SERIES); ASSERT(p->y->form == QP_CHANNEL_FORM_SERIES); csx0 = &(p->x->series); csy0 = &(p->y->series); gr->same_x_limits = 1; gr->same_y_limits = 1; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { double dx, dy; struct qp_channel_series *cs; ASSERT(p->x->form == QP_CHANNEL_FORM_SERIES); ASSERT(p->y->form == QP_CHANNEL_FORM_SERIES); cs = &(p->x->series); dx = cs->max - cs->min; if(xmin > cs->min) xmin = cs->min; if(xmax < cs->max) xmax = cs->max; if(dx > SMALL_DOUBLE && dx_min > dx) dx_min = dx; if(csx0->max != cs->max || csx0->min != cs->min) gr->same_x_limits = 0; cs = &(p->y->series); dy = cs->max - cs->min; if(ymin > cs->min) ymin = cs->min; if(ymax < cs->max) ymax = cs->max; if(dy > SMALL_DOUBLE && dy_min > dy) dy_min = dy; if(csy0->max != cs->max || csy0->min != cs->min) gr->same_y_limits = 0; } if(gr->same_x_limits) { gr->same_x_scale = 1; } if(gr->same_x_scale) { if(xmax == xmin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ xmax += 1; xmin -= 1; } else if(xmax - xmin < SMALL_DOUBLE) { xmax += SMALL_DOUBLE; xmin -= SMALL_DOUBLE; } } else if(xmax == xmin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ xmax += 1; xmin -= 1; } else if(xmax - xmin < SMALL_DOUBLE) { /* they requested different scales but the values * are too close together, so we make it same scale */ xmax += SMALL_DOUBLE; xmin -= SMALL_DOUBLE; } else { /* use different scales */ xmin = INFINITY; xmax = -INFINITY; } if(gr->same_y_limits) gr->same_y_scale = 1; if(gr->same_y_scale) { if(ymax == ymin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ ymax += 1; ymin -= 1; } else if(ymax - ymin < SMALL_DOUBLE) { ymax += SMALL_DOUBLE; ymin -= SMALL_DOUBLE; } } else if(ymax == ymin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ ymax += 1; ymin -= 1; } else if(ymax - ymin < SMALL_DOUBLE) { /* they requested different scales but the values * are too close together, so we make it same scale */ ymax += SMALL_DOUBLE; ymin -= SMALL_DOUBLE; } else { /* use different scales */ ymin = INFINITY; ymax = -INFINITY; } for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { qp_plot_x_rescale(p, xmin, xmax); qp_plot_y_rescale(p, ymin, ymax); } } static void _qp_graph_set_redraw(struct qp_graph *gr) { gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); if(gr->qp->graph_detail) gtk_widget_queue_draw(gr->qp->graph_detail->selecter_drawing_area); /* We will queue the Graph draw in the selecter_drawing_area draw * so that we see the selecter draw before the graph */ gr->pixbuf_needs_draw = 1; gr->draw_value_pick = 0; if(gr->qp->graph_detail && gr->qp->current_graph == gr) { qp_graph_detail_set_value_mode(gr); qp_graph_detail_plot_list_remake(gr->qp); } } void qp_graph_remove_plot(struct qp_graph *gr, struct qp_plot *p) { ASSERT(gr); ASSERT(p); qp_sllist_remove(gr->plots, p, 0); qp_plot_destroy(p, gr); if(qp_sllist_length(gr->plots)) _qp_graph_rescale_plots(gr); _qp_graph_set_redraw(gr); } void qp_graph_add_plot(struct qp_graph *gr, struct qp_source *sx, struct qp_source *sy, size_t x_channel_num, size_t y_channel_num) { char pname[128]; struct qp_channel *x, *y; ASSERT(gr); ASSERT(sx); ASSERT(sy); ASSERT(sx->num_channels > x_channel_num); ASSERT(sy->num_channels > y_channel_num); x = sx->channels[x_channel_num]; y = sy->channels[y_channel_num]; ASSERT(x->form == QP_CHANNEL_FORM_SERIES); ASSERT(y->form == QP_CHANNEL_FORM_SERIES); qp_source_get_plot_name(pname, 128, sx, sy, x_channel_num, y_channel_num); qp_plot_create(gr, x, y, pname, x->series.min, x->series.max, y->series.min, y->series.max); _qp_graph_rescale_plots(gr); _qp_graph_set_redraw(gr); } void qp_graph_same_x_scale(struct qp_graph *gr, int same_x_scale /* 0 or 1 */) { if(gr->same_x_scale == same_x_scale || gr->same_x_limits) return; gr->same_x_scale = same_x_scale; if(same_x_scale) { double min=INFINITY, max=-INFINITY; struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { ASSERT(p->x->form == QP_CHANNEL_FORM_SERIES); if(max < p->x->series.max) max = p->x->series.max; if(min > p->x->series.min) min = p->x->series.min; } ASSERT(max >= min); if(max == min) { max += 1; min -= 1; } else if(max - min < SMALL_DOUBLE) { max += SMALL_DOUBLE; min -= SMALL_DOUBLE; } for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) qp_plot_x_rescale(p, min, max); } else { struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { double min, max; max = p->x->series.max; min = p->x->series.min; if(max == min) { max += 1; min -= 1; } else if(max - min < SMALL_DOUBLE) { max += SMALL_DOUBLE; min -= SMALL_DOUBLE; } qp_plot_x_rescale(p, min, max); } } gr->pixbuf_needs_draw = 1; } void qp_graph_same_y_scale(struct qp_graph *gr, int same_y_scale /* 0 or 1 */) { if(gr->same_y_scale == same_y_scale || (gr->same_y_limits && !same_y_scale)) return; gr->same_y_scale = same_y_scale; if(same_y_scale) { double min=INFINITY, max=-INFINITY; struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { ASSERT(p->y->form == QP_CHANNEL_FORM_SERIES); if(max < p->y->series.max) max = p->y->series.max; if(min > p->y->series.min) min = p->y->series.min; } ASSERT(max >= min); if(max == min) { max += 1; min -= 1; } else if(max - min < SMALL_DOUBLE) { max += SMALL_DOUBLE; min -= SMALL_DOUBLE; } for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) qp_plot_y_rescale(p, min, max); } else { /* different scales for each plot */ struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { double min, max; max = p->y->series.max; min = p->y->series.min; if(max == min) { max += 1; min -= 1; } else if(max - min < SMALL_DOUBLE) { max += SMALL_DOUBLE; min -= SMALL_DOUBLE; } qp_plot_y_rescale(p, min, max); } } gr->pixbuf_needs_draw = 1; } quickplot-0.10.6/exec_lib.c0000644000175000017500000000617312244565775012500 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include "config.h" #ifdef HAVE_LIBREADLINE # if defined(HAVE_READLINE_READLINE_H) # include # elif defined(HAVE_READLINE_H) # include # else /* !defined(HAVE_READLINE_H) */ # undef HAVE_LIBREADLINE # endif #endif #ifdef DMALLOC # include "dmalloc.h" #endif /* This is the stuff that will tell the compiler to make this library * one that can be executed. */ #ifdef __i386__ # define LIBDIR "/lib/" #endif #ifdef __x86_64__ # define LIBDIR "/lib64/" #endif #ifndef LIBDIR # error "The compiler did not define __i386__ or __x86_64__" #endif const char my_interp[] __attribute__((section(".interp"))) = LIBDIR LD_SO; /* Here's what to execute when this library is executed. */ void qp_exec_lib(void) { char *sndfile_version; sndfile_version = (char *) sf_version_string(); while(*sndfile_version && (*sndfile_version < '0' || *sndfile_version > '9')) ++sndfile_version; printf(" =============================================\n" " " PACKAGE_NAME " version: " VERSION "\n" " =============================================\n" "\n" " Compiled ("__FILE__") on date: "__DATE__ "\n" " at: "__TIME__ "\n" "\n" " libquickplot version: " LIB_VERSION "\n" "\n" " Was built with\n" " GTK+ version: %d.%d.%d\n" " libsndfile version: %s\n" #ifdef HAVE_LIBREADLINE " libreadline version: %d.%d\n" #endif " ------------------------------------------------\n" #ifdef QP_DEBUG " QP_DEBUG was defined in this build.\n" #else " QP_DEBUG was NOT defined in this build.\n" #endif " ------------------------------------------------\n" "\n" " The Quickplot homepage is:\n" " "PACKAGE_URL "\n" "\n" " Copyright (C) 1998-2011 - Lance Arsenault\n" " This is free software licensed under the GNU GPL (v3).\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION, sndfile_version #ifdef HAVE_LIBREADLINE , RL_VERSION_MAJOR, RL_VERSION_MINOR #endif ); /* This needs to call exit and not return 0 since this is not main() * and main is not called. */ exit(0); } quickplot-0.10.6/qp.h0000644000175000017500000004234712244753113011337 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #ifndef PACKAGE_TARNAME # error "You must include config.h before this file" #endif #include #include #include #include #include #include #include #define GRAB_BUTTON (1) #define PICK_BUTTON (2) #define ZOOM_BUTTON (3) /* Given we just have one X server connection we just need * one saved pointer and mouse flag thingy. */ extern int save_x, save_y, mouse_num, got_motion; #ifdef INT #error "INT is already defined" #endif /* ABS was defined already */ #define ABSVAL(x) (((x)>0)?(x):(-(x))) #ifndef WINDOZ /* TODO: change to the windows defined thingy */ #define DIR_CHAR '/' #define DIR_STR "/" #else #define DIR_CHAR '\\' #define DIR_STR "\\" #endif #define QP_DA_BG_RGBA { 1.0, 1.0, 1.0, 1.0 } /* converting the values to ints before plotting * increases Cairo draw rate by an order of magnitude!! */ #define INT(x) ((int)(((x)>0.0)?(x)+0.5:(x)-0.5)) struct qp_zoom { double xscale, xshift, yscale, yshift; struct qp_zoom *next; }; /* color with alpha */ struct qp_colora { double r, g, b, a; }; struct qp_color { struct qp_colora c; /* cairo colors */ unsigned long x; /* x11 color */ }; /* The plot class precomputes all the linear transformations * and reduces them to just one mulitple and one add for * each point value read in the tight plot loops where it counts. */ struct qp_plot { struct qp_channel *x, *y; /* For value picking */ struct qp_channel *x_picker, *y_picker; size_t num_points, picker_i; /* current picker index */ double xval, yval; /* last values read from x_picker and y_picker */ struct qp_graph *gr; char *name; int plot_num; /* gr->plot_create_count after this was made */ /* point and line colors */ struct qp_color p, l; /* boolean to show lines, points and gaps */ int lines, points, gaps; /* these are changed at the begining of each reading/plotting loop * They change with the current zoom that is passed in from the * graph */ double xscale, yscale, xshift, yshift; /* these store the plot scales for the life of the plot * They never change after the plot is created */ double xscale0, yscale0, xshift0, yshift0; /* This is used when we know how to limit the number * of values that we need to read from the channels * based on the nature of the data. */ size_t num_read; double line_width, point_size; /* These show the middle mouse picker plot values */ GtkWidget *x_entry, *y_entry; int sig_fig_x, sig_fig_y; /* Virtual functions in C */ /* This gives us a common interface to reading the * data whether the data be stored in floats, doubles * ints, and etc. */ int (* x_is_reading)(struct qp_channel *c); int (* y_is_reading)(struct qp_channel *c); double (* channel_x_begin)(struct qp_channel *c); double (* channel_y_begin)(struct qp_channel *c); double (* channel_x_end) (struct qp_channel *c); double (* channel_y_end) (struct qp_channel *c); double (* channel_x_next) (struct qp_channel *c); double (* channel_y_next) (struct qp_channel *c); double (* channel_x_prev) (struct qp_channel *c); double (* channel_y_prev) (struct qp_channel *c); double (* channel_series_x_index)(struct qp_channel *c, size_t i); double (* channel_series_y_index)(struct qp_channel *c, size_t i); size_t (* channel_series_x_get_index)(struct qp_channel *c); //size_t (* num_vals)(struct qp_plot *p); }; struct qp_source { char *name; char **labels; size_t num_labels; size_t num_values; int value_type; /* can be multi-type */ size_t num_channels; /* An array of channels (pointers) */ struct qp_channel **channels; }; /* graphs do not exist unless they are * in a qp_win with a gtk window. */ struct qp_graph { int ref_count; // flags to keep from destroying at the wrong time int destroy_called; char *name; int graph_num; /* win->graph_create_count after this was made */ struct qp_plot *current_plot; struct qp_color_gen *color_gen; struct qp_sllist *plots; struct qp_win *qp; GtkWidget *drawing_area, *tab_label, *tab_label_hbox, *close_button; /* xscale, xshift, yscale, yshift provide an * additional drawing area transformation that maps * to a sub area of the drawing area and flips Y * so it is positively changing in the up direction. */ int xscale, xshift, yscale, yshift; /* The first zoom in the stack is the identity transformation. * Zooms are normalized to a 0,0 to 1,1 box */ struct qp_zoom *z; int zoom_level; /* starting at 0 */ /* bool value == do all the plots have the same scale? */ int same_x_scale, same_y_scale; /* do all the plots have the same min and max */ int same_x_limits, same_y_limits; int show_grid, grid_numbers; /* maximum pixel space between grid lines * the smallest it could be is 1/3 of this */ int grid_x_space, grid_y_space; /* default plot parameters in the graph */ int line_width, point_size; int points, lines, gaps; int grid_line_width; int grid_on_top; char *grid_font; PangoLayout *pangolayout; struct qp_colora background_color, grid_line_color, grid_text_color; /* A place to store the background color is we * switch to using X11 shape extension */ double bg_alpha_preshape; int pixbuf_width, pixbuf_height, pixbuf_x, pixbuf_y; /* grab x,y needs to be a double so we may scale it on * window resize */ double grab_x, grab_y; /* Defining relative positions of things: * ------------------------------------------------------------------------ position |position in |position |position in pixbuf |drawing area |in scaled plots|in plot values (int) | (int) | (int) | (double) --------------------|-------------|---------------|---------------------- (xi+pixbuf_x+grab_x,|(xi+grab_x, | (xi,yi) |(qp_plot_get_xval(xi), yi+pixbuf_y+grab_y)| yi+grab_y) | | qp_plot_get_xval(xi)) ------------------------------------------------------------------------- scaling takes place in the qp_plot_get_*val() in the qp_plot objects */ /* since we have our own drawing buffer which we double buffer with, * we do not need to redraw it at every draw event, hence this flag */ int pixbuf_needs_draw; int draw_zoom_box; // flag to tell to draw a zoom box int z_x, z_y, z_w, z_h; // zoom box geometry in drawing_area pixels int draw_value_pick; /* Value pick mode * First two bits: * Pointer Value = 0, * Interpolate Plot Value = 1, * Pick Plot Value = 2, * third and forth bits are available modes: * 0 = 0, 1 = 0 or 1, or 2 = 0, 1 or 2 */ int value_mode, /* The pick x y values depend on the mode * if it's mode=2 Pick Plot Value then * value_pick_x (y) will not necessarily be the * same as qp->pointer_x (y). */ value_pick_x, value_pick_y; int waiting_to_resize_draw; /* our back drawing buffer which may be larger than the drawing_area */ cairo_surface_t *pixbuf_surface; cairo_t *cr; /* just tmp variable for drawing */ void (*DrawLine)(struct qp_graph *gr, int *new_line, double from_x, double from_y, double to_x, double to_y); int font_antialias_set; /* bool */ /* is NULL if not drawing with X11 */ struct qp_graph_x11 *x11; int plot_create_count; }; struct qp_graph_x11 { GC gc; Pixmap pixmap; /* sits under the pixbuf_surface */ Display *dsp; /* background is used to store the background color * in raw format for the X11 shape extension draw * mode. */ uint32_t background; int background_set; }; /* there can be only one app object */ struct qp_app { int *argc; char ***argv; int is_globel_menu; int is_gtk_init; int main_window_count; pid_t pid; struct qp_sllist *qps; struct qp_sllist *sources; struct qp_sllist *shells; /* This include declares op_ variables which are long * options like for example: * --grid-line-width ==> op_grip_line_width * * app_op_declare.h is a generated file. */ # include "app_op_declare.h" /* TODO: an option like grid draw position. */ int op_grid_on_top; GdkCursor *waitCursor, *grabCursor, *holdCursor, *pickCursor, *zoomCursor; int root_window_width, root_window_height; int gui_can_exit; }; struct qp_slider { int min, max, extended_max; GtkWidget *entry, *scale; void (*callback)(struct qp_slider *s); int *val; double *dval; int is_plot_line_width; struct qp_graph *gr; }; #define PL_IS_SHOWING (1<<4) struct qp_graph_detail { /* see graph::valuemode * first 4 bits for modes * and fifth bit for is showing */ int plot_list_modes; GtkWidget *window, *notebook, *config_label, *show_container, *background_color_picker, *grid_color_picker, *numbers_color_picker, *font_picker, *x_scale, *y_scale, *selecter_x_vbox, *selecter_y_vbox, *selecter_drawing_area, *selecter_hbox, *plot_list_hbox, *plot_list_combo_box, *plot_list_drawing_area, **plot_list_button_lines, **plot_list_button_points; struct qp_slider *line_width_slider, *point_size_slider, *grid_line_width_slider, *grid_x_line_space_slider, *grid_y_line_space_slider, **plot_line_width_slider, **plot_point_size_slider; }; /* There is one of these per quickplot main window * The window does not have to be made. */ struct qp_win { int ref_count; // flags to keep from destroying at the wrong time int destroy_called; struct qp_sllist *graphs; struct qp_graph *current_graph; GtkWidget *window, *view_buttonbar, *view_menubar, *view_graph_tabs, *view_statusbar, *view_border, *view_fullscreen, *view_shape, *view_x11_draw, *view_cairo_draw, *view_graph_detail, *copy_window_menu_item, *delete_window_menu_item, *menubar, *file_menu, *buttonbar, *button_graph_detail, *notebook, /* graph tabs */ *statusbar, *status_entry; struct qp_graph_detail *graph_detail; //int wait_warning_showing; /* this is the last known pointer position, in pixels, * in the drawing_area, all drawing areas being in the * same position and size for a given qp_win. */ int pointer_x, pointer_y; /* A flag to update the graph_detail after * a graph draw */ int update_graph_detail; int wait_cursor_showing; /* boolean draw graphs with X11 API */ int x11_draw; /* Each qp window that is made has a number * assigned. The window title uses this. */ int window_num; int border; int shape; /* use X11 shape extention */ /* This is just when we use the X shape extension. * We save the last shape that was applied and * do not apply a new shape region unless it * changes. Otherwise we can end up with many * unnecessary redraw events. */ cairo_region_t *last_shape_region; /* The front page after qp_startup_idle_callback() */ int init_front_page_num; int graph_create_count; /* graph and plot default parameter values */ int gaps, lines, points, grid, grid_numbers, same_x_scale, same_y_scale; int grid_x_space, grid_y_space, grid_line_width; int line_width, point_size; char *grid_font; struct qp_colora background_color, grid_line_color, grid_text_color; }; /* this is the one and only gtk app object. */ extern struct qp_app *app; extern struct qp_app *qp_app_create(void); extern void set_value_pick_entries(struct qp_graph *gr, int x, int y); extern void qp_getargs_1st_pass(int argc, char **argv); extern void qp_getargs_2nd_pass(int argc, char **argv); extern void qp_graph_detail_set_value_mode(struct qp_graph *gr); extern void qp_graph_detail_plot_list_remake(struct qp_win *qp); extern void qp_graph_detail_destory(struct qp_win *qp); extern struct qp_win *qp_win_copy_create(struct qp_win *old_qp); extern int qp_find_doc_file(const char *fileName, char **fullpath_ret); extern int qp_launch_browser(const char *fileName); extern void qp_get_root_window_size(void); /* Setup the widget for a particular graph */ extern void qp_win_graph_detail_init(struct qp_win *qp); extern void qp_graph_copy(struct qp_graph *gr, struct qp_graph *old_gr); extern void qp_win_set_status(struct qp_win *qp); extern void qp_win_set_window_title(struct qp_win *qp); extern void qp_app_set_window_titles(void); extern void add_source_buffer_remove_menus(struct qp_source *source); extern void qp_app_graph_detail_source_remake(void); extern void qp_plot_set_X11_color(struct qp_plot *p, struct qp_color *c); #ifdef QP_DEBUG extern void qp_source_debug_print(struct qp_source *s); #endif extern void qp_plot_destroy(struct qp_plot *plot, struct qp_graph *gr); extern int qp_source_parse_doubles(struct qp_source *source, char *line_in); extern void qp_graph_zoom_out(struct qp_graph *gr, int all); extern void qp_graph_switch_draw_mode(struct qp_graph *gr); extern void qp_graph_set_grid_font(struct qp_graph *gr); extern void qp_win_graph_remove(qp_win_t qp, qp_graph_t graph); /* plots belong to the creating graph */ extern struct qp_plot *qp_plot_copy_create(qp_graph_t gr, struct qp_plot *old_p); extern qp_plot_t qp_plot_create(struct qp_graph *graph, qp_channel_t x, qp_channel_t y, const char *name, double xmin, double xmax, double ymin, double ymax); extern qp_graph_t qp_graph_create(qp_win_t qp, const char *name); extern void qp_graph_grid_draw(struct qp_graph *gr, struct qp_plot *p, cairo_t *cr, int width, int height); extern void qp_graph_destroy(qp_graph_t graph); extern void qp_graph_append(qp_graph_t graph, qp_plot_t plot); extern void qp_graph_draw(struct qp_graph *gr, cairo_t *cr); extern int qp_win_save_png(struct qp_win *qp, struct qp_graph *gr, const char *filename); /** * Sources can be shared between qps * * value_type will be ignored if the value_type can * be easily determined from the file contents. */ extern qp_source_t qp_source_create( const char *filename, int value_type); extern qp_source_t qp_source_create_from_func( const char *name, int value_type, void (* func)(const void *)); extern void qp_source_destroy(qp_source_t source); extern struct qp_gtk_options *strip_gtk_options(int *argc, char ***argv); extern int qp_gtk_init_check(struct qp_gtk_options *opt); /* default_qp is the last qp created during startup * After that it is set by the shells. * TODO: Add list of structs to hold attibutes * of connected shells, since more than one shell * can connect at a time. */ extern struct qp_win *default_qp; static inline struct qp_win *qp_win_check(struct qp_win *qp) { if(qp) return qp; if(default_qp) return default_qp; return default_qp = qp_win_create(); } static inline char *qp_source_get_label(struct qp_source *s, size_t num, char *buf, size_t buf_len) { if(num >= s->num_labels) snprintf(buf, buf_len, "%s[%zu]", s->name, num); else snprintf(buf, buf_len, "%s", s->labels[num]); return buf; } static inline void qp_app_check(void) { if(!app) qp_app_create(); } /* Checks for app and the gtk_init() was called. */ static inline int qp_app_init_check(void) { if(!app) qp_app_create(); if(!app->is_gtk_init && qp_app_init(NULL, NULL)) return 1; /* failure */ return 0; /* success */ } static inline void qp_source_get_plot_name(char *pname, size_t plen, struct qp_source *sx, struct qp_source *sy, size_t channel_num_x, size_t channel_num_y) { size_t len = 0; if(channel_num_y >= sy->num_labels) snprintf(pname, plen, "%s[%zu] VS ", sy->name, channel_num_y); else snprintf(pname, plen, "%s VS ", sy->labels[channel_num_y]); len = strlen(pname); if(channel_num_x >= sx->num_labels) snprintf(&pname[len], plen-len, "%s[%zu]", sx->name, channel_num_x); else snprintf(&pname[len], plen-len, "%s", sx->labels[channel_num_x]); } extern void qp_graph_remove_plot(struct qp_graph *gr, struct qp_plot *p); extern void qp_graph_add_plot(struct qp_graph *gr, struct qp_source *sx, struct qp_source *sy, size_t x_channel_num, size_t y_channel_num); extern void qp_graph_same_x_scale(struct qp_graph *gr, int same_x_scale); extern void qp_graph_same_y_scale(struct qp_graph *gr, int same_y_scale); quickplot-0.10.6/zoom.h0000644000175000017500000001000712244565775011706 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /************************************************************* * All data pasted into zoom and read from zoom is normalized * to be a linear tranformation of a 0,0 to 1,1 box. *************************************************************/ /* private */ static inline void _qp_zoom_push(struct qp_zoom **z, double xscale, double xshift, double yscale, double yshift) { struct qp_zoom *new_z; ASSERT(z); ASSERT(*z); new_z = (struct qp_zoom*)qp_malloc(sizeof(*new_z)); new_z->xscale = xscale; new_z->xshift = xshift; new_z->yscale = yscale; new_z->yshift = yshift; new_z->next = *z; *z = new_z; } static inline void qp_zoom_push(struct qp_zoom **z, double xscale, double xshift, double yscale, double yshift) { _qp_zoom_push(z, xscale*(*z)->xscale, xscale*(*z)->xshift + xshift, yscale*(*z)->yscale, yscale*(*z)->yshift + yshift); } static inline void qp_zoom_pop(struct qp_zoom **z) { ASSERT(z); ASSERT(*z); if((*z)->next) { struct qp_zoom *next; next = (*z)->next; free(*z); *z = next; } } /* free up all but the top of the stack */ static inline void qp_zoom_pop_all(struct qp_zoom **z) { ASSERT(z); ASSERT(*z); while((*z)->next) { struct qp_zoom *next; next = (*z)->next; free(*z); *z = next; } } /* add a zoom that is a shift in the 0,0 to 1,1 space */ static inline void qp_zoom_push_shift(struct qp_zoom **z, double dx, double dy) { _qp_zoom_push(z, (*z)->xscale, (*z)->xshift + dx, (*z)->yscale, (*z)->yshift + dy); } /* xmin, ymin and xmax, ymax are normalized "close to" * between 0,0 to 1,1 * * You must be sure the xmin, ymin, xmax, ymax values * are good before calling this. */ static inline void qp_zoom_push_mm(struct qp_zoom **z, double xmin, double ymin, double xmax, double ymax) { double xscale, xshift, yscale, yshift; xscale = (*z)->xscale/(xmax - xmin); yscale = (*z)->yscale/(ymax - ymin); xshift = xscale*((*z)->xshift - xmin)/(*z)->xscale; yshift = yscale*((*z)->yshift - ymin)/(*z)->yscale; _qp_zoom_push(z, xscale, xshift, yscale, yshift); } static inline struct qp_zoom *qp_zoom_create(double xscale, double xshift, double yscale, double yshift) { struct qp_zoom *z; z = (struct qp_zoom *)qp_malloc(sizeof(struct qp_zoom)); z->xscale = xscale; z->xshift = xshift; z->yscale = yscale; z->yshift = yshift; z->next = NULL; return z; } /* We assume that there is one zoom from qp_zoom_create() * to start with. */ static inline void qp_zoom_copy(struct qp_zoom *z, const struct qp_zoom *org_z) { ASSERT(org_z); ASSERT(z); if(z->next) { /* Remove and free the old stack */ struct qp_zoom *n; for(n=z->next;n;n=n->next) free(n); z->next = NULL; } /* Copy the current zoom */ z->xscale = org_z->xscale; z->yscale = org_z->yscale; z->xshift = org_z->xshift; z->yshift = org_z->yshift; for(org_z = org_z->next; org_z; org_z = org_z->next) { /* copy the rest of the zoom stack */ z->next = qp_zoom_create(org_z->xscale, org_z->xshift, org_z->yscale, org_z->yshift); z = z->next; } } static inline void qp_zoom_destroy(struct qp_zoom *z) { ASSERT(z); while(z) { struct qp_zoom *next; next = z->next; free(z); z = next; } } quickplot-0.10.6/qp_main.c0000644000175000017500000000477012245013605012330 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "spew.h" #include "qp.h" #include "shell.h" #include "term_color.h" #include "shell_common.h" #ifdef QP_DEBUG # include #endif #ifdef DMALLOC # include "dmalloc.h" #endif static void usr1_sighandler(int sig_num, siginfo_t *info, void *ptr) { char path_in[FIFO_PATH_LEN], path_out[FIFO_PATH_LEN]; FILE *in = NULL, *out = NULL; NOTICE("Received signal %d from pid %d\n", sig_num, info->si_pid); in = fopen(set_to_qp_fifo_path(path_in, getpid(), info->si_pid), "r"); if(!in) { QP_EERROR("Failed to open fifo %s\n", path_in); return; } out = fopen(set_from_qp_fifo_path(path_out, getpid(), info->si_pid), "w"); if(!out) { fclose(in); QP_EERROR("Failed to open fifo %s\n", path_out); return; } qp_shell_create(in, out, 1, info->si_pid); } #ifdef QP_DEBUG static void error_sighandler(int sig_num) { VASSERT(0, "We caught signal %d", sig_num); } #endif int main (int argc, char **argv) { struct qp_gtk_options *gtk_opt; struct sigaction action; #ifdef QP_DEBUG signal(SIGSEGV, error_sighandler); signal(SIGABRT, error_sighandler); #endif qp_app_create(); gtk_opt = strip_gtk_options(&argc, &argv); qp_getargs_1st_pass(argc, argv); if(qp_gtk_init_check(gtk_opt)) return 1; qp_getargs_2nd_pass(argc, argv); memset(&action, 0, sizeof(action)); action.sa_sigaction = usr1_sighandler; action.sa_flags = SA_SIGINFO; sigaction(SIGUSR1, &action, NULL); if(app->op_signal) kill(app->op_signal, SIGUSR1); DEBUG("Quickplot pid %d\n", getpid()); gtk_main(); if(app->op_shell) qp_shell_destroy(app->op_shell); return 0; } quickplot-0.10.6/README0000644000175000017500000000215312245051450011411 00000000000000Quickplot Home-page: http://quickplot.sourceforge.net/ What is Quickplot? Quickplot is an interactive 2D plotter. You can very quickly swim through data with Quickplot. Quickplot installs HTML (and man pages and etc) files that document Quickplot better than this file, but if they are not built and installed yet here's some pointers. Quickplot is a standard GNU Autotools built package run: ./configure make make install or run: ./configure --help for a long list of configuration options. See http://quickplot.sourceforge.net/about.html for Installation prerequisites and other details. There is another optional Quickplot package for development and testing the Quickplot source code. Test programs in this package do things like: display the default Quickplot point and line colors in one window, or stupid things like read and print "NAN" as a double; just so developers know. You can get this "quickplot_tests" package by: svn co https://quickplot.svn.sf.net/svnroot/quickplot/quickplot_tests quickplot_tests This will make the directory quickplot_tests in the current directory. quickplot-0.10.6/imgNewWindow.png0000644000175000017500000000031412244565775013675 00000000000000‰PNG  IHDRóÿa“IDATxœíб‚0Æñ•`!èdâ㟷¾ƒ³HØdhiz.g­#_rÉ-ß/—ƒÈ(€¶½ŠÖ;¦É#"äyŽ÷k-ºÐd›-.|ÒD±N (˃Jºn i.<úDfa_UŒÖq\yNEÆý鸎º>Î0ÆðÕ¼;$±?X€ø ΋1&Öú-/T»BiÆäÑ«IEND®B`‚quickplot-0.10.6/help_tail.htm.in0000644000175000017500000002140612245205664013623 00000000000000

For example the command

quickplot file0.txt file1.wav file2.csv file3.dat

will make four graphs in four tabs in one main window.

The command

quickplot file0.txt file1.wav file2.csv --new-window file3.dat --no-new-window

will make two windows with two graphs in each window.  You see: file1.wav will be forced to be graphed when the parser hits the argument file2.csv, and file2.csv will be forced to be graphed when the parser hits the file3.dat argument, at which time the --new-window is in effect which causes a new window to be used for file2.csv.  file3.dat will be graphed in the same window as file2.csv because the --new-window option is not longer in effect when file3.dat is forced to be graphed at the end of the command line.

The command

quickplot load1.txt --no-grid --no-lines load2.txt --lines=y --line-width=9 -F

will make a graph from data in file load1.txt with no connecting lines and no grid.  It will make a graph from the data in load2.txt with lines with width 9 pixels and no grid.  The main window displayed will not be full screen since the -F option was given after the main window would have been created.  The two graphs will be in two different tab pages in the one main window.

The command

quickplot --fullscreen --no-gui load1.txt --default-graph --gui --no-buttons --no-fullscreen --geometry=400x400-0+0 --new-window --graph "0 1" --geometry=400x400+0-0 load2.txt --background-color='rgba(140,140,200,0.6)' --cairo-draw

will make main window with a graph in full screen without GUIs, another smaller main window with the same plot in the top right corner with GUIs except for the buttons bar, and another small main window in the bottom left corner with a default graph of the file load2.txt drawn with Cairo with a translucent blueish gray background.  The main windows are made when they have to be, which at the --default-graph, --graph "0 1", and at the end of the command line when for the default graph of the file load2.txt must be displayed.  Notice all the graphs are made in a new main window.  That's because the --new-window flag was set and is not unset as it could be with the --no-new-window command.

The command

echo -e "graph zoom 2 1 -.5 0\ninput `tty`\n" | quickplot /usr/share/tuxpaint/sounds/areyousure.wav --shell --no-gui --no-pipe

will graph the tuxpaint areyousure.wav file with the view zoomed to the right half of the graph.  If you ran this from a bash (or tcsh) shell with a tty, Quickplot program will connect a Quickplot shell to the tty and give you an interactive Quickplot shell after running the input tty command.  The --no-pipe option keeps Quickplot from reading the standard input as graph data so that it can be read by the Quickplot shell.  The Quickplot shell will be started after all the command line arguments are applied, so the shell command graph zoom 2 1 -.5 0 is applied to the graph that is showing after the all the command line arguments are processed.  Type help at the Quickplot shell prompt.  If you would like Quickplot to save your Quickplot shell history between sessions just create a .quickplot_history in your home directory with a command like `touch ~/.quickplot_history'.

GTK+ OPTIONS

The following GTK+ options are parsed by the GTK+ APIs (application programming interfaces), which Quickplot uses:

--class=CLASS Program class as used by the window manager
--display=DISPLAY X display to use
--g-fatal-warnings Make all warnings fatal
--gdk-debug=FLAGS Gdk debugging flags to set
--gdk-no-debug=FLAGS Gdk debugging flags to unset
--gtk-debug=FLAGS Gtk+ debugging flags to set
--gtk-module=MODULE Load an additional Gtk module
--gtk-no-debug=FLAGS Gtk+ debugging flags to unset
--gxid-host=HOST
--gxid-port=PORT
--name=NAME Program name as used by the window manager
--screen=SCREEN X screen to use
--sync Make X calls synchronous

Keyboard Short-cuts

Quickplot has GUIs for all of the following immutable keyboard short-cuts:

a show information about Quickplot using a web browser
b show/hide the button bar
c copies the current focused main window so long as it is not maximized or in fullscreen
d delete the main window.  This will not close the last main window.
e toggles the visibility of the main window border
f toggles full screen viewing
g show/hide the graph detail widget
h show help using a web browser
i save a PNG image of the graph
m show/hide the menu bar or do nothing if there is a globel menu bar
n make a new graph
o open a data file
q quit
r toggles the between drawing with Cairo and X11
s show/hide of the status bar
t show/hide of the graph tabs
u show/hide of all GUIs
w makes a new main window
xtoggles the X11 shape extension on and off
z zoom out one level
Z Zoom out all the way
esc close the current focused window.  This will not close the last main window.  If the current focused window is in full screen this will change it to non-full screen.
left/right arrow the right and left arrow keys cycle though graph tabs when the buttons and tabs are not showing
@FOOTER_HTM@ quickplot-0.10.6/repo_version.sh0000755000175000017500000000050112245046430013577 00000000000000#!/bin/sh if test -z "$2" ; then echo "Usage: $0 REPO_VERSION_FILE SRC_DIR" exit 1 fi ret="`(svnversion) 2>/dev/null`" err="$?" if test "$err" != "0" ; then if test -d "$2/.svn" ; then echo "unknown" else cat "$1" fi elif test "$ret" = "Unversioned directory" ; then cat "$1" else echo "$ret" fi quickplot-0.10.6/configure.ac0000644000175000017500000002440312245172700013023 00000000000000# Quickplot - an interactive 2D plotter # # Copyright (C) 1998-2011 Lance Arsenault # This file is part of Quickplot. # # Quickplot 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. # # Quickplot 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 Quickplot. If not, see . # # require autoconf version AC_PREREQ(2.59) ################################################################# ############### Configure a release here ######################## ################################################################# # AC_INIT( PACKAGE, VERSION, BUGREPORT, TARNAME , URL) AC_INIT([quickplot], 0.10.6, [http://quickplot.sourceforge.net/], [quickplot], [http://quickplot.sourceforge.net/]) # LIB_VERSION=LIB_CURRENT:LIB_REVISION:LIB_AGE LIB_CURRENT=0 LIB_REVISION=1 LIB_AGE=0 # # See LIB_VERSION notes at the very bottom of this file # ################################################################# ############## END: Configure a release here #################### ################################################################# # Stuff that may be configured to change constants that # get compiled in. NUMBER_OF_PLOTS="12" # default number of plots at startup # if auto scale is set this is the factor that the span of the # plots values may differ by to be on the same scales SCALE_FACTOR="50" DEFAULT_GRID_FONT="Sans 10" ################################################################ # setting many variables before AC_PROG_* ################################################################ #AM_INIT_AUTOMAKE(option1 option2 ...) AM_INIT_AUTOMAKE(dist-bzip2 dist-xz) AC_CONFIG_MACRO_DIR([m4]) AM_CONFIG_HEADER(config.h) AC_PROG_CC_C_O AM_PROG_CC_C_O AC_PROG_LIBTOOL AC_LANG(C) ################################################################# LIB_VERSION="${LIB_CURRENT}:${LIB_REVISION}:${LIB_AGE}" ################################################################ # initialize the error flag error=no AC_ARG_ENABLE([developer], AS_HELP_STRING([--enable-developer], [if you wish to build and edit Quickplot source image\ files and Quickplot documentation files enabling this option will add\ addition make file targets which are built using the programs lynx and\ the ImageMagick program convert. This option is required if you are\ building Quickplot from the repository source.\ (default is no developer targets).]), [enable_developer="$enableval"], [enable_developer=no]) USE_LYNX=no USE_CONVERT=no if test "$enable_developer" != "no"; then USE_LYNX=yes USE_CONVERT=yes AC_CHECK_PROG(HAVE_LYNX, lynx, [yes], [no]) AC_CHECK_PROG(HAVE_CONVERT, convert, [yes], [no]) if test x$HAVE_LYNX != xyes; then error=yes AC_MSG_WARN([ lynx is required with --enable-developer homepage: http://lynx.isc.org/]) fi if test x$HAVE_CONVERT != xyes; then error=yes AC_MSG_WARN([ convert from ImageMagick is required with --enable-developer homepage: http://www.imagemagick.org/]) fi fi AM_CONDITIONAL([USE_LYNX], [test x$USE_LYNX = xyes]) AM_CONDITIONAL([USE_CONVERT], [test x$USE_CONVERT = xyes]) AC_CHECK_HEADERS(math.h) AC_CHECK_FUNCS( vsnprintf \ powl ) m4_include([ax_lib_readline.m4]) AX_LIB_READLINE if test "$ax_cv_lib_readline" != "no"; then readline_LIBS="$ax_cv_lib_readline" AC_SUBST(readline_LIBS) else AC_MSG_WARN([ libreadline version >= 6.2 is required homepage: http://tiswww.case.edu/php/chet/readline/rltop.html]) error=yes fi #AM_CONDITIONAL([HAVE_READLINE], [test "$ax_cv_lib_readline" != "no"]) PKG_CHECK_MODULES([gtk_3], [gtk+-3.0 >= 3.0.12], [], [error=yes AC_MSG_WARN([ gtk+-3.0 version >= 3.0.12 is required homepage: http://www.gtk.org/]) ] ) PKG_CHECK_MODULES([sndfile], [sndfile >= 1.0.5], [], [error=yes AC_MSG_WARN([ lib sndfile version >= 1.0.5 is required homepage: http://www.mega-nerd.com/libsndfile/]) ] ) ################################################################ # --enable-debug ################################################################ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [compile more debugging code into quickplot and libquickplot\ (default is no debugging code). You do not want this unless\ you are developing quickplot. This is unrelated to debug compile\ options. Adding this option makes Quickplot become Slowplot.]), [enable_debug="$enableval"], [enable_debug=no]) case "$enable_debug" in y* | Y* ) debug=yes ;; * ) debug=no ;; esac ################################################################ # test for gnu/lib-names.h ################################################################ HAVE_GNU_LIB_NAMES_H=no # This is so we can see if the file gnu/lib-names.h is present and # works so that we can make the libraries executable. See that this # compiles will be a good enough test. Used in # libquickplot/lib_main.c AC_MSG_CHECKING([if gnu/lib-names.h is present and works\ so we can make libraries executable]) # Below the real code requires a "const char my_interp[] __att.... " # etc, but I don't know how to make a '[' in an autoconf string. AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #ifdef __i386__ # define LIBDIR "/lib/" #endif #ifdef __x86_64__ # define LIBDIR "/lib64/" #endif #ifndef LIBDIR # error "The compiler did not define __i386__ or __x86_64__" #endif const char my_interp[] __attribute__ ((section(".interp")))= LIBDIR LD_SO; int main(void) { /* do something so the compiler does not give a warning */ char *ptr = (char *) my_interp; ptr += 1; return 0; } ]])], [AC_MSG_RESULT([yes])] HAVE_GNU_LIB_NAMES_H=yes, [AC_MSG_RESULT([no])], [AC_MSG_RESULT([CROSS-COMPILING])] ) AM_CONDITIONAL([HAVE_GNU_LIB_NAMES_H], [test x$HAVE_GNU_LIB_NAMES_H = xyes]) ################################################################# # AC_SUBST() go into Makefile.am files and other .in files # AC_DEFINE*() go into config.h # replace @STYLE_CSS@ with the file style.css STYLE_CSS="${srcdir}/style.css" AC_SUBST_FILE(STYLE_CSS) # replace @FOOTER_HTM@ with the file footer.htm FOOTER_HTM="footer.htm" AC_SUBST_FILE(FOOTER_HTM) RELEASE_DATE="`${srcdir}/release_date.sh ${srcdir}/RELEASE_DATE`" AC_SUBST(RELEASE_DATE) AC_SUBST(DEFAULT_GRID_FONT) AC_DEFINE_UNQUOTED(DEFAULT_GRID_FONT, "$DEFAULT_GRID_FONT", [The default font used when drawing the numbers on the grid]) AC_DEFINE_UNQUOTED(LIB_VERSION, "$LIB_VERSION", [Quickplot Library version number]) AC_SUBST(LIB_VERSION) AC_SUBST(LIB_CURRENT) AC_SUBST(LIB_REVISION) AC_SUBST(LIB_AGE) AM_CONDITIONAL([QP_DEBUG], [test x$debug = xyes]) if test x$debug == xyes ; then AC_DEFINE_UNQUOTED(QP_DEBUG,[1], [If QP_DEBUG is defined we add extra debug \ code to quickplot and libquickplot.]) fi AC_SUBST(SCALE_FACTOR) AC_DEFINE_UNQUOTED(SCALE_FACTOR, $SCALE_FACTOR, [Factor switch plot values may differ to be \ on the same scale when auto scale is selected]) AC_SUBST(NUMBER_OF_PLOTS) AC_DEFINE_UNQUOTED(NUMBER_OF_PLOTS, $NUMBER_OF_PLOTS, [The default maximum number of plot per file]) AM_CONDITIONAL([IS_SVN_CO], [test -f .svn/all-wcprops]) AM_CONDITIONAL([HAVE_LOCAL_SCREENSHOTS], [test -f screenshots.html.in]) ################################################################# # We show all warnings to the user before erroring out. This # beats having the user fix one error in order to get to the next. # Instead we show all the warnings (errors) that we can. if test x$error = xyes ; then AC_MSG_ERROR([ Failed to configure quickplot version $VERSION. See above WARNING(s). ]) fi ################################################################# AC_CONFIG_FILES( Makefile quickplot.pc footer.htm about.htm help_head.htm help_tail.htm index.htm quickplot.1.head quickplot.1.tail quickplot_shell.1 ) AC_OUTPUT # you can add spew here AC_MSG_RESULT([ ------------------------------------------------------------ done configuring: $PACKAGE_NAME version $VERSION ------------------------------------------------------------ extra debug code: $debug extra developer targets: $enable_developer C Compiler (CC): $CC C Compiler Flags (CFLAGS): $CFLAGS C Linker Flags (LDFLAGS): $LDFLAGS Installation prefix (prefix): $prefix srcdir: $srcdir ]) ###################################################################### # LIB_VERSION notes ###################################################################### # Updating library version interface information # (from libtool version 1.4.3 info page) # GNU LibTool library interface numbers # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that # this library implements. In other words, the library implements # all the interface numbers in the range from number `CURRENT - # AGE' to `CURRENT'. # # # 1. Start with version information of `0:0:0' for each libtool # library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are # unnecessary, and only guarantee that the current interface # number gets larger faster. We do it just after a release. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public # release, then set AGE to 0. # quickplot-0.10.6/shell_common.c0000644000175000017500000006316012244565775013404 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "debug.h" #include "list.h" #include "spew.h" #include "term_color.h" #include "shell_common.h" #ifdef DMALLOC # include "dmalloc.h" #endif # ifdef HAVE_READLINE_HISTORY #define HISTORY_FILENAME_POSTFIX "/.quickplot_history" char *history_filename = NULL; int added_history_length = 0; # endif #ifdef HAVE_READLINE_HISTORY void Save_history(void) { if(history_filename && added_history_length) { if(added_history_length < 0 || added_history_length > 2000) added_history_length = 2000; append_history(added_history_length, history_filename); history_truncate_file(history_filename, 2000); added_history_length = 0; } } static inline int Has_Space(const char *s) { for(;*s;++s) if(isspace(*s)) return 1; return 0; } static inline void Add_history(int argc, char **argv, size_t maxlen) { int i; size_t len; char *buf = qp_malloc(maxlen + 1); /* We write packed version of user_line * into history */ len = sprintf(buf, "%s", argv[0]); for(i=1; iname; ++c) { size_t space_len; char space[MAX_NAME_LEN]; char args[MAX_NAME_LEN]; *args = '\0'; space_len = max_name_len - strlen(c->name) + 2; if(c->args) { space_len -= (1 + strlen(c->args)); snprintf(args, MAX_NAME_LEN, " %s", c->args); } snprintf(space, space_len, "%s", " "); fprintf(file, " %s%s %s%s\n", c->name, args, space, c->doc); } putc('\n', file); } static inline void print_wgp_doc(FILE *file, char *sub_com) { char spaces[64]; ASSERT(strlen(sub_com)+1 < 64); snprintf(spaces, strlen(sub_com)+9, " "); fprintf(file, " %s%s%s NUM set the %s you are acting on to NUM. If NUM\n" "%s is not given this will list the current parameters\n" "%s of the current %s", tur, sub_com, trm, sub_com, spaces, spaces, sub_com); if(!strcmp(sub_com, "window")) fprintf(file, ".\n\n"); else if(!strcmp(sub_com, "graph")) fprintf(file, " in the current window.\n\n"); else if(!strcmp(sub_com, "plot")) fprintf(file, " in the current graph.\n\n"); } static inline void print_node_help(FILE *file, char *node_title) { struct command **scom; int child = 0; fprintf(file, " ****************************************************************\n" " %s help\n" " ****************************************************************\n" "\n", node_title); if(!strcmp(node_title, "app")) { scom = sub_commands; fprintf(file, " app commands set parameters for all plots in all graphs in all\n" " windows. If you need to set parameters for a specific window,\n" " graph, or plot, use the window, graph, or plot commands.\n"); } fprintf(file, " The following %s commands are available:\n" "\n", node_title); if(!strcmp(node_title, "window")) { scom = &sub_commands[1]; print_wgp_doc(file, "window"); } else if(!strcmp(node_title, "graph")) { scom = &sub_commands[2]; print_wgp_doc(file, "graph"); } else if(!strcmp(node_title, "plot")) { scom = &sub_commands[3]; print_wgp_doc(file, "plot"); } for(;*scom;++scom) { struct command *com; size_t max_len = 0; for(com = *scom; com->name; ++com) { size_t nlen; if(child && !com->propagrate) continue; nlen = strlen(com->name) + 1; if(com->args) nlen += strlen(com->args) + 1; if(nlen > max_len) max_len = nlen; } if(!strcmp(node_title, "app")) { if(*scom == app_commands) { fprintf(file, " %sapp%s list all app parameter values\n\n", tur, trm); fprintf(file, " When opening files with %sopen%s:\n\n", tur, trm); } else if(*scom == window_commands) fprintf(file, " For all windows in the app:\n\n"); else if(*scom == graph_commands) fprintf(file, " For all graphs in the app:\n\n"); else if(*scom == plot_commands) fprintf(file, " For all plots in the app:\n\n"); } else if(!strcmp(node_title, "window") && *scom == graph_commands) fprintf(file, " For all graphs in the window:\n\n"); else if(!strcmp(node_title, "window") && *scom == plot_commands) fprintf(file, " For all plots in the window:\n\n"); else if(!strcmp(node_title, "graph") && *scom == plot_commands) fprintf(file, " For all plots in the graph:\n\n"); for(com = *scom; com->name; ++com) { size_t space_len; char space[MAX_NAME_LEN]; char args[MAX_NAME_LEN]; if(child && !com->propagrate) continue; *args = '\0'; space_len = max_len - strlen(com->name); if(com->args) { space_len -= (1 + strlen(com->args)); snprintf(args, MAX_NAME_LEN, " %s", com->args); } snprintf(space, space_len, "%s", " "); fprintf(file, " %s%s%s %s%s%s%s %s%s\n", tur, node_title, trm, blu, com->name, trm, args, space, com->doc); } putc('\n', file); child = 1; } } /* remove white space before and after * returns a pointer in string and modifies * the end of the string blanking white space */ static inline char *strip_white_space(char *string) { char *s, *t; for(s = string; isspace(*s); ++s); if(!*s) return s; t = s + strlen (s) - 1; while(t > s && isspace(*t)) --t; *++t = '\0'; return s; } static char *command_generator(const char *text, int state) { static int list_index, len; char *name; /* If this is a new word to complete, initialize now. This includes saving the length of TEXT for efficiency, and initializing the index variable to 0. */ if(!state) { list_index = 0; len = strlen(text); } /* Return the next name which partially matches from the command list. */ while((name = commands[list_index].name)) { list_index++; if(strncmp(name, text, len) == 0) return qp_strdup(name); } if(list_index == 0) rl_attempted_completion_over = 1; /* If no names matched, then return NULL. */ return NULL; } static char command[MAX_NAME_LEN]; static char *sub_command_generator(const char *text, int state) { static int len; static struct command *com = NULL; static int level = 0, child = 0; char *name; /* If this is a new word to complete, initialize now. This includes saving the length of TEXT for efficiency, and initializing the index variable to 0. */ if(!state || !com) { if(!strcmp(command, "help") || !strcmp(command, "?")) com = help_commands; else if(!strcmp(command, "graph")) { if(*text == '\0' || (*text >= '0' && *text <= '9')) { char *str; str = get_graph_nums(state); if(str) return str; } level = 'g'; com = graph_commands; } else if(!strcmp(command, "app")) { level = 'a'; com = app_commands; } else if(!strcmp(command, "window")) { if(*text == '\0' || (*text >= '0' && *text <= '9')) { char *str; str = get_window_nums(state); if(str) return str; } level = 'w'; com = window_commands; } else if(!strcmp(command, "plot")) { if(*text == '\0' || (*text >= '0' && *text <= '9')) { char *str; str = get_plot_nums(state); if(str) return str; } level = 'p'; com = plot_commands; } else return NULL; len = strlen(text); } /* Return the next name which partially matches from the command list. */ while((name = com->name)) { int cmp; cmp = strncmp(name, text, len) == 0 && (!child || com->propagrate); ++com; if(cmp) return qp_strdup(name); } if(level == 'a') { child = 1; com = window_commands; level = 'w'; return sub_command_generator(text, 1); } if(level == 'w') { /* graphs are children of windows */ child = 1; com = graph_commands; level = 'g'; return sub_command_generator(text, 1); } if(level == 'g') { /* plots are children of graphs */ child = 1; com = plot_commands; level = 'p'; return sub_command_generator(text, 1); } com = NULL; child = 0; rl_attempted_completion_over = 1; /* If no names matched, then return NULL. */ return NULL; } /* set buf to the first word in rl_line_buffer */ static void find_command(char *buf) { char *s, *e; size_t len; for(s = rl_line_buffer; isspace(*s); ++s); if(!*s) { buf[0] = '\0'; return; } for(e = s; *e && !isspace(*e); ++e); len = e - s; if(len > MAX_NAME_LEN-1) len = MAX_NAME_LEN-1; strncpy(buf, s, len); buf[len] = '\0'; } static int has_sub_command(char *com) { struct command *sub; if(!strcmp(com, "help") || !strcmp(com, "?")) return 1; for(sub = help_commands; sub->name; ++sub) if(!strcmp(com, sub->name)) return 1; return 0; } static int count_words(char *last_char) { char *s; int count = 0; s = rl_line_buffer; while(*s) { for(; isspace(*s); ++s) *last_char = *s; if(*s) ++count; for(; *s && !isspace(*s); ++s) *last_char = *s; } return count; } static char **qp_completion (const char *text, int start, int end) { /* If this word is at the start of the line, then it is a command to complete. Otherwise it is the name of a file in the current directory. */ int words; char last_char = 0; words = count_words(&last_char); rl_attempted_completion_over = 0; if(words == 0 || (words == 1 && !isspace(last_char))) return rl_completion_matches(text, command_generator); find_command(command); if(!strcmp(command, "exit") || !strcmp(command, "quit")) /* We do not need command completion. */ rl_attempted_completion_over = 1; else if(has_sub_command(command) && (words == 1 || (words == 2 && !isspace(last_char)))) return rl_completion_matches(text, sub_command_generator); else if(strcmp(command, "open")) // Not open rl_attempted_completion_over = 1; return NULL; } void qp_shell_initialize(int use_readline) { struct command *c; #ifdef HAVE_READLINE_HISTORY if(use_readline) { char *env; env = getenv("QUICKPLOT_HISTORY_FILE"); if(env) history_filename = qp_strdup(env); else { env = getenv("HOME"); if(env) { history_filename = qp_malloc(sizeof(char)* (strlen(env)+strlen(HISTORY_FILENAME_POSTFIX)+1)); sprintf(history_filename, "%s" HISTORY_FILENAME_POSTFIX, env); } } if(history_filename) read_history(history_filename); } #endif max_name_len = 0; for(c = commands; c->name; ++c) { size_t len; len = strlen(c->name); if(c->args) len += 1 + strlen(c->args); if(max_name_len < len) max_name_len = len; } sub_commands[0] = app_commands; sub_commands[1] = window_commands; sub_commands[2] = graph_commands; sub_commands[3] = plot_commands; sub_commands[4] = NULL; /* Check that coding assumption is good. * This check is not needed at non DEBUG time given that * the commands array is constant. */ ASSERT(max_name_len < MAX_NAME_LEN); #ifdef HAVE_LIBREADLINE if(use_readline) { /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = "quickplot"; /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = qp_completion; } #endif } /* Returns 1 if there was a client_side_command * Returns 0 if there was no client_side_command found */ /* this does all client side commands except exit and quit. */ int process_client_side_commands(int *argc_, char ***argv_, FILE *in, FILE *out, size_t line_len, char **history_mem #ifdef HAVE_LIBREADLINE , int no_readline, int *use_readline #endif ) { int argc; char **argv; argc = *argc_; argv = *argv_; *history_mem = NULL; #ifdef HAVE_READLINE_HISTORY /* We add to the history whether they are using * readline or not in case they switch to using * readline after not using it, by switching input * to a tty. */ #define DO_HISTORY() \ do { \ char *new_line; \ *history_mem = new_line = qp_strdup(h->line); \ fprintf(out, "%s\n", new_line); \ free(argv); \ line_len = strlen(new_line) + 1; \ argv = get_args(new_line, &argc); \ *argv_ = argv; \ *argc_ = argc; \ } while(0) if(argc > 0 && **argv == '!' && ((argc == 1 && argv[0][1]) || argc > 1)) { /* This block adds the !NUMBER history stuff */ char *num; char *endptr = NULL; int hist_num; if(argv[0][1]) num = &argv[0][1]; else num = argv[1]; hist_num = strtol(num, &endptr, 10); if(*endptr == '\0') { HIST_ENTRY *h; if((argv[0][1] && argc > 1) || argc > 2) { /* We do not tolerate having extra arguments */ fprintf(out, "Bad history command: "); spew_args(NULL, argc, argv, out); return 1; } h = history_get(hist_num); if(h) { DO_HISTORY(); } else { fprintf(out, "Command number %d not found in history\n", hist_num); return 1; } } else if(argv[0][1] == '!' && argv[0][2] == '\0' && argc == 1) { HIST_ENTRY *h; h = current_history(); if(h) { DO_HISTORY(); } else { fprintf(out, "No history found for: "); spew_args(NULL, argc, argv, out); } } else { /* search history for match */ char *line; size_t len; HIST_ENTRY *h; int i; /* fix is it !argv0 argv1 or ! argv0 argv1 */ if(argv[0][1]) { argv[0] = &argv[0][1]; } else { int j; for(j=0;argv[j];++j) argv[j] = argv[j+1]; --argc; } line = qp_malloc(line_len + 1); len = sprintf(line, "%s", argv[0]); for(i=1; i= 1) { if(!strcmp("help", *argv) || !strcmp("?", *argv)) // help { if(argc == 1) print_help(out); else if(argc == 2 && (!strcmp(argv[1], "app") || !strcmp(argv[1], "window") || !strcmp(argv[1], "graph") || !strcmp(argv[1], "plot"))) print_node_help(out, argv[1]); else { fprintf(out, "No help for: "); spew_args(NULL, argc-1, argv+1, out); } return 1; } #ifdef HAVE_READLINE_HISTORY else if(!strcmp("history", *argv) && (argc == 1 || argc == 2)) { HIST_ENTRY **h; int i = 0; if(argc > 1) { char *end; int num; num = strtol(argv[1], &end, 10); if(*end == '\0') { if(num < history_length) i = history_length - num; } } h = history_list(); h += i; for(;h && *h; ++h) fprintf(out, "%s %s\n", space_number(++i), (*h)->line); return 1; } #endif else if(!strcmp("input", *argv)) { if(argc > 1) { change_input(argv[1], in, out); #ifdef HAVE_LIBREADLINE if(isatty(fileno(in)) && !no_readline) { /* setup readline */ *use_readline = 1; fprintf(out, "Using readline version: %d.%d\n", RL_VERSION_MAJOR, RL_VERSION_MINOR); } else { #endif /* setup getline */ #ifdef HAVE_LIBREADLINE *use_readline = 0; #endif fprintf(out, "Using getline()\n"); fflush(out); #ifdef HAVE_LIBREADLINE } #endif return 1; } else { fprintf(out, "reading input from file descriptor %d which %s a tty device\n", fileno(in), isatty(fileno(in))?"is":"is not"); fflush(out); return 1; } } } return 0; } quickplot-0.10.6/release_date.sh0000755000175000017500000000023012245046523013504 00000000000000#!/bin/sh if test -z "$1" ; then echo "Usage: $0 RELEASE_DATE_FILE" exit 1 fi if test -f "$1" ; then cat "$1" else echo "not released yet" fi quickplot-0.10.6/sample_plot.png0000644000175000017500000004213112244565775013601 00000000000000‰PNG  IHDRMZA˜°sBITÛáOàtEXtSoftwaregnome-screenshotï¿> IDATxœí½w%Çç÷Ë2ÏÛöÞ÷¸nô8 f €#@—»ÜÕCZžôøOÒ¥P¬bƒ2¡ÛàÅ)¤‹ÕiK  @ ƒÁÄ×ã0¦½7¯ŸweST÷›×ÝU¯_O¿ªWUŸ?:^WfUeVå·Òýò—èã«@ l UíÝaàŸý B¨Ú)!•çûÿú¿Eçð—ù—€1®fІPø¦ ‚°´´”N§÷ìÙãp8†¡( !TÅ>);§ðú~ö³Ÿ®ê¼¾¾>›ÍV!Q„ê‘ÉdBN§3 ú|>—Ë¥H½Úé"TžUcŒA¨nRÃq\>Ÿ—$IY–B4MÓ4­ZŸ×´…¯ùI}¾sdYVÚeÅïë\A žššJ§ÓcY– T/ªÄ÷x<½½½:¦ cI’xžç8Žçy§ÓY¨Ï ¥P0 %A9Ž¢(j÷Tþ·nÝŠÅbòPREùýþ#GŽTåDžç7¿šû:—e¹ ót:­4ç”K—øÊJ’Çãñx¡¬‚,Ë’$år¹ÅÅÅ\.—H$\.MÓ@ÀëõR%B"‘eYEEí€òx<@€a¥ò¯`­nÚú<º\®†††ÂsÐJj>Ÿ_\\\ZZ’$©*'r‡1f¦8κú\i¼€$I@ ¹¹Y9³ét:™L* ¿ A”+ÔÔÚ\x4H|6[^˜[ˆæ¶¸æ}èšãû‚¸ýÅÍhé“ʩߌ§8ÍPnú‹[ÝN§3—Ë---Åb1–e@ÅîîîÎÎN†a‰Äðð°Óé”$©P¥‚PWW·ÿ~‡ÃÁ²¬V;ßfð<ßÖÖÖ××·e÷vyyyii)—Ë)1?1“ÉȲ¬¼Í«:/4”ê^Ѽ(ŠÇ•¾G"‘ˆÇã’$­ÿØ GmÏà¾&wÑ!Úá 5v†—î܉pe}·×®¹öE«DÌJ]®<±?‰¯/ܨðw¡ü+§ÊM!ØívïÙ³Çí¾ÿ–R©ÔØØX&“Qtù|öîÝ[8%—ËÍÎÎf2™T*åñx”òTÁ*Ý´õ¹(в, ‚ÉdJÇ\YYYYYAQ]ENL&“·oß>xð Óé,¤çÚµkÝÝÝápxɹ\nóÇw£Î•­Ü£Ð1(Òö¡¸æGî¶}ûšÜB|flr>šÎ‹À¸|5Í=m!WÃÞ}™ÔÕélí|iyø“å­£’1–å-› ºÂÎï¸ó+ÇË}V¡BM陂–––R©”ÛíÎf³cžç•š<•J)#‘HD£Q‡Ã‘Ífiš¦(j—ÔçŠ4 Ý[­hʳUZ=ŠvŠOÌår ›Ïjllôx?55õþûï?~|hhhÉ<Ï‹¢¨ÙnWT]xg…#åçíjo÷ȱ»—¯ÍåVŸ‰”‰ÍÄãÙƒÇö„|ííþÙ¯c"Swèä`â7>½ )*:›"ÐÞúö޶†¿‡¥óéÈüäøÔrV’×j³B’‘³¾ÿà@‹äÔÔëãÉÀÁ“ƒ!Hßù[šj| ¤||aâÞØBFØtÊUÛÞÓÙ\pÑR>¹²056ÉË«‰|l xìI­«Ø`KwgK]pµGÃ¥ÑÈâÂür‚“µ®,*¹oêéël »iùtta.EÒLm~n©ÑÛoScmÐÃ"ÀBfenìÞä /£BO{C”O6ÇqÇÑ4­|¾•áºB ôÕ9Žs:,Ë ‚Pº_¾Îa­òS¢Ÿ877÷÷ÿ÷›Ïúþ÷¿¿oß>­oß¾}æÌžçñ‹_¼þúëýýýSSSo¼ñœ?^„ýû÷o8q³rïë\‰WH¨‚V…¢|·@Uç”·6Ìð cóiÃg"3?ºÐu´Åªq /ª£¢T„u£nïÑ¡–ûÍLäðÕw0‰O®D6\Šöµ ÞSǹsõælZƇüÝ{ük§Ó®Pë¾£ôÅðlN†õW Ü-ƒÇöÕÐ÷ãºkw¾¼V¹•«ƒÜ­ƒ‡úƒ÷%A;}5;šæ p?#›®,ån<º7¼:ŒJ9|u{êÔo½úÛß»¯Y@¬·®ó!þê˱TqÒ6|Ù•ø|>OÓ´RŸë¼ðõW¾J¥Á0LaøÝÞ#ðåè¼0Q­ô‰Õ7œ800àp8Þzë-øÃþpæÌ™BýßøÆÀÀ@4->QõFëóBÿ¼t}^йJLŠõ8 ͛ϖ3±´8ä5ea\|ŸâzŠëX¦¦w‹€Œ~=:ÍðÀx‚õ­mq}LÌÔô:Ô pzzøÊÝÕ¡€ÂeSS7nMDÒ"í­ïìð‡ûzC ×"ºúœ­éí¯¡§¦nÜœˆd ‘kV#óK—>>zê`bÃ_Z¾ßÙÔ¬Ø ã® €ÜÔ¥¯F⦗'ª­oªg$Y–E+[ÓÛ¦Ö’”•hO]×À`‡©<«µß ¬ŒÝº7ÍŠ”»®{h¨ÃëiiöŽ'ÝEÒñxcìt:EQ!N+G€çyY–óùüììl4Uªtš¦@aúý+vÓöÏ ¥}ËNZ! ÝNÔ*Å_ÒÍ'2 ÓÕÕõꫯ~ðÁ…N¾Ãáxî¹çúûûY–Ý|âúö5@Açn&Q:W…Çýü:’Ú3‘¤û¡kUT³øt(þh¬c¸©+WGâJl!¹<•Tú¤ÌjLp6î?üP‹ „Èí‹Ã“IqÃesã×ïÌ)õYbîÎuoýc=îp½óÒº{Շ钑5²)-|ù¾Jl8—â Öåî8úXC:“ãréØÊâüíK£.ñií$©<+å7?sõ꽨ò„…ñ‰ÎŽ ëfÖÊ@që]iÊ9ަ¦&¥l)•3Æxbb"™Lª eÂUéœË²œL&•A;‡Ã¡Œm6Ò°År-»âúoÉcš¦‡Y’¤7n×öª'*=óâ!tŠ¢º»»Ýn·ê‰›¿Gë:ëŪÞVÿ|]L)Ÿá Îå¹Ðl~£ÐiwØBŽ“d©Õ~Páàº:Šv1¦Uš kÕµ¿÷á‡|,€´üõõ‰87EÈ'²bát9›È¸'e¯»—“)YVéÏ—‹œ¹z×3Ô×àa\¾ Ë ×6µ÷íY¾ùù婌 W¦´“¤YŸg–üý+œaÕï/¸Ýîp8\ÂayyyddÄëõÆí‚Á`oo¯(®~AWVVâñx6›Íçó…šÜÆ:—e™çùÅÅÅÍqêëë].Wám¨–°,ûØcƒA%Çq£££Jw©Ä‰<ÏÏÌÌž9H’433Ã0Ìæ;*‹#ÃÞÿ†^w¡ß^Èsq§®ÐX –S +Bg«³µ¯qä«™\‘ÖyÚú[rb9-È2#ËÑ Â…n)ã­õ¨ô91Ÿ Öá »©Ùü¦1®ÕóS#——:ÞWC×?¿>Ÿ“×Gpú0Ç­¤œ~'9^’e´î^yÀ¡YP\(nåÞWgG—Ïçu»\n_m{{°¾¿Û?}-&i\YâsZIÒìŸË뚊RY .^æÀó¼b'S[[ët:)ŠZYYAñ<ŸN§•8±X,¿†RÉ€V/½¸a- Š$i~~þç?ÿùæ8¯½öZoo/^£ ºÂ‰Êï\.W¨™›ymMõDžç§¦¦”þ¹ÒKR†Kßyç—^z©¯¯oó‰°aÖ}Î Õ½rãâŏŽSq—@IPqãuùîH¢u°þàcGÝ7ïM/'²°žPcçÞ¾Z €ŸYÌI@.ÍC3ÔÝ]·rw)#³¾ºÎ‡;ÖÊnQ[T–$!>³Ä··9;Ê =Is˜ñ„;ºÂËÃ×Ö†¯d>z÷ÂyñØÉÁzwÛ‘“̵Ï.M¤$J‰àéÚ¿ro1%Ðþ¦þ¡^€¸2—à%‰-¾WbnElköôí‰_Yy>ÁK I’(wÈKÍG…ÕÇÁ6=öâ#uùò÷\вn`Žïäæfæ#±äJ"Šïëhº'­Œ{ª^YJÌ­ˆí«Iº·’XcßP¯§æâgUü»ðZ¨·Ô[¡ï†b†eYe¶¼¸ù&˲ ù|^™¶Ušú4Mo¾Z¡‚*îÀoèÌ›¼^º3»¡ù­Ô¨Näyþ­·Þ*β2gYâÄ[·n?^‰|êÔ©®®®ùùù÷Þ{>úè£h4Úßß_|¢¼6»Vœ¶íöâÈeL oh3¬þNÜûâ+ÏãÇ:½{Ž6îY¿tóóá%NÆr|b2ݵÇè}ä™MÖñ›Æá¸¥ë—'Ã':½ûiÜw?b$zu]«›\8'{ò`“£ièÉìgîF¼Ö^@Áž‡Oõe`åÖÍÅ|¡ \½W~áæÍ冃õÁÞ‡O¥LZ¾ys!¯äTÌDsÐàõô|± òÅo?/§1‘«¶¹­¶yCŽåèl\e¬qe!¿xóV¤a¨nC’TŸ¨%cûB§lƒ8‹ ^3’ÏçóÊÀ»(ŠŠà•Žz¡ª)T;Ê¥ ãó–hêW˵µµßþö·7Çill,|ŠŸøòË/o÷Ä–––C‡}õÕWO=õTOOÇãiooñÅÏ;788ØÛÛ»áD…RõyaŒaC»}Å­¯âl_)5uñôÊLÏÞÞŽ¦º ›Y}‡ÒòðÇŸÆ×ê(Vnžÿ£|h°§)à@€…Lt~b<ÑòðCáÍcK@vöÒ‡§öìëmo¬ñ9(À\b~üö…|Qm,I’R|äÂGâ±SG[µûŸx‚ýã'×V”±›W#µ= 'R62ùõÕë  ¨ºS®ùìtvïྮ¦°›r±…‰Û×ïÌeÖ²)ÅG‡Gî ¯©¨%XiþËs—zº;ZkNÄ|"2;zëÖDZÄšW–@JÜûì,?xð@W½‡Ì%§ÆVê ¨<+Õd¬Ï`aø­.Õét¥ ÌÌÌ8Š¢ƒèåååT*¥œ¢ÄY\\ŒÇã,Ë*Fï.—kïÞ½Šì'''•áúBATtÞßßïóù6 Ñ›¼>WÊ9Ã0 öÄã‚Âèõzûúúxžïîîv8Š LWWW,ëíí ƒñx¼øD¥1µ¡>G_xãgóÃþ0‰Äb±ÂzµššŸÏ§4* ³h›ÓÇq\,EqÿþýÚO ±µž—ËñŸOùìÇQ×y}}}¹ èÜížb(Üô‡o¼QíD˜ 䊗ÂßBEQÊMÓ›gƒDQäy^©®•2ºaxI™A¹˜^çJ¿z[(J3þD·Û-IR)æî;aWQlQl'Wø[°˜,Œ™€ÒVWJNa¥£b3[4ÏóJ„ÂGA‰ ”$©¸w@Ø .—+ŸÏox’u¾²²b`’ÖC™°Éf³¢(R¥‡?+«xe)›3™L*ýsQ•.¥²¦°†è|ç¸\.ŽãÔן¸{÷®I"X•éééÂï™™™Í–––J_!‰T8Mx饗6w‚6ê>šP?ÿ¯Ÿxºðû'çÏV,]&†d¹Š)1›å÷™.õãv^-L ˆÎ ûCtN Ø¢sÁþö‡èœ@°?Dç‚ý!:'ìÑ9`ˆÎ ûCtN Ø¢sÁþ¨¬c)¶ì×¢œ86ƒdÙöØ ¿g§Õ—âúœ@°?Dç‚ý!:'ìJÿ\kµ½ÍVä—ÉrSb 6Ë/ñ3A ì^ˆÎ ûCtN Ø¢sÁþ¨ŒÃéÃázáØ7)DÀÛŸþÚ˜›ºb¡RmP}~rà1åq¶ÁB¥ÚˆTv5v¼Áh’ìôB°Ö*պ뜡˜¡¾ƒ2–/ܺ ÷½c°\©Ö]ç'¥ukâ/’ 6Ár¥Z_7…›ê‚u™|vdöž®7" Ê¥ZGSï;€/Üú£~w!ŒÄ¢¥ZGÛÿC3S‹S©lJ¿»FbÑR­—ÎkýµÍµ-‚$\½ªÓ-ƒ±n©ÖKç8€.ݹ²¬Ó-ƒ±n©ÖËÎÉ:àÄG7½zò50½ý°ë–jkXó„ W}®úa3ù7@(uK5©Ï ûCtN ؃֥*˜¼mC <–(Õ¤>'ìÑ9`ˆÎ ûCtN Ø¢sÁþö‡èœ@°?Dç‚ý!:'ìÑ9`ˆÎ ûCtN Ø¢sÁþö‡èœ@°?†®?'LÈOÿóQå+Ú*ôý­±ÉÑ¢sc˜Á2Rþ’PU“U1ˆÎ »·,õð©>ÙváWHRR€•€Â0 ’SwÁg@²²æ‰Î »…‚¶;„TÈ)Jv8¥§ Àg—Î. ˆwúï8ƒwœÁå0*Ƀèœ`gTµý°XÞ“OìÉ'^Xb]w¡;Îà´Ã÷€—3¢s‚Ý`±Ü.¤»ùtŸnÒôƒj[‹!ß ,œÌ,ÄhçgðŽ+8éð›¼UOtN°•ª··EXâNd—Nd—DDM9|wœÁ¯¡mÆV=Ñ9ÁªTEÛª0Xîá’=\òE˜VZõ£Nÿë—‘Y*y¢s‚•лM¾s ­úí¸ç ÞqDZڂ':'˜ƒ´H@0…ÁŽn”øÂXý˜3pרâX=Ñ9ÁŒÐ&ÏSô”ÃWÓì|ä,ç EýäüÙâa‰ÛË%Ƹ@Ÿ¦ðƒoxÎbyo>¾7 ZCwDç„jÂŽü¨ø_ p¡.øžÿ•½¢íIÖ?æð/0n¡}iEŽÑÎ ž† ž,vóé=\|—pÉâN–¸OÿWpÂd@òzµëdfKtN04È:5È%„fYß„Ã7îðM³>m{íV–bnºB7]!ã>¹—Kôs‰ Äï$U0«xB’Î+ʈΠUf0Þagx;×¶*"BwÁ»Î 4 Ù=|b_>Ñ"fÑξP4ÆÈ•J¤*Dç„*S)‘ë¤m-XÏëùÄÛì•Å~.±—KôòI§\ÊŠ¶0²¨[­NtN¨&4È;ùæþvÓV&Š¹ê®½ê®EÍBv/ŸØÃÅ›…Üv+y„u\GtN¨¸Øäö[¼×ÛåƒæXÏë9ëm®ó{¹Ä.Þ!dw2V_)ˆÎ Õ!(ñ¯$&ÿÏò"›VÛZDW„q}æmta©?Ÿ8š_éæ’¥OÁz¶EˆÎ U€Âøõä¸k«Þì”Ão!m«’Gt”qÖ ¹ÒÑ0 ý:ç@tN¨ Oe:¹´V¨„ újö™*=ÌÇ^KL0%›îÞ†±Dç£éá“O¥çµBeý'“¼œ>‘]*M$êßT!:'ŠO^OLÆ¢¼Þâ-Æ8ÿCí~ÑÕHZ%a±üÄÄ|lsPq–¿ôÖÿÞ×nÀ4Ñ9Á8ÀkÉIŸ$¨†Êˆúe¨‡³¾Èƒ’ðçñ‘&!["ŽŒÐûþ¶ žc’DtN0ŽÙ¥>.¡zÖ×<ËxŒL´Ù?úKZÅæ)úŸCÝ÷AÃREtN0ˆf!û|jF+tÌ8ïm22=z°/=9á(9`ÿê[d܆¥ ˆÎ ÆàÄÒ÷ãZ+UÒ4ûV Ët.#¶ÉÓ™ù§Òó¥ÍàfYïáÞ4Å–*¢s‚¼š©óªA¡·]iÚè¢_A(_NNÉFJG»î®y;ÐUß2DçÝÊGKhà wý=gÀÈôT–þ4>Ö³•¹ÛÇþ–½ÍÕj³ô¥FÊ¿œœÒ g=ÚŒLOe©¹¿ˆh5UDDý:ØuÃ6,U›!:'è ø»qÍq)Ž¢ê1¹çótóé?ºKz˜ÉÐÌ?{§>ÃR¥ Ñ9AGN¥æZ…ŒVèüíQÚidz*È¡ÜÊ·““¥}à,³® õÅLG¢s‚^ôðÉ'²‹Z¡×\5—ݵF¦§R”iÐ:æ ¼êÉ›Ãì‡èœ  ì[7cœï; NRE(aÐZŒa­eBtN¨÷n\èo†òÑcÚ 9S-{3ÝF¦ÇBX·TëUŸK²OÅæcó‹±å — ºü½m}mum4¢xìôÅtº/¡4u"WÂÔë¡÷02=Öº¥Z/¿ûÇßÿKÇ.Þþ*Û™ÝÓ¾Çë2Åš§]ƒñ÷´½sýf¨ûGf³Š1Ö-Ն޵ŒÌ`2R¾‘šiÔž-ÿ¿=J»ŒL=°D©6Tçíõ­ J¦±°+¸ØqínùUwíUÓxƒ²–(ÕÆéÜápè€Ñ…QÃnJP‹Ü+ ÍnùëúmÀ,Þ ¬…UJµAv2NÆñÜ‘çhŠNçÒ_OÜ2æ¦ðŸ$Æ]>Dý2ØË#2[¾m,TªÐ¹Ïí{úàÓ4Ãp÷Ñ°å— XŽçS³­BF+ôwŽ%†tË·µJµî:¯ Ö>>x’B/ðg.}(›ÛœÀ~ìÏÇK¸=¾ê®5“f a¹R­¯Î;š»÷Bqwæò¼é‡ÍIü«É ¤á€%¸~h78I6ÀŠ¥ZGv=Ô×Ú馱ö IDAT²|îÃËøæÙ äïÅÇ\³å"¢Þ õð»xë‚â¥Z/ß¼¹¶™Ä¹+i;%"èų©ùÝòßûÛ–·‘é±Ö-Õº­c©mQ~½ÁoŸ|mC臗N§sinM€½\âñì¢Vè5wíEO½‘é±Ö-Õd6ņ%þµD©nù»¤[¾ËЫ>ûÓ_ëteBi(Œ_OŽkí,"ê¤[þ X·T“úÜn<™ïä4[ø[I·|÷Atn+ú¸ä™­Ð[®ðdSÁ] ѹ}ðËüw´gËcŒóÓliL0¢s›@aüÝø¸WTC%„~êÉ#âös—BtnžÌÌwñšÝòÓ¾V“liL¨ Dçv ‡OžÒî–í _ð6™‚Ù :·<>Yx]{¶<Î8ßvšxÂ[¥[îÓî–ÿ"Ø'³å»¢sks2»ØÍ§´B?òµÎ²¦Ù·œP=ˆÎ-L7Ÿz:=§zÇúŒtË @tn]<²øzb‚Òì–;~è"Ýr‚ѹ%A¯'&ü¯*#êWîñÄNXƒèÜ’<žYìãZ¡g}M“SoD0¢sëÑÁ§ŸÕî–8ƒç½ÍF¦‡`~ˆÎ-†G¿›§°º/“íøUtË !:·àµÄDP³[Žþ9Ô¡ˆ;a#DçVâDfqv·üœ·i‚%Ýr‚ Dç–¡]È|C»[>ê œóµ™‚… :·nYú“ĘV·åðŸ!ÝrBÙ›—,}/1®Õ-ÏRÌ/CÝ2B§Š`]ˆ-ôœú‡Õ]GÏH{7‡>Ûs§‚÷bG~¤ü@ ÿß›Dþcÿ`µ[Þ¤*<[~fl5wŽÉû»¬²\Ùlîr Z5Ñy¹ F¥Å€% tæ¦ky‰€ ž†»Î€^÷F SF „0Æ0°ANH8õºé.„ÂPÖ½DÑy9`„eJ‚Â{@€( º¼X«¹ó¬ç´¿µòw]»7be|¿7€Â0týëëÏË.nÙÃ-¹øˆ›_vK9RxÊ!ìhÌzºRîÎúßûÖ‡é[¢È«Ú™’áõï#ZÆbåG7¼*­Íä(æŸB}èÕ-G´¬T㪡´C¤[Ó®Öû[¾)–xøe¿ìá–]|ĭDZ4ŽÚ¼§+åîLºÛS´[}§ê5ô*Q Dç¥ÀH–išðt š"€_»º±o3G¬_`ý o÷}ƒ\1Íò7q qç<»PùΦŒ§+ånK»ZÒ´§´¶×£ç¸*Ñy)Æö}ù$j3æ^a‰ã5–£€„Ð]§ÙgËŸÀøOWRù‹·ìVùü’;qKi{.¶¡Ý¢»#åéJº;SŽš|µ“£ѹ&Á•™®€†Î+Ú•Rü·þ“F($0ªÙf@#»š3®æLሔcøe7·ìæ—Ýܲ‡_vɼUÒR¬ìjOy:SîΔ³1‹T}Û‚ŒÃ«%Sÿ€fŠ¥JjâáÜr»ön§¢!SåX¢¥Ù ¨J½çÌüo¾#¬Œñãu95Ý|…Ý-wgÒÝ•rµ¤)º’ÒIJŽo™è\Æ'4g„b4ß"© %r'„%î›É­P)Ó/úƒ b#}Õ¾¤d®èiÊHïI¦m;sžNe8-M9$]nƒ bäæ×GŸú΄€%ª‚¯¼’œb5zæ2 Ù‘+` $€V¦Ðe,¯éÐ@(Œ( ¨‚_Ò€ sž®”§3áîHmo8íÁÐSä@t¾™†'‹»”ÿËÿû{åÇd2É›µ‹ïvWðvGr‘nnuàJ±x+ "ê?Ôî0® ÞN‹B ù¯Ÿxºpð'çÏ*?¨ÿã°£>ï¬Ï:êsÎúœ£>·Õ,ÑÁˆ,­sÚ'x:“žÎ”»+ÅÔ— îŒBø¯þîçËhügCºR¯£æñùÀÀŠVhv*°øÛ® Þ. ßHi¶Ø?ñ6#ò-‘y:?ëÍÏÞßz•rÊl8ç¬Ë;š²Îºœ³!G{4[@…2¢íι2Ñú©xÝ\<<ßóø|ů/$œÙñ`vÂÏÍ{Úÿå-Ú©ÒìOß ë=At~oo²æqM‡ªBŠ]üMweÛW/'&]²zoÎá9ïmªà½*‹ÌQÜ‚—[ðÂZ@³aÎQŸsÔçœõyg}– qhgBEåZweFv·¥=)WgòÂÞÑûöªÂ%ŽÎMùs“þìd€¸•±†ÀàŠªÈ 9\W™kCt¾Š£6ßøíQ­¢IÉô¯ûÄŠ~t‡òQ-gì2¢Þ tZhEƈºø¨ î„•#ˆ‘u9g}ÞQŸUÚü%†<ÔAØÓ›ÈŽVÆjQØÙ”õt&ÝIW[†bÖDPeÞ©,Rùon2 p žÍƒçÁÃ˪' QWvR· kбåOîi}n ýÃO07QÁ;ú$áŤæòòO½ Œ§‚·3,®UøP«A4fÃyWS–­Ë;ërΦ̖ʯ;5;=xð‘@ {:R®¶´»-ínK#¦Âó²Håg|Ù‰@vÂÏ/z°öÀ¡³)Sl2\LüJ½“ Dç€n|yœ i6ÚZÇëº&*xÓo¥§=²úPÖãþØgñ„øˆ›¸ GØ ‡E  «;ë³Þ}ñôíð¶nÄ9wgÊÓ•rw$·Ýˆ(nÅ›ä&ýÙ)¿œ/ËÎ'x0¢z\©ÔÚŠ¦N¢s¨{nºØH{µK½·WöޏØ@NÝ!”ŒÐÛÁNý«˜ !áTÆ;° ˆU¯ÔjŸšIß m9,Â9OwÒÓ•tµ¥+¯mŒò žìd 7áÏÏy·kÃG9$ÿ@T5(ýu1Ëþv»Îƒ‡#¡£KZ¡ÞT;áS•5uËÒ·š-ö/< ³¬W+Ô~æó^˜ RéÁ:Â\p(’¸Z¯ü»ÎI@xÕŒhÃMئ±ÆðJËg§gssÞÊNºš3ÎÆ¬jPr¸¡‚7*Í.Õù–Æ­‘s­ÙÑ T´ruañ•¤fóᢻnܱ«w5Žþ±90´B±*MÜð‰…äp½,Pp߯ŽÀq‹žÜ¤ÿåÐÓÁX%1›Ñ¦y`´¦ÓdN2§°+uŽ ñåñbãÖ $®6Ä¿¨¼Ês©y¿¤¾b‚q|èÓÍ!”E2lüˆ5£4Æ'„Yˆ~Öðà£%#®0œ6ëS¾á'tô/@{Dßõæ[êzÌ×vÛ:?²àß«¹ÿA~Þ»|º½â7íá“çÔ?íð®¿3OYu%v‰}Õ<ºD»TªôÐ±Åø¥ÆÍÇ·DL;rì„?;S†:ºðXÑê&®énW̮ӹ·7YûÔ¬V¨bçßê«ìÚrp`éÛÉ)¤áàqØ]wO?®–BÎÓñ/šT_í’jŽ/À­åøÃòLvÒŸŸ d'üüJ•Ö RŸ6ÏÏ+DƱ»t^Ú¸U©Š·*<“ž‹êv8)Šý½ß ×T– ~©!xtIuè$øðü}Á†ÊKÌŒsþìäÖiÆànO9êrªA†M§ØE:§\Róë#ZÆ­°ü‡N=æ9:øô‰¬æý»ÁÎi±!ótìBSýs*&+)NQ±@!ZVæÏ ÈhîÍ~㬅ª9Hy:ýuÁ‰Ù-³8ˆÆ-¯”ðÑýc‹㟠Ư$'µZì·\á;¦÷îh<ñË |Lc[ÅBƒ¢vÌÓX °¤¯3–€ñ ¾}qÕ Ôµ:eÐÐô|¿jQ÷Ì´»=¥š¾Š~¢‹IùS™ù:Qýã’¡™wzÜÔòÈ(öYKãKã›Cþêï~žºQ·ð^—áiÚÁˆº³=Œ ¶}F²+êóÒÆ­Ü²gñÝn=Ü#µÙ“™E­Ð÷ýíYj·|g·Kêf Q_±çXq6¨÷{MB8pX}.7åã£U´¿ÎÝ©úçµ[³Ìü?÷êá]˜ù•ä$¥áøí¶+4ì2º“f!0FÑóê-,„pÍIMw fÀÓ“Ôr;•¸jœ \16×9âš_Ó`Ç2µðN¯N;žÌ,6 êyŠ~/Pù)z›‘¾Öõ퉹Z4ÍœªŽ– œ˜fÓw+lI]&vÖ9ÅÊÍß-á±0òQkvүǭÄü©´¦³±üm)ªÂËclIôMÁÚ'5 ª à<½êö³©ëu7Í(ûêAÃKãÎõãÖ‹b_µ%Ư&&´¶=q/» µ…².™‰@NãCìéJz:5V«HàPDuo,#ã§Í ØVç5Í—0nÍN–>Ыå|<»Ô*¨·*yŠ~7Ðaš=,@ä\»–#÷ÚS3¦óÇAáÀAuƒöÜxPHV­gOû÷Åjµ‡jĤcñ {n-P#qϦ5o}Æ×§I‹}äç< W®æŒ¯O}ŽºZøúãŒWc©’þN]K`C;r ßšPßÌ@è¹·úvâ¤à•Ąֿ*“Nßžê ·ZšÈ'­ZF¬5OΕØIÚx4º&œ™{Õ4ˆ²›ÎiØòÍM°0Z|¯‹[ÔË•êÑìr—Ævˆ"¢Þ tš¨HZ~ÉþZݤ³>ë; Ù;3GM^kÈ y­®ºöö¶Ò9¢qók£%<·F?oNßÙžóÐò JüóiÍAà}Í+´)6W±"+ç[µ¶­ybÖ˜[¶$p0¢ÚŠÄ2ªn£l¦ój·*|;9¥µ¹Ê,ëýÌ£ËØþ.Aˆ9“ ¶G‘§g3ˆÆd¤ï…ôÞViKì£ój·*Ê­ôil®"!ôNÐJ›«˜“èg-XT/®áÇç*¾Ãvñí‹jYj¤ª7VÀ&:¯–q«‚_æ¿¥½âyoó"ãÖ %”‰˜b—ÕÃú…Ƙah¹”¢®ŒþÛ*m‰t^EãV…—“ÓNíÍU>ñ™w;Dk½Ð,sêëð£óšƒ¯úãhÈiuÃuf˜°¼Î«hܪ0íÍ«ÏâʽêÚ%›«€”eâÕ'&i:¦¹4Po‚Úe‘J^7…í£Åu^=ãV¯,¾”œÒ ýÜÛ0kñíÍFìËf­ŠÂÇ™ÊîÁ^+ûÕmàÒwÂRÖK­­ó*·*¼šÑÚq™uÙõ®š+ŽÌQ1 —Û”C ¯B•îÐÞØüª)*s°´Î«hܪ°?ÒÞ\åi±ëBübƒ˜V·]büFWéZC€Ü²'7­c‡q[XUçU4nUpaé%í Ì¿ôÔOï¦í‹Tìsu;Š‘k3Ô…S{[¥„i*s°¨Î«kܪðäŒOV_±£ds]‰_©Ór8aÚ‘GË©«,ЩDç; ºÆ­ }\òH^»Åìäwëvˆ!£Øgê{ß! תíܤ”K hllžº6r[¥-1QRʤºÆ­àÄÒË)MWÍWܵã³ôÊlŒEúV´ìðªâÔµÓyu[žMÍ…Dõ{’fÿ@6W1„ê;ŠDš#pùy/7o®Ñ+鼺ƭ |ú‘Û!:9D6W1ˆê:Št·¦5·Uªöê´ÍXFçU7n…­6W¹î®¹K6W1–*:Š hTæG§o·±y™XCçU7nUx:=W«±¹Jšfç'®š¦ZŽ"àÛ§1w£Öøm•¶Ät R¡ÚÆ­ ­bö±¬¦¹ÕïÉæ*U¢*Ž"}­P´ÆÆæ‹êª‹y‹æ™±½ÊDcø÷}Bÿêï~®üÐÛ¸õ§ÿù¨ò‹CÿÛ¦•G?öÿn¹Â7\úÎä´PEzÕB*Ž"Ó÷*¼5¬5mž›ññ+f\ƒlúúœÂ@kº0À¸UaYËß`ž¢G6W©*;Šôt¥¦8f›N+`n#\ÂOˆ,Róo÷êjܺ ‡PpÚßš¢ªìh—Ã/¹3wÔ+mg}Ö«±?ñÐÚØ<Ǥo›´Y§Ònÿë'žÞò´râìÇä¢LIXÃÝRg ´ïÚ©ÆÞ~èÕ;!I µ”´ö|åðó¯è„*aÀ[®YîðWþV]ï°ÿ»Ò±ONiõá‹)'¿¼3ûű1©|VÚ¢ý—ž(#±:rvú¬êqS×çXc™ tŒnœí×;c$Ë Ýð‹ì«ò{%(xҡ晽ªAYO|¾ív¥n4ß~[FªmLÔ2y Rw©8¦Ö¹£î{G ¸QíÝ  ±éE nbâj:Æ!¬^ž§ú†1UG‘x¡í®j@(ÖäÎVßœ¦Ö9RmkaDIL9Ͱœ½˜þZ3!L«˜ WÖß2µ_5(ïJÍuÜÚù-¢õ3y·úœ¼™+sPíŸÿä¼z¿¸÷¢§‚œ‘ö‚ ˆ…uÍfŒ°–ôN@›ù—Ñ;µ¡ûÃ*¸È °¤{2ŒÇà·\YèËB×S«2h:üpòÂâf –må·å»#ޤʨž˜aϼ5%M£lÃx¦Ký¸¹k$ X @F€`2Â"e@M–¸¿ˆhml "Bz¯–!<R†_RwÉø„ÐÃ;ò*ÅxOº‹þdõ66/së0`‘Â… ‹”.rXþ³ø˜–×7EDnZbŸk;Š|ta'Ž"‡"ªË+°ŒÌiWŒyíáží¹cüMÀk‰‰&á¾ílÿo•#±(\ôÔ¿è0>a„2QEÖRÙ6Cq9û ‡CêÓæÙ± X½ÍËÄôõ¹±<™ž?×t ;áðý6@–—›=EúúãŒOýDÓÚÀ£o}Þn8Ø{Øãr#@p6Ÿ»rïJ$¡é(¢º äcOg4]%hÇ/ƒ=2ù2šÅQ¤ª«ÅQäÒûÛ½fððýBË2¯ËKS4PÙ@WèO®¯š¶T+èXj»[zxÜëò @€y]ž“ƒw5véwÓ¦A̽ª½¶3ì¡Þ4Mì[­AeE:jsîµ%®.‡;à ("ÏÌC^—×´¥º€^:w2Ž¡ž!Àñù 7?ï»n~Îñy@p°ïƒ5׸€Wÿ">êÐ2bGhéÀ ,ÙYÅ:TÔQdðàê‰Q^—d,'³É•DôÖé¬iKu1zé| {’eéý˧b ¢(.ÄÞ¿|Z–%„зtºï@þ³øXHÔüÆÇ»†2 ]¦ˆP*å(’beÿÚÆæ^—0àX:&ˆ|úNpn6fÎR½½tÞn€™È¬,ÞŸ ’Eq&2 M5º»…(ŸRÓ¼¦ã‘l}G´çˆ‘é!T„J9ŠôíѮՆË8€xÀWÀ¬¥zzéÜÁ:`fy£.刓Õב[ùË-?’ÑôëÈûÂKOÆš9‚É©ˆ£È`‘8„(àø¨+;µººÁl¥z3zéœBñÌÆ9*å2Ǩu7ŸþVRe¢U!K1 Ÿ—2öfavè(ÒÙ˜uµ¦ ÿ*ß{Q yµ¾`µeªR­Š~)C ò;½¢(¬V™°Ä}/>Ji,G“õËPèöœ*BeÙ¡£HUÿP˲H%¯ßwêjžR­…~:ÇÀ86¶d¥zÔß|µ4[·¾ïo#۪؂Ҏ"±vY¤’_m[%„¨ÌíšbëZ“”êè¥s„¼Ýè(G0Td1ð²Ù¸u=õ<êË!–Cq©äjÎD§´NôÄ6ìÕ©™¡™ {¡š¡T—F/ómõ{GÊe$£ZãÖÝF G‘ãýµ*âb8Œep¦r3ë:tf(Õ¥ÑKçK±Eh«k¥˜ûÍŠaÚêZ`1V5#Abܺ á—Üé¯Õ=4füÑ¥–ÑÍÇ]-™Í["uK'ÌVª·D¯}süLQô7<ßTÓÄPLSMÓ7‹D‡{nÀT¥ºô²ÔãDþÚØµ¡žƒN‡ëÄGï`æÍ0ý(mÜŠúu°“·Ú!æL^«S?Ïy’‹mwš§ïûœ¢]¢¿ÊÆrìF At8`’R]&:6PÇçÆ>¿ùY–Ë(ÆC€q–Ë|z㳉ùqýnªÅ–Æ­ç½M·œ&u¾M¨ÑÏZ°¨^à'ú/KÔ}•úÒÜØ|ücÚ<¥º|ôµ¼_Š-}ðÕºÞ¢LJ·Þq…>ò©/{ Ø1Å&.ׇQñÅ;³ók>?‘ú´9俼ܒ{ ÌRªËgW 8•6n]bÜo»L<÷I¨Ñ Í2§¾AýTïUeÍÝžrԪ¼b—ªØ_ç[·þc¸Cêïž`3¤,¿¨n!8ò¡c‹ aRŽI}]£câôÄæ:/Ǹ5N›Ý¹¡‚ľÔvy|ÑQŸóîU·­HÞ¬ÕêÞ›«¦»ˆq+a32GÅ¿T_@J9¤–×G´66O^«S=n l«sbÜJÐ"öU£–£H6¤>#“öóKfÜØ¼Ll«sbÜJÐBq¹­S¬;§`OãVBiJ8ŠÜŒ˜aÓw¬m[aòNŒ[ [£í(r3Éëµ&ßViKÌë¡òÁ Æ­„2Iݬ X„ü»¼¨‘Õê†ÿêß¿™´ÂN ¥±U}NŒ[ åSÂQd1Ù‰€7¯ã·2±U}NŒ[ Û"}'ìOlQÕ%®Xx:­€}êsbÜJxºî-ŒQf$dTZtÄ&:'Æ­„£f¹i¸šh¬Z·vÐ91n%ì$kVZ®),‡åuNŒ[ ;a¤^¥ËÈÌ.\·…µuNŒ[ Éô&I#,Y[ÅX{¼·*ˆ–ÄÕ½0`‰²Me–Ö91n%Tl« |VÕ91n%TŠÿ‹Õeª?9¶º)ÑK~Àˆq+°-¬§sbÜJ lë霷ÛÅb:'Æ­Â`%ãVáÁ°ŒÎ‰q+ðÀXCçĸ•@Ø Ð91n%vˆyídØ‘)?hÀïaù½õ¡?öÿ@ùAŒ[ „-1{}N¦5úä@Œ[ „ò0¹B0­aÙ "¢~ê!Æ­–˜Zç à+€è˜a½F¦‡@°(¦Ö9Ò6yùÄ×<ì®50-‚…©Ø8\C¸á`ïaËaÀÙ|îʽ+‘ÄR¥®_Œ è¬w{ûæT–æš–ž–ž/Ä2«½A—Ë—ï^Å“e>#àÎq8\/û&…(xûÓ_oµS–ûÚúz[ú\¬!Œ³B~dæîØÜXqóç·2õywKÏ£{] ¯Ësrðñ®Æ®\VÕ™$"JFÕtÜuüÀñúP}AäÀÒLKMó‹Ç¿åsûŠc–ùdtz€úqrà1Eä›±M–)€g?7ØõÛá^-nyƒÅÑ,‘ß ÔçNÆ1Ô3„8>åÞ•H*Rç¯;ÜØépì;4áMû–Òˆ@±ëta@bU® ÉR<›Í/Æ–3\&èò÷¶õµÕµÑˆ~tà±Ó?P¢•ùdô{€:ÑÕØð£É•šÀÆ®“²|òàS¯b©èí©Û+‰·ËÓÝÜÓÑÐQˆc•üV >èD€dYzÿòé…Ø‚(Š ±…÷/Ÿ–e !t ó¡\\@”Œ„É ˆÂP}¿ûÇßœ¿~~df$•IÈ¢KÇ.Þþêîô]ðºî¯{/óÉèú+C1C}e,_¸uas¨m²Üj¨ñ×ÀäÂä¹ás‹±EQSÙäµÑ«ï}þ›B4«ä·:o7ÀLdV.êšÊ¢8™€¦õ=åËGJ@”€(ÑÜ£†#ó£ë:e>½`e91ð(…¨[·x‘ßj›,èQ®Œ\.Í*ù­@»ÝÁ:`fyvÃñ™åÙŽ†'û€{S }»Ó”K{}+ˆÒýYæ“ÑéêAS¸©.X—ÉgGfï©F°M–ý?ÌÇKG³J~+ s Ä3ý®*G¹+áJáp¸tÀèÂhá`™OÆ*xxß1|áÖ5ãØ%Ë4EÀüÊÜC=C]M]4¢@”¥åøâW÷.ªe«ä·"7@ ò9‰¢°hsœŒãù#ÏÑÎ¥¿ž¸UR擱Æ<¶ÿ†f¦§RYM>6ËòžÖþÞ–^š¢ `hº¹¶å_<ü¢ÃáZ‹büVDçÇÆ¶£L;Ùݽ‹ÏíûÆÃßdº¨C}ÔIDAT–¸†78 -óÉXàÖúk›k[I¸”×É”ùd,ñ9p]ºsäRé±M–±²°ÃG—?›Ëæ³é\úòÝKw¦n@ÐT¢™'¿çþÓ¿ýŸþüˆVhúç¼À¹®¶úÖ¥ØBññ¶úVàMǬV§£¹ëpÏ!„'pg.Ào²„+óÉXâ*cE'<º9èÕ“¯ÁšUœm²Ìñ¼Ëé’°˜ãrÅÇ'—&÷vì+Ø™$¿çþÓ¿ýèôo±ö¢¯ ÔçK±Eh«k¥˜û_ ŠaÚêZ`1f.3ÆJ1ØõБžÃ¡,Ÿ{ÿÒªve>;=@Ûdy164Åx\ë6èlèyMQfÈoA䃵âT >¿9~£½±ƒ¢èoyþÊÈ•HÒju•ùd,ñ7±Ãúš\Á6Y¾>q£½±‹BèéÃÏ~=qk!6O!jOÛžŽÆNˆ§¢J´ªç·Xäµuš^•* sNä¯]ê9èt¸Öµë0 ›Á€±â("€ 7øí“¯mýðÒét. e?;=@ÛdYÅ+÷.í?ÂÒÌPïÐ ‚Q¸ðõêÌbuó[,ò¦æ6¯?¨³2ëÕÆçÆ2¹ô¡¾C‡Œ³|öòÝ«f[{d;=@Ûdyzi*MÙsÄçö#„@…ÅøÂ¥»—å¢ÁÈjåwƒÈ¡wß~S+rÅÖ¥.Å–>øêƒJ]Íä¨6bµ(óÉXñj=Ûd9–޹|fËhÆçw³Èu‡#F¢%òãpDç‚•(!r}Çá‚1”yéq8RŸÖ ´È ‡#ú±¥ÈÉ8`mÊ9‡#¬Jù"†6®“)@tN ˜—¯ÞüéG§§È¸®¾Áã hý[Bä Ú?¦K=êÙé³[Ʊ$˶Çäùý7ÿæ¿S~|za¸øx‰ÑšCäâîú:744üð‡?¬lB Bi"‘È•+WŽ9ÒÜ܇ÿáþáùçŸ/ÿ¸Çãa†¢JµÍ7Öç‘HD¿ü„Í,--‰¢˜Éd‰([úD"‘2çr¹ru®œ¬w~‚*étzzz:»Ýît:]Ðc9ÇY–¥(ª´ÎÑÇW'ÞøÙß”`,þ_ÿ@ÆÛ „ÝÀÿ<í aÝ1‘6IEND®B`‚quickplot-0.10.6/spew.h0000644000175000017500000000367612244565775011716 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #ifndef _QP_SPEW_H_ #define _QP_SPEW_H_ #include extern int qp_get_spew_level(void); /* INFO 1 NOTICE 2 WARN 3 ERROR 4 NONE 5 */ extern void qp_spew_init(int level); extern int qp_set_spew_level(int level); /* This adds addition compiler checks for the printf formating. */ #define __printf(a,b) __attribute__((format(printf,a,b))) extern void qp_spew(int level, int show_errno, const char *format, ...) __printf(3,4); extern void qp_spew_append(const char *format, ...) __printf(1,2); #define QP_INFO(fmt, ...) \ qp_spew(1, 0, fmt, ##__VA_ARGS__ ) #define QP_NOTICE(fmt, ...) \ qp_spew(2, 0, fmt, ##__VA_ARGS__ ) #define QP_WARN(fmt, ...) \ qp_spew(3, 0, fmt, ##__VA_ARGS__ ) #define QP_ERROR(fmt, ...) \ qp_spew(4, 0, fmt, ##__VA_ARGS__ ) #define QP_EINFO(fmt, ...) \ qp_spew(1, 1, fmt, ##__VA_ARGS__ ) #define QP_ENOTICE(fmt, ...) \ qp_spew(2, 1, fmt, ##__VA_ARGS__ ) #define QP_EWARN(fmt, ...) \ qp_spew(3, 1, fmt, ##__VA_ARGS__ ) #define QP_EERROR(fmt, ...) \ qp_spew(4, 1, fmt, ##__VA_ARGS__ ) #define QP_APPEND(fmt, ...) \ qp_spew_append(fmt, ##__VA_ARGS__ ) #else /* #ifndef _QP_SPEW_H_ */ #error "You included this file twice." #endif /* #ifndef _QP_SPEW_H_ */ quickplot-0.10.6/TODO0000644000175000017500000000703312244566326011237 00000000000000 Most of this is done, but we need to leave it so we may check it out more carefully. This is just the authors junk notes. Add keep aspect mode: The x/y aspect stays the same when zooming. This would be handy for when looking at GIS data. test all the shell commands document all the environment variables Add quickplot_shell --pid=PID program that connects to a pipe to the running quickplot program. fix: quickplot -h ==> "failed to create drawable" Looks like GTK+-3.0 is printing this after I call exit. So I guess it's not really a bug. Fix gnome plugdev Run with dmalloc Remove the New Graph Tab button. Announce on Freshmeat freecode.com. Grid and plot layer positions, i.e. grid on top, grid on bottom, grid between plots. Plot layering comes from plot order in the -g option. Should -g "0 1 grid 3 4" put the grid between plot 0 1 and plot 3 4? how about -g "0 1 grid-x 3 4 grid-numbers 0 6" to order the different parts of the grid? It's just drawing layers... Document environment variables in html and man Make a command line dump option that prints out a command line that would as close as it can reproduce the current graphs and windows. Make 'N' put up the Select Channel to Plot tab in the Graph Details. Add configure tab that lets you change app default values. - like turning off label reading. - default background - lines on/off - points on/off Add per user defaults that can be saved or auto saved in a dot file. Ruby bindings... Change graph tab name when graph gets it's first plot. Add a screenshot gallary to the homepage - link to it on the top page. - thumb nails with command line option and links to: * with data files * or c source file * or Ruby source files - do not include it in the source. Add move grid to front option Add move plot to front button/function Full control of graph colors and fonts: Like: Add x/y line grid color, x/y line number font x/y line number color, and sub grid x/y line colors. Add another Cairo draw mode that will use sub-pixel values or basically use Cairo the way it was meant to be used. It will be much slower at drawing than the current Quickplot Cairo draw mode, but may make much better static images. It could make images that are not restricted by the computer display. Fix and use plot sig fig in status (may be done) add sub-grid find/check all the GTK+ argument options check the status x y print format when there is no grid Make function channels that use less memory - linear channel - sine functions and other elementary functions Add Channel functions like linear, sine, cosine, exp, ln and so on - do using plugins?? - plugins that quickplot compiles or Ruby?? Add other channel data types other than double, like short and int for loading sound files with a smaller buffer. Add CAIRO X11 macro #ifdef to code to remove X11 specific code on none X11 platforms add all --no-bla-bla and --bla-bla options that make things consistent Test the startup of large data sets plotting more than one graph tab and more than one window. Add widget that shows and edits all app options. Add focus grab when waiting for the draw ... or just throw away all events except quit or escape and equivalent. Add quick culling to the case when values are always decreasing. Add extern C to port API to C++. Add option to strip nan and/or inf from channels. ?? quickplot-0.10.6/about.htm.in0000644000175000017500000002276712245203144012776 00000000000000 About Quickplot

About Quickplot

a fast interactive 2D plotter

Version @VERSION@   repo version @repo_version@

Quickplot Home-page

@PACKAGE_URL@

What is Quickplot?

Quickplot is an interactive 2D plotter.  You can very quickly swim through data with Quickplot. 

What can Quickplot do other 2D plotters can't do?

The difference between Quickplot and most 2D plotters is that the primary purpose of Quickplot is to help you quickly interact with your data.  Of secondary importance is to make a pretty static picture of your data.  Features that distinguish Quickplot include: unlimited mouse press (pointer move) and release zooming, mouse grab and slide (new in version 0.9.0), any number of plots with different scales displayed at one time, value picking for any number of plots displayed at one time, and reading data from standard input (a pipe).  These features become indispensable when you're looking at data sets with 10,000 to 10,000,000 and more data points.  You can't look at a 2D plot with a million points unless you can quickly zoom.  If you need to look at hundreds of files each with 100,000 or more points Quickplot may save your sanity.

Quickplot has lots of command line options that let you customize your graphs in one command.  With the Quickplot graphical user interface (GUI) you can read files and remove buffers, add and remove plots in graphs, add and remove graphs, add and remove main windows with any number of graphs, change individual plot line and point widths, change colors of lines, points, background and grid, change graph grid line spacings and line width, copy and remove graphs, save image files, rescale, zoom in and out any number of times, grab and move graphs, examine plotted numbers, and so on.  Quickplot is excellent presenting 2D plots to groups of people if you would like an interactive and flexible presentation format.  Quickplot can also make png images with translucent colors (version 0.9.*).

In most use cases the command to plot your data is quickplot FILENAME and Quickplot's default graphs may be all you need.

Quickplot is more like an interactive data browser than an interactive picture editor.

All future versions of Quickplot will keep the show me the data quickly theme.  This does not rule out additions that make Quickplot a more full-featured 2D plotter that one can make pretty pictures with.

New features in after version 0.8.*

  • draws much faster then version 0.8.*
  • has many more command line options
  • the new mouse grab and slide with left mouse button is very intuitive
  • more robust text data file reading
    • better locale support
    • reads rows with missing number entries
    • more row comment formats
    • reads infinity and nan, using nan as a line break
    • will read any text file and pick out the numbers
    • reads CSV files
  • Cairo drawing that provides translucent and transparent colors using RGBA
  • makes graphs with the X11 shape extension that float graphs on your screen letting you see though them to your other windows below
  • has fullscreen draw mode for presentations
  • reads more sound file formats with newer libsndfile
  • reads sound files from standard input (pipe input) with newer libsndfile
  • better double buffer drawing with super quick re-expose redraws, fixes previous versions slow re-expose redraws
  • Quickplot is no longer written in C++ so it builds and installs faster with less prerequisites
  • a command line shell that let you interact with a running quickplot process from a text based command shell (added in version 0.10.*)

Installation prerequisites

Quickplot uses the GNU Autotools (./configure) to build and install.  To build Quickplot from the distribution source tarball (example: quickplot-@VERSION@.tar.bz2) the following packages are required to be installed:

  • GTK+   has many prerequisites, but they all come with most GNU/Linux distributions.  GTK+ version 3 is required for Quickplot version @VERSION@.
  • GNU readline   allows users to edit command lines as they are typed in.  In addition to standard graphical user interfaces (GUIs) Quickplot has a command shell interface that lets you edit all aspects of Quickplot graphs.  The history and tab auto-completion of readline makes the interactive version of the Quickplot shell easy to use.
  • libsndfile    is a C library for reading and writing files containing sampled sound, such as Ogg/Vorbis, microsoft WAV, and the Apple/SGI AIFF format, through one standard library interface.

Development prerequisites

To build and develop Quickplot from the SVN source the following packages, in addition to the above packages, are required to be installed:

  • The GNU Autotools   Autoconf, Automake, and Libtool are used to build the Quickplot source.
  • ImageMagick   The convert program, from ImageMagick, is used to make xpm images from PNG images in the Quickplot source.
  • Lynx   Lynx is a fully-featured World Wide Web (WWW) client, or web browser, that can display inside of a tty terminal.  We use Lynx to generate ASCII text files from our html files, like for example the simple ASCII text version of this file you are reading now.  The text version of the help page is used to make the man page.

The --enble-developer option flag is required to be set when running configure when building Quickplot from the repository source files. It adds make targets to build files that are not in the source repository but are needed to make a source tarball. Quickplot will fail to build without these generated files.

The name and history of this program

We call it Lanceman's Quickplot in order to distinguish it from another program called Quickplot which predates this program.  It used to be on NeXT computers.  It may have died with NeXT.

This is a complete rewrite, by the original author of the Lanceman's Quickplot which first appeared in 1998, and managed to find its way into the Debian GNU/Linux distribution soon after.

Quickplot started out in 1998 as an Athena Widgets X11 GUI (graphical user interface) program.  In 2003 it was rewritten as a QT GUI program.  In 2004 it was changed to a GTK+ GUI program using the gtkmm C++ wrapper to GTK+.  In 2011 it was rewritten again with C using GTK+, without GTKmm.

Copy Right and Legal Notice

Quickplot -- an interactive 2D plotter

Copyright (C) 1998-2011 Lance Arsenault

Quickplot 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.

Quickplot 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 Quickplot.  If not, see http://www.gnu.org/licenses/gpl.html.

@FOOTER_HTM@ quickplot-0.10.6/imgDeleteWindow.xpm0000644000175000017500000001105112245423271014347 00000000000000/* XPM */ static const char *imgDeleteWindow[] = { /* columns rows colors chars-per-pixel */ "16 16 256 2 ", " c None", ". c #800000", "X c black", "o c black", "O c black", "+ c black", "@ c black", "# c black", "$ c black", "% c black", "& c black", "* c black", "= c black", "- c black", "; c #800000", ": c black", "> c #C00000", ", c #800000", "< c #800000", "1 c #C3C3C3", "2 c #C3C3C3", "3 c #C3C3C3", "4 c #C3C3C3", "5 c #C3C3C3", "6 c #C3C3C3", "7 c #C3C3C3", "8 c #C3C3C3", "9 c #C3C3C3", "0 c #C3C3C3", "q c #800000", "w c #C00000", "e c #C00000", "r c #800000", "t c #C00000", "y c #800000", "u c #800000", "i c #C3C3C3", "p c #C3C3C3", "a c #C3C3C3", "s c #C3C3C3", "d c #C3C3C3", "f c #C3C3C3", "g c #C3C3C3", "h c #C3C3C3", "j c #800000", "k c #C00000", "l c #800000", "z c #800000", "x c black", "c c #800000", "v c #C00000", "b c #800000", "n c #800000", "m c black", "M c black", "N c black", "B c #141313", "V c #030405", "C c #3F1000", "Z c #800000", "A c #C00000", "S c #800000", "D c #800000", "F c black", "G c black", "H c #C3C3C3", "J c #800000", "K c #C00000", "L c #800000", "P c #800000", "I c #040504", "U c gray1", "Y c #1D2122", "T c #33221D", "R c #800000", "E c #C00000", "W c #800000", "Q c #800000", "! c #C3C3C3", "~ c black", "^ c black", "/ c #C3C3C3", "( c green", ") c #800000", "_ c #C00000", "` c #800000", "' c #800000", "] c #0058C0", "[ c #0058C0", "{ c #800000", "} c #C00000", "| c #800000", " . c #800000", ".. c green", "X. c #C3C3C3", "o. c black", "O. c black", "+. c #C3C3C3", "@. c red", "#. c green", "$. c #800000", "%. c #C00000", "&. c #800000", "*. c #800000", "=. c #800000", "-. c #C00000", ";. c #800000", ":. c #800000", ">. c green", ",. c green", "<. c #C3C3C3", "1. c black", "2. c black", "3. c #C3C3C3", "4. c #814C23", "5. c green", "6. c green", "7. c #800000", "8. c #C00000", "9. c #800000", "0. c #C00000", "q. c #800000", "w. c #800000", "e. c #0058C0", "r. c green", "t. c #120301", "y. c #C3C3C3", "u. c black", "i. c black", "p. c #C3C3C3", "a. c #3F6021", "s. c #2D0D07", "d. c green", "f. c green", "g. c #800000", "h. c #C00000", "j. c #800000", "k. c #800000", "l. c #217716", "z. c #0058C0", "x. c green", "c. c #180001", "v. c #C3C3C3", "b. c black", "n. c black", "m. c #C3C3C3", "M. c #446A25", "N. c #0058C0", "B. c #0058C0", "V. c #800000", "C. c #C00000", "Z. c #800000", "A. c #C00000", "S. c #800000", "D. c #800000", "F. c #2D8229", "G. c green", "H. c #0058C0", "J. c #C3C3C3", "K. c black", "L. c black", "P. c #C3C3C3", "I. c #385F25", "U. c #0058C0", "Y. c #800000", "T. c #C00000", "R. c #800000", "E. c #800000", "W. c #800000", "Q. c #C00000", "!. c #800000", "~. c #800000", "^. c green", "/. c #4F4F1A", "(. c #C3C3C3", "). c black", "_. c black", "`. c #C3C3C3", "'. c #0058C0", "]. c #800000", "[. c #C00000", "{. c #800000", "}. c #800000", "|. c green", " X c green", ".X c #800000", "XX c #C00000", "oX c #800000", "OX c #800000", "+X c #57541A", "@X c #C3C3C3", "#X c black", "$X c black", "%X c #C3C3C3", "&X c #800000", "*X c #C00000", "=X c #800000", "-X c #800000", ";X c #652815", ":X c black", ">X c green", ",X c green", " , < 1 2 3 4 5 6 7 8 9 0 q w e ", "r t y u i p a s d f g h j k l z ", "x c v b n m M N B V C Z A S D F ", "G H J K L P I U Y T R E W Q ! ~ ", "^ / ( ) _ ` ' ] [ { } | ...X.o.", "O.+.@.#.$.%.&.*.=.-.;.:.>.,.<.1.", "2.3.4.5.6.7.8.9.0.q.w.e.r.t.y.u.", "i.p.a.s.d.f.g.h.j.k.l.z.x.c.v.b.", "n.m.M.N.B.V.C.Z.A.S.D.F.G.H.J.K.", "L.P.I.U.Y.T.R.E.W.Q.!.~.^./.(.).", "_.`.'.].[.{.}.|. X.XXXoXOX+X@X#X", "$X%X&X*X=X-X;X:X>X,X ? @ C c is a comment line that is ignored. Any lines with no numbers that can be read will be ignored. If you wish to have a break in a plot line put a NAN (stands for not-a-number) in the channel (column) at the point (or non-point) where you wish to put the break at. Example: 1e2 0 -1 2.1e2 1 0 3e2 NAN 1 4.01e2 1 2 5e2 0.87 3 6.1e2 -0.65 3.2 7e2 1 3 5.4e2 0.7 2 example plot Graph with two plots: column 1 versus column 0 and column 2 versus column 0. Note that when Quickplot plots a point with a x or y value of NAN (or INF) the point is skipped and there is not a connecting line to the adjacent points. In Austria it may look like: 1e2 0 -1 2,1e2 1 0 3e2 NAN 1 4,01e2 1 2 5e2 0,87 3 6,1e2 -0,65 3,2 7e2 1 3 5,4e2 0,7 2 The above example has three channels and eight samples (set of values) for each channel. A file may have any counting number of channels, that's 1,2,3,4 or more channels. With the use of NAN, as a kind of plot line terminator, you can use Quickplot to draw figures composed of straight line segments. Here's a silly example. Copy and paste the following command to draw this house: picture of house echo -e "-10 8 -8 1 -1.5 -6\n-10 -6 -4 1 1.5 -6\n\ 10 -6 -4 5 1.5 3\n10 8 -8 5 -1.5 3\nnan nan -8 1 -1.5 -6\n\ -13 8 nan nan\n13 8 4 1\n0 20 8 1\n-13 8 8 5\nnan nan 4 5\n\ nan nan 4 1" | quickplot -P --line-width=2 --no-grid \ --no-border --cairo-draw -C 'rgba(0,0,0,0)' --no-gui \ --no-points --geometry 79x87 -F -g "0 1 2 3 4 5" Using NAN as a line terminator can be very handy when drawing phase plots when you need to avoid connecting points that should not be connected and you don't want to make more channels (degrees of freedom). For phase space plots the NAN can be thought of as a place holder where you removed part of the series because it is not accessible in the current model sampling. If a file is loaded with a single channel an additional channel, with the same number of values as the channel in the file, will be added before the channel from the file. Quickplot can read [1]CSV files. libsndfile sound file Using the package libsndfile Quickplot can read many sound file formats. An incomplete list of readable sound file formats includes: Ogg/Vorbis, Microsoft WAV, SGI/Apple AIFF/AIFC, and Sun/DEC/NeXT AU/SND. See the [2]libsndfile home-page for a full list of supported sound file formats. When loading a sound file the first channel (sequence) loaded will be the time sequence, then each sound channel will follow in separate channels. Quickplot may be a little slow with sound files larger than thirty seconds long. Thirty seconds of sound sampled at 44 kHz with one channel would load 1.32 million data points. Command Line Options Usage: quickplot [OPTIONS] Graphs will be generated for each file loaded, unless options are given that tell Quickplot to do otherwise. The default number of plots in a graph will be up to 12 plots or just the number channels in the file minus one if that is less, unless options override that. The default initial plots will be of all channels except the first channel in the order that the channel was loaded from a file plotted against the first channel in the file. A time channel will be the first channel generated for all sound files loaded. The order of argument options matters. Options take effect in the order that they are given with later options overriding earlier ones. The options that cause actions like graph "something" must come after the option that says to read the file that has "something" in it. In general, the order of argument options gives the order in which things happen as Quickplot starts up. Short options, like -n20, that require a sub-argument, may not be grouped with other short options in one argument. For example the argument -on20, is not valid, but -oN is a valid argument with two options o (--no-points) and N (--no-pipe), and -n20 is a valid option (--number-of-plots=20) that sets the default number of plots to 20. All of the command line options set things that can be changed with the Quickplot graphical user interface (GUI). For example, if you start with a graph with no lines and just points showing, you can click a GUI to add the lines after the program starts. OPTIONS long option short arg description FILE read data from file FILE. If FILE is - (dash) then standard input will be read. This is the same as the [3]--file option. See also [4]--pipe. --about -a display introductory information about Quickplot in a browser and exit --auto-scale -A automatically select the X and Y scales for graphs containing more than one plot. This is the default. See also [5]--same-x-scale, [6]--same-y-scale, [7]--same-scale [8]--different-scale. --background-color -C RGBA set the color of the graph background. RGBA may be any string that GTK+ can parse into a RGB or RGBA color. For examples --background-color='rgba(0,0,255,0.5)' will make translucent blue, and -C '#050' will make a dark green. --border -b add a border to main window. This is the default. See also [9]--no-border. --buttons show the button bar in the main window. This is the default. See also [10]--no-buttons. --cairo-draw -c draw graphs using the Cairo API. Cairo drawing may be slower, but you get translucent colors and anti-aliasing in all aspects of the graph and in saved image files. See also [11]--x11-draw. --default-graph -D create the default graph for the current file and turn default graphing for future files read. If you give a [12]--graph or [13]--graph-file after this option you will generate an additional graph. A default graph will be made each time this option is encountered, so this can be used to control when, in the sequence of command line options, graphs are made. See also [14]--no-default-graph. --different-scale -d graphs with more than one plot will have different scales if the extreme values in each plot are not all the same. See also [15]--same-scale, [16]--same-x-scale and [17]--same-y-scale. --file -f FILE read data from file FILE. If FILE is - (dash) then standard input will be read. See also [18]--pipe. --fullscreen -F make the main window fullscreen. See also [19]--no-fullscreen and [20]--maximize. --gaps interpret NAN, -NAN, INF, -INF, and double overflow numbers as a gap in the plot, and don't draw a connecting line to adjacent non-gap points. This is the default. See also [21]--no-gaps. --geometry GEO specify the position and size of the main window. To set the geometry back to the default just set GEO to NONE. Example --geometry=1000x300-0+30 --graph -g LIST make a graph with plots LIST. The LIST is of the form "x0 y0 x1 y1 x2 y2 ...". For example: --graph "0 1 3 4" will make two plots in a graph. It will plot channel 1 vs channel 0 and channel 4 vs channel 3 in the same graph. Data channels are numbered, starting at 0, in the order that they are created as files are read. A separate graph tab will be created for each --graph option given. This --graph option must be after the file loading options that load the channels that it lists to plot. See also [22]--graph-file. --graph-file -G LIST make a graph with plots LIST. The LIST is of the form "x0 y0 x1 y1 x2 y2 ...". Example: --graph-file "0 1 3 4" will make two plots in a graph. It will plot channel 1 vs channel 0 and channel 4 vs channel 3 in the same graph. A separate graph tab will be created for each --graph-file option given. This is like the [23]--graph option except that the channel numbers start at zero for the last file read. They are relative channel numbers. So channel numbers for ---graph-file may be negative to refer to channels that came from files before the last file. This is handy if you load a lots of files and lose count of the number of channels loaded in each file. --grid draw a grid with the graph. This is the default. See also [24]--no-grid. --grid-font -T FONT set the font used to in the grid label numbers. Example: --grid-font='Sans Bold 12'. The default grid font is "Sans 10". --grid-line-color RGBA set the graph grid lines color. RGBA may be any string that GTK+ can parse into a RGB or RGBA color. For example --grid_line_color='rgba(255,0,0,0.5)' will make a translucent red. --grid-line-width -W PIXELS set the width of the grid lines if there are any --grid-numbers show grid numbers. This is the default. The grid must be showing to show grid numbers too. See also [25]--no-grid-numbers. --grid-text-color RGBA set the graph grid text color. RGBA may be any string that GTK+ can parse into a RGB or RGBA color. For example --grid_text_color='rgba(0,255,0,0.5)' will make translucent green. --grid-x-space -X PIXELS set the maximum x space between vertical grid lines. The minimum will be about half this. This distance varies as the scale changes due to zooming. This distance cannot be fixed due to the way Quickplot scales your graphs and always picks reasonable grid line spacing. See also --grid-x-space. --grid-y-space -Y PIXELS set the maximum y space between horizontal grid lines. See also [26]--grid-x-space above. --gtk-version print the version of GTK+ that Quickplot was built with and then exit --gui show the menu bar, button bar, tabs bar, and the status bar. This is the default. See also [27]--no-gui. --help -h display help in a browser and exit --label-separator -p STR specifies the label separator string STR if labels are read in from the top of a text data plot file. The default value of STR is " " (a single space). See option: [28]--labels. --labels -L read labels from the first line of a text file that is not skipped. See also: [29]--skip-lines, [30]--label-separator and [31]--no-labels. --libsndfile-version print the version of libsndfile that Quickplot was built with and then exit --line-width -I PIXELS specify the plot line widths in pixels. May be set to AUTO to let Quickplot select the line width based on the plot point density. AUTO is the default. --linear-channel -l [OPTS] OPTS are START|[STEP]. This option prepends a linear series channel to the file being read. * START set the first value in the sequence to START. The default START value is 0. * STEP set the sequence step size to STEP. The default STEP is 1. There must be a START before STEP. For example: --linear-channel='100 0.2' will make a linear channel that starts at 100 and steps 0.2. Sound files will always have a linear channel that contains the time prepended. Using this option with a sound file would prepend an additional channel. Any file loaded that contains just a single channel will automatically have a channel prepended. Using this option with a single channel file will not prepend an additional channel, but will let you set the start and step values for that prepended channel. See also [32]--no-linear-channel. --lines -j Y|N|A * Y yes show lines. * N no don't show lines. Same as [33]--no-lines. * A auto, be smart about it. This is the default. --local-menubars disable that darn Ubuntu Unity globel menu bar. This will do nothing if not running with Unity. --maximize -m maximize the main window. See also [34]--no-maximize and [35]--fullscreen. --menubar show the menu bar. This is the default. See also [36]--no-menubar. This will do nothing if not running with the Ubuntu Unity window manager. --new-window -w make a new main window for each graph --no-border -B display graphs main windows with no borders --no-buttons hide the button bar in the main window. See also [37]--buttons. --no-default-graph -U stop making the default graph for each file loaded. See also [38]--default-graph. --no-fullscreen don't make the main window fullscreen. This is the default. See also [39]--fullscreen. --no-gaps -J draw a line across NAN (-NAN, INF, -INF and overflow double) values if there are finite values on both sides. See also [40]--gaps. --no-grid -H don't draw graph grid lines in the graph. See also [41]--grid. --no-grid-numbers don't show grid numbers. See also [42]--grid-numbers. --no-gui -z don't show the menu bar, button bar, tabs bar, and status bar. See also [43]--gui. --no-labels -Q don't read channel labels from the file. This is the default. See also [44]--labels. --no-linear-channel -k turn off adding a linear channel for up coming files. See also [45]--linear-channel. --no-lines -i plot without drawing lines in the graph. See also --lines. --no-maximize don't maximize the main window. This is the default. See also [46]--maximize. --no-menubar -M don't display the menu bar in the main window. See also [47]--menubar. This will do nothing if not running with the Ubuntu Unity window manager. --no-new-window -Z don't make a new main window for the graph. This is the default. See also [48]--new-window. --no-pipe -N don't read data in from standard input even if there is input to read. See also [49]--pipe. --no-points -o plot without drawing points in the graph. See also --points. --no-readline don't use GNU readline with the Quickplot command shell if you run with the [50]--shell option. This will disable the use of line editing, shell history, and tab command completion. This option has no effect if Quickplot is not built with GNU readline. --no-shape turn off the use of the X11 shape extension. See also [51]--shape. --no-statusbar hide the status bar in the main window. See also [52]--statusbar. --no-tabs don't show the graph tabs in the main window. See also [53]--tabs. --number-of-plots -n NUM set the default maximum number of plots for each graph to NUM --pipe -P read graph data from standard input. By default Quickplot looks for data from standard input and stops looking if no data is found in some short amount of time. This option will cause Quickplot to wait for standard input indefinitely. If you would like to type data in from the terminal use --pipe. This option is the same as [54]--file=-. --point-size -O PIXELS start Quickplot using plot point size PIXELS wide in pixels. This may be set to AUTO to have quickplot automatically set the point size depending on the point density that is in graph. AUTO is the default. --points show points in the plots in the graph. This is the default. --print-about prints the About document to standard output andthen exits. Use option [55]--about to display an HTML version of the Quickplot About information. --print-help prints this Help document as ASCII text to standard output and then exits. Use option [56]--help for displaying an HTML version of this help. --read-pipe-here -R this is a place holder that tells Quickplot when to read the data from standard input. This is intended to give the option of telling Quickplot when to read standard input when Quickplot automatically determines whether to read standard input or not. See options [57]--file, [58]--pipe and [59]--no-pipe. --same-scale -s plot all plots in the same graph scale. See also [60]--different-scale, [61]--same-x-scale and [62]--same-y-scale. --same-x-scale -x Y|N|A use in place of [63]--same-scale or [64]--auto-scale for finer control over how the x values of the plots are scaled when you have more than one plot on a graph * Y yes same x scale * N no different x scales * A auto, be smart about it. This is the default. See also [65]--same-y-scale. --same-y-scale -y Y|N|A use in place of [66]--same-scale or [67]--auto-scale for finer control over how the x values of the plots are scaled when you have more than one plot on a graph * Y yes same y scale * N no different y scales * A auto, be smart about it. This is the default. See also [68]--same-x-scale. --shape make graphs see through. It uses the X11 shape extension which was made famous by xeyes. The X11 shape extension may be a little flashy on some systems. Try using --shape with the [69]--no-gui, [70]--no-grid, and [71]--no-border options to make a floating graph on your display. The use of the X11 shape extension is a property of the main window, not each graph tab. This option may not work well with fullscreen view. This will slow down graph drawing considerably. You can toggle this on and off with the x key. See option [72]--no-shape. --shell -e run a Quickplot command shell that reads commands from standard input and writes out to standard output. The default is no shell and standard input will be read as graph data. If Quickplot is reading standard input for plot data Quickplot will read shell commands from the controlling terminal (/dev/tty) after all the standard input has been read. You may use [73]--no-pipe to stop standard input from being read as graph data. The shell can do most all the things that command-line options can do and a lot more. Run an interactive shell with quickplot --shell and use the help and tab completion to see how it works. You can also connect a Quickplot command shell to a running Quickplot program with the program quickplot_shell. --signal PID signal SIGUSR1 to process PID after Quickplot is running. --silent don't spew even on error. The --silent option will override the effect of the [74]--verbose option. --skip-lines -S NUM skip the first NUM lines when reading the file. This applies of all types of files that quickplot can read. Set NUM to zero to stop skipping lines. --statusbar show the status bar below the graph. This is the default. See also [75]--no-statusbar. --tabs show the graph tabs. This is the default. See also [76]--no-tabs. --verbose -v spew more to standard output. See also [77]--silent. --version -V print the Quickplot version number and then exit returning 0 exit status --x11-draw -q draw points and lines using the X11 API. This is the default. Drawing may be much faster than with Cairo, but there will be no translucent colors and no anti-aliasing in the drawing of the plot lines and points. There will be translucent colors and anti-aliasing in the background and grid. Also, saved images will not have translucent colors like they do with the Cairo draw mode. You can start drawing with X11 and switch to drawing with Cairo when you want to save an image. Use the r key or the View menu to switch back and forth between drawing with X11 and Cairo. See also [78]--cairo-draw. For example the command quickplot file0.txt file1.wav file2.csv file3.dat will make four graphs in four tabs in one main window. The command quickplot file0.txt file1.wav file2.csv --new-window file3.dat --no-new-window will make two windows with two graphs in each window. You see: file1.wav will be forced to be graphed when the parser hits the argument file2.csv, and file2.csv will be forced to be graphed when the parser hits the file3.dat argument, at which time the --new-window is in effect which causes a new window to be used for file2.csv. file3.dat will be graphed in the same window as file2.csv because the --new-window option is not longer in effect when file3.dat is forced to be graphed at the end of the command line. The command quickplot load1.txt --no-grid --no-lines load2.txt --lines=y --line-width=9 -F will make a graph from data in file load1.txt with no connecting lines and no grid. It will make a graph from the data in load2.txt with lines with width 9 pixels and no grid. The main window displayed will not be full screen since the -F option was given after the main window would have been created. The two graphs will be in two different tab pages in the one main window. The command quickplot --fullscreen --no-gui load1.txt --default-graph --gui --no-buttons --n o-fullscreen --geometry=400x400-0+0 --new-window --graph "0 1" --geometry=400x40 0+0-0 load2.txt --background-color='rgba(140,140,200,0.6)' --cairo-draw will make main window with a graph in full screen without GUIs, another smaller main window with the same plot in the top right corner with GUIs except for the buttons bar, and another small main window in the bottom left corner with a default graph of the file load2.txt drawn with Cairo with a translucent blueish gray background. The main windows are made when they have to be, which at the --default-graph, --graph "0 1", and at the end of the command line when for the default graph of the file load2.txt must be displayed. Notice all the graphs are made in a new main window. That's because the --new-window flag was set and is not unset as it could be with the --no-new-window command. The command echo -e "graph zoom 2 1 -.5 0\ninput `tty`\n" | quickplot /usr/share/tuxpaint/so unds/areyousure.wav --shell --no-gui --no-pipe will graph the tuxpaint areyousure.wav file with the view zoomed to the right half of the graph. If you ran this from a bash (or tcsh) shell with a tty, Quickplot program will connect a Quickplot shell to the tty and give you an interactive Quickplot shell after running the input tty command. The --no-pipe option keeps Quickplot from reading the standard input as graph data so that it can be read by the Quickplot shell. The Quickplot shell will be started after all the command line arguments are applied, so the shell command graph zoom 2 1 -.5 0 is applied to the graph that is showing after the all the command line arguments are processed. Type help at the Quickplot shell prompt. If you would like Quickplot to save your Quickplot shell history between sessions just create a .quickplot_history in your home directory with a command like `touch ~/.quickplot_history'. GTK+ OPTIONS The following GTK+ options are parsed by the [79]GTK+ APIs (application programming interfaces), which Quickplot uses: --class=CLASS Program class as used by the window manager --display=DISPLAY X display to use --g-fatal-warnings Make all warnings fatal --gdk-debug=FLAGS Gdk debugging flags to set --gdk-no-debug=FLAGS Gdk debugging flags to unset --gtk-debug=FLAGS Gtk+ debugging flags to set --gtk-module=MODULE Load an additional Gtk module --gtk-no-debug=FLAGS Gtk+ debugging flags to unset --gxid-host=HOST --gxid-port=PORT --name=NAME Program name as used by the window manager --screen=SCREEN X screen to use --sync Make X calls synchronous Keyboard Short-cuts Quickplot has GUIs for all of the following immutable keyboard short-cuts: a show information about Quickplot using a web browser b show/hide the button bar c copies the current focused main window so long as it is not maximized or in fullscreen d delete the main window. This will not close the last main window. e toggles the visibility of the main window border f toggles full screen viewing g show/hide the graph detail widget h show help using a web browser i save a PNG image of the graph m show/hide the menu bar or do nothing if there is a globel menu bar n make a new graph o open a data file q quit r toggles the between drawing with Cairo and X11 s show/hide of the status bar t show/hide of the graph tabs u show/hide of all GUIs w makes a new main window x toggles the X11 shape extension on and off z zoom out one level Z Zoom out all the way esc close the current focused window. This will not close the last main window. If the current focused window is in full screen this will change it to non-full screen. left/right arrow the right and left arrow keys cycle though graph tabs when the buttons and tabs are not showing [80] Top | [81] About | Help Quickplot Version 0.10.6 References 1. http://en.wikipedia.org/wiki/Comma-separated_values 2. http://www.mega-nerd.com/libsndfile/ 3. file:help.html#op_file 4. file:help.html#op_pipe 5. file:help.html#op_same_x_scale 6. file:help.html#op_same_y_scale 7. file:help.html#op_same_scale 8. file:help.html#op_different_scale 9. file:help.html#op_no_border 10. file:help.html#op_no_buttons 11. file:help.html#op_x11_draw 12. file:help.html#op_graph 13. file:help.html#op_graph_file 14. file:help.html#op_no_default_graph 15. file:help.html#op_same_scale 16. file:help.html#op_same_x_scale 17. file:help.html#op_same_y_scale 18. file:help.html#op_pipe 19. file:help.html#op_no_fullscreen 20. file:help.html#op_maximize 21. file:help.html#op_no_gaps 22. file:help.html#op_graph_file 23. file:help.html#op_graph 24. file:help.html#op_no_grid 25. file:help.html#op_no_grid_numbers 26. file:help.html#op_grid_x_space 27. file:help.html#op_no_gui 28. file:help.html#op_labels 29. file:help.html#op_skip_lines 30. file:help.html#op_label_separator 31. file:help.html#op_no_labels 32. file:help.html#op_no_linear_channel 33. file:help.html#op_no_lines 34. file:help.html#op_no_maximize 35. file:help.html#op_fullscreen 36. file:help.html#op_no_menubar 37. file:help.html#op_buttons 38. file:help.html#op_default_graph 39. file:help.html#op_fullscreen 40. file:help.html#op_gaps 41. file:help.html#op_grid 42. file:help.html#op_grid_numbers 43. file:help.html#op_gui 44. file:help.html#op_labels 45. file:help.html#op_linear_channel 46. file:help.html#op_maximize 47. file:help.html#op_menubar 48. file:help.html#op_new_window 49. file:help.html#op_pipe 50. file:help.html#op_shell 51. file:help.html#op_shape 52. file:help.html#op_statusbar 53. file:help.html#op_tabs 54. file:help.html#op_file 55. file:help.html#op_about 56. file:help.html#op_help 57. file:help.html#op_file 58. file:help.html#op_pipe 59. file:help.html#op_no_pipe 60. file:help.html#op_different_scale 61. file:help.html#op_same_x_scale 62. file:help.html#op_same_y_scale 63. file:help.html#op_same_scale 64. file:help.html#op_auto_scale 65. file:help.html#op_same_y_scale 66. file:help.html#op_same_scale 67. file:help.html#op_auto_scale 68. file:help.html#op_same_x_scale 69. file:help.html#op_no_gui 70. file:help.html#op_no_grid 71. file:help.html#op_no_border 72. file:help.html#op_no_shape 73. file:help.html#op_no_pipe 74. file:help.html#op_verbose 75. file:help.html#op_no_statusbar 76. file:help.html#op_no_tabs 77. file:help.html#op_silent 78. file:help.html#op_cairo_draw 79. http://www.gtk.org/ 80. file:index.html 81. file:about.html quickplot-0.10.6/debug_spew.c0000644000175000017500000002111712245231076013026 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /* This file will not be used if --enable-debug was not set * as a ./configure option. */ #include #include #include #include #include #include "config.h" #include "debug.h" #include "term_color.h" #include "list.h" #ifndef QP_DEBUG # error This file should not be complied with QP_DEBUG not defined #endif #ifdef DMALLOC # include "dmalloc.h" #endif static int spew_level = -1; static FILE *spew_file = NULL; static int last_spewed = 0; /* bool */ struct flag { char *file; int level; int line; }; /* list of spew levels for a given source code file */ static struct qp_sllist *file_spew_list = NULL; static char *color[] = { "\033[1;032m", /* DEBUG 0 */ "\033[1;036m", /* INFO 1 */ "\033[1;035m", /* NOTICE 2 */ "\033[1;033m", /* WARN 3 */ "\033[1;031m" /* ERROR 4 */ }; static const char * const prefix[] = { "QP_DEBUG", /* 0 */ "QP_INFO", /* 1 */ "QP_NOTICE", /* 2 */ "QP_WARNING",/* 3 */ "QP_ERROR" /* 4 */ }; static void _qp_spew_init(void) { char *env; spew_file = stdout; /* default value */ spew_level = 2; /* default value */ env = getenv("SPEW_FILE"); if(!env) env = getenv("QP_SPEW_FILE"); if(env && env[0]) { if(strncasecmp(env, "none", 4) == 0 || env[0] == '\0') { spew_level = 5; /* OFF */ spew_file = NULL; } else if(strncasecmp(env, "stdout", 4) == 0 || strncasecmp(env, "out", 1) == 0 || env[0] == '1') ; else if(strncasecmp(env, "stderr", 4) == 0 || strncasecmp(env, "err", 1) == 0 || env[0] == '2') spew_file = stderr; else { spew_file = fopen(env, "a"); if(!spew_file) spew_file = stdout; } } env = getenv("SPEW_LEVEL"); if(!env) env = getenv("QP_SPEW_LEVEL"); if(spew_level == 5 /* if NO SPEW */) env = NULL; if(env && env[0]) { if(strncasecmp(env, "off", 2) == 0 || strcasecmp(env, "no") == 0 || env[0] == '5' || env[0] == '6' || env[0] == '7' || env[0] == '8' || env[0] == '9') spew_level = 5; /* NO SPEW */ else if( strncasecmp(env, "error", 1) == 0 || env[0] == '4') spew_level = 4; /* ERROR */ else if(strncasecmp(env, "on", 1) == 0 || strncasecmp(env, "info", 1) == 0 || strncasecmp(env, "yes", 1) == 0 || env[0] == '1') spew_level = 1; /* INFO */ else if(strncasecmp(env, "notice", 3) == 0 || env[0] == '2') spew_level = 2; /* NOTICE */ else if(strncasecmp(env, "debug", 1) == 0 || env[0] == '0') spew_level = 0; /* DEBUG */ else if(strncasecmp(env, "warn", 1) == 0 || env[0] == '3') spew_level = 3; /* WARN */ } if(!qp_term_color_init()) { int i; for(i=0; i<5; ++i) color[i] = nul; } env = getenv("SPEW_FILES"); if(!env) env = getenv("QP_SPEW_FILES"); if(env && env[0]) { file_spew_list = qp_sllist_create(NULL); /* form: QP_SPEW_FILES="file:[level:[line:]]file:..." * Since levels are just 0,1,2,3,4 the valid line numbers * will always be larger. * QP_SPEW_FILES="file1.c:321:2:file2.h:file3.c:450:1" * Extra colons (:) are ignored. */ while(*env == ':') ++env; while(*env) { struct flag *f; char *p; int i; int got_line = 0; int got_level = 0; p = env+1; f = (struct flag *) qp_malloc(sizeof(*f)); f->level = spew_level; f->line = 0; while(*p && *p != ':') ++p; f->file = strndup(env, (size_t) (p - env)); VASSERT(f->file, "strndup() failed\n"); qp_sllist_append(file_spew_list, f); if(*p) ++p; while(*p == ':') ++p; for(i=0; *p && i<2; ++i) { int j; char *endptr = NULL; j = strtol(p, &endptr, 10); //DEBUG("strtol(\"%s\",)=%d endptr=\"%s\"\n", p, j, endptr); if(endptr[0] != '\0' && endptr[0] != ':') /* it did not read to the next ':' or '\0' */ break; if(j > 5) { f->line = j; got_line = 1; } else { f->level = (j>0)?j:0; got_level = 1; } ++p; while(*p && *p != ':') ++p; while(*p == ':') ++p; } if(got_line && !got_level) f->level = 0; env = p; } if(!qp_sllist_begin(file_spew_list)) { WARN("Got %s set with no files listed\n", env); qp_sllist_destroy(file_spew_list, 0); file_spew_list = NULL; } #if 1 if(qp_sllist_begin(file_spew_list)) { struct flag *f; DEBUG("Got the following per file spew list with %zu entries\n" " file line level\n", qp_sllist_length(file_spew_list)); f = qp_sllist_begin(file_spew_list); for(;f; f = qp_sllist_next(file_spew_list)) APPEND(" %d\r" " %d\r" "%s\n", f->level, f->line, f->file); } else DEBUG("Got %s set with no files listed\n", env); #endif } } /* returns: -1 spew off level from QP_SPEW_FILE was > 4 * 0 spew set from globel spew level * 1 spew on */ static inline int got_per_file_spew(const char *file, int level, int line) { struct flag *f; int ret = 0; if(!file_spew_list) return 0; for(f = (struct flag *) qp_sllist_begin(file_spew_list); f ; f = (struct flag *) qp_sllist_next(file_spew_list)) if(strcmp(f->file, file) == 0) { /* Files may be listed more than once * so we let the last entry in the list * have the last word unless we get * file and line */ if(line == f->line) { if(level >= f->level) return 1; else return -1; } if(f->line == 0) { if(level >= f->level) ret = 1; else ret = -1; } } return ret; } int _qp_spew_level(void) { if(spew_level == -1) _qp_spew_init(); return spew_level; } void _qp_spew(const char *file, int line, const char *func, int level, int show_errno, const char *format, ...) { int env_spew_set; if(spew_level == -1) _qp_spew_init(); if(level > 4) level = 4; else if(level < 0) level = 0; env_spew_set = got_per_file_spew(file, level, line); if((level >= spew_level && env_spew_set != -1) || env_spew_set == 1) { last_spewed = 1; if(!show_errno) fprintf(spew_file, "%s%s%s:%s%s:%d%s:%s%s()%s: ", color[level], prefix[level], trm, bblu, file, line, trm, btur, func, trm); else { char errstr[128]; /* thread safe strerror() */ strerror_r(errno, errstr, 128); fprintf(spew_file, "%s%s%s:%s%s:%d%s:%s%s()%s:errno=%d:\"%s\": ", color[level], prefix[level], trm, bblu, file, line, trm, btur, func, trm, errno, errstr); } va_list ap; va_start(ap, format); vfprintf(spew_file, format, ap); fflush(spew_file); va_end(ap); } else last_spewed = 0; } int _qp_spew_debug_append_is_on(void) { return last_spewed; } void _qp_spew_append(const char *format, ...) { if(last_spewed) { va_list ap; va_start(ap, format); vfprintf(spew_file, format, ap); fflush(spew_file); va_end(ap); } } void _qp_assert(const char *file, int line, const char *func, long bool_arg, const char *arg, const char *format, ...) { if(!bool_arg) { va_list ap; _qp_spew(file, line, func, 4 /* ERROR */, 1, "%sASSERTION(%s%s%s%s%s) FAILED%s: pid: %d\n", btur, trm, yel, arg, trm, btur, trm, getpid()); va_start(ap, format); vfprintf(spew_file, format, ap); va_end(ap); _qp_spew_append("\nsignal to exit, quickplot sleeping here ..."); while(1) sleep(10); } } quickplot-0.10.6/background_h2.png0000644000175000017500000002444712244565775014004 00000000000000‰PNG  IHDRq-° ‘ßbKGDÿÿÿ ½§“ IDATxœíßrÝ:r¯$%[ö‘¶lÙ²%y«Æ§&UN%¹Î]ž&Iå•òyˆÜJR™ª“OöŒöX-Y–¶´-{Ë$‘‹eHX$‚Z¿¯Êe{-.DãO£èfÿøOÿú/” móÛ="¢¢|ûÞv]Å‹¿ný–S[UTUm[¿m ú÷>×—-ýUKÅiÉڧĉñ¢¼l‰ÿ(®fÆ’QÁ‹?/¨=«}¨8û›šñ ÷f÷—1e&SpzZpö¼.ø {£å@'7ß:i !3ô«´¤’æ¯p¤ôݤ٠/~]óæ QyLQÉèkéáWÖþ.þÞOBë!ûâ3†Ì ‡ #•Ì ‡„#…Ì ‡„%…Ì ‡„%†-¤k¾ªÚ†mŸ¾_¯êë’ˆè`çÍÙð7Y.Æôa¤’ôp¤ô°ô•Y‘¾¨ÃaŒ³–óVüÿ+oZV0Öûú‚EÑ>¨‰ÿWÍøÿ#^ÔòÀZf¬-¾+ˆ—5£ñJ½Üïg2œ±]Ί?-ô’á+#0>èWÓó×ô€ž8=Bˬ¥æÇ’±'%ãYrþ—Ô¶O¾ÿ1Þ,'ÐC¦GT™A‰Bh™A‰Oð~=$:¡e=$>ƒdæ0_É\"¢ý£wOQd¹A‰Bh™M]©Ú6ûµNð~=$:.2ËÞ‰[qö7âøŒsÆ ÆnʾÂÊ‚·œ›îÑu=ãŒ3ªˆ±kbìº!ú±"¾ã}–2+ßk f=I ÜI!3éÂï**^·Ôþ¡aÍ—€¯±tøÊŒúÕôÀü5= 'NÐ2ãTþªåôSÃØ6ŒýgË駂د"i2=¢É zH4BË zH|BË zH|BË zH|zËÌq¾’¸ Ñä=$¡e6e=d~BÿÙÏ¿¡e=$>.2ËÞ‰[3þoâøŒ3þKѶ7…·õzAÌ8Hw^Ïù—š;.¦B ™1¢Õ²å¿–²ø‘¤ŸQÁÙVEl¿%ú» ýˆ¯ŒÀø _MÌ_ÓzâôÞÏ_£’½çÔ֜ں&~Ä8_‹÷Ë ôéCfÐCâZfÐC⼟A‰Nð~=$:}dæ:_UmssúI£,úCnÐCâZfSÕCÔë9¼ŸA‰Ž“í7}±†Ã9?£‚^²–²–RA/[â ù Oگ界½"ÎW‰óÕ’èû†øZf²ÓQ8C?,¡eVr¶SÛiXñ®eí§”ïr_q‘È ô«éùkz@Oœ¡eFD¿Äv£¢ZaåKFçb`|åÆ'´Ì ‡Ä'´Ì ‡Ä'´Ì ‡Ä'Â|=$2¾2󙯶O߯ÕÕj#ÿ->ý -7è!ñ -³©ê!²7÷ðê¡e=$>N2«pCh—ÄVñßñ¶øØí¬ïõ ñkùÊ ±¿àT/ÚŸ9òU$´Ì@|BËŒ½ âTrú Ñíƶ ÿã¾wÐO¦úÕôÀü5= 'NÐ2kyñûŠ·ß3âo‰ˆ8±«¶ä ú JŸñN6ˆOÁps_%³Ý?ýÿ?ñòÁ÷DDGÏ÷¡‡Dýlz„–ôø„–ô=²ãC>áÚ_™ù¬›…£f¶µw)þÞ=þa³ª¯ËªmX]”K.Éþ„–ì!ñ‰ÙצÄNà BË zH|\dÆþñŸþõ_Æ)Þ]Úæ·{DDEùv’±Ñ—Èlz@fÓr›Ùô€Ì¦d6= ³i¹MX2«Ú†íÿ°)6Ôæ ŸMÈlz@fã ;¹æ:w¤”™ÉѼ{r°QÕ×e]­6‡Ï÷/b—ã>€¾6= 3=:Ý÷ðÅëó6t@fÓ£¯Ì&NsöÞ=‘ÿÄzŽfR<;Öó€±§rÅiܱËH‡¬û"¼: 8qx“ÂiºÑÕÑ´QŒÌj˜É›ÏaÔ€IPµq榹A-g]”/œÕÅíXýÙ4®Ì¶ö.wØL)1ΉçÛ›ÅÂdtØ?z÷$…Œä>pø|ÿB|>ÛÚ»|~ü»—USGÙ´­ÖõÁΛ³ 0ª“¢ª¯ËíÓ÷ër];ª\ëjµ«¿ú£öå1ÆB1nä6~ø8´e}'Õ\oC>…+o°’çåÊÙ‡ªmY]ÁÛŠNÞUÛ°ÜÚ%˜£Ž]»Ç?lê®‰ÕÆ}¾\%"ªËªŸ©ëuƒÌØmI§“ç4èÊ7Õq*%8‰ p0í]ÆHêÏ  ?:£Õ}l㦅nêrìÍfåp}òB[6V¤(ÛþÑ»'Âx"s±Ÿ©+Ãï‡b2ÜÅ ùØu¹=ä2Ö.8¹¿…˜œâfœæ2ÑßîãX À2‘j,ì+ÆKä auµÚt9ÆvΨ¨§pÇ.OHÄ©Ëð÷•ê,ÓÕàYþ²¼R²qùqˆèbýé盲(ëy<»-Ù6˜¦.‹[ŸÎ¥Œ¹'.À=B8pe£5ÑÜX³{üÃæ2(Ç6#÷2¼ÿ²!‡{áš\º]†ÂTFY!÷”ùXM!¥ÅõÚXåè2ÜŠ¡ú„.nîÈNnÛFƒ\Brës.S˾x}."}"Ç2ÀŽ<ÉóTйÚ4w䢷Éë&uC”‰Ôuh¶™‹(ÏÍU>ÄÚ4$×YŽ¡½ÁuƒÅáóý‹Ãçû²Î¢‹¨6Wkë×òç&}¸ª¯Ë±Æ…\"7ÙP7ͤ\;M™ý£wOàĸ'È;A…ÑZ6¼Ê×Mq1ï‚Kø ûúîËÌF˜΋®…nª\Ÿ{³Ùcño“A Un\¹¾ÕP© Ò¶Põ)êAëuלln~! ×'ºžG”—ÁxáôFǦƒX§}†’›1®.J>ÛÚ»4.ï³n€+9n Q©)¨¦¹#ç™êõ9Éšƒú>ŸÂs‰Ø4¤ê¹bCÝy§.J#rÉõ¹7›=–uþ±#îøl°ˆIK‹ÍCÕ‡R­ƒ\:cnº¹)ü{NuG4Î\®nŽãž›àÄàŒ.œvá'ò¢´.J®Ë{•úäZì1C]|ËN¯vy†08€9-ÚªR¯Tùŧm¡{çÚˆ!…}sʼnò¤*KÊ…¿ì†}A¶cÔÕjCõâwco’uíWc%7å©/ÎOOeú^ÕÍ]¾!‘Ÿ©s6ö|s^ª×¤ÔRÍå&{µjc¬«ÕN\Vtª®]÷cR|v”¡´äŽ©þÆpFN S½ÉŠgª6ækpMÑgm;iC?¿ka 'RÈG­1ž†Xä°QÅ6þ)‹Íø·qùqˆèbýégñY¬|×û¥<…«#¦!Q”ã+݆çõý}¨ùÃÖÇSS]6ÊÈÈmcH= ÑYê²jWšùüÒ¨e a?†M·Â6wçâÈèdžÂàÜǹ‘J·01†ÁyJ䨾U¦pRЄ¼éyŒu€Œ<ÎærêJ÷½n,ÓÙ~¿¾l>!÷M¤Ú@6TÏ–Çæœ7¼,¤ËxñúÜ´é@µK-lÈꃮMºÊMm›>éÔÜË>ϼùw ʶýš_®¿8ý¸¶ÒÉN´mFQËõ·±ú¢ùɇT:‰þÚ¶™?—Mp¦zÑ9/eRlM¹ÁÓaŠHIá”X‘N[è@õó”!0\§¦rOÙXÐß0ØÂ1F=u•oÌPzê3åþ¡æŸMÑ\CjÉÄ/¬Þïðùþ…¬ü†ÌS«>+‡r&DØ%ÑNú„ÁõéaJm/‹íû!í_­—CFSDDWkë×â³!¬\ g1Âxù†ø‹Öï¦eÕº†çMÞXW'±Cúl”Œ¢/t^ܾˆ1O”%Åœès½:& ½g ÝÇ%ÿ´zâ=t†87bç W75¨ãÍØá÷lŒ¡·ªÏK¥×÷yO›N®dáPåiÚX‘¢®Å¿åqÖõ÷Cœ]t­Mt!•uÆû9:ûÌé*b™|¿ÐèÆ´.»LŸ{މ.„²-úþ>zgW›´Õɱd|Ö·÷’ÇßuŸÚNC¤éèŠ v²¹ùEí)ô6á4®«ÕÆ{Ób¤¾h‹üd,ˈºW½™RaÄÖK|6šҀÅ×atíYÑŠgª¾àãÀT‰^X>` m,žB wy–é¹±wŸšNÑÕEÉ}NÛv¥Š{›vתÏ…müí:yç2v/„2ܧ¥Û毇î ÷™_Bžu=U¾ðüH'Q… |Oá†>ñîr5öiÜ>'‡ž˜ô=ý«*/nã]êГ6tu)Æd]^¸Ta¿RxGE†:7bE(0!Ë-fÛÒ½“Y×mŒÓ/]2ÏWÇWñÿPÑx\ÞS7ߎyªÛ†­^å:£üªdÛä«oÝÉÑÜ¡ŸøŽáºP¨6_~zùa.ßqQ¼ŸË»¹ÞS>í,Ó–Å-v›QÓ¶‰1´Ï½bôE]ä'Ÿr }¾ŠÎðõÛß¾sŒNW‹uz¸^©;p ¿{Šñ6vÊ"ßyN\˜ CBëõÅuÂRC`¤4¦øÔE ‡óÞlöXu\‰¾Øgq´PÅ)ß/t»óÉ»ÜE §•É`Óµi E_ðu`ª„^h¨'”»”Ò¡Õ¢iÃÎÚÊc,í̦ôsS9\ÛŸi£ŠíÞ}éu9¬Ä5EÓz9„|Ú¨|’N-¯«q]”]ý,Tm¨eñ™ B/ä:ðuÞ }—(¤˜I]› ˆì2î{2qhŽà'…ñ…Mc”#uÞ¹>'9t!HcÌ]6—ÓÑN"pnÄØ,jSÔÐgÛÐu¶ßÆÒ?\6Y鮓ÿßg}dÛŒé3‹¿ueË™kZ«¸†®Œ1êú„É)ªr±þôóÓóÙãËk:'nßб¾˜æ…º(¹pð¸ï{¼ 1DwÖÐ+…Ž£¬j¿åŒ9¾ËyŒÃ«‡z8€xü²ºÒ­hT‡X Ú!Žâ1Œ)}îËÉVµ {r:ßµçýÛÀ9”BÕ“z¯2uÍ»ÜE,§U_'8Qü¾ÐçÄž®Œòýú–/ÔbÜw±óüüü!ÑÚ'×°³‚Ø'…Tg¶ëidYCê4f¿uWLå”efÚMÛ×Àb§úþÑ»'ÂYåº9"Ä}H.(Q† ÍEÇÝ/Þ¿uêÃGÑgCœ/‚ÎT‚=œ¶ ub)¦aK¾oˆûÄpÀtmÈi›_¥_ßY—!)1mŠê³ OÅ6ç ™½ú¨{M¿ 57Wí|S”ìÔéšK\ÇE›3P=££ïéÚiŸ²¦>Álª/—2¨ó`ŠÈO®N—«µõë§ç³ÇÂI¡2ÔYà:ëêC®ÛÙÖÞåóãß½4•³¡çôXŽ.]j¾ÜùoÝ6ÆÄ´"„ ¦K¶…wÍ£ë’kZu¾«'âå NòïL›mL|}e×ǾÊN`BÔ“éT°/±ì.¾› c8þL§¨otÇ÷Ži¯ ­W¦ØŒ"—3§Í/ìïÿáŸÿïXWiÛã§DDEñâãØen@fÓ2›&:¹™rüßÞþ4ôyê½ûÞS¾O]VíÉææ—¡ýB•OP4-Û9ýð(ÄýDÙZv¾ADTðÍ ×ûMËžŸŸ?T©}Ê£»WNmC —3TéÛîÔ~²å2m=» âR¾oˆvÛ÷>ºñÈ÷>/N?®‰vp¼å²¨>ÚÚ9»\-øæEßz U‡¦{º¶A—|_!Úßûô½—üyl<Úzv%÷Yîj{÷8ÚzvÅË‚ï~û¿îùªL÷,ת㿌ï˜4´-õê òû kä:¯ÙÉ"ýQ.Oß¹Ìw~6õ%“<]ê]®‹!ãŒO ­;1§ýŸëï.ž\\Dövè“;³Ïx¢þFȬâÏÏLs‰é·C×IBO%š‡¼oË‚«zµM†{³ÙcÛsmó£ Ó|.¾“ŸçÓÞBèšDö~ÖÕ~†ÈI}Ï¡ë>Û᪫™Æv“ì}ê;äX²sòß;DDÇOßü)¤-!Ç5™îž!Ë)ßWª¼*j_ Õ‡MtéM¾|©lú(ßáöö'QÙ&½Ú&ï®¶ogÄýmº¯í¹&Û…O½wÙåû Õ‹†ê¹&BÚ]úê¿¡ßÍÖgCÙøcŒaDqtÕ2&êž+»®sF²ay­ =Àh¼ßÞþÔe¼îƒærÈ%ÿ¶jêbçôã¡å‹±èP'ý>eÜ›ÍË¿ûZ”üèÉúµOùÚ²à&EÿÅéÇ5פ{³ÙãÓB;pu÷*ÏÐ\"s»ó©ÇÐuø~{ûS]V-Ñü}Ãɚʢlêï}˦ë“}Ê#rnVM]¸¶«g?]­Í‘!ÚNh¹o=ýìR6[õ­SÓ½û¼§:ÆéîëK[\–»üø¿ø^î?k_¾TDDÍ·ÏTD}¹¼·0€×eÕÊׇ“\؛ݞ†ñÍ?+Ó–—ëjHyä{)îž®˜äcÃt©/úŒ=CÛƒOß“ß}È3??|X•O1 ÁÔçMˆ±Gþc»>D?’9ÙÜü"N3÷ÕcuºõÐq]”Ƚ.]]>ã‘IÎ>ýÆT§ºúϜ×56è~;d$뫦.Dýªzµí]ó\ŸñN÷\чˆæï)Êê;ï™Ö½.úýBÛ:ýééš®2¸êt2ª®#Ê¡®3|ÊAdŸ#ä1¦Ï8cº·Ïør,ùúíTÔ½FG*¯r{]NÝX8tMß…ºiåhëÙUhçqW=m|š¯/?úªû^¬+Ä:ƒh±/¸Ê¡«í«ýS'mº¯­Ît›BB8ÎMNdy<ïC(=WEW§©ºþ‘Iµébˆ=ÈDÑ´,´^IFÆ>ã^(èÍüv¹Jäßö«¢|û¾Ïƒc’c™€Èlz@fÓD'·£·D´^ãÕÇ~aLoïñý'.f¨Uèhçíp¹¿š —;Ï@4¿G(«ÕÑÎÛ…:t-ãͻу+ùó÷[¿|"ê××t2]iˆöOo¯Ñ…U•äw¥^Òr««+ׯó{ì\<{}NË©kwD‹õ¨“ï·<ÆW1êðìÙ¼Y­Ðm»Zeö°JUÛ°Í\>}ö·¿+zÖåÑÎÛ›<0¶¶áÂÐ1Jô}•ýB~OÝ}/"¿w“ÇŒ¯\|öwÿ]-È]nÇ7ùÄWçÏ9{6ϯ»Ò­|ªÚо+.×·?ewxX[Û^kæÏ>yöú¼(J®ÊÀW~â=}ú¤ÚÄ;÷E®«¾cƒœÏ]¾GŸ9Ít¯.ª¶akÍ<4¶ëou}ÉX§ÊØ£–Q–Oßúì3¾ªm³Ïs‰ˆXùö½AŸòÄiÈïï`èó&äö#0éh }i`?º¡¼¿}õØÅP‰îºµs?ó¬KÔ±w(òxd›×uóŒÐ/ëjµ©¾…àw©?[ÿwÕ÷}çó¢|ûÞ4‡ËÏוÕg´Ø¦nÓ¬4¢¾Üõê³g-£¢°^c{' ÷,‰N¶çýS´…yY%y;¶7݉h®ß›tkU–_9Ñ÷ˆŽvnû™NÞïåƒ2Ïäu†ë:ô¦½4ndÝwŽý½*}&‡ •ç]ÙTte 9–|ÜœŸj{ÐìœëBÌé:ä±¥k ãÂîǃ 1îeø•êXH´(Û!CWÙ_ÊzîÑöüÞ1v–‰v§“ÁÃoíúúñ¯Ï MxÜ«õ‹Õ§ç³ÇO?Uí—Ç¿ú‰È¬‹Ùt~ß¶/Ï“ê8®ëÛºw”uæÃ¯Ïu©e„L]ʤê!:]Œh>ööµí…Òsu¨uÚ·=Ñû®d|l-!lü}Ö+6äqŒV‡Û–eúÊØd¿íÒóÔ1S¶¹»„*—õŒ¯|îÀ=ó´a!'.Üäü}òªªù‡æ=“IèmùŸ|sSÆÈE`ËM©Ò™c«ù­wø1Ó½tÎHYÆ&Båß0•ÍTjÙÌÆ±[bä‡íî¦\J=Êù¤MyŒCÖ¡È+Ê ÷Qß\[ºÜ÷Û-îBW{P"]:Z¬ÜÅ&=öÎu‡Œü]Èr…&Fžø¹º«úº Y]ùŽSÏç.ë$]IQ'ºõ€Ë¸1$·fteê;ïéêÆem$"_²:}_~w—<ÜÚqgÀ¡Ë™®›ºò(ÇÊq.Oµ }VÌ÷!ó`†ÊEoC—£[*÷ã· Ò›Da×­&\d`ÒƒÔ<Ñ ö±ŽÅ²3Õ»ÌkŸ…Ï5ï¨êÌ¡Ç11Øôb鹦{ö7l9”]ÇÍÝ“ƒ>øcØ|lô±És°©}ÄÇ\s|wµSŸ¾b²¹›Êaz¶8Ùë»yN\¸Gg”ÎQ%¾/‰}Ï[þ´ ‚·Ôž½:~÷³zŸX ‚ºÜ=9Øø°ùòÓ³ó?y…£ˆiLÑ »~ãzò´/]ÎH•TÎ#Ó)µl:CT×}b 3’‰ò}¥ÛðC±Ê¤:rå竸(¢¡7[øª¶a1 .ŽÆ[™… Í#Ú†ì@öéÓSpàé;D®'~"ö‹žF/Wg”IŽ} -¡‰½ÀíC g§0`¦*Ç£Mßg.<_c¨weãr¾Áéb=\þÚ¾}Þæäˆ5'Ùž¯b2褘b;Q†Ðµ‰Át‚A|CÏ–7Ù)çsÓä`çÍ™ª[ËåR—«B´XÖPŽynmz6ÑÎÑÏ»®‰E×ýMíòðÅësÙ‰ªO\¬?ýüô|öxãò㚘Ló®ì¦—1ô«º¬Ú•f^¾!¶Š˜ó„ï†-±\*¦õ¾Ž\u~üJRåD™†È@^W¸´á.gªÏ³}ÆqÝ;¦Ð™ÕqǶ²‹˜›)>›Ãu„ÜÄØG?cèkRû¼øÚÿbc]B”¿›ÊX:²#W÷ÿ©`Úc½l×} úzýJ©Ü7ÔoŠ,!6ÖŒ‰Ä%´·À–èfmÁ† ×9΢^‡ºn–Çëû8Vë¸}N»¦Ü¨éX-{¨MŒ:]£«Îbn¬ëÂu3Š‹þ–2B`çéבÊòÙpâÀp³ âÅ~ÃèS[UT]¶mý¤-§I LÕ Sqjå†Í@ÛÞÎ8åŽ_XÈÜY,È=­¢{—z˜b[ϱ̶¨Cæ ›Q-æ‰ö.GyÌþìr7uN@"¿ú©ÛèSá ©®;Ûc8Óú:`‡æsÁÔluok?÷ÑpjÃǰ.g 7—r<Ê1œ|N¨—rœ³sc¾n{uiúÿÔH)óªm˜ONaÛ}Ä¿sSlVé“SR&—úSs®yPs§úlÜTë¼ë}B…ÐöECÇÜê’ I0f*]ÙºÂâ…ÝÄ(èj7cžÆϵ9™MúÛ˜ý?—±'ê:ÖäcœµœZöMùÊ›¶*£Fº)3u˜¦E{ŠS림©:b*©¦¼`)NqëNªæ°»ó>#/o> ØÎSYLåžB;‰YF×Ó)®'Äc` Q¢-æbÎǨ2˜Š­=¸±§”4º0àD~sZ*§Á¦ÆT6¼æ†zZÌþèõ/Ô ÂéÃù`KYáB’¼¡ž9%UÆvÞÈÈIºü9ÍÁC7nú¼Ë˜áíE;™³~› ª˜ª×ý+4¶Ó®¶ Í©ðY7CKGªˆ2€sÆ ÆnÆþV¼å˜t€¤æ`çÍ™úçðùþE EÙeñ™b:ÛÚ»”©C¯çRË€X¤Ær²¦^`ªíb¬vbË=©:ÀRäŸ$Š'ãû@Ì8b,õ1Ô‡ÈfÂÖ\Øòüº|SB•­\j>aÛ}Rä-ã¹3º±xHŸŒí|è3—¥ á*ש¯3hl猈H¦›‹Õ5êå3‘Zß³.rIKæ’ë^M¥6vÙt'pÅ8‘b3…i,“Ÿ=–\U§²ü6PŽNâÀÁÿ¥hùzó-|2oëõ‚Ø—'q ¦¼©)•õN¡`q’ùäBŠç¥ç•KÛ ‘Ÿ-H9r,™J~nlEA\ž-¦Ñ¨ÏiôPùÀt˜ÚC'¦†)„»®þÆžÛq‚€¼á$ÐåŒå|èšËrHwÒ÷4nJG³+9¬Å|É¥îR0Ûzu™Ëa[›Wu“Ô2Ò•MŒ!‡/^ŸË'ÍS¥z0e¹èÀ¹¬Á-pâÀÁ9?c½d-ÍOTô²mùéÈÅd ¬ rضØ9Ys W]~¶±œ(]\ä«Nê²j«¦.}¾\ýymãŽc4¦áF Ýõ޲C=F>0"}{ÈáÂÔ0¦`°Ôò–!údª~m›Ëtaâ÷Þ=9|ñú\ü?U9‡æÆá3klrqà™Û|éT‡©ºaB·E|«L]›YÇ3rZ?‚9§ KDË蘈ý̈~È~ÃÛâç¶ ÙØålaÛ‚Ü_ [•Ë.çˆ!Dów3çlWˆ»û.–X„)–Im¸éj)êjÈIœÂ Œk€e@̶9mŒ bªîÕu=œ#ñÈeƒà}G׿s8/Ê&þm+rèw9µUYž»Ç?l޹~sp–Œ†øTÐóÿµã˜;r_EqÞèÂV½Ë9ò)gùóä¹»,!•s #š«µõë§ç³Ç"L±L ÃzÒ`÷ä`ÃÖ.…3U9)‡²Ã)\r0>@ vÞœížl¨s‡ü=Ñ|Ž«êërŒ<œDýÒ€°`sXZLéˆòÔSÔ2UF±&Ê­­æ²~sp ±BƒÉ;Š— Ý)çÑvÃkN¦ÜçPw2¶°Ä© 7²ÜE(ã;eIx*X}ß1 í¦…)r‹<ljkļ’<§Ãé?õ;8G Ó5±9,>¦:Ρ]çP•…(Q…RˆœØ;oÎä?c—kYÁI\ÀR*ïnŽˆ…øØå°íÒ¯«Õ&‡2¦@Îå—úòÁΛ³ªm˜*Qž”áÜÔ÷]ùè‹N#GwÉ!w¨:×". */ #ifndef _QP_DEBUG_H_ #error "You must include qp_debug.h before this file." #endif #define QP_FOREACH_SLLIST(list, func) \ do { \ struct qp_sllist_entry *e; \ ASSERT(list); \ e = (list)->first; \ while(e) { \ (func)(e->val); \ e = e->next; \ } \ } while(0) #define QP_FOREACH_DLLIST(list, func) \ do { \ struct qp_dllist_entry *e; \ ASSERT(list); \ e = (list)->first; \ while(e) { \ (func)(e->val); \ e = e->next; \ } \ } while(0) #define QP_FOREACH_DLLIST_R(list, func) \ do { \ struct qp_dllist_entry *e; \ ASSERT(list); \ e = (list)->last; \ while(e) { \ (func)(e->val); \ e = e->prev; \ } \ } while(0) /* singly linked list */ struct qp_sllist_entry { struct qp_sllist_entry *next; void *val; /* cast to what you like */ }; /* doubly linked list */ struct qp_dllist_entry { struct qp_dllist_entry *next; struct qp_dllist_entry *prev; void *val; /* cast to what you like */ }; /* singly linked list managing object */ struct qp_sllist { struct qp_sllist_entry *first, *last, *current; size_t length; /* if *ref_count > 1 copies have been made and we cannot edit * (add or remove entries) the list until *ref_count gets to * one by destroying copies. When *ref_count == 0 the list * entries are destroyed. In our use case it is more efficient * to stop writing when there is more than one copy then to * add another flag, counter, or pointer thing to the data * structures. We do not need the extra functionality of * multi-object editing. We need speed and multi-object * reading. */ int *ref_count; }; /* doubly linked list managing object */ struct qp_dllist { struct qp_dllist_entry *first, *last, *current; size_t length; /* if *ref_count > 1 copies have been made and we cannot edit * (add or remove entries) the list until *ref_count gets to * one by destroying copies. When *ref_count == 0 the list * entries are destroyed. In our use case it is more efficient * to stop writing when there is more than one copy then to * add another flag, counter, or pointer thing to the data * structures. We do not need the extra functionality of * multi-object editing. We need speed and multi-object * reading. */ int *ref_count; }; extern struct qp_sllist *qp_sllist_create(struct qp_sllist *l); extern struct qp_dllist *qp_dllist_create(struct qp_dllist *l); /** add val to the end */ extern void qp_sllist_append(struct qp_sllist *l, void *val); /** add val to the end */ extern void qp_dllist_append(struct qp_dllist *l, void *val); /** if free_vals is non zero all the elements will have * free(element) called on them. */ extern void qp_sllist_destroy(struct qp_sllist *l, int free_vals); /** if free_vals is non zero all the elements will have * free(element) called on them. */ extern void qp_dllist_destroy(struct qp_dllist *l, int free_vals); static inline size_t qp_sllist_length(struct qp_sllist *l) { return l->length; } static inline size_t qp_dllist_length(struct qp_dllist *l) { return l->length; } static inline void *qp_sllist_val(struct qp_sllist *l) { ASSERT(l); if(l->current) return l->current->val; return NULL; } static inline void *qp_dllist_val(struct qp_dllist *l) { ASSERT(l); if(l->current) return l->current->val; return NULL; } /** moves current forward and then get val * \return val or NULL if at the end */ static inline void *qp_sllist_next(struct qp_sllist *l) { ASSERT(l); if(l->current && l->current->next) { l->current = l->current->next; return l->current->val; } else if(l->current) l->current = NULL; return NULL; } /** moves current forward and then get current val * \return val or NULL if at the end */ static inline void *qp_dllist_next(struct qp_dllist *l) { ASSERT(l); if(l->current && l->current->next) { l->current = l->current->next; return l->current->val; } else if(l->current) l->current = NULL; return NULL; } /** moves current back and then get current val * \return val or NULL if at the begining */ static inline void *qp_dllist_prev(struct qp_dllist *l) { ASSERT(l); if(l->current && l->current->prev) { l->current = l->current->prev; return l->current->val; } else if(l->current) l->current = NULL; return NULL; } /** move to the begining * \return the first val */ static inline void *qp_sllist_begin(struct qp_sllist *l) { ASSERT(l); l->current = l->first; if(l->current) return l->current->val; return NULL; } /** move to the begining * \return the first val */ static inline void *qp_dllist_begin(struct qp_dllist *l) { ASSERT(l); l->current = l->first; if(l->current) return l->current->val; return NULL; } /** move to the ending * \return the last val */ static inline void *qp_dllist_end(struct qp_dllist *l) { ASSERT(l); l->current = l->last; if(l->current) return l->current->val; return NULL; } /** * \return the first val */ static inline void *qp_sllist_first(struct qp_sllist *l) { ASSERT(l); if(l->first) return l->first->val; return NULL; } /** * \return the first val */ static inline void *qp_dllist_first(struct qp_dllist *l) { ASSERT(l); if(l->first) return l->first->val; return NULL; } /** * \return the last val */ static inline void *qp_sllist_last(struct qp_sllist *l) { ASSERT(l); if(l->last) return l->last->val; return NULL; } /** * \return the last val */ static inline void *qp_dllist_last(struct qp_dllist *l) { ASSERT(l); if(l->last) return l->last->val; return NULL; } /* returns the number found */ extern int qp_sllist_find(struct qp_sllist *l, void *val); /* returns the number found */ extern int qp_dllist_find(struct qp_dllist *l, void *val); /** remove by pointer * This will remove all found. * * If you are sure that the current value last returned * from qp_sllist_next() is not the one you are removing * you can continue iterating with qp_sllist_next(), * otherwise the interator will be reset and * qp_sllist_next() will return after this call. * * If the value is in the list more than once * it will be freed only once. * \return the number of values found and removed. */ extern int qp_sllist_remove(struct qp_sllist *l, const void *val, int free_val); /** remove by pointer * This will remove all found. * * If you are sure that the current value last returned * from qp_sllist_next() is not the one you are removing * you can continue iterating with qp_sllist_next(), * otherwise the interator will be reset and * qp_sllist_next() will return after this call. * * If the value is in the list more than once * it will be freed only once. * \return the number of values found and removed. */ extern int qp_dllist_remove(struct qp_dllist *l, const void *val, int free_val); quickplot-0.10.6/graph_detail.c0000644000175000017500000014757212244704272013345 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "qp.h" #include "callbacks.h" #include "channel.h" #include "channel_double.h" #include "plot.h" #ifdef DMALLOC # include "dmalloc.h" #endif static __thread int _cb_view_graph_detail_reenter = 0; static gboolean graph_detail_hide(struct qp_win *qp) { ASSERT(qp); ASSERT(qp->graph_detail); ASSERT(qp->graph_detail->window); if(qp->graph_detail->window) gtk_widget_hide(qp->graph_detail->window); return TRUE; /* TRUE means event is handled */ } static inline void set_color_button(GtkWidget *w, struct qp_colora *c) { GdkRGBA rgba; rgba.red = c->r; rgba.green = c->g; rgba.blue = c->b; rgba.alpha = c->a; //DEBUG("%g %g %g %g\n", c->r, c->g, c->b, c->a); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(w), &rgba); } static inline void set_combo_box_text(GtkWidget *w, int same_scale, int same_limits) { ASSERT((same_limits && same_scale) || !same_limits); gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(w), GTK_SENSITIVITY_ON); gtk_combo_box_set_active(GTK_COMBO_BOX(w), same_scale); if(same_limits) gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(w), GTK_SENSITIVITY_OFF); else gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(w), GTK_SENSITIVITY_ON); } static void cb_same_y_scale(GtkComboBox *w, gpointer data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; ASSERT(!gr->same_y_limits); qp_graph_same_y_scale(gr, gtk_combo_box_get_active(w)?1:0); } static __thread int _ignore_slider_cb = 0; static void set_slider_val(int val, struct qp_slider *s) { if(s->val) *(s->val) = val; else if(s->dval) *(s->dval) = val; else if(s->is_plot_line_width) { struct qp_sllist *plots; struct qp_plot *p; ASSERT(s->gr); plots = s->gr->plots; for(p=qp_sllist_begin(plots);p;p=qp_sllist_next(plots)) p->line_width = val; } else { struct qp_sllist *plots; struct qp_plot *p; ASSERT(s->gr); plots = s->gr->plots; for(p=qp_sllist_begin(plots);p;p=qp_sllist_next(plots)) p->point_size = val; } if(s->callback) s->callback(s); } static void cb_scale_change(GtkRange *range, struct qp_slider *s) { int val; char str[8]; if(_ignore_slider_cb) return; val = INT((s->max - s->min)*gtk_range_get_value(range) + s->min); snprintf(str, 8, "%d", val); _ignore_slider_cb = 1; gtk_entry_set_text(GTK_ENTRY(s->entry), str); _ignore_slider_cb = 0; set_slider_val(val, s); } static void cb_text_entry(GtkEntry *entry, struct qp_slider *s) { char str[8], *ss; const char *text; int val; double dval; if(_ignore_slider_cb) return; text = gtk_entry_get_text(entry); strncpy(str, text, 7); str[7] = '\0'; for(ss = str; *ss; ++ss) if(*ss < '0' && *ss > '9') { /* Remove non-number chars */ char *c; for(c = ss; *c; ++c) *c = *(c+1); } val = strtol(str, NULL, 10); if(val < s->min) val = s->min; else if(val > s->max) { if(val > s->extended_max) val = s->max = s->extended_max; else s->max = val; } snprintf(str, 8, "%d", val); if(strcmp(str, text)) gtk_entry_set_text(entry, str); dval = s->max - s->min; dval = val/dval - s->min/dval; _ignore_slider_cb = 1; gtk_range_set_value(GTK_RANGE(s->scale), dval); _ignore_slider_cb = 0; set_slider_val(val, s); } static struct qp_slider *create_slider_input(const char *label, GtkWidget **vbox, int min, int max, int extended_max) { GtkWidget *frame, *scale, *entry, *hbox; int max_len; double v,step; char text[16]; struct qp_slider *slider; slider = qp_malloc(sizeof(*slider)); slider->min = min; slider->max = max; slider->callback = NULL; slider->extended_max = extended_max; slider->val = NULL; slider->dval = NULL; slider->is_plot_line_width = 0; slider->gr = NULL; frame = gtk_frame_new(label); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE); v = 0.3; step = 1.0/((double)(max - min)); scale = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 0.0, 1.0, 0.001); gtk_range_set_increments(GTK_RANGE(scale), step, 2*step); gtk_range_set_value(GTK_RANGE(scale), v); gtk_widget_set_size_request(scale, 100, -1); gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE); g_signal_connect(G_OBJECT(scale), "value-changed", G_CALLBACK(cb_scale_change), slider); gtk_box_pack_start(GTK_BOX(hbox), scale, TRUE, TRUE, 2); gtk_widget_show(scale); entry = gtk_entry_new(); snprintf(text, 16, "%d", extended_max); max_len = strlen(text); ASSERT(max_len <= 4); gtk_entry_set_max_length(GTK_ENTRY(entry), max_len); gtk_entry_set_width_chars(GTK_ENTRY(entry), 4); //g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(cb_text_entry_focus_out), slider); g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(cb_text_entry), slider); gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 2); gtk_widget_show(entry); slider->scale = scale; slider->entry = entry; gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_widget_show(hbox); gtk_widget_show(frame); if(*vbox) gtk_box_pack_start(GTK_BOX(*vbox), frame, FALSE, FALSE, 8); else /* let the user stuff the frame in something */ *vbox = frame; return slider; } static void set_slider_entry(struct qp_slider *slider, int val) { char text[8]; snprintf(text, 8, "%d", val); gtk_entry_set_text(GTK_ENTRY(slider->entry), text); cb_text_entry(GTK_ENTRY(slider->entry), slider); } static gboolean cb_plot_list_draw(GtkWidget *w, cairo_t *cr, struct qp_win *qp) { struct qp_graph *gr; GtkAllocation da_a; struct qp_plot *p; size_t i = 0; if(qp->update_graph_detail) /* We need to wait for a graph draw * and then this will be called again. */ return TRUE; gtk_widget_get_allocation(w, &da_a); gr = qp->current_graph; cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(cr, gr->background_color.r, gr->background_color.g, gr->background_color.b, gr->background_color.a); cairo_paint(cr); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { GtkAllocation a; int width; double w2, y; gtk_widget_get_allocation(p->x_entry, &a); y = a.y - da_a.y + a.height/2.0; if(p->lines || !(p->lines || p->points)) { width = p->line_width; if(width > 18) width = 18; cairo_set_source_rgba(cr, p->l.c.r, p->l.c.g, p->l.c.b, p->l.c.a); cairo_set_line_width(cr, width); cairo_move_to(cr, 0, y); cairo_line_to(cr, da_a.width, y); cairo_stroke(cr); } if(p->points || !(p->lines || p->points)) { width = p->point_size; if(width > 18) width = 18; w2 = width/2.0; y -= w2; cairo_set_source_rgba(cr, p->p.c.r, p->p.c.g, p->p.c.b, p->p.c.a); cairo_rectangle(cr, da_a.width/3.0 - w2, y, width, width); cairo_rectangle(cr, 2*da_a.width/3.0 - w2, y, width, width); cairo_fill(cr); } ++i; } return TRUE; } void qp_graph_detail_set_value_mode(struct qp_graph *gr) { struct qp_plot *p, *p0; if(!gr->same_x_scale) { gr->value_mode = 0; return; } p0 = qp_sllist_begin(gr->plots); if(!p0) { gr->value_mode = 0; return; } if(!p0->x->series.is_increasing) { gr->value_mode = 0; return; } for(p=qp_sllist_next(gr->plots);p;p=qp_sllist_next(gr->plots)) { if(!qp_channel_equals(p0->x, p->x) || !p->x->series.is_increasing) { gr->value_mode = 0; return; } } gr->value_mode = (1 | (2<<2)); } void cb_plot_list_redraw(struct qp_slider *s) { if(s->gr->qp->graph_detail->plot_list_drawing_area) gtk_widget_queue_draw(s->gr->qp->graph_detail->plot_list_drawing_area); } static inline void set_rgba(GtkColorButton *w, struct qp_colora *c) { GdkRGBA rgba; gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(w), &rgba); c->r = rgba.red; c->g = rgba.green; c->b = rgba.blue; c->a = rgba.alpha; } static void cb_plot_line_color(GtkColorButton *w, struct qp_plot *p) { set_rgba(w, &(p->l.c)); if(p->gr->x11) qp_plot_set_X11_color(p, &(p->l)); gtk_widget_queue_draw(p->gr->qp->graph_detail->plot_list_drawing_area); } static void cb_plot_point_color(GtkColorButton *w, struct qp_plot *p) { set_rgba(w, &(p->p.c)); if(p->gr->x11) qp_plot_set_X11_color(p, &(p->p)); gtk_widget_queue_draw(p->gr->qp->graph_detail->plot_list_drawing_area); } static inline GtkWidget *color_button_create(const char *text, void (*callback)(GtkColorButton *w, struct qp_plot *p), struct qp_colora *c, void *data) { GtkWidget *label, *picker, *hbox; char t[64]; snprintf(t, 64, "%s:", text); label = gtk_label_new(t); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); picker = gtk_color_button_new(); gtk_color_button_set_title(GTK_COLOR_BUTTON(picker), text); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(picker), TRUE); set_color_button(picker, c); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1); gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), picker, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(picker), "color-set", G_CALLBACK(callback), data); gtk_widget_show(label); gtk_widget_show(picker); gtk_widget_show(hbox); return hbox; } static inline void set_margin(GtkWidget *w, int left, int right, int top, int bottom) { gtk_widget_set_margin_left(w, left); gtk_widget_set_margin_right(w, right); gtk_widget_set_margin_top(w, top); gtk_widget_set_margin_bottom(w, bottom); } static void set_plot_lines(GtkToggleButton *button, struct qp_plot *p) { p->lines = gtk_toggle_button_get_active(button); gtk_widget_queue_draw(p->gr->qp->graph_detail->plot_list_drawing_area); } static void set_plot_points(GtkToggleButton *button, struct qp_plot *p) { p->points = gtk_toggle_button_get_active(button); gtk_widget_queue_draw(p->gr->qp->graph_detail->plot_list_drawing_area); } #define CHAR_WIDTH (24) /* make plot list for a particular graph */ static void plot_list_make(struct qp_win *qp) { GtkWidget *grid, *w; const GdkRGBA rgba = QP_DA_BG_RGBA; int row = 0; struct qp_graph *gr; struct qp_plot *p; struct qp_graph_detail *gd; PangoFontDescription *pfd; int num_plots; gr = qp->current_graph; gd = qp->graph_detail; if(qp_sllist_length(gr->plots) == 0) return; pfd = pango_font_description_from_string("Monospace Bold 11"); num_plots = qp_sllist_length(gr->plots); gd->plot_line_width_slider = qp_malloc( sizeof(struct qp_slider *)*(num_plots+1)); gd->plot_point_size_slider = qp_malloc( sizeof(struct qp_slider *)*(num_plots+1)); gd->plot_list_button_lines = qp_malloc( sizeof(GtkWidget *)*(num_plots+1)); gd->plot_list_button_points = qp_malloc( sizeof(GtkWidget *)*(num_plots+1)); gd->plot_line_width_slider[num_plots] = NULL; gd->plot_point_size_slider[num_plots] = NULL; gd->plot_list_button_lines[num_plots] = NULL; gd->plot_list_button_points[num_plots] = NULL; grid = gtk_grid_new(); qp->graph_detail->plot_list_drawing_area = w = gtk_drawing_area_new(); set_margin(w, 0, 0, 4, 4); gtk_widget_set_size_request(w, 100, -1); g_signal_connect(G_OBJECT(w), "draw", G_CALLBACK(cb_plot_list_draw), qp); gtk_grid_attach(GTK_GRID(grid), w, 0, 0, 1, 2*num_plots+2); gtk_widget_override_background_color(w, GTK_STATE_FLAG_NORMAL, &rgba); gtk_widget_show(w); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { GtkWidget *f; w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); set_margin(w, 0, 0, 4, 4); gtk_grid_attach(GTK_GRID(grid), w, 1, 2*row, 8, 1); gtk_widget_show(w); w = gtk_entry_new(); set_margin(w, 5, 2, 0, 0); if(pfd) gtk_widget_override_font(w, pfd); p->x_entry = w; gtk_entry_set_width_chars(GTK_ENTRY(w), CHAR_WIDTH); gtk_grid_attach(GTK_GRID(grid), w, 1, 2*row+1, 1, 1); gtk_widget_show(w); w = gtk_entry_new(); set_margin(w, 0, 0, 0, 0); if(pfd) gtk_widget_override_font(w, pfd); p->y_entry = w; gtk_entry_set_width_chars(GTK_ENTRY(w), CHAR_WIDTH); gtk_grid_attach(GTK_GRID(grid), w, 2, 2*row+1, 1, 1); gtk_widget_show(w); w = gtk_label_new(p->name); set_margin(w, 8, 8, 8, 8); gtk_grid_attach(GTK_GRID(grid), w, 3, 2*row+1, 1, 1); gtk_widget_show(w); f = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1); gtk_box_set_homogeneous(GTK_BOX(f), TRUE); gd->plot_list_button_lines[row] = w = gtk_check_button_new_with_label("Show Lines"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), p->lines); gtk_box_pack_start(GTK_BOX(f), w, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(set_plot_lines), p); gtk_widget_show(w); gd->plot_list_button_points[row] = w = gtk_check_button_new_with_label("Show Points"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), p->points); gtk_box_pack_start(GTK_BOX(f), w, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(set_plot_points), p); gtk_widget_show(w); gtk_widget_set_margin_left(f, 5); gtk_widget_set_margin_right(f, 5); gtk_grid_attach(GTK_GRID(grid), f, 4, 2*row+1, 1, 1); gtk_widget_show(f); w = NULL; gd->plot_line_width_slider[row] = create_slider_input( "Line Width", &w, 1, 20, 40); set_margin(w, 4, 6, 0, 0); gd->plot_line_width_slider[row]->dval = &(p->line_width); gtk_grid_attach(GTK_GRID(grid), w, 5, 2*row+1, 1, 1); set_slider_entry(gd->plot_line_width_slider[row], p->line_width); gd->plot_line_width_slider[row]->callback = cb_plot_list_redraw; gd->plot_line_width_slider[row]->gr = gr; w = NULL; gd->plot_point_size_slider[row] = create_slider_input( "Point Size", &w, 1, 20, 40); set_margin(w, 4, 6, 0, 0); gd->plot_point_size_slider[row]->dval = &(p->point_size); gtk_grid_attach(GTK_GRID(grid), w, 6, 2*row+1, 1, 1); set_slider_entry(gd->plot_point_size_slider[row], p->point_size); gd->plot_point_size_slider[row]->callback = cb_plot_list_redraw; gd->plot_point_size_slider[row]->gr = gr; w = color_button_create("Line Color", cb_plot_line_color, &(p->l.c), p); set_margin(w, 4, 4, 6, 4); gtk_grid_attach(GTK_GRID(grid), w, 7, 2*row+1, 1, 1); w = color_button_create("Point Color", cb_plot_point_color, &(p->p.c), p); set_margin(w, 4, 8, 6, 4); gtk_grid_attach(GTK_GRID(grid), w, 8, 2*row+1, 1, 1); ++row; } w = gtk_separator_new(GTK_ORIENTATION_VERTICAL); set_margin(w, 0, 1, 4, 4); gtk_grid_attach(GTK_GRID(grid), w, 9, 0, 1, 2*row+1); gtk_widget_show(w); w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); set_margin(w, 0, 0, 4, 5); gtk_grid_attach(GTK_GRID(grid), w, 1, 2*row, 8, 1); gtk_widget_show(w); if(pfd) pango_font_description_free(pfd); gtk_box_pack_start(GTK_BOX(qp->graph_detail->plot_list_hbox), grid, FALSE, FALSE, 8); gtk_widget_show(grid); if(gr->draw_value_pick) set_value_pick_entries(gr, gr->value_pick_x, gr->value_pick_y); } #define free_null_term_pointer_array(T, ptr) \ do { \ T **p; \ p = (ptr); \ for(;*p;++p) \ free(*p); \ free(ptr); \ ptr = NULL; \ } while(0) /* called this when the main window is destroyed */ void qp_graph_detail_destory(struct qp_win *qp) { struct qp_graph_detail *gd; ASSERT(qp); gd = qp->graph_detail; ASSERT(gd); gtk_widget_destroy(gd->window); if(gd->plot_line_width_slider) { free_null_term_pointer_array(struct qp_slider, gd->plot_line_width_slider); free_null_term_pointer_array(struct qp_slider, gd->plot_point_size_slider); free(gd->plot_list_button_lines); free(gd->plot_list_button_points); } free(gd->line_width_slider); free(gd->point_size_slider); free(gd->grid_line_width_slider); free(gd->grid_x_line_space_slider); free(gd->grid_y_line_space_slider); free(gd); qp->graph_detail = NULL; } void qp_graph_detail_plot_list_remake(struct qp_win *qp) { GList *l, *list; list = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->plot_list_hbox)); for(l=list;l;l=l->next) gtk_widget_destroy(GTK_WIDGET(l->data)); g_list_free(list); ASSERT(qp->graph_detail); if(qp->graph_detail->plot_line_width_slider) { free_null_term_pointer_array(struct qp_slider, qp->graph_detail->plot_line_width_slider); free_null_term_pointer_array(struct qp_slider, qp->graph_detail->plot_point_size_slider); free(qp->graph_detail->plot_list_button_lines); free(qp->graph_detail->plot_list_button_points); qp->graph_detail->plot_list_button_lines = qp->graph_detail->plot_list_button_points = NULL; } qp->graph_detail->plot_list_drawing_area = NULL; plot_list_make(qp); } #undef free_null_term_pointer_array static void plot_list_combo_box_init(struct qp_graph *gr, struct qp_graph_detail *gd) { int modes, current_modes; GtkWidget *combo; combo = gd->plot_list_combo_box; modes = (((gr->value_mode) & (3<<2)) >> 2); /* possible modes */ current_modes = (((gd->plot_list_modes) & (3<<2)) >> 2); /* current possible modes */ if(current_modes != modes) { if(modes > current_modes) { if(current_modes < 1) gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo), 1, "Interpolate Plot Values"); if(modes == 2) gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo), 2, "Pick Plot Values"); } else { if(modes < 2 && current_modes == 2) gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(combo), 2); if(current_modes >= 1 && modes == 0) gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(combo), 1); } } gtk_combo_box_set_active(GTK_COMBO_BOX(combo), gr->value_mode & 3); if(modes & 3) gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(combo), GTK_SENSITIVITY_ON); else gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(combo), GTK_SENSITIVITY_OFF); gd->plot_list_modes = ((gd->plot_list_modes) & PL_IS_SHOWING) | gr->value_mode; } static inline void configure_graph_init(struct qp_win *qp) { struct qp_graph *gr; struct qp_graph_detail *gd; ASSERT(qp); ASSERT(qp->graph_detail); ASSERT(qp->graph_detail->window); gd = qp->graph_detail; gr = qp->current_graph; { /************************************************** * Setup Show Check Buttons **************************************************/ struct qp_plot *p; int lines = 0, points = 0; GList *list, *l; GtkWidget *w; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { if(p->lines) lines = 1; if(p->points) points = 1; } /* Set to NULL so that the callbacks do not do anything. */ qp->current_graph = NULL; l = list = gtk_container_get_children(GTK_CONTAINER(gd->show_container)); /* Show Grid */ w = l->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), gr->show_grid); /* Show Grid Numbers */ l = l->next; w = l->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), gr->grid_numbers); /* Show Lines */ l = l->next; w = l->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), lines); /* Show Points */ l = l->next; w = l->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), points); /************************/ g_list_free(list); } set_color_button(gd->background_color_picker,&(gr->background_color)); set_color_button(gd->grid_color_picker,&(gr->grid_line_color)); set_color_button(gd->numbers_color_picker,&(gr->grid_text_color)); gtk_font_button_set_font_name(GTK_FONT_BUTTON(gd->font_picker), gr->grid_font); set_combo_box_text(gd->x_scale, gr->same_x_scale, gr->same_x_limits); set_combo_box_text(gd->y_scale, gr->same_y_scale, gr->same_y_limits); gd->line_width_slider->gr = gr; gd->line_width_slider->is_plot_line_width = 1; if(qp_sllist_first(gr->plots)) set_slider_entry(gd->line_width_slider, ((struct qp_plot*)qp_sllist_first(gr->plots))->line_width); else set_slider_entry(gd->line_width_slider, 4); gd->point_size_slider->gr = gr; if(qp_sllist_first(gr->plots)) set_slider_entry(gd->point_size_slider, ((struct qp_plot*)qp_sllist_first(gr->plots))->point_size); else set_slider_entry(gd->point_size_slider, 4); gd->grid_line_width_slider->val = &(gr->grid_line_width); set_slider_entry(gd->grid_line_width_slider, gr->grid_line_width); gd->grid_x_line_space_slider->val = &(gr->grid_x_space); set_slider_entry(gd->grid_x_line_space_slider, gr->grid_x_space); gd->grid_y_line_space_slider->val = &(gr->grid_y_space); set_slider_entry(gd->grid_y_line_space_slider, gr->grid_y_space); qp->current_graph = gr; } /* Setup the widget for a particular graph */ void qp_win_graph_detail_init(struct qp_win *qp) { struct qp_graph *gr; struct qp_graph_detail *gd; ASSERT(qp); ASSERT(qp->graph_detail); ASSERT(qp->graph_detail->window); gd = qp->graph_detail; gr = qp->current_graph; { char title[256]; snprintf(title, 256, "%s Graph Details", gr->name); gtk_window_set_title(GTK_WINDOW(gd->window), title); } { char text[128]; snprintf(text, 128, "Configure Graph: %s", gr->name); gtk_label_set_text(GTK_LABEL(gd->config_label), text); } if(gtk_notebook_get_current_page(GTK_NOTEBOOK(gd->notebook)) == 0) { qp->current_graph = gr; configure_graph_init(qp); qp->current_graph = NULL; } gtk_widget_queue_draw(qp->graph_detail->selecter_drawing_area); plot_list_combo_box_init(gr, gd); qp->current_graph = gr; qp_graph_detail_plot_list_remake(qp); } static void cb_plot_list_mode(GtkComboBox *w, struct qp_win *qp) { int mode; mode = gtk_combo_box_get_active(w); if(mode < 0 || mode > 2) return; if(qp->current_graph) { qp->current_graph->value_mode = (((qp->current_graph->value_mode) & (7<<2)) | mode); qp->graph_detail->plot_list_modes = ((qp->graph_detail->plot_list_modes & (7<<2)) | mode); } } static void cb_show_grid(GtkWidget *w, void *data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; gr->show_grid = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); } static void cb_show_grid_numbers(GtkWidget *w, void *data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; gr->grid_numbers = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); } static void cb_show_lines(GtkWidget *w, void *data) { struct qp_graph *gr; struct qp_plot *p; int on; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->lines = on; } static void cb_show_points(GtkWidget *w, void *data) { struct qp_graph *gr; struct qp_plot *p; int on; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->points = on; } static void cb_background_color(GtkColorButton *w, gpointer data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; set_rgba(w, &(gr->background_color)); } static void cb_grid_color(GtkColorButton *w, gpointer data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; set_rgba(w, &(gr->grid_line_color)); } static void cb_grid_numbers_color(GtkColorButton *w, gpointer data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; set_rgba(w, &(gr->grid_text_color)); } static void cb_grid_font(GtkFontButton *w, gpointer data) { struct qp_graph *gr; gr = ((struct qp_win *)data)->current_graph; if(!gr) return; if(gr->grid_font) free(gr->grid_font); gr->grid_font = qp_strdup(gtk_font_button_get_font_name(w)); if(gr->pangolayout) /* If there is no pangolayout there is no reason to call this */ qp_graph_set_grid_font(gr); } static void create_show_check_button(const char *label, void (*callback)(GtkWidget*, void*), struct qp_win *qp, GtkWidget *vbox, gboolean checked) { GtkWidget *b; b = gtk_check_button_new_with_label(label); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b), checked); if(callback) g_signal_connect(G_OBJECT(b), "toggled", G_CALLBACK(callback), qp); gtk_box_pack_start(GTK_BOX(vbox), b, FALSE, FALSE, 0); gtk_widget_show(b); } static gboolean ecb_close_graph_detail( GtkWidget *w, GdkEvent *event, gpointer data) { cb_graph_detail_show_hide(NULL, data); return TRUE;/* TRUE means event is handled */ } static void cb_same_x_scale(GtkComboBox *w, struct qp_win *qp) { struct qp_graph *gr; gr = qp->current_graph; if(!gr) return; ASSERT(!gr->same_x_limits); qp_graph_same_x_scale(gr, gtk_combo_box_get_active(w)?1:0); } static void cb_redraw(GtkButton *button, struct qp_win *qp) { if(qp->graph_detail->plot_list_drawing_area) gtk_widget_queue_draw(qp->graph_detail->plot_list_drawing_area); gtk_widget_queue_draw(qp->current_graph->drawing_area); qp->current_graph->pixbuf_needs_draw = 1; //qp->current_graph->draw_value_pick = 0; gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } static inline void add_grid_label(GtkWidget *grid, const char *text, int with_frame, int vertical, int left, int top) { GtkWidget *label, *frame; label = gtk_label_new(text); if(vertical) gtk_label_set_angle(GTK_LABEL(label), 80); frame = gtk_frame_new(NULL); if(!with_frame) gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE); gtk_container_add(GTK_CONTAINER(frame), label); gtk_widget_show(label); gtk_grid_attach(GTK_GRID(grid), frame, left, top, 1, 1); gtk_widget_show(frame); } struct qp_plotter { struct qp_win *qp; GtkWidget *radio; ssize_t channel_num; struct qp_source *source; struct qp_channel *channel; int is_y; /* 0 = x 1 = y */ }; static void cb_plotter(GtkButton *w, struct qp_plotter *pr) { GtkWidget *vbox; GList *l, *list; struct qp_plot *p; struct qp_graph *gr; struct qp_plotter *o_pr = NULL, *x_pr = NULL, *y_pr = NULL; if(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) return; /* Get the other channel */ if(pr->is_y) { vbox = pr->qp->graph_detail->selecter_x_vbox; y_pr = pr; } else { vbox = pr->qp->graph_detail->selecter_y_vbox; x_pr = pr; } l = list = gtk_container_get_children(GTK_CONTAINER(vbox)); /* first check the "none" radio button */ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l->data))) return; /* It is "none" */ for(l=list->next;l;l=l->next) { o_pr = g_object_get_data(G_OBJECT(l->data), "plotter"); if(o_pr && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l->data))) break; else o_pr = NULL; } g_list_free(list); ASSERT(o_pr); if(!o_pr) return; /* WTF */ if(x_pr) y_pr = o_pr; else x_pr = o_pr; gr = pr->qp->current_graph; /* we have the two channels x_pr and y_pr */ for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) if(qp_channel_equals(p->x, x_pr->channel) && qp_channel_equals(p->y, y_pr->channel)) break; if(p) qp_graph_remove_plot(gr, p); else qp_graph_add_plot(gr, x_pr->source, y_pr->source, x_pr->channel_num, y_pr->channel_num); //qp_win_graph_detail_init(gr->qp); #if 0 DEBUG("chan_num=%zd toggled=%d\n", pr->channel_num, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); #endif } static GtkWidget *make_channel_selecter_column(GtkWidget *hbox, struct qp_win *qp, int is_y) { GtkWidget *radio, *vbox; struct qp_source *s; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); radio = gtk_radio_button_new_with_label(NULL, "none"); gtk_box_pack_start(GTK_BOX(vbox), radio, FALSE, FALSE, 0); gtk_widget_show(radio); for(s=qp_sllist_begin(app->sources);s;s=qp_sllist_next(app->sources)) { size_t i; GtkWidget *label; label = gtk_label_new(s->name); gtk_widget_set_margin_top(label, 8); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 8); gtk_widget_show(label); for(i=0;inum_channels;++i) { char text[128]; struct qp_plotter *pr; qp_source_get_label(s, i, text, 128); radio = gtk_radio_button_new_with_label_from_widget( GTK_RADIO_BUTTON(radio), text); pr = qp_malloc(sizeof(*pr)); pr->qp = qp; pr->source = s; pr->radio = radio; pr->channel = s->channels[i]; pr->channel_num = i; pr->is_y = is_y; g_object_set_data(G_OBJECT(radio), "plotter", pr); g_signal_connect(G_OBJECT(radio), "clicked", G_CALLBACK(cb_plotter), pr); gtk_widget_set_margin_top(radio, 0); gtk_widget_set_margin_bottom(radio, 0); gtk_box_pack_start(GTK_BOX(vbox), radio, FALSE, FALSE, 0); gtk_widget_show(radio); } } gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); gtk_widget_show(vbox); return vbox; } static gboolean cb_selecter_draw(GtkWidget *w, cairo_t *cr, struct qp_win *qp) { struct qp_graph *gr; GtkAllocation da_a; GList *l, *list; struct qp_plot *p; if(qp->update_graph_detail) /* We need to wait for a graph draw * and then this will be called again. */ return TRUE; gtk_widget_get_allocation(w, &da_a); gr = qp->current_graph; cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(cr, gr->background_color.r, gr->background_color.g, gr->background_color.b, gr->background_color.a); cairo_paint(cr); cairo_set_source_rgba(cr, gr->grid_line_color.r, gr->grid_line_color.g, gr->grid_line_color.b, gr->grid_line_color.a); l = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->selecter_x_vbox)); /* The first toggle button is the "none" button. */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l->data), TRUE); g_list_free(l); l = list = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->selecter_y_vbox)); /* The first toggle button is the "none" button. */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l->data), TRUE); /* Set the X and Y Channel "none" radio buttons. */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l->data), TRUE); cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); /* skip the "none" radio button */ for(l=list->next;l;l=l->next) { GtkAllocation a; gtk_widget_get_allocation(GTK_WIDGET(l->data), &a); if(g_object_get_data(G_OBJECT(l->data), "plotter")) { cairo_rectangle(cr, 0, a.y - da_a.y + 2, a.height/2, a.height-4); cairo_rectangle(cr, da_a.width - a.height/2, a.y - da_a.y + 2, a.height/2, a.height-4); } else cairo_rectangle(cr, 0, a.y - da_a.y, da_a.width, a.height); } cairo_fill(cr); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { int x_y = 0, y_y = 0, width; double w2; for(l=list->next;l;l=l->next) { struct qp_plotter *pr; pr = g_object_get_data(G_OBJECT(l->data), "plotter"); if(!x_y && pr && qp_channel_equals(pr->channel, p->x)) { GtkAllocation a; gtk_widget_get_allocation(GTK_WIDGET(l->data), &a); x_y = a.y - da_a.y + a.height/2; if(y_y) break; } if(!y_y && pr && qp_channel_equals(pr->channel, p->y)) { GtkAllocation a; gtk_widget_get_allocation(GTK_WIDGET(l->data), &a); y_y = a.y - da_a.y + a.height/2; if(x_y) break; } } width = p->line_width; if(width > 22) width = 22; cairo_set_source_rgba(cr, p->l.c.r, p->l.c.g, p->l.c.b, p->l.c.a); cairo_set_line_width(cr, width); cairo_move_to(cr, 0, x_y); cairo_line_to(cr, da_a.width, y_y); cairo_stroke(cr); if(p->points) { width = p->point_size; if(width > 22) width = 22; w2 = width/2.0; cairo_set_source_rgba(cr, p->p.c.r, p->p.c.g, p->p.c.b, p->p.c.a); cairo_rectangle(cr, da_a.width/3 - w2, x_y + (y_y - x_y)/3 - w2, width, width); cairo_rectangle(cr, 2*da_a.width/3 - w2, x_y + 2*(y_y - x_y)/3 - w2, width, width); cairo_fill(cr); } } g_list_free(list); if(qp->current_graph->pixbuf_needs_draw) gtk_widget_queue_draw(qp->current_graph->drawing_area); return TRUE; /* TRUE means the event is handled. */ } static void plot_selecter_make(struct qp_win *qp) { GtkWidget *hbox, *da; const GdkRGBA rgba = QP_DA_BG_RGBA; hbox = qp->graph_detail->selecter_hbox; qp->graph_detail->selecter_x_vbox = make_channel_selecter_column(hbox, qp, 0); qp->graph_detail->selecter_drawing_area = da = gtk_drawing_area_new(); gtk_widget_set_size_request(da, 100, -1); g_signal_connect(G_OBJECT(da), "draw", G_CALLBACK(cb_selecter_draw), qp); gtk_box_pack_start(GTK_BOX(hbox), da, TRUE, TRUE, 0); gtk_widget_override_background_color(da, GTK_STATE_FLAG_NORMAL, &rgba); gtk_widget_show(da); qp->graph_detail->selecter_y_vbox = make_channel_selecter_column(hbox, qp, 1); } /* Call this if there are sources added or removed * and qp->graph_detail is non NULL. */ static void plot_selecter_remake(struct qp_win *qp) { GList *l, *list; l = list = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->selecter_x_vbox)); for(l=list->next;l;l=l->next) { void *pr; pr = g_object_get_data(G_OBJECT(l->data), "plotter"); if(pr) free(pr); } g_list_free(list); l = list = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->selecter_y_vbox)); for(l=list->next;l;l=l->next) { void *pr; pr = g_object_get_data(G_OBJECT(l->data), "plotter"); if(pr) free(pr); } g_list_free(list); /* Remove the widgets from the selecter_hbox */ list = l = gtk_container_get_children( GTK_CONTAINER(qp->graph_detail->selecter_hbox)); for(;l && l->data;l=l->next) gtk_widget_destroy(GTK_WIDGET(l->data)); g_list_free(list); plot_selecter_make(qp); } static GtkWidget *make_pretty_header_label(const char *text, GtkBox *vbox) { GtkWidget *hbox, *frame, *label; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 14); gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); frame = gtk_frame_new(NULL); label = gtk_label_new(text); gtk_container_add(GTK_CONTAINER(frame), label); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 8); gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); gtk_widget_show(hbox); return label; } static void make_redraw_button(GtkWidget *vbox, struct qp_win *qp) { GtkWidget *button, *hbox; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 14); gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); button = gtk_button_new_with_label("Redraw Graph"); g_signal_connect(button, "clicked", G_CALLBACK(cb_redraw), qp); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 8); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 8); gtk_widget_show(hbox); } /* Call this when a source is added or removed */ void qp_app_graph_detail_source_remake(void) { struct qp_win *qp; ASSERT(app); ASSERT(app->qps); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) if(qp->graph_detail) { qp_graph_detail_plot_list_remake(qp); plot_selecter_remake(qp); } } gboolean cb_graph_detail_switch_page(GtkNotebook *notebook, GtkWidget *page, guint page_num, struct qp_win *qp) { // page_num = 0 Configure Graph 1 Select Channels to Plot 2 Plots List if(page_num == 2 && qp->graph_detail && qp->graph_detail->plot_line_width_slider) /* Plots List */ { struct qp_slider **lws, **pss; struct qp_plot *p; struct qp_sllist *l; struct qp_graph *gr; GtkWidget **lines, **points; /* Go through 5 lists in one loop. All lists the same length * which is the number of plots. */ gr = qp->current_graph; l = gr->plots; p = qp_sllist_begin(l); pss = qp->graph_detail->plot_point_size_slider; lines = qp->graph_detail->plot_list_button_lines; points = qp->graph_detail->plot_list_button_points; for(lws=qp->graph_detail->plot_line_width_slider;lws && *lws;++lws) { int val; set_slider_entry(*lws, p->line_width); set_slider_entry(*pss, p->point_size); val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(*lines)); if((val && !p->lines) || (!val && p->lines)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*lines), p->lines); val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(*points)); if((val && !p->points) || (!val && p->points)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*points), p->points); p=qp_sllist_next(l); ++pss; ++lines; ++points; } qp->graph_detail->plot_list_modes |= PL_IS_SHOWING; plot_list_combo_box_init(gr, qp->graph_detail); if(gr->draw_value_pick) set_value_pick_entries(gr, gr->value_pick_x, gr->value_pick_y); } else if(qp->graph_detail) qp->graph_detail->plot_list_modes &= ~PL_IS_SHOWING; if(page_num == 0 && qp->graph_detail) configure_graph_init(qp); return TRUE; } /* Make a graph detail main window widget */ static void graph_detail_create(struct qp_win *qp) { struct qp_graph *gr; struct qp_graph_detail *gd; ASSERT(qp); gr = qp->current_graph; ASSERT(!qp->graph_detail); gd = (qp->graph_detail = qp_malloc(sizeof(*gd))); memset(gd, 0, sizeof(*gd)); gd->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_icon(GTK_WINDOW(gd->window), gtk_window_get_icon(GTK_WINDOW(qp->window))); gtk_window_set_default_size(GTK_WINDOW(gd->window), 600, 490); g_signal_connect(G_OBJECT(gd->window), "delete_event", G_CALLBACK(ecb_close_graph_detail), qp); g_signal_connect(G_OBJECT(gd->window), "key-press-event", G_CALLBACK(ecb_key_press), qp); { GtkWidget *notebook; notebook = gtk_notebook_new(); gd->notebook = notebook; g_object_set(G_OBJECT(notebook), "scrollable", TRUE, NULL); { /************************************************************************* * Configure Graph *************************************************************************/ GtkWidget *vbox; GtkWidget *tab_label; GtkWidget *hbox; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); gd->config_label = make_pretty_header_label("Configure Graph", GTK_BOX(vbox)); { GtkWidget *scrollwin; scrollwin = gtk_scrolled_window_new(gtk_adjustment_new(0,0,0,0,0,0), gtk_adjustment_new(0,0,0,0,0,0)); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE); { /***************************************************************************** * Left VBox *****************************************************************************/ GtkWidget *ivbox; ivbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_set_homogeneous(GTK_BOX(ivbox), FALSE); gd->show_container = ivbox; { /****************************************** * Show check buttons ******************************************/ create_show_check_button("Show Grid", cb_show_grid, qp, ivbox, gr->show_grid); create_show_check_button("Show Grid Numbers", cb_show_grid_numbers, qp, ivbox, gr->grid_numbers); create_show_check_button("Show Lines", cb_show_lines, qp, ivbox, 1); create_show_check_button("Show Points", cb_show_points, qp, ivbox, 1); } { /****************************************** * X and Y Scales ******************************************/ GtkWidget *combo_box; gd->x_scale = combo_box = gtk_combo_box_text_new(); gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo_box), 0, "Different X Scales"); gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo_box), 1, "Same X Scales"); g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(cb_same_x_scale), qp); gtk_box_pack_start(GTK_BOX(ivbox), combo_box, FALSE, FALSE, 0); gtk_widget_show(combo_box); gd->y_scale = combo_box = gtk_combo_box_text_new(); gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo_box), 0, "Different Y Scales"); gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo_box), 1, "Same Y Scales"); g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(cb_same_y_scale), qp); gtk_box_pack_start(GTK_BOX(ivbox), combo_box, FALSE, FALSE, 0); gtk_widget_show(combo_box); } { /******************************************** * Color and Font ********************************************/ GtkWidget *grid; grid = gtk_grid_new(); gtk_grid_set_row_spacing(GTK_GRID(grid), 3); gtk_grid_set_column_spacing(GTK_GRID(grid), 10); { GtkWidget *label, *picker; label = gtk_label_new ("Background Color:"); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gd->background_color_picker = picker = gtk_color_button_new(); gtk_color_button_set_title(GTK_COLOR_BUTTON(picker), "Select the Graph Background Color"); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(picker), TRUE); gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1); gtk_grid_attach(GTK_GRID(grid), picker, 1, 0, 1, 1); g_signal_connect(G_OBJECT(picker), "color-set", G_CALLBACK(cb_background_color), qp); gtk_widget_show(label); gtk_widget_show(picker); label = gtk_label_new("Grid Lines Color:"); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gd->grid_color_picker = picker = gtk_color_button_new(); gtk_color_button_set_title(GTK_COLOR_BUTTON(picker), "Select the Graph Grid Color"); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(picker), TRUE); gtk_grid_attach(GTK_GRID(grid), label, 0, 1, 1, 1); gtk_grid_attach(GTK_GRID(grid), picker, 1, 1, 1, 1); g_signal_connect(G_OBJECT(picker), "color-set", G_CALLBACK(cb_grid_color), qp); gtk_widget_show(label); gtk_widget_show(picker); label = gtk_label_new ("Grid Numbers Color:"); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gd->numbers_color_picker = picker = gtk_color_button_new(); gtk_color_button_set_title(GTK_COLOR_BUTTON(picker), "Select the Graph Grid Numbers Color"); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(picker), TRUE); gtk_grid_attach(GTK_GRID(grid), label, 0, 2, 1, 1); gtk_grid_attach(GTK_GRID(grid), picker, 1, 2, 1, 1); g_signal_connect(G_OBJECT(picker), "color-set", G_CALLBACK(cb_grid_numbers_color), qp); gtk_widget_show(label); gtk_widget_show(picker); label = gtk_label_new ("Grid Numbers Font:"); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gd->font_picker = picker = gtk_font_button_new (); gtk_font_button_set_title(GTK_FONT_BUTTON(picker), "Select the Graph Grid Numbers Font"); gtk_grid_attach(GTK_GRID(grid), label, 0, 3, 1, 1); gtk_grid_attach(GTK_GRID(grid), picker, 1, 3, 1, 1); g_signal_connect(G_OBJECT(picker), "font-set", G_CALLBACK(cb_grid_font), qp); gtk_widget_show(label); gtk_widget_show(picker); } gtk_box_pack_start(GTK_BOX(ivbox), grid, FALSE, FALSE, 0); gtk_widget_show(grid); } gtk_box_pack_start(GTK_BOX(hbox), ivbox, FALSE, FALSE, 10); gtk_widget_show(ivbox); /***************************************************************************** * Right VBox *****************************************************************************/ ivbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2); gtk_box_set_homogeneous(GTK_BOX(ivbox), FALSE); { /*********************************************** * Int Number Sliders ***********************************************/ gd->line_width_slider = create_slider_input( "Plots Line Width", &ivbox, 1, 20, 200); gd->point_size_slider = create_slider_input( "Plots Point Size", &ivbox, 1, 20, 200); gd->grid_line_width_slider = create_slider_input( "Grid Line Width", &ivbox, 1, 20, 200); gd->grid_x_line_space_slider = create_slider_input( "Grid X Line Space", &ivbox, 30, 600, 2000); gd->grid_y_line_space_slider = create_slider_input( "Grid Y Line Space", &ivbox, 30, 600, 2000); } gtk_box_pack_start(GTK_BOX(hbox), ivbox, FALSE, FALSE, 10); gtk_widget_show(ivbox); /*****************************************************************************/ } gtk_container_add(GTK_CONTAINER(scrollwin), hbox); gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), scrollwin, TRUE, TRUE, 8); gtk_widget_show(scrollwin); make_redraw_button(vbox, qp); } tab_label = gtk_label_new("Configure Graph"); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tab_label); gtk_widget_show(tab_label); gtk_widget_show(vbox); } { /************************************************************************* * Select Plots *************************************************************************/ GtkWidget *vbox, *tab_label, *scrollwin, *label, *hbox; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); make_pretty_header_label("Select Channels to Plot or Unplot", GTK_BOX(vbox)); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE); label = gtk_label_new("X Channel"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 20); gtk_widget_show(label); label = gtk_label_new("Y Channel"); gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 30); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); scrollwin = gtk_scrolled_window_new(gtk_adjustment_new(0,0,0,0,0,0), gtk_adjustment_new(0,0,0,0,0,0)); { GtkWidget *box; gd->selecter_hbox = box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_set_homogeneous(GTK_BOX(box), FALSE); plot_selecter_make(qp); gtk_container_add(GTK_CONTAINER(scrollwin), box); gtk_widget_show(box); } gtk_box_pack_start(GTK_BOX(vbox), scrollwin, TRUE, TRUE, 8); gtk_widget_show(scrollwin); //make_redraw_button(vbox, qp); gtk_widget_show(vbox); tab_label = gtk_label_new("Select Channels to Plot"); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tab_label); gtk_widget_show(tab_label); } { /************************************************************************* * Plots List *************************************************************************/ GtkWidget *vbox, *tab_label, *scrollwin; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); { GtkWidget *combo_box, *hbox; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); gd->plot_list_combo_box = combo_box = gtk_combo_box_text_new(); gtk_widget_set_size_request(combo_box, 260, -1); gd->plot_list_modes = 0; gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo_box), 0, "Pointer Value"); g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(cb_plot_list_mode), qp); gtk_box_pack_start(GTK_BOX(hbox), combo_box, FALSE, FALSE, 0); //gtk_widget_set_margin_top(combo_box, 26); //gtk_widget_set_margin_bottom(combo_box, 14); gtk_widget_show(combo_box); gtk_widget_show(hbox); } scrollwin = gtk_scrolled_window_new(gtk_adjustment_new(0,0,0,0,0,0), gtk_adjustment_new(0,0,0,0,0,0)); { GtkWidget *box; gd->plot_list_hbox = box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous(GTK_BOX(box), FALSE); plot_list_make(qp); gtk_container_add(GTK_CONTAINER(scrollwin), box); gtk_widget_show(box); } gtk_box_pack_start(GTK_BOX(vbox), scrollwin, TRUE, TRUE, 8); gtk_widget_show(scrollwin); make_redraw_button(vbox, qp); tab_label = gtk_label_new("Plots List and Values"); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tab_label); gtk_widget_show(tab_label); gtk_widget_show(vbox); } g_signal_connect(G_OBJECT(notebook), "switch-page", G_CALLBACK(cb_graph_detail_switch_page), qp); gtk_container_add(GTK_CONTAINER(qp->graph_detail->window), notebook); gtk_widget_show(notebook); } qp_win_graph_detail_init(qp); } static void graph_detail_show(struct qp_win *qp) { ASSERT(qp); if(!qp->graph_detail) graph_detail_create(qp); qp_win_graph_detail_init(qp); gtk_widget_show(qp->graph_detail->window); gtk_window_present(GTK_WINDOW(qp->graph_detail->window)); } /* We let the view menu be the holder of the state of whether * or not the graph_detail should be showing or not, instead * of declaring another variable. */ void cb_view_graph_detail(GtkWidget *w, gpointer data) { struct qp_win *qp; qp = data; if(_cb_view_graph_detail_reenter) return; _cb_view_graph_detail_reenter = 1; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail))) graph_detail_show(qp); else graph_detail_hide(qp); _cb_view_graph_detail_reenter = 0; } void cb_graph_detail_show_hide(GtkWidget *w, gpointer data) { struct qp_win *qp; qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail))) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail), FALSE); else gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail), TRUE); } quickplot-0.10.6/REPO_VERSION0000644000175000017500000000000412245423272012424 00000000000000217 quickplot-0.10.6/quickplot.1.tail.in0000644000175000017500000000161112244565775014204 00000000000000.SH "SEE ALSO" .BR quickplot_shell (1) .SH COPYRIGHT Copyright (C) 1998-2011 Lance Arsenault .PP Quickplot 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. .PP Quickplot 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. .PP You should have received a copy of the GNU General Public License along with Quickplot. If not, see . .SH AUTHOR .PP Lance Arsenault .br Send bug reports or comments to the above address. .br For more information, see the Quickplot homepage at .br <@PACKAGE_URL@>. quickplot-0.10.6/term_color.c0000644000175000017500000000460712244565775013073 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include "term_color.h" #ifdef DMALLOC # include "dmalloc.h" #endif /* for quickplot developer spew colors */ char *gry = "\033[030m"; char *red = "\033[031m"; char *grn = "\033[032m"; char *yel = "\033[033m"; char *blu = "\033[034m"; char *vil = "\033[035m"; char *tur = "\033[036m"; char *bld = "\033[1;037m"; char *bgry = "\033[1;030m"; char *bred = "\033[1;031m"; char *bgrn = "\033[1;032m"; char *byel = "\033[1;033m"; char *bblu = "\033[1;034m"; char *bvil = "\033[1;035m"; char *btur = "\033[1;036m"; char *rgry = "\033[1;7;030m"; char *rred = "\033[1;7;031m"; char *rgrn = "\033[1;7;032m"; char *ryel = "\033[1;7;033m"; char *rblu = "\033[1;7;034m"; char *rvil = "\033[1;7;035m"; char *rtur = "\033[1;7;036m"; char *rbld = "\033[1;7;037m"; char *trm = "\033[000m"; char *nul = ""; static int is_init_and_color = 0; /* 0 = not init -1 = init but no color 1 = init with color */ int qp_term_color_on(void) { return qp_term_color_init(); } int qp_term_color_init(void) { char *env; if(is_init_and_color) return ((is_init_and_color == -1)?0:1); env = getenv("QP_TERM_COLOR"); if(env && (strncasecmp(env,"off",2) == 0 || strncasecmp(env,"none",2) == 0)) { gry = red = grn = yel = blu = vil = tur = bld = bgry = bred = bgrn = byel = bblu = bvil = btur = rgry = rred = rgrn = ryel = rblu = rvil = rtur = rbld = trm = nul; is_init_and_color = -1; return 0; /* there will not be color */ } return is_init_and_color = 1; /* there will be color */ } quickplot-0.10.6/footer.htm.in0000644000175000017500000000452412244565775013175 00000000000000
@Top@ | @About@ | @Help@ Quickplot Version @VERSION@
quickplot-0.10.6/aclocal.m40000644000175000017500000013136212245423264012404 00000000000000# generated automatically by aclocal 1.13.3 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". 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_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 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_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) 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 AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # 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 AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [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]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) quickplot-0.10.6/style.css0000644000175000017500000000635212245205503012410 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /* Style Definitions */ body { color:black; background-color:#c0d0e0; margin-left:20px; margin-right:20px; font-family:sans-serif; } h1 { font-size:xx-large; font-weight:bold; text-align:center; padding: 18px 26px; margin-left: 15%; margin-right: 15%; padding: 20px; margin-bottom: 38px; background-image:url('background_h1.png'); border-top-left-radius:28px; -moz-border-radius-topleft:28px; border-top-right-radius:28px; -moz-border-radius-topright:28px; border-bottom-right-radius:20px; -moz-border-radius-bottomright:20px; border-bottom-left-radius:20px; -moz-border-radius-bottomleft:20px; } h2 { background-color:#A8C8E8; font-size:x-large; font-weight:bold; padding: 8px 26px; margin-top:40px; margin-bottom:10px; background-image:url('background_h2.png'); border-top-left-radius:28px; -moz-border-radius-topleft:28px; border-top-right-radius:28px; -moz-border-radius-topright:28px; border-bottom-right-radius:4px; -moz-border-radius-bottomright:4px; border-bottom-left-radius:4px; -moz-border-radius-bottomleft:4px; } h3 { font-size:large; font-weight:bold; padding: 8px 26px; margin-top:34px; margin-bottom:7px; } p { margin-top:2px; margin-bottom:4px; padding-top:6px; padding-bottom:6px; } li { margin-top:12px; margin-bottom:12px; } td { position:relative; vertical-align:top; padding-left:8px; padding-right:8px; padding-top:4px; padding-bottom:4px; } td.num { padding-top:1px; padding-bottom:1px; } div.num { margin-left:0px; margin-right:0px; } span.code { color:101010; white-space: nowrap; font-size: 120%; font-family: monospace; } a.nav { color:#0000EE; font-style: normal; text-decoration: none; } span.nav { color:#203; } a.nav:visited { color:#551AA0; } a.nav:hover { color:#1005E0; background-color:#6EB4EF; } a.nav:active { color: #800; background-color:#B4BBF2; } pre { white-space: pre-wrap; border:2px solid #7B87D0; margin-left:10px; margin-right:10px; padding: 10px; background-color: #9CCCE9; border-top-left-radius:10px; -moz-border-radius-topleft:10px; border-top-right-radius:10px; -moz-border-radius-topright:10px; border-bottom-right-radius:10px; -moz-border-radius-bottomright:10px; border-bottom-left-radius:10px; -moz-border-radius-bottomleft:10px; } quickplot-0.10.6/m4/0000755000175000017500000000000012245423271011134 500000000000000quickplot-0.10.6/m4/ltoptions.m40000644000175000017500000003007312245423256013357 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) quickplot-0.10.6/m4/ltversion.m40000644000175000017500000000126212245423256013347 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) quickplot-0.10.6/m4/lt~obsolete.m40000644000175000017500000001375612245423256013707 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) quickplot-0.10.6/m4/ltsugar.m40000644000175000017500000001042412245423256013003 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) quickplot-0.10.6/m4/libtool.m40000644000175000017500000106000712245423256012771 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # 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 lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); 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 lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); 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 _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) 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 ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # 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*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ 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" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. 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|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_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 $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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"`env 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 ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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}' m4_if([$1], [],[ 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`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[[23]].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) 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 # 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="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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 ;; 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [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 ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /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 AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* 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@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_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@&t@_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_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # 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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $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 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # 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) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $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='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) 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. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | 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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='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. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $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. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC 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_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 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 ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi 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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | 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 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## 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_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_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 AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 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=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # 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 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [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 ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#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 ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS quickplot-0.10.6/configure0000755000175000017500000155066412245423265012467 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for quickplot 0.10.6. # # 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 $0: http://quickplot.sourceforge.net/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_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='quickplot' PACKAGE_TARNAME='quickplot' PACKAGE_VERSION='0.10.6' PACKAGE_STRING='quickplot 0.10.6' PACKAGE_BUGREPORT='http://quickplot.sourceforge.net/' PACKAGE_URL='http://quickplot.sourceforge.net/' # 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 LIBOBJS HAVE_LOCAL_SCREENSHOTS_FALSE HAVE_LOCAL_SCREENSHOTS_TRUE IS_SVN_CO_FALSE IS_SVN_CO_TRUE NUMBER_OF_PLOTS SCALE_FACTOR QP_DEBUG_FALSE QP_DEBUG_TRUE LIB_AGE LIB_REVISION LIB_CURRENT LIB_VERSION DEFAULT_GRID_FONT RELEASE_DATE HAVE_GNU_LIB_NAMES_H_FALSE HAVE_GNU_LIB_NAMES_H_TRUE sndfile_LIBS sndfile_CFLAGS gtk_3_LIBS gtk_3_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG readline_LIBS USE_CONVERT_FALSE USE_CONVERT_TRUE USE_LYNX_FALSE USE_LYNX_TRUE HAVE_CONVERT HAVE_LYNX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC 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' ac_subst_files='STYLE_CSS FOOTER_HTM' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_developer enable_debug ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR gtk_3_CFLAGS gtk_3_LIBS sndfile_CFLAGS sndfile_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 quickplot 0.10.6 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/quickplot] --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 quickplot 0.10.6:";; 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-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-developer if you wish to build and edit Quickplot source image files and Quickplot documentation files enabling this option will add addition make file targets which are built using the programs lynx and the ImageMagick program convert. This option is required if you are building Quickplot from the repository source. (default is no developer targets). --enable-debug compile more debugging code into quickplot and libquickplot (default is no debugging code). You do not want this unless you are developing quickplot. This is unrelated to debug compile options. Adding this option makes Quickplot become Slowplot. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] 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). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP 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 gtk_3_CFLAGS C compiler flags for gtk_3, overriding pkg-config gtk_3_LIBS linker flags for gtk_3, overriding pkg-config sndfile_CFLAGS C compiler flags for sndfile, overriding pkg-config sndfile_LIBS linker flags for sndfile, 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 . quickplot home page: . _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 quickplot configure 0.10.6 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_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_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_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_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_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 http://quickplot.sourceforge.net/ ## ## ------------------------------------------------ ##" ) | 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 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 quickplot $as_me 0.10.6, 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 # LIB_VERSION=LIB_CURRENT:LIB_REVISION:LIB_AGE LIB_CURRENT=0 LIB_REVISION=1 LIB_AGE=0 # # See LIB_VERSION notes at the very bottom of this file # ################################################################# ############## END: Configure a release here #################### ################################################################# # Stuff that may be configured to change constants that # get compiled in. NUMBER_OF_PLOTS="12" # default number of plots at startup # if auto scale is set this is the factor that the span of the # plots values may differ by to be on the same scales SCALE_FACTOR="50" DEFAULT_GRID_FONT="Sans 10" ################################################################ # setting many variables before AC_PROG_* ################################################################ #AM_INIT_AUTOMAKE(option1 option2 ...) am__api_version='1.13' 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}" != 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='quickplot' VERSION='0.10.6' 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. 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 -' ac_config_headers="$ac_config_headers config.h" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $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 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_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 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 if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $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; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_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. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { 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; } && test -f conftest2.$ac_objext && { { 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 eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { 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; } && test -f conftest2.$ac_objext && { { 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 # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 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.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # 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 # 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; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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"`env 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 ;; 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_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 \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; 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 ;; *-*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*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) 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 there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 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 -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; 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 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 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 # Set options enable_dlopen=no enable_win32_dll=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; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac 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 ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; 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 | 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\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # 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\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; 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_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=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='${wl}-rpath ${wl}$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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $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 link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. 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 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 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 ;; # 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_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* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 ;; 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[23].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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 # 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="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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" ac_config_commands="$ac_config_commands libtool" # Only expand once: 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 ################################################################# LIB_VERSION="${LIB_CURRENT}:${LIB_REVISION}:${LIB_AGE}" ################################################################ # initialize the error flag error=no # Check whether --enable-developer was given. if test "${enable_developer+set}" = set; then : enableval=$enable_developer; enable_developer="$enableval" else enable_developer=no fi USE_LYNX=no USE_CONVERT=no if test "$enable_developer" != "no"; then USE_LYNX=yes USE_CONVERT=yes # Extract the first word of "lynx", so it can be a program name with args. set dummy lynx; 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_HAVE_LYNX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_LYNX"; then ac_cv_prog_HAVE_LYNX="$HAVE_LYNX" # 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_HAVE_LYNX="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_LYNX" && ac_cv_prog_HAVE_LYNX="no" fi fi HAVE_LYNX=$ac_cv_prog_HAVE_LYNX if test -n "$HAVE_LYNX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LYNX" >&5 $as_echo "$HAVE_LYNX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "convert", so it can be a program name with args. set dummy convert; 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_HAVE_CONVERT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_CONVERT"; then ac_cv_prog_HAVE_CONVERT="$HAVE_CONVERT" # 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_HAVE_CONVERT="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_CONVERT" && ac_cv_prog_HAVE_CONVERT="no" fi fi HAVE_CONVERT=$ac_cv_prog_HAVE_CONVERT if test -n "$HAVE_CONVERT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_CONVERT" >&5 $as_echo "$HAVE_CONVERT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$HAVE_LYNX != xyes; then error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lynx is required with --enable-developer homepage: http://lynx.isc.org/" >&5 $as_echo "$as_me: WARNING: lynx is required with --enable-developer homepage: http://lynx.isc.org/" >&2;} fi if test x$HAVE_CONVERT != xyes; then error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: convert from ImageMagick is required with --enable-developer homepage: http://www.imagemagick.org/" >&5 $as_echo "$as_me: WARNING: convert from ImageMagick is required with --enable-developer homepage: http://www.imagemagick.org/" >&2;} fi fi if test x$USE_LYNX = xyes; then USE_LYNX_TRUE= USE_LYNX_FALSE='#' else USE_LYNX_TRUE='#' USE_LYNX_FALSE= fi if test x$USE_CONVERT = xyes; then USE_CONVERT_TRUE= USE_CONVERT_FALSE='#' else USE_CONVERT_TRUE='#' USE_CONVERT_FALSE= fi 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 fi done for ac_func in vsnprintf \ powl 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 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html # =========================================================================== # # SYNOPSIS # # AX_LIB_READLINE # # DESCRIPTION # # Searches for a readline compatible library. If found, defines # `HAVE_LIBREADLINE'. If the found library has the `add_history' function, # sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the # necessary include files and sets `HAVE_READLINE_H' or # `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or # 'HAVE_HISTORY_H' if the corresponding include files exists. # # The libraries that may be readline compatible are `libedit', # `libeditline' and `libreadline'. Sometimes we need to link a termcap # library for readline to work, this macro tests these cases too by trying # to link with `libtermcap', `libcurses' or `libncurses' before giving up. # # Here is an example of how to use the information provided by this macro # to perform the necessary includes or declarations in a C file: # # #ifdef HAVE_LIBREADLINE # # if defined(HAVE_READLINE_READLINE_H) # # include # # elif defined(HAVE_READLINE_H) # # include # # else /* !defined(HAVE_READLINE_H) */ # extern char *readline (); # # endif /* !defined(HAVE_READLINE_H) */ # char *cmdline = NULL; # #else /* !defined(HAVE_READLINE_READLINE_H) */ # /* no readline */ # #endif /* HAVE_LIBREADLINE */ # # #ifdef HAVE_READLINE_HISTORY # # if defined(HAVE_READLINE_HISTORY_H) # # include # # elif defined(HAVE_HISTORY_H) # # include # # else /* !defined(HAVE_HISTORY_H) */ # extern void add_history (); # extern int write_history (); # extern int read_history (); # # endif /* defined(HAVE_READLINE_HISTORY_H) */ # /* no history */ # #endif /* HAVE_READLINE_HISTORY */ # # LICENSE # # Copyright (c) 2008 Ville Laurikari # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 6 # This is what autoupdate's m4 run will expand. It fires # the warning (with _au_warn_XXX), outputs it into the # updated configure.ac (with AC_DIAGNOSE), and then outputs # the replacement expansion. # This is an auxiliary macro that is also run when # autoupdate runs m4. It simply calls m4_warning, but # we need a wrapper so that each warning is emitted only # once. We break the quoting in m4_warning's argument in # order to expand this macro's arguments, not AU_DEFUN's. # Finally, this is the expansion that is picked up by # autoconf. It tells the user to run autoupdate, and # then outputs the replacement expansion. We do not care # about autoupdate's warning because that contains # information on what to do *after* running autoupdate. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5 $as_echo_n "checking for a readline compatible library... " >&6; } if ${ax_cv_lib_readline+:} false; then : $as_echo_n "(cached) " >&6 else ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do for termcap_lib in "" termcap curses ncurses; do if test -z "$termcap_lib"; then TRY_LIB="-l$readline_lib" else TRY_LIB="-l$readline_lib -l$termcap_lib" fi LIBS="$ORIG_LIBS $TRY_LIB" 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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_lib_readline="$TRY_LIB" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -n "$ax_cv_lib_readline"; then break fi done if test -n "$ax_cv_lib_readline"; then break fi done if test -z "$ax_cv_lib_readline"; then ax_cv_lib_readline="no" fi LIBS="$ORIG_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline" >&5 $as_echo "$ax_cv_lib_readline" >&6; } if test "$ax_cv_lib_readline" != "no"; then LIBS="$LIBS $ax_cv_lib_readline" $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h for ac_header in readline.h readline/readline.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5 $as_echo_n "checking whether readline supports history... " >&6; } if ${ax_cv_lib_readline_history+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_lib_readline_history="no" 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 add_history (); int main () { return add_history (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_lib_readline_history="yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline_history" >&5 $as_echo "$ax_cv_lib_readline_history" >&6; } if test "$ax_cv_lib_readline_history" = "yes"; then $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h for ac_header in history.h readline/history.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$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 fi fi if test "$ax_cv_lib_readline" != "no"; then readline_LIBS="$ax_cv_lib_readline" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libreadline version >= 6.2 is required homepage: http://tiswww.case.edu/php/chet/readline/rltop.html" >&5 $as_echo "$as_me: WARNING: libreadline version >= 6.2 is required homepage: http://tiswww.case.edu/php/chet/readline/rltop.html" >&2;} error=yes fi #AM_CONDITIONAL([HAVE_READLINE], [test "$ax_cv_lib_readline" != "no"]) 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 gtk_3" >&5 $as_echo_n "checking for gtk_3... " >&6; } if test -n "$gtk_3_CFLAGS"; then pkg_cv_gtk_3_CFLAGS="$gtk_3_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.0.12\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.0.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtk_3_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 3.0.12" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$gtk_3_LIBS"; then pkg_cv_gtk_3_LIBS="$gtk_3_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.0.12\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.0.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtk_3_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 3.0.12" 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 gtk_3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= 3.0.12" 2>&1` else gtk_3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= 3.0.12" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$gtk_3_PKG_ERRORS" >&5 error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gtk+-3.0 version >= 3.0.12 is required homepage: http://www.gtk.org/" >&5 $as_echo "$as_me: WARNING: gtk+-3.0 version >= 3.0.12 is required homepage: http://www.gtk.org/" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gtk+-3.0 version >= 3.0.12 is required homepage: http://www.gtk.org/" >&5 $as_echo "$as_me: WARNING: gtk+-3.0 version >= 3.0.12 is required homepage: http://www.gtk.org/" >&2;} else gtk_3_CFLAGS=$pkg_cv_gtk_3_CFLAGS gtk_3_LIBS=$pkg_cv_gtk_3_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 sndfile" >&5 $as_echo_n "checking for sndfile... " >&6; } if test -n "$sndfile_CFLAGS"; then pkg_cv_sndfile_CFLAGS="$sndfile_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_sndfile_CFLAGS=`$PKG_CONFIG --cflags "sndfile >= 1.0.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$sndfile_LIBS"; then pkg_cv_sndfile_LIBS="$sndfile_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_sndfile_LIBS=`$PKG_CONFIG --libs "sndfile >= 1.0.5" 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 sndfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sndfile >= 1.0.5" 2>&1` else sndfile_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sndfile >= 1.0.5" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$sndfile_PKG_ERRORS" >&5 error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lib sndfile version >= 1.0.5 is required homepage: http://www.mega-nerd.com/libsndfile/" >&5 $as_echo "$as_me: WARNING: lib sndfile version >= 1.0.5 is required homepage: http://www.mega-nerd.com/libsndfile/" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } error=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lib sndfile version >= 1.0.5 is required homepage: http://www.mega-nerd.com/libsndfile/" >&5 $as_echo "$as_me: WARNING: lib sndfile version >= 1.0.5 is required homepage: http://www.mega-nerd.com/libsndfile/" >&2;} else sndfile_CFLAGS=$pkg_cv_sndfile_CFLAGS sndfile_LIBS=$pkg_cv_sndfile_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ################################################################ # --enable-debug ################################################################ # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug="$enableval" else enable_debug=no fi case "$enable_debug" in y* | Y* ) debug=yes ;; * ) debug=no ;; esac ################################################################ # test for gnu/lib-names.h ################################################################ HAVE_GNU_LIB_NAMES_H=no # This is so we can see if the file gnu/lib-names.h is present and # works so that we can make the libraries executable. See that this # compiles will be a good enough test. Used in # libquickplot/lib_main.c { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gnu/lib-names.h is present and works\ so we can make libraries executable" >&5 $as_echo_n "checking if gnu/lib-names.h is present and works\ so we can make libraries executable... " >&6; } # Below the real code requires a "const char my_interp[] __att.... " # etc, but I don't know how to make a '[' in an autoconf string. if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: CROSS-COMPILING" >&5 $as_echo "CROSS-COMPILING" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __i386__ # define LIBDIR "/lib/" #endif #ifdef __x86_64__ # define LIBDIR "/lib64/" #endif #ifndef LIBDIR # error "The compiler did not define __i386__ or __x86_64__" #endif const char my_interp[] __attribute__ ((section(".interp")))= LIBDIR LD_SO; int main(void) { /* do something so the compiler does not give a warning */ char *ptr = (char *) my_interp; ptr += 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GNU_LIB_NAMES_H=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test x$HAVE_GNU_LIB_NAMES_H = xyes; then HAVE_GNU_LIB_NAMES_H_TRUE= HAVE_GNU_LIB_NAMES_H_FALSE='#' else HAVE_GNU_LIB_NAMES_H_TRUE='#' HAVE_GNU_LIB_NAMES_H_FALSE= fi ################################################################# # AC_SUBST() go into Makefile.am files and other .in files # AC_DEFINE*() go into config.h # replace @STYLE_CSS@ with the file style.css STYLE_CSS="${srcdir}/style.css" # replace @FOOTER_HTM@ with the file footer.htm FOOTER_HTM="footer.htm" RELEASE_DATE="`${srcdir}/release_date.sh ${srcdir}/RELEASE_DATE`" cat >>confdefs.h <<_ACEOF #define DEFAULT_GRID_FONT "$DEFAULT_GRID_FONT" _ACEOF cat >>confdefs.h <<_ACEOF #define LIB_VERSION "$LIB_VERSION" _ACEOF if test x$debug = xyes; then QP_DEBUG_TRUE= QP_DEBUG_FALSE='#' else QP_DEBUG_TRUE='#' QP_DEBUG_FALSE= fi if test x$debug == xyes ; then cat >>confdefs.h <<_ACEOF #define QP_DEBUG 1 _ACEOF fi cat >>confdefs.h <<_ACEOF #define SCALE_FACTOR $SCALE_FACTOR _ACEOF cat >>confdefs.h <<_ACEOF #define NUMBER_OF_PLOTS $NUMBER_OF_PLOTS _ACEOF if test -f .svn/all-wcprops; then IS_SVN_CO_TRUE= IS_SVN_CO_FALSE='#' else IS_SVN_CO_TRUE='#' IS_SVN_CO_FALSE= fi if test -f screenshots.html.in; then HAVE_LOCAL_SCREENSHOTS_TRUE= HAVE_LOCAL_SCREENSHOTS_FALSE='#' else HAVE_LOCAL_SCREENSHOTS_TRUE='#' HAVE_LOCAL_SCREENSHOTS_FALSE= fi ################################################################# # We show all warnings to the user before erroring out. This # beats having the user fix one error in order to get to the next. # Instead we show all the warnings (errors) that we can. if test x$error = xyes ; then as_fn_error $? " Failed to configure quickplot version $VERSION. See above WARNING(s). " "$LINENO" 5 fi ################################################################# ac_config_files="$ac_config_files Makefile quickplot.pc footer.htm about.htm help_head.htm help_tail.htm index.htm quickplot.1.head quickplot.1.tail quickplot_shell.1" 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 "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_LYNX_TRUE}" && test -z "${USE_LYNX_FALSE}"; then as_fn_error $? "conditional \"USE_LYNX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_CONVERT_TRUE}" && test -z "${USE_CONVERT_FALSE}"; then as_fn_error $? "conditional \"USE_CONVERT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GNU_LIB_NAMES_H_TRUE}" && test -z "${HAVE_GNU_LIB_NAMES_H_FALSE}"; then as_fn_error $? "conditional \"HAVE_GNU_LIB_NAMES_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${QP_DEBUG_TRUE}" && test -z "${QP_DEBUG_FALSE}"; then as_fn_error $? "conditional \"QP_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SVN_CO_TRUE}" && test -z "${IS_SVN_CO_FALSE}"; then as_fn_error $? "conditional \"IS_SVN_CO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_SCREENSHOTS_TRUE}" && test -z "${HAVE_LOCAL_SCREENSHOTS_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_SCREENSHOTS\" 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 quickplot $as_me 0.10.6, 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 . quickplot home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ quickplot config.status 0.10.6 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" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' 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"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $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"`' OBJDUMP='`$ECHO "$OBJDUMP" | $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"`' DLLTOOL='`$ECHO "$DLLTOOL" | $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_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"`' 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 SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ 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_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; 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; 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" ;; "quickplot.pc") CONFIG_FILES="$CONFIG_FILES quickplot.pc" ;; "footer.htm") CONFIG_FILES="$CONFIG_FILES footer.htm" ;; "about.htm") CONFIG_FILES="$CONFIG_FILES about.htm" ;; "help_head.htm") CONFIG_FILES="$CONFIG_FILES help_head.htm" ;; "help_tail.htm") CONFIG_FILES="$CONFIG_FILES help_tail.htm" ;; "index.htm") CONFIG_FILES="$CONFIG_FILES index.htm" ;; "quickplot.1.head") CONFIG_FILES="$CONFIG_FILES quickplot.1.head" ;; "quickplot.1.tail") CONFIG_FILES="$CONFIG_FILES quickplot.1.tail" ;; "quickplot_shell.1") CONFIG_FILES="$CONFIG_FILES quickplot_shell.1" ;; *) 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 if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi 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 # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { 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 = "" \$ac_cs_awk_pipe_init } { 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 } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _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" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 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="" # ### BEGIN LIBTOOL CONFIG # 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 PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # 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 # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # 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 # DLL creation program. DLLTOOL=$lt_DLLTOOL # 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 # 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 # ### 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" ;; 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 # you can add spew here { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------------------------------------------------------------ done configuring: $PACKAGE_NAME version $VERSION ------------------------------------------------------------ extra debug code: $debug extra developer targets: $enable_developer C Compiler (CC): $CC C Compiler Flags (CFLAGS): $CFLAGS C Linker Flags (LDFLAGS): $LDFLAGS Installation prefix (prefix): $prefix srcdir: $srcdir " >&5 $as_echo " ------------------------------------------------------------ done configuring: $PACKAGE_NAME version $VERSION ------------------------------------------------------------ extra debug code: $debug extra developer targets: $enable_developer C Compiler (CC): $CC C Compiler Flags (CFLAGS): $CFLAGS C Linker Flags (LDFLAGS): $LDFLAGS Installation prefix (prefix): $prefix srcdir: $srcdir " >&6; } ###################################################################### # LIB_VERSION notes ###################################################################### # Updating library version interface information # (from libtool version 1.4.3 info page) # GNU LibTool library interface numbers # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that # this library implements. In other words, the library implements # all the interface numbers in the range from number `CURRENT - # AGE' to `CURRENT'. # # # 1. Start with version information of `0:0:0' for each libtool # library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are # unnecessary, and only guarantee that the current interface # number gets larger faster. We do it just after a release. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public # release, then set AGE to 0. # quickplot-0.10.6/bootstrap0000755000175000017500000000317412244565775012523 00000000000000#! /bin/bash # Quickplot - an interactive 2D plotter # # Copyright (C) 1998-2011 Lance Arsenault # This file is part of Quickplot. # # Quickplot 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. # # Quickplot 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 Quickplot. If not, see . # #--------------------------------------------------------------------- # WHAT'S THIS FOR # Run this if you just got this package from Subversion. # This is run to generate files, configure, Makefile.in and the-like, # that are needed to make the files in this directory into something # closer to a package for source distribution, packages source # tar-ball files. The files that this starts with commonly come from # a Subversion or other file repository. This uses the GNU Autotools. #--------------------------------------------------------------------- d=$(echo "$0"|sed 's/[^/]*$//') [ -z "$d" ] && d='.' if [ "$(cd "$d" 2>/dev/null && echo "${PWD}")" != "${PWD}" ] then echo "This script ($0) must be executed directly\ from the top $0 source directory." exit 1 fi # Today bootscrap is easy with autoreconf autoreconf --force --verbose --install quickplot-0.10.6/house.png0000644000175000017500000000402712244565775012407 00000000000000‰PNG  IHDROWE±pbKGDÿÿÿ ½§“ÌIDATxœíœ}ŒõÇ?Ïìwpˆ@!½·}9°õHc”ÆØˆ¡ib‚F¸Ý;ÁÊQ¬„4h4Ò cB±áMšrw‘„—9 Ѷ&„Úµ’¦+ÂîÞ±»R‹%Q¸›yúœ±xwìÞ̾çóçíožç{Ÿ<;¿›ÙÙb Å0³ÓßÿžO¯¬°dÄòÕŸü§Ø™®§$åÅÎÔOIJۀúk?:å7ü-»Ÿ~^ÄXßÂ(v€ë‰%ƒ“µÏÞ Ô#G8Ô÷YÖιŸ…&;ß7))ys¡:Ê|»E‚Á¾ò(ö•GAŽ êë5vÏI„ꊳŸ’yÛ6¦ÂSDh˜ü ½ò”Y“ªG"#¶÷(|®Ê‚}5‰“ÅM\"“לO5DÛ&(¼Ë…‘Oö‹0kÒ=•½öb>˜`´5§ÃS‹™J`òšÏF¦Y½Ú*Â…Cã«Æ-ß*G{Z»Hï,û"óÅ`&ÈyÛ°~±/ÐùI#MQ'¯9ú‘e]‡ÈÁ¡Äl•£½ãªÆ-Cä èxQãÍÆT臅ÌüMŠ&¯±³î[ä QƨÊ[|R\?[åh/Æ—«Ê[¢Œ1 ÙÑØYwG!2_OQä5¦‚Ó ¿¯åÈáøófV¶Ç›MXr8þ¼ Pn1ü¾ÖÆTpz>3DÁÏyÑLäQÝŒT›}Ój+W öpj­RŒc©ð1hzÀXlVŸ:ìnâÁ)¨¼XWø^õñº@…"ovTÅ_APGEiÊDV*ús ‹%f]âwMÁäEÓá™(D(S´½£*ùªcqý(Í„^¤E•^„eÕ‰¿¸R{ "/z:ô3D~'B[Ì@bC^ú¤Ã˫ҋê¯:j“óѧŸ¼o±Lè!ñëE(S•ÍùÐQX¯*›E(Ÿ±>– =”¯^çÉ‹¥"³1xUŸ²no ¾-ŸýúiêŽ<¡¶®@ÄÂæE³&~ }ò&¯©;ÜhÛ¬0P]kÖ$ßÈW¯ˆ¦B¿‘glÃ`åÞ@bŸÛ=ò"/–=ò"€«÷V%vå£ÏhÊ„çªò€­ºf_Mr§›õ]—ה޴(ú‚‚ŠÈ*³*¾Çí¹ËDšUu•€òêÞêx»[µ]•=~J –)Ø‚þÚ¬Nv¸Y¸ÄÒ¡¨"/ËÕ r½Yø½u]“Ë„– ²Ä}Ö¬NüÉ­ÚnM‡g ²Ô‡è&³*¹ÙiMWäEO‡Vˆ!O ô)²¢£&þŽuÝ&šŠ< è:¿Úº­£6¹ÎI=Çò¢™Ès¢ú8pÅBžÙ_ÿ«ÓšùdN:r¿ÝŒ@d»Yÿípk _ž"Ñtø%æ—Q{©YÓùÞ°ëX*xblÊUÙÕQX=œKÅaÉ[¥Ç2¡U‚4+\ƒ§Í@a.ÆÝ"Úú ¶l¨@ØÝH¬ÎõîNÎò®Š‹¼,h¸hØ,ÚS›ø{®uJX*t7"F˜ Uñßä"0'y1ÅG&¼˜|‰!‹Ì@ühŽ™KŠXwäNµÙ&h%ðGªÏ™’ÝÙ¬o ÌÐ~2á×€Y( ¿´ÜìâÌ@ü¨ÏÏ|” À,2á×fè 6Çf5y±ã #äÖž ÷ÿµ-cᾺSÇ„.5»ê Ÿ½«ð®\¹Ìl8~e¨cn(ï“õå•£t“¨ÞrÞ0úî tý˵Ô%DswÝ,Û×*0NEÞûê¢,}gʩ˃­RÞ‚d°âK¿ñº÷ç ÛX°§öTÜõÔ%DóéúˆmØíÀD”÷+ûì%m¡ÎK­TÞƒÝQåZ±U”»TùLʬsrW2o©KˆØÙºöúÚE˜¤ðÑeãÒ“oº/^¿nÀ #v®at¹U±]”»€´àŸû]`NîJÚbÌÒw—[Û;;©òúußš¼Øùð­ú;D˜œö•—µìžx¢»¡KGþ}[ÀºÜÛÔªrL*YhŽO\èýÿ&ïádp,=´Š0 ¡Ëê³æWÅìžx¢Ûê³æ#t‰0ZNÇö¿þµ¼y]µãü~_JpÒ/þyûƒ]gŠ’º„Øì:ãÿ<à$Jƒßïk›×U;®½mcgê'ªe· D>µ± Ÿ.&ž˜:¡¼²¯U`ªB\|F‹D3á×6,QøèêÛÖfÐ?=F4g±tøD,>‘Ç<%A.¿gI@ôÐíÉeO;í[ Yܘ¼ìèüÔ…žƒQÐ,Ž'¯ŸÛ;Ÿ¹íFk>n,ÈJ¡²xç<xòàÉs€kç<7¨9p$‹ÝR¥fÿ8/»u®”Úäe±[æu·Î‰’š¼~R³§¸[Ö8RR÷Kmòn*. # #################################################################### VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 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@ @HAVE_LOCAL_SCREENSHOTS_TRUE@am__append_1 = \ @HAVE_LOCAL_SCREENSHOTS_TRUE@ screenshots.html @HAVE_LOCAL_SCREENSHOTS_TRUE@am__append_2 = \ @HAVE_LOCAL_SCREENSHOTS_TRUE@ screenshots.html noinst_PROGRAMS = mk_options$(EXEEXT) # For making libquickplot.so executable if we are using GCC # and glibc which we tested in configure by compiling with the # gnu/lib-names.h file. @HAVE_GNU_LIB_NAMES_H_TRUE@am__append_3 = exec_lib.c @HAVE_GNU_LIB_NAMES_H_TRUE@am__append_4 = -shared -Wl,-e -Wl,qp_exec_lib @HAVE_GNU_LIB_NAMES_H_TRUE@am__append_5 = -fPIC @HAVE_GNU_LIB_NAMES_H_FALSE@am__append_6 = exec_lib.c @QP_DEBUG_TRUE@am__append_7 = debug_spew.c @QP_DEBUG_FALSE@am__append_8 = debug_spew.c bin_PROGRAMS = quickplot$(EXEEXT) quickplot_shell$(EXEEXT) @QP_DEBUG_TRUE@am__append_9 = debug_spew.c @USE_CONVERT_TRUE@am__append_10 = .png .xpm @USE_LYNX_TRUE@am__append_11 = .txt subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/quickplot.pc.in \ $(srcdir)/footer.htm.in $(srcdir)/about.htm.in \ $(srcdir)/help_head.htm.in $(srcdir)/help_tail.htm.in \ $(srcdir)/index.htm.in $(srcdir)/quickplot.1.head.in \ $(srcdir)/quickplot.1.tail.in $(srcdir)/quickplot_shell.1.in \ depcomp $(quickplotinclude_HEADERS) COPYING TODO compile \ config.guess config.sub install-sh missing ltmain.sh 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)/ax_lib_readline.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = quickplot.pc footer.htm about.htm help_head.htm \ help_tail.htm index.htm quickplot.1.head quickplot.1.tail \ quickplot_shell.1 CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(quickplotincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libquickplot_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libquickplot_la_SOURCES_DIST = app_op_declare.h app_op_init.h \ callbacks.c callbacks.h channel.c channel_double.c \ channel_double.h channel.h color_gen.c color_gen.h config.h \ debug.h get_opt.c get_opt.h graph.c graph_detail.c \ graph_draw.c graph_grid.c imgCopyWindow.xpm \ imgDeleteWindow.xpm imgGrabCursor.xpm imgHoldCursor.xpm \ imgNewWindow.xpm imgSaveImage.xpm launch_browser.c list.c \ list.h parse_1st_pass_funcs.h parse_2nd_pass_funcs.h \ parse_args.h parse_args_utils.h parse_argument_options.c \ paths.h plot.c plot.h process_gtk_options.c qp.c qp.h \ quickplot.h quickplot.xpm shell.c shell_get_set_values.h \ shell.h source.c source_double.c shell_common.c shell_common.h \ shell_server_commands.c spew.c spew.h term_color.c \ term_color.h utils.h win.c zoom.h exec_lib.c debug_spew.c @HAVE_GNU_LIB_NAMES_H_TRUE@am__objects_1 = lib-exec_lib.lo @QP_DEBUG_TRUE@am__objects_2 = lib-debug_spew.lo am_libquickplot_la_OBJECTS = lib-callbacks.lo lib-channel.lo \ lib-channel_double.lo lib-color_gen.lo lib-get_opt.lo \ lib-graph.lo lib-graph_detail.lo lib-graph_draw.lo \ lib-graph_grid.lo lib-launch_browser.lo lib-list.lo \ lib-parse_argument_options.lo lib-plot.lo \ lib-process_gtk_options.lo lib-qp.lo lib-shell.lo \ lib-source.lo lib-source_double.lo lib-shell_common.lo \ lib-shell_server_commands.lo lib-spew.lo lib-term_color.lo \ lib-win.lo $(am__objects_1) $(am__objects_2) libquickplot_la_OBJECTS = $(am_libquickplot_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libquickplot_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libquickplot_la_CFLAGS) $(CFLAGS) $(libquickplot_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_mk_options_OBJECTS = mk_options.$(OBJEXT) mk_options_OBJECTS = $(am_mk_options_OBJECTS) mk_options_LDADD = $(LDADD) am_quickplot_OBJECTS = qp-qp_main.$(OBJEXT) quickplot_OBJECTS = $(am_quickplot_OBJECTS) quickplot_DEPENDENCIES = libquickplot.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) quickplot_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(quickplot_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__quickplot_shell_SOURCES_DIST = list.c debug.h list.h qp_shell.c \ shell_common.c shell_common.h spew.c spew.h term_color.c \ term_color.h debug_spew.c @QP_DEBUG_TRUE@am__objects_3 = debug_spew.$(OBJEXT) am_quickplot_shell_OBJECTS = list.$(OBJEXT) qp_shell.$(OBJEXT) \ shell_common.$(OBJEXT) spew.$(OBJEXT) term_color.$(OBJEXT) \ $(am__objects_3) quickplot_shell_OBJECTS = $(am_quickplot_shell_OBJECTS) quickplot_shell_DEPENDENCIES = $(am__DEPENDENCIES_1) 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 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libquickplot_la_SOURCES) $(mk_options_SOURCES) \ $(quickplot_SOURCES) $(quickplot_shell_SOURCES) DIST_SOURCES = $(am__libquickplot_la_SOURCES_DIST) \ $(mk_options_SOURCES) $(quickplot_SOURCES) \ $(am__quickplot_shell_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DATA = $(html_DATA) $(pkgconfig_DATA) HEADERS = $(quickplotinclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_GRID_FONT = @DEFAULT_GRID_FONT@ 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@ GREP = @GREP@ HAVE_CONVERT = @HAVE_CONVERT@ HAVE_LYNX = @HAVE_LYNX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_AGE = @LIB_AGE@ LIB_CURRENT = @LIB_CURRENT@ LIB_REVISION = @LIB_REVISION@ LIB_VERSION = @LIB_VERSION@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NUMBER_OF_PLOTS = @NUMBER_OF_PLOTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ RELEASE_DATE = @RELEASE_DATE@ SCALE_FACTOR = @SCALE_FACTOR@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ 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_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@ gtk_3_CFLAGS = @gtk_3_CFLAGS@ gtk_3_LIBS = @gtk_3_LIBS@ 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@ readline_LIBS = @readline_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sndfile_CFLAGS = @sndfile_CFLAGS@ sndfile_LIBS = @sndfile_LIBS@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = house.png imgGrabCursor.png imgGrabCursor.xpm \ imgHoldCursor.png imgHoldCursor.xpm imgNewWindow.png \ imgNewWindow.xpm imgDeleteWindow.png imgDeleteWindow.xpm \ imgCopyWindow.png imgCopyWindow.xpm imgSaveImage.png \ imgSaveImage.xpm quickplot.png quickplot.xpm sample_plot.png \ screenshot_small.png favicon.ico background_ft.png \ background_h1.png background_h2.png style.css footer.htm.in \ about.htm.in help_head.htm.in help_tail.htm.in index.htm.in \ about.txt help.txt bootstrap quickplot.ebuild \ quickplot.1.head.in quickplot.1.tail.in Repo_clean \ release_date.sh repo_version.sh ax_lib_readline.m4 \ $(am__append_6) $(am__append_8) BUILT_SOURCES = \ imgGrabCursor.xpm\ imgHoldCursor.xpm\ imgNewWindow.xpm\ imgDeleteWindow.xpm\ imgCopyWindow.xpm\ imgSaveImage.xpm\ quickplot.xpm\ about.txt\ help.txt\ paths.h\ parse_args.h\ app_op_declare.h\ app_op_init.h man_MANS = quickplot.1 quickplot_shell.1 # The .xpm files are built but come in a tarball # .xpm files are not checked into the repository html_DATA = about.html help.html house.png index.html quickplot.png \ sample_plot.png screenshot_small.png background_ft.png \ background_h1.png background_h2.png favicon.ico about.txt \ help.txt $(am__append_1) DISTCLEANFILES = about.html app_op_declare.h app_op_init.h help.html \ index.html parse_args.h paths.h quickplot.1 $(am__append_2) mk_options_SOURCES = mk_options.c lib_LTLIBRARIES = libquickplot.la libquickplot_la_SOURCES = app_op_declare.h app_op_init.h callbacks.c \ callbacks.h channel.c channel_double.c channel_double.h \ channel.h color_gen.c color_gen.h config.h debug.h get_opt.c \ get_opt.h graph.c graph_detail.c graph_draw.c graph_grid.c \ imgCopyWindow.xpm imgDeleteWindow.xpm imgGrabCursor.xpm \ imgHoldCursor.xpm imgNewWindow.xpm imgSaveImage.xpm \ launch_browser.c list.c list.h parse_1st_pass_funcs.h \ parse_2nd_pass_funcs.h parse_args.h parse_args_utils.h \ parse_argument_options.c paths.h plot.c plot.h \ process_gtk_options.c qp.c qp.h quickplot.h quickplot.xpm \ shell.c shell_get_set_values.h shell.h source.c \ source_double.c shell_common.c shell_common.h \ shell_server_commands.c spew.c spew.h term_color.c \ term_color.h utils.h win.c zoom.h $(am__append_3) \ $(am__append_7) libquickplot_la_SHORTNAME = lib libquickplot_la_CFLAGS = $(gtk_3_CFLAGS) $(sndfile_CFLAGS) \ $(am__append_5) libquickplot_la_LDFLAGS = -version-info $(LIB_VERSION) $(am__append_4) # We look at a sndfile symbol when libquickplot runs libquickplot_la_LIBADD = $(sndfile_LIBS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = quickplot.pc quickplotinclude_HEADERS = quickplot.h quickplotincludedir = $(includedir) quickplot_SOURCES = \ config.h\ qp_main.c\ quickplot.h quickplot_SHORTNAME = qp quickplot_CFLAGS = $(gtk_3_CFLAGS) $(sndfile_CFLAGS) #if USE_READLINE quickplot_LDADD = libquickplot.la $(gtk_3_LIBS) $(sndfile_LIBS) -lX11 \ -ldl $(readline_LIBS) #endif quickplot_shell_SOURCES = list.c debug.h list.h qp_shell.c \ shell_common.c shell_common.h spew.c spew.h term_color.c \ term_color.h $(am__append_9) quickplot_shell_SHORTNAME = sh #if USE_READLINE quickplot_shell_LDADD = $(readline_LIBS) #endif gzfile = $(distdir).tar.gz bz2file = $(distdir).tar.bz2 xzfile = $(distdir).tar.xz SUFFIXES = .html .bz2 .xz .gz .gz.md5 .gz.sha1 .gz.sha256 .gz.sha512 \ .bz2.md5 .bz2.sha1 .bz2.sha256 .bz2.sha512 .xz.md5 .xz.sha1 \ .xz.sha256 .xz.sha512 $(am__append_10) $(am__append_11) @HAVE_LOCAL_SCREENSHOTS_FALSE@SCREENSHOT_URL = @PACKAGE_URL@screenshots.html @HAVE_LOCAL_SCREENSHOTS_TRUE@SCREENSHOT_URL = screenshots.html all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .html .bz2 .xz .gz .gz.md5 .gz.sha1 .gz.sha256 .gz.sha512 .bz2.md5 .bz2.sha1 .bz2.sha256 .bz2.sha512 .xz.md5 .xz.sha1 .xz.sha256 .xz.sha512 .png .xpm .txt .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 quickplot.pc: $(top_builddir)/config.status $(srcdir)/quickplot.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ footer.htm: $(top_builddir)/config.status $(srcdir)/footer.htm.in cd $(top_builddir) && $(SHELL) ./config.status $@ about.htm: $(top_builddir)/config.status $(srcdir)/about.htm.in cd $(top_builddir) && $(SHELL) ./config.status $@ help_head.htm: $(top_builddir)/config.status $(srcdir)/help_head.htm.in cd $(top_builddir) && $(SHELL) ./config.status $@ help_tail.htm: $(top_builddir)/config.status $(srcdir)/help_tail.htm.in cd $(top_builddir) && $(SHELL) ./config.status $@ index.htm: $(top_builddir)/config.status $(srcdir)/index.htm.in cd $(top_builddir) && $(SHELL) ./config.status $@ quickplot.1.head: $(top_builddir)/config.status $(srcdir)/quickplot.1.head.in cd $(top_builddir) && $(SHELL) ./config.status $@ quickplot.1.tail: $(top_builddir)/config.status $(srcdir)/quickplot.1.tail.in cd $(top_builddir) && $(SHELL) ./config.status $@ quickplot_shell.1: $(top_builddir)/config.status $(srcdir)/quickplot_shell.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libquickplot.la: $(libquickplot_la_OBJECTS) $(libquickplot_la_DEPENDENCIES) $(EXTRA_libquickplot_la_DEPENDENCIES) $(AM_V_CCLD)$(libquickplot_la_LINK) -rpath $(libdir) $(libquickplot_la_OBJECTS) $(libquickplot_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mk_options$(EXEEXT): $(mk_options_OBJECTS) $(mk_options_DEPENDENCIES) $(EXTRA_mk_options_DEPENDENCIES) @rm -f mk_options$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mk_options_OBJECTS) $(mk_options_LDADD) $(LIBS) quickplot$(EXEEXT): $(quickplot_OBJECTS) $(quickplot_DEPENDENCIES) $(EXTRA_quickplot_DEPENDENCIES) @rm -f quickplot$(EXEEXT) $(AM_V_CCLD)$(quickplot_LINK) $(quickplot_OBJECTS) $(quickplot_LDADD) $(LIBS) quickplot_shell$(EXEEXT): $(quickplot_shell_OBJECTS) $(quickplot_shell_DEPENDENCIES) $(EXTRA_quickplot_shell_DEPENDENCIES) @rm -f quickplot_shell$(EXEEXT) $(AM_V_CCLD)$(LINK) $(quickplot_shell_OBJECTS) $(quickplot_shell_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug_spew.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-channel_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-color_gen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-debug_spew.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-exec_lib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-get_opt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-graph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-graph_detail.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-graph_draw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-graph_grid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-launch_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-parse_argument_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-process_gtk_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-qp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-shell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-shell_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-shell_server_commands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-source.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-source_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-spew.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-term_color.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-win.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mk_options.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qp-qp_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qp_shell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell_common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spew.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term_color.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< lib-callbacks.lo: callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-callbacks.lo -MD -MP -MF $(DEPDIR)/lib-callbacks.Tpo -c -o lib-callbacks.lo `test -f 'callbacks.c' || echo '$(srcdir)/'`callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-callbacks.Tpo $(DEPDIR)/lib-callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='callbacks.c' object='lib-callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-callbacks.lo `test -f 'callbacks.c' || echo '$(srcdir)/'`callbacks.c lib-channel.lo: channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-channel.lo -MD -MP -MF $(DEPDIR)/lib-channel.Tpo -c -o lib-channel.lo `test -f 'channel.c' || echo '$(srcdir)/'`channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-channel.Tpo $(DEPDIR)/lib-channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='channel.c' object='lib-channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-channel.lo `test -f 'channel.c' || echo '$(srcdir)/'`channel.c lib-channel_double.lo: channel_double.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-channel_double.lo -MD -MP -MF $(DEPDIR)/lib-channel_double.Tpo -c -o lib-channel_double.lo `test -f 'channel_double.c' || echo '$(srcdir)/'`channel_double.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-channel_double.Tpo $(DEPDIR)/lib-channel_double.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='channel_double.c' object='lib-channel_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-channel_double.lo `test -f 'channel_double.c' || echo '$(srcdir)/'`channel_double.c lib-color_gen.lo: color_gen.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-color_gen.lo -MD -MP -MF $(DEPDIR)/lib-color_gen.Tpo -c -o lib-color_gen.lo `test -f 'color_gen.c' || echo '$(srcdir)/'`color_gen.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-color_gen.Tpo $(DEPDIR)/lib-color_gen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='color_gen.c' object='lib-color_gen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-color_gen.lo `test -f 'color_gen.c' || echo '$(srcdir)/'`color_gen.c lib-get_opt.lo: get_opt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-get_opt.lo -MD -MP -MF $(DEPDIR)/lib-get_opt.Tpo -c -o lib-get_opt.lo `test -f 'get_opt.c' || echo '$(srcdir)/'`get_opt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-get_opt.Tpo $(DEPDIR)/lib-get_opt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_opt.c' object='lib-get_opt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-get_opt.lo `test -f 'get_opt.c' || echo '$(srcdir)/'`get_opt.c lib-graph.lo: graph.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-graph.lo -MD -MP -MF $(DEPDIR)/lib-graph.Tpo -c -o lib-graph.lo `test -f 'graph.c' || echo '$(srcdir)/'`graph.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-graph.Tpo $(DEPDIR)/lib-graph.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='graph.c' object='lib-graph.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-graph.lo `test -f 'graph.c' || echo '$(srcdir)/'`graph.c lib-graph_detail.lo: graph_detail.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-graph_detail.lo -MD -MP -MF $(DEPDIR)/lib-graph_detail.Tpo -c -o lib-graph_detail.lo `test -f 'graph_detail.c' || echo '$(srcdir)/'`graph_detail.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-graph_detail.Tpo $(DEPDIR)/lib-graph_detail.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='graph_detail.c' object='lib-graph_detail.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-graph_detail.lo `test -f 'graph_detail.c' || echo '$(srcdir)/'`graph_detail.c lib-graph_draw.lo: graph_draw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-graph_draw.lo -MD -MP -MF $(DEPDIR)/lib-graph_draw.Tpo -c -o lib-graph_draw.lo `test -f 'graph_draw.c' || echo '$(srcdir)/'`graph_draw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-graph_draw.Tpo $(DEPDIR)/lib-graph_draw.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='graph_draw.c' object='lib-graph_draw.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-graph_draw.lo `test -f 'graph_draw.c' || echo '$(srcdir)/'`graph_draw.c lib-graph_grid.lo: graph_grid.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-graph_grid.lo -MD -MP -MF $(DEPDIR)/lib-graph_grid.Tpo -c -o lib-graph_grid.lo `test -f 'graph_grid.c' || echo '$(srcdir)/'`graph_grid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-graph_grid.Tpo $(DEPDIR)/lib-graph_grid.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='graph_grid.c' object='lib-graph_grid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-graph_grid.lo `test -f 'graph_grid.c' || echo '$(srcdir)/'`graph_grid.c lib-launch_browser.lo: launch_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-launch_browser.lo -MD -MP -MF $(DEPDIR)/lib-launch_browser.Tpo -c -o lib-launch_browser.lo `test -f 'launch_browser.c' || echo '$(srcdir)/'`launch_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-launch_browser.Tpo $(DEPDIR)/lib-launch_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='launch_browser.c' object='lib-launch_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-launch_browser.lo `test -f 'launch_browser.c' || echo '$(srcdir)/'`launch_browser.c lib-list.lo: list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-list.lo -MD -MP -MF $(DEPDIR)/lib-list.Tpo -c -o lib-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-list.Tpo $(DEPDIR)/lib-list.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='lib-list.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c lib-parse_argument_options.lo: parse_argument_options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-parse_argument_options.lo -MD -MP -MF $(DEPDIR)/lib-parse_argument_options.Tpo -c -o lib-parse_argument_options.lo `test -f 'parse_argument_options.c' || echo '$(srcdir)/'`parse_argument_options.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-parse_argument_options.Tpo $(DEPDIR)/lib-parse_argument_options.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse_argument_options.c' object='lib-parse_argument_options.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-parse_argument_options.lo `test -f 'parse_argument_options.c' || echo '$(srcdir)/'`parse_argument_options.c lib-plot.lo: plot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-plot.lo -MD -MP -MF $(DEPDIR)/lib-plot.Tpo -c -o lib-plot.lo `test -f 'plot.c' || echo '$(srcdir)/'`plot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-plot.Tpo $(DEPDIR)/lib-plot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='plot.c' object='lib-plot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-plot.lo `test -f 'plot.c' || echo '$(srcdir)/'`plot.c lib-process_gtk_options.lo: process_gtk_options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-process_gtk_options.lo -MD -MP -MF $(DEPDIR)/lib-process_gtk_options.Tpo -c -o lib-process_gtk_options.lo `test -f 'process_gtk_options.c' || echo '$(srcdir)/'`process_gtk_options.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-process_gtk_options.Tpo $(DEPDIR)/lib-process_gtk_options.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process_gtk_options.c' object='lib-process_gtk_options.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-process_gtk_options.lo `test -f 'process_gtk_options.c' || echo '$(srcdir)/'`process_gtk_options.c lib-qp.lo: qp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-qp.lo -MD -MP -MF $(DEPDIR)/lib-qp.Tpo -c -o lib-qp.lo `test -f 'qp.c' || echo '$(srcdir)/'`qp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-qp.Tpo $(DEPDIR)/lib-qp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qp.c' object='lib-qp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-qp.lo `test -f 'qp.c' || echo '$(srcdir)/'`qp.c lib-shell.lo: shell.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-shell.lo -MD -MP -MF $(DEPDIR)/lib-shell.Tpo -c -o lib-shell.lo `test -f 'shell.c' || echo '$(srcdir)/'`shell.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-shell.Tpo $(DEPDIR)/lib-shell.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell.c' object='lib-shell.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-shell.lo `test -f 'shell.c' || echo '$(srcdir)/'`shell.c lib-source.lo: source.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-source.lo -MD -MP -MF $(DEPDIR)/lib-source.Tpo -c -o lib-source.lo `test -f 'source.c' || echo '$(srcdir)/'`source.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-source.Tpo $(DEPDIR)/lib-source.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='source.c' object='lib-source.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-source.lo `test -f 'source.c' || echo '$(srcdir)/'`source.c lib-source_double.lo: source_double.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-source_double.lo -MD -MP -MF $(DEPDIR)/lib-source_double.Tpo -c -o lib-source_double.lo `test -f 'source_double.c' || echo '$(srcdir)/'`source_double.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-source_double.Tpo $(DEPDIR)/lib-source_double.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='source_double.c' object='lib-source_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-source_double.lo `test -f 'source_double.c' || echo '$(srcdir)/'`source_double.c lib-shell_common.lo: shell_common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-shell_common.lo -MD -MP -MF $(DEPDIR)/lib-shell_common.Tpo -c -o lib-shell_common.lo `test -f 'shell_common.c' || echo '$(srcdir)/'`shell_common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-shell_common.Tpo $(DEPDIR)/lib-shell_common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell_common.c' object='lib-shell_common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-shell_common.lo `test -f 'shell_common.c' || echo '$(srcdir)/'`shell_common.c lib-shell_server_commands.lo: shell_server_commands.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-shell_server_commands.lo -MD -MP -MF $(DEPDIR)/lib-shell_server_commands.Tpo -c -o lib-shell_server_commands.lo `test -f 'shell_server_commands.c' || echo '$(srcdir)/'`shell_server_commands.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-shell_server_commands.Tpo $(DEPDIR)/lib-shell_server_commands.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell_server_commands.c' object='lib-shell_server_commands.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-shell_server_commands.lo `test -f 'shell_server_commands.c' || echo '$(srcdir)/'`shell_server_commands.c lib-spew.lo: spew.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-spew.lo -MD -MP -MF $(DEPDIR)/lib-spew.Tpo -c -o lib-spew.lo `test -f 'spew.c' || echo '$(srcdir)/'`spew.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-spew.Tpo $(DEPDIR)/lib-spew.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spew.c' object='lib-spew.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-spew.lo `test -f 'spew.c' || echo '$(srcdir)/'`spew.c lib-term_color.lo: term_color.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-term_color.lo -MD -MP -MF $(DEPDIR)/lib-term_color.Tpo -c -o lib-term_color.lo `test -f 'term_color.c' || echo '$(srcdir)/'`term_color.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-term_color.Tpo $(DEPDIR)/lib-term_color.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='term_color.c' object='lib-term_color.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-term_color.lo `test -f 'term_color.c' || echo '$(srcdir)/'`term_color.c lib-win.lo: win.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-win.lo -MD -MP -MF $(DEPDIR)/lib-win.Tpo -c -o lib-win.lo `test -f 'win.c' || echo '$(srcdir)/'`win.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-win.Tpo $(DEPDIR)/lib-win.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='win.c' object='lib-win.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-win.lo `test -f 'win.c' || echo '$(srcdir)/'`win.c lib-exec_lib.lo: exec_lib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-exec_lib.lo -MD -MP -MF $(DEPDIR)/lib-exec_lib.Tpo -c -o lib-exec_lib.lo `test -f 'exec_lib.c' || echo '$(srcdir)/'`exec_lib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-exec_lib.Tpo $(DEPDIR)/lib-exec_lib.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='exec_lib.c' object='lib-exec_lib.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-exec_lib.lo `test -f 'exec_lib.c' || echo '$(srcdir)/'`exec_lib.c lib-debug_spew.lo: debug_spew.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -MT lib-debug_spew.lo -MD -MP -MF $(DEPDIR)/lib-debug_spew.Tpo -c -o lib-debug_spew.lo `test -f 'debug_spew.c' || echo '$(srcdir)/'`debug_spew.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib-debug_spew.Tpo $(DEPDIR)/lib-debug_spew.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug_spew.c' object='lib-debug_spew.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquickplot_la_CFLAGS) $(CFLAGS) -c -o lib-debug_spew.lo `test -f 'debug_spew.c' || echo '$(srcdir)/'`debug_spew.c qp-qp_main.o: qp_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(quickplot_CFLAGS) $(CFLAGS) -MT qp-qp_main.o -MD -MP -MF $(DEPDIR)/qp-qp_main.Tpo -c -o qp-qp_main.o `test -f 'qp_main.c' || echo '$(srcdir)/'`qp_main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qp-qp_main.Tpo $(DEPDIR)/qp-qp_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qp_main.c' object='qp-qp_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(quickplot_CFLAGS) $(CFLAGS) -c -o qp-qp_main.o `test -f 'qp_main.c' || echo '$(srcdir)/'`qp_main.c qp-qp_main.obj: qp_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(quickplot_CFLAGS) $(CFLAGS) -MT qp-qp_main.obj -MD -MP -MF $(DEPDIR)/qp-qp_main.Tpo -c -o qp-qp_main.obj `if test -f 'qp_main.c'; then $(CYGPATH_W) 'qp_main.c'; else $(CYGPATH_W) '$(srcdir)/qp_main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qp-qp_main.Tpo $(DEPDIR)/qp-qp_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qp_main.c' object='qp-qp_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(quickplot_CFLAGS) $(CFLAGS) -c -o qp-qp_main.obj `if test -f 'qp_main.c'; then $(CYGPATH_W) 'qp_main.c'; else $(CYGPATH_W) '$(srcdir)/qp_main.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-quickplotincludeHEADERS: $(quickplotinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(quickplotinclude_HEADERS)'; test -n "$(quickplotincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(quickplotincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(quickplotincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(quickplotincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(quickplotincludedir)" || exit $$?; \ done uninstall-quickplotincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(quickplotinclude_HEADERS)'; test -n "$(quickplotincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(quickplotincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(quickplotincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @HAVE_LOCAL_SCREENSHOTS_FALSE@install-exec-hook: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-htmlDATA install-man install-pkgconfigDATA \ install-quickplotincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \ uninstall-libLTLIBRARIES uninstall-man uninstall-pkgconfigDATA \ uninstall-quickplotincludeHEADERS uninstall-man: uninstall-man1 .MAKE: all check install install-am install-exec-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-cscope clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-htmlDATA install-info \ install-info-am install-libLTLIBRARIES install-man \ install-man1 install-pdf install-pdf-am install-pkgconfigDATA \ install-ps install-ps-am install-quickplotincludeHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-htmlDATA \ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \ uninstall-pkgconfigDATA uninstall-quickplotincludeHEADERS .PHONY: hash md5 sha1 sha256 sha512 # TODO: There should be a better way to find installed # from the running quickplot program. paths.h: echo "/* This file was generated using $(MAKE) */" > $@ echo >> $@ echo "#define HTMLDIR \"$(htmldir)\"" >> $@ echo "#define DOCDIR \"$(docdir)\"" >> $@ parse_args.h: mk_options ./mk_options -a > $@ app_op_declare.h: mk_options ./mk_options -I > $@ app_op_init.h: mk_options ./mk_options -i > $@ quickplot.1: quickplot.1.head quickplot.1.tail mk_options echo ".\\\" Do not edit this file" > $@ echo ".\\\" This file was generated using $(MAKE)" >> $@ cat quickplot.1.head >> $@ ./mk_options -m >> $@ cat quickplot.1.tail >> $@ echo ".\\\" Do not edit this file" >> $@ echo ".\\\" This file was generated using $(MAKE)" >> $@ index.html: index.htm sed $<\ -e "s!@SCREENSHOT_URL@!$(SCREENSHOT_URL)!g"\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ > $@ # We cannot have configure replace @release_date@ and @repo_version@ # because we need to generate about.html for two cases, one for # dist and one for installing, and the values for # @release_date@ and @repo_version@ differ for those two cases about.html: about.htm repo_version="`${top_srcdir}/repo_version.sh ${top_srcdir}/REPO_VERSION ${top_srcdir}`";\ rel_date="`${top_srcdir}/release_date.sh ${top_srcdir}/RELEASE_DATE`"; sed $<\ -e "s/@release_date@/$$rel_date/g"\ -e "s/@repo_version@/$$repo_version/g"\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ > $@ help.html: help_head.htm mk_options help_tail.htm cat help_head.htm > $@ ./mk_options -t >> $@ cat help_tail.htm | sed\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ >> $@ @HAVE_LOCAL_SCREENSHOTS_TRUE@install-exec-hook: @HAVE_LOCAL_SCREENSHOTS_TRUE@ mkdir -p $(htmldir) @HAVE_LOCAL_SCREENSHOTS_TRUE@ cp ScreenShot_* _ScreenShot_* $(htmldir) @HAVE_LOCAL_SCREENSHOTS_TRUE@thumbs.htm: mk_thumbs.htm.bash @HAVE_LOCAL_SCREENSHOTS_TRUE@ ./mk_thumbs.htm.bash > $@ @HAVE_LOCAL_SCREENSHOTS_TRUE@screenshots.html: screenshots.html.in style.css thumbs.htm footer.htm @HAVE_LOCAL_SCREENSHOTS_TRUE@ ./mk_screenshots.html.bash < $< > $@ @HAVE_LOCAL_SCREENSHOTS_TRUE@screenshots: @HAVE_LOCAL_SCREENSHOTS_TRUE@ rm -f screenshots.html thumbs.htm @HAVE_LOCAL_SCREENSHOTS_TRUE@ $(MAKE) screenshots.html help_head.htm: style.css help_tail.htm: footer.htm index.htm: style.css footer.htm about.htm: style.css footer.htm @USE_CONVERT_TRUE@.png.xpm: @USE_CONVERT_TRUE@ convert $< $@ @USE_CONVERT_TRUE@ mv $@ $@.in @USE_CONVERT_TRUE@ sed -e 's/static.*\schar/static const char/g' $@.in > $@ @USE_CONVERT_TRUE@ rm $@.in @USE_LYNX_TRUE@.html.txt: @USE_LYNX_TRUE@ echo > $@ @USE_LYNX_TRUE@ dir=`pwd` && lynx -dump $< | \ @USE_LYNX_TRUE@sed -e "s!//localhost$$dir/!!g" >> $@ # Add the repository revision number to the dist. # Fix any dist files that have RELEASE_DATE in them, like help.txt # Remove generated dist files that auto-tools is stupid about. # Remove the out-of-date hash files. dist-hook: if test -f RELEASE_DATE ; then mv RELEASE_DATE RELEASE_DATE.save ; fi if test -f REPO_VERSION ; then mv REPO_VERSION REPO_VERSION.save ; fi ${top_srcdir}/repo_version.sh ${top_srcdir}/REPO_VERSION ${top_srcdir} > REPO_VERSION.tmp mv REPO_VERSION.tmp REPO_VERSION date -u +"%d %b %G %H:%M:%S UTC" > RELEASE_DATE echo $(VERSION) > last_release cat RELEASE_DATE REPO_VERSION >> last_release @USE_LYNX_TRUE@ rm -f about.html about.htm about.txt @USE_LYNX_TRUE@ $(MAKE) about.txt @USE_LYNX_TRUE@ mv REPO_VERSION RELEASE_DATE about.txt $(distdir) @USE_LYNX_TRUE@ rm -f about.html about.htm @USE_LYNX_TRUE@ $(MAKE) about.txt @USE_LYNX_FALSE@ mv REPO_VERSION RELEASE_DATE $(distdir) if test -f REPO_VERSION.save ; then mv REPO_VERSION.save REPO_VERSION ; fi if test -f RELEASE_DATE.save ; then mv RELEASE_DATE.save RELEASE_DATE ; fi cd $(distdir) && rm -f $(DISTCLEANFILES) config.h rm -f $(gzfile).md5 $(gzfile).sha* $(bz2file).md5 $(bz2file).sha* $(xzfile).md5 $(xzfile).sha* hash: md5 sha1 sha256 sha512 md5: $(gzfile).md5 $(bz2file).md5 $(xzfile).md5 sha1: $(gzfile).sha1 $(bz2file).sha1 $(xzfile).sha1 sha256: $(gzfile).sha256 $(bz2file).sha256 $(xzfile).sha256 sha512: $(gzfile).sha512 $(bz2file).sha512 $(xzfile).sha512 .gz.gz.md5: md5sum $< > $@ .gz.gz.sha1: sha1sum $< > $@ .gz.gz.sha256: sha256sum $< > $@ .gz.gz.sha512: sha512sum $< > $@ .bz2.bz2.md5: md5sum $< > $@ .bz2.bz2.sha1: sha1sum $< > $@ .bz2.bz2.sha256: sha256sum $< > $@ .bz2.bz2.sha512: sha512sum $< > $@ .xz.xz.md5: md5sum $< > $@ .xz.xz.sha1: sha1sum $< > $@ .xz.xz.sha256: sha256sum $< > $@ .xz.xz.sha512: sha512sum $< > $@ $(gzfile): $(MAKE) dist-gzip $(bz2file): $(MAKE) dist-bzip2 $(xzfile): $(MAKE) dist-xz # 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: quickplot-0.10.6/ax_lib_readline.m40000644000175000017500000000744612244565775014131 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html # =========================================================================== # # SYNOPSIS # # AX_LIB_READLINE # # DESCRIPTION # # Searches for a readline compatible library. If found, defines # `HAVE_LIBREADLINE'. If the found library has the `add_history' function, # sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the # necessary include files and sets `HAVE_READLINE_H' or # `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or # 'HAVE_HISTORY_H' if the corresponding include files exists. # # The libraries that may be readline compatible are `libedit', # `libeditline' and `libreadline'. Sometimes we need to link a termcap # library for readline to work, this macro tests these cases too by trying # to link with `libtermcap', `libcurses' or `libncurses' before giving up. # # Here is an example of how to use the information provided by this macro # to perform the necessary includes or declarations in a C file: # # #ifdef HAVE_LIBREADLINE # # if defined(HAVE_READLINE_READLINE_H) # # include # # elif defined(HAVE_READLINE_H) # # include # # else /* !defined(HAVE_READLINE_H) */ # extern char *readline (); # # endif /* !defined(HAVE_READLINE_H) */ # char *cmdline = NULL; # #else /* !defined(HAVE_READLINE_READLINE_H) */ # /* no readline */ # #endif /* HAVE_LIBREADLINE */ # # #ifdef HAVE_READLINE_HISTORY # # if defined(HAVE_READLINE_HISTORY_H) # # include # # elif defined(HAVE_HISTORY_H) # # include # # else /* !defined(HAVE_HISTORY_H) */ # extern void add_history (); # extern int write_history (); # extern int read_history (); # # endif /* defined(HAVE_READLINE_HISTORY_H) */ # /* no history */ # #endif /* HAVE_READLINE_HISTORY */ # # LICENSE # # Copyright (c) 2008 Ville Laurikari # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 6 AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE]) AC_DEFUN([AX_LIB_READLINE], [ AC_CACHE_CHECK([for a readline compatible library], ax_cv_lib_readline, [ ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do for termcap_lib in "" termcap curses ncurses; do if test -z "$termcap_lib"; then TRY_LIB="-l$readline_lib" else TRY_LIB="-l$readline_lib -l$termcap_lib" fi LIBS="$ORIG_LIBS $TRY_LIB" AC_TRY_LINK_FUNC(readline, ax_cv_lib_readline="$TRY_LIB") if test -n "$ax_cv_lib_readline"; then break fi done if test -n "$ax_cv_lib_readline"; then break fi done if test -z "$ax_cv_lib_readline"; then ax_cv_lib_readline="no" fi LIBS="$ORIG_LIBS" ]) if test "$ax_cv_lib_readline" != "no"; then LIBS="$LIBS $ax_cv_lib_readline" AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a readline compatible library]) AC_CHECK_HEADERS(readline.h readline/readline.h) AC_CACHE_CHECK([whether readline supports history], ax_cv_lib_readline_history, [ ax_cv_lib_readline_history="no" AC_TRY_LINK_FUNC(add_history, ax_cv_lib_readline_history="yes") ]) if test "$ax_cv_lib_readline_history" = "yes"; then AC_DEFINE(HAVE_READLINE_HISTORY, 1, [Define if your readline library has \`add_history']) AC_CHECK_HEADERS(history.h readline/history.h) fi fi ])dnl quickplot-0.10.6/ChangeLog0000644000175000017500000000300512245051113012274 00000000000000This ChangeLog just keeps a summary see: svn log https://quickplot.svn.sf.net/svnroot/quickplot/trunk for a more. Tue 26 Nov 2013 Lance Arsenault * Added fixes for Ubuntu Unity * Other minor bug fixes Wed 16 Nov 2011 Lance Arsenault * complete rewrite initial checkin to SVN server at https://quickplot.svn.sf.net/svnroot/quickplot/trunk Sun 11 Dec 2011 Lance Arsenault * Released version 0.9.0 the GTK+3, just C, no C++, complete rewrite Sun 12 Dec 2011 Lance Arsenault * Added a workaround to a bug in libsndfile version 1.0.25 which caused reading of Ogg sound files from pipes to fail due to calling lseek() on a pipe * Released version 0.9.1 Tue 13 Dec 2011 Lance Arsenault * Fixed X11 draw mode bug which happened when there is transparent background with alpha less than 0.01. Redrawing would not remove the drawing from the draw events before. So it drew a mess of lines and points from previous zoom levels. * Released version 0.9.2 Sat 17 Dec 2011 Lance Arsenault * Released version 0.9.3 * Then fixed memory corruption bug so then * Released version 0.9.4 Sat 18 Dec 2011 Lance Arsenault * Found and fixed pipe reading bug in non-debug builds * Released version 0.9.5 quickplot-0.10.6/imgSaveImage.png0000644000175000017500000000143512244565775013622 00000000000000‰PNG  IHDR‘h6 pHYsbb•FÏIDATxÚm’MHa€ßo¾owÆÙùÛYwVÝÕ±MÝÍÔÐJ#³è÷RDJ‘ ýžŠ¨CAD»^êRAHÑ­¢.ABEE¨ÑŸ«¶±¹êÎîìÎÌÎ|]¢.ŸçöÀƒzzz8ŽËçó”RJ)P *9#ïº.BÈu]AB†a0˜¡EQ’É$ „ZÛÚX–ýk¢Ñ¨®ëÑu]Åx<î'¤ˆpÂÊžu&NE« ²ˆ:eWUUL¦Lä.Ü0äg,Ër§ì8V©´/ô åM¬}F2 ÅbÑ,š¦iÛ¶ã9ó39¹…DI§Ó0•J Ñf.„ûr_¿œçE@1a bFÝYYtˤµµ•㸠,ˆlt~ÉÎÔ}¥q™kK¸ß|Kc`s¢hÍÒ®ka>ˆÒ#ð/€¹QO.i 7¶mSÙÙfتø &Ù}wõ€Ñ®v Ê2–©Ò4Y’"‘ˆQ×òtŒhz=ûºB½gk—ë ÐÂ]|¸×lj³ìÌÅš‚zgnåÏù÷{Y:Y?=s>lt›|s‹Ì¹Ò ºð@Š¿8©ÅÂKnê"Sw4ðù¶¸u3* Å>ŒJ™œV+@”xðäj6²ƒa„;*f;šŽ+tŠ’¸fE¢¿¶çQ¢÷ñ=\OìŽaòôtu¥•º?ê5 øíiïÓ•¢ØîbÏWúJ·ßª3¬Ò»=ÂúX?¡ ›B.^~59¦Ir§Þr.”±„iM[b=¾T² ZÈwÝgAI’! jšì÷A÷ÕØìÊôcÇ«FŸÄ@ÛŠÿÏ€ü¨¡*¹ášûè¼=¸ˆ*(BP]Ífç,ÛB *Ûe5¤L2™ ÆØ£ô7›ž¢Ïä'§IEND®B`‚quickplot-0.10.6/config.guess0000755000175000017500000013036112245423266013064 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # 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 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 . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: quickplot-0.10.6/shell.h0000644000175000017500000000252212244565775012034 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ struct qp_shell { /* C says that the order of a struct is the order of the types * in it. And there is no padding at the top. */ GSource gsource; /* We inherit GSource. */ GPollFD fd; FILE *file_in, *file_out; char *line; size_t len; char *prompt; guint tag; int close_on_exit; pid_t pid; /* process that is connected */ int file_in_isatty; }; extern struct qp_shell *qp_shell_create(FILE *file_in, FILE *file_out, int close_on_exit, pid_t pid); extern void qp_shell_destroy(struct qp_shell *sh); extern int do_server_commands(size_t argc, char **argv, struct qp_shell *sh); quickplot-0.10.6/win.c0000644000175000017500000005410012245003535011472 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "qp.h" #include "callbacks.h" #include "imgGrabCursor.xpm" #include "imgHoldCursor.xpm" #include "quickplot.xpm" #include "imgNewWindow.xpm" #include "imgDeleteWindow.xpm" #include "imgCopyWindow.xpm" #include "imgSaveImage.xpm" #ifdef DMALLOC # include "dmalloc.h" #endif static int main_window_create_count = 0; static inline GtkWidget *create_check_menu_item(GtkWidget *menu, const char *label, guint key, gboolean is_checked, void (*callback)(GtkWidget*, void*), gpointer data) { GtkWidget *mi; mi = gtk_check_menu_item_new_with_mnemonic(label); gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi), is_checked); if(key) gtk_widget_add_accelerator(mi, "activate", gtk_menu_get_accel_group(GTK_MENU(menu)), key, (GdkModifierType) 0x0, GTK_ACCEL_VISIBLE); g_signal_connect(G_OBJECT(mi), "toggled", G_CALLBACK(callback), data); gtk_widget_show(mi); return mi; } static inline void create_menu_item_seperator(GtkWidget *menu) { GtkWidget *mi; mi = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); gtk_widget_show(mi); } static inline GtkWidget *create_menu(GtkWidget *menubar, GtkAccelGroup *accelGroup, const char *label) { GtkWidget *menuitem, *menu; menuitem = gtk_menu_item_new_with_label(label); menu = gtk_menu_new(); gtk_menu_set_accel_group(GTK_MENU(menu), accelGroup); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem); gtk_widget_show(menuitem); /* The menu is shown when the user activates it. */ return menu; } static inline GtkWidget *create_menu_item(GtkWidget *menu, const char *label, const char *pixmap[], const gchar *STOCK, guint key, gboolean with_mnemonic, void (*callback)(GtkWidget*, void*), gpointer data, gboolean is_sensitive) { GtkWidget *mi; if(with_mnemonic) mi = gtk_image_menu_item_new_with_mnemonic(label); else mi = gtk_image_menu_item_new_with_label(label); if(pixmap) gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), gtk_image_new_from_pixbuf( gdk_pixbuf_new_from_xpm_data(pixmap))); else if(STOCK) gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), gtk_image_new_from_stock(STOCK, GTK_ICON_SIZE_MENU)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); if(callback) g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(callback), data); if(key) gtk_widget_add_accelerator(mi, "activate", gtk_menu_get_accel_group(GTK_MENU(menu)), key, (GdkModifierType) 0x0, GTK_ACCEL_VISIBLE); gtk_widget_set_sensitive(mi, is_sensitive); gtk_widget_show(mi); return mi; } static inline void add_source_buffer_remove_menu(struct qp_win *qp, struct qp_source *s) { GtkWidget *mi; const size_t MLEN = 64; char str[MLEN]; char *name; size_t len; len = strlen(s->name); if(len > MLEN-1) { snprintf(str, MLEN, "... %s", &s->name[len-59]); name = str; } else name = s->name; mi = create_menu_item(qp->file_menu, name, NULL, GTK_STOCK_DELETE, 0, FALSE, cb_remove_source, s, TRUE); ASSERT(g_object_get_data(G_OBJECT(mi), "quickplot-source") == NULL); g_object_set_data(G_OBJECT(mi), "quickplot-source", s); gtk_widget_set_tooltip_text(mi, "Remove this buffer, its channels," " and all its plots"); } void add_source_buffer_remove_menus(struct qp_source *s) { struct qp_win *qp; for(qp=(struct qp_win*)qp_sllist_begin(app->qps); qp; qp=(struct qp_win*)qp_sllist_next(app->qps)) if(qp->window) add_source_buffer_remove_menu(qp, s); } static inline GtkWidget *create_button(GtkWidget *hbox, GtkAccelGroup *accelGroup, const char *label, guint key, void (*callback)(GtkWidget*, void*), gpointer data) { GtkWidget *b = gtk_button_new_with_mnemonic(label); gtk_box_pack_start(GTK_BOX(hbox), b, FALSE, TRUE, 0); gtk_widget_add_accelerator(b, "activate", accelGroup, key, (GdkModifierType) 0x0, GTK_ACCEL_VISIBLE); gtk_widget_show(b); g_signal_connect(G_OBJECT(b),"clicked", G_CALLBACK(callback), data); return b; } void qp_get_root_window_size(void) { GdkWindow *root; root = gdk_get_default_root_window(); ASSERT(root); app->root_window_width = gdk_window_get_width(root); app->root_window_height = gdk_window_get_height(root); ASSERT(app->root_window_width > 0); ASSERT(app->root_window_height > 0); } /* We flip back the tab and wait for the drawing to * finish and then flip back to the next tab and * so on, until all tabs have been flipped. */ static gboolean qp_startup_idle_callback(gpointer data) { struct qp_win *qp = NULL; qp = (struct qp_win *) data; ASSERT(qp); ASSERT(qp->notebook); if(qp->destroy_called) { --qp->ref_count; qp_win_destroy(qp); return FALSE; } //DEBUG("qp->init_front_page_num=%d page=%d\n", qp->init_front_page_num, // gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook))); if(qp->init_front_page_num == -1) { int n; if((n = gtk_notebook_get_n_pages(GTK_NOTEBOOK(qp->notebook))) == 1) { qp->init_front_page_num = -1; --qp->ref_count; DEBUG("removing callback\n"); return FALSE; /* remove this idle callback */ } qp->init_front_page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); if(qp->init_front_page_num != 0) gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), 0); else gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), 1); return TRUE; } else { int n, c; gtk_notebook_next_page(GTK_NOTEBOOK(qp->notebook)); n = gtk_notebook_get_n_pages(GTK_NOTEBOOK(qp->notebook)); c = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); if(c == qp->init_front_page_num) { gtk_notebook_next_page(GTK_NOTEBOOK(qp->notebook)); c = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); } if(c == n-1) { gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), qp->init_front_page_num); qp->init_front_page_num = -1; --qp->ref_count; DEBUG("removing callback\n"); return FALSE; /* remove this idle callback */ } return TRUE; } } struct qp_win_config { int border, x11_draw, width, height, menubar, buttonbar, tabs, statusbar; }; /* the qp_win_config thing will over-ride the app->op_* stuff * so that we may have this make a copy of a qp that exists * and may have a different state than the app->op_* stuff */ static qp_win_t _qp_win_create(const struct qp_win_config *c) { struct qp_win *qp; GtkWidget *vbox; GtkAccelGroup *accelGroup; GdkPixbuf *pixbuf; if(qp_app_init_check()) return NULL; qp = qp_malloc(sizeof(*qp)); memset(qp,0,sizeof(*qp)); qp->ref_count = 1; qp->graphs = qp_sllist_create(NULL); qp_sllist_append(app->qps, qp); default_qp = qp; qp->gaps = app->op_gaps; qp->lines = app->op_lines; qp->points = app->op_points; qp->grid = app->op_grid; qp->grid_font = qp_strdup(app->op_grid_font); qp->same_x_scale = app->op_same_x_scale; qp->same_y_scale = app->op_same_y_scale; qp->grid_numbers = app->op_grid_numbers; qp->grid_line_width = app->op_grid_line_width; qp->grid_x_space = app->op_grid_x_space; qp->grid_y_space = app->op_grid_y_space; qp->point_size = app->op_point_size; qp->line_width = app->op_line_width; memcpy(&qp->background_color, &app->op_background_color, sizeof(qp->background_color)); memcpy(&qp->grid_line_color, &app->op_grid_line_color, sizeof(qp->grid_line_color)); memcpy(&qp->grid_text_color, &app->op_grid_text_color, sizeof(qp->grid_text_color)); qp->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ASSERT(qp->window); qp->border = (c)?(c->border):(app->op_border); gtk_window_set_decorated(GTK_WINDOW(qp->window), qp->border); qp->shape = (c)?0:(app->op_shape); qp->x11_draw = (c)?(c->x11_draw):(app->op_x11_draw); gtk_container_set_border_width(GTK_CONTAINER(qp->window), 0); #ifdef NO_BIG_WIN_COPY gtk_widget_set_events(qp->window, /* for window-state-event */ gtk_widget_get_events(qp->window) | GDK_STRUCTURE_MASK); #endif ++main_window_create_count; ++(app->main_window_count); ASSERT(app->main_window_count > 0); qp->window_num = main_window_create_count; qp_win_set_window_title(qp); //gtk_widget_set_events(qp->window, gtk_widget_get_events(qp->window)); if(app->root_window_width < 1) qp_get_root_window_size(); { int width, height; width = (c)?(c->width):(app->op_geometry.width); height = (c)?(c->height):(app->op_geometry.height); gtk_window_set_default_size(GTK_WINDOW(qp->window), width, height); } if(app->op_geometry.x != INT_MAX && app->op_geometry.y != INT_MAX && !c) { int x, y; x = app->op_geometry.x; y = app->op_geometry.y; if(x >= app->root_window_width) x = app->root_window_width - 1; else if(x <= -app->root_window_width && x != INT_MIN) x = -app->root_window_width - 1; if(y >= app->root_window_height) y = app->root_window_height - 1; else if(y <= -app->root_window_height && y != INT_MIN) y = -app->root_window_height - 1; if(x == INT_MIN) /* like example: --geometry=600x600-0+0 */ x = app->root_window_width - app->op_geometry.width; else if(x < 0) x = app->root_window_width - app->op_geometry.width + x; if(y == INT_MIN) /* like example: --geometry=600x600+0-0 */ y = app->root_window_height - app->op_geometry.height; else if(y < 0) y = app->root_window_height - app->op_geometry.height + y; DEBUG("move WINDOW to (%d,%d)\n", x, y); gtk_window_move(GTK_WINDOW(qp->window), x, y); } gtk_window_set_icon(GTK_WINDOW(qp->window), pixbuf = gdk_pixbuf_new_from_xpm_data(quickplot)); g_object_unref(G_OBJECT(pixbuf)); accelGroup = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(qp->window), accelGroup); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); ASSERT(vbox); gtk_container_add(GTK_CONTAINER(qp->window), vbox); { /********************************************************************* * top menu bar *********************************************************************/ GtkWidget *menubar; qp->menubar = menubar = gtk_menu_bar_new(); gtk_menu_bar_set_pack_direction(GTK_MENU_BAR(menubar), GTK_PACK_DIRECTION_LTR); gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0); { GtkWidget *menu; /******************************************************************* * File menu *******************************************************************/ qp->file_menu = menu = create_menu(menubar, accelGroup, "File"); create_menu_item(menu, "_Open File ...", NULL, GTK_STOCK_OPEN, GDK_KEY_O, TRUE, cb_open_file, qp, TRUE); create_menu_item(menu, "_New Graph Tab", NULL, GTK_STOCK_NEW, GDK_KEY_N, TRUE, cb_new_graph_tab, qp, TRUE); create_menu_item(menu, "New _Window (Empty)", imgNewWindow, NULL, GDK_KEY_W, TRUE, cb_new_window, NULL, TRUE); qp->copy_window_menu_item = create_menu_item(menu, "_Copy Window", imgCopyWindow, NULL, GDK_KEY_C, TRUE, cb_copy_window, qp, (app->op_maximize && !c)?FALSE:TRUE); qp->delete_window_menu_item = create_menu_item(menu, "_Delete Window", imgDeleteWindow, NULL, GDK_KEY_D, TRUE, cb_delete_window, qp, app->main_window_count != 1); if(app->main_window_count == 2) { /* We must make the other qp->delete_window_menu_item * have the correct sensitive state. */ struct qp_win *oqp; ASSERT(qp_sllist_length(app->qps) > 0); for(oqp=qp_sllist_begin(app->qps); oqp; oqp=qp_sllist_next(app->qps)) if(oqp->window) { gtk_widget_set_sensitive(oqp->delete_window_menu_item, TRUE); break; } ASSERT(oqp); } create_menu_item(menu, "Save PNG _Image File", imgSaveImage, NULL, GDK_KEY_I, TRUE, cb_save_png_image_file, qp, TRUE); create_menu_item_seperator(menu); create_menu_item(menu, "_Quit", NULL, GTK_STOCK_QUIT, GDK_KEY_Q, TRUE, cb_quit, qp->window, TRUE); create_menu_item_seperator(menu); create_menu_item_seperator(menu); { struct qp_source *s; for(s=(struct qp_source*)qp_sllist_begin(app->sources); s;s=(struct qp_source*)qp_sllist_next(app->sources)) add_source_buffer_remove_menu(qp, s); } /******************************************************************* * View menu *******************************************************************/ menu = create_menu(menubar, accelGroup, "View"); if(!app->is_globel_menu) qp->view_menubar = create_check_menu_item(menu, "_Menu Bar", GDK_KEY_M, (c)?(c->menubar):(app->op_menubar), cb_view_menubar, qp); else qp->view_menubar = NULL; qp->view_buttonbar = create_check_menu_item(menu, "_Button Bar", GDK_KEY_B, (c)?(c->buttonbar):(app->op_buttons), cb_view_buttonbar, qp); qp->view_graph_tabs = create_check_menu_item(menu, "Graph _Tabs", GDK_KEY_T, (c)?(c->tabs):(app->op_tabs), cb_view_graph_tabs, qp); qp->view_statusbar = create_check_menu_item(menu, "_Status Bar", GDK_KEY_S, (c)?(c->statusbar):(app->op_statusbar), cb_view_statusbar, qp); create_menu_item_seperator(menu); qp->view_cairo_draw = create_check_menu_item(menu, "D_raw with Cairo", GDK_KEY_R, !qp->x11_draw, cb_view_cairo_draw, qp); qp->view_border = create_check_menu_item(menu, "Window Bord_er", GDK_KEY_E, qp->border, cb_view_border, qp); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_border), qp->border); qp->view_fullscreen = create_check_menu_item(menu, "_Full Screen", GDK_KEY_F, (c)?0:(app->op_maximize == 2), cb_view_fullscreen, qp); qp->view_shape = create_check_menu_item(menu, "Shape _X11 Extension", GDK_KEY_X, qp->shape, cb_view_shape, qp); create_menu_item(menu, "_zoom Out", NULL, NULL, 0, TRUE, cb_zoom_out, qp, TRUE); create_menu_item(menu, "_Zoom Out All", NULL, NULL, GDK_KEY_Z, TRUE, cb_zoom_out_all, qp, TRUE); create_menu_item_seperator(menu); qp->view_graph_detail = create_check_menu_item(menu, "_Graph Details", GDK_KEY_G, FALSE, cb_view_graph_detail, qp); /******************************************************************* * Help menu *******************************************************************/ menu = create_menu(menubar, accelGroup, "Help"); create_menu_item(menu, "_About", NULL, GTK_STOCK_ABOUT, GDK_KEY_A, TRUE, cb_about, NULL, TRUE); create_menu_item(menu, "_Help", NULL, GTK_STOCK_HELP, GDK_KEY_H, TRUE, cb_help, NULL, TRUE); } if((c)?(c->menubar):(app->op_menubar)) gtk_widget_show(menubar); /******************************************************************* * Button Bar *******************************************************************/ qp->buttonbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_set_homogeneous(GTK_BOX(qp->buttonbar), FALSE); gtk_box_pack_start(GTK_BOX(vbox), qp->buttonbar, FALSE, FALSE, 0); create_button(qp->buttonbar, accelGroup, "_Open File ...", GDK_KEY_O, cb_open_file, qp); create_button(qp->buttonbar, accelGroup, "_New Graph Tab ...", GDK_KEY_N, cb_new_graph_tab, qp); qp->button_graph_detail = create_button(qp->buttonbar, accelGroup, "_Graph Details", GDK_KEY_G, cb_graph_detail_show_hide, qp); create_button(qp->buttonbar, accelGroup, "Save PNG _Image ...", GDK_KEY_I, cb_save_png_image_file, qp); if((c)?(c->buttonbar):(app->op_buttons)) gtk_widget_show(qp->buttonbar); /******************************************************************* * Graph Tabs *******************************************************************/ qp->notebook = gtk_notebook_new(); gtk_notebook_set_show_border(GTK_NOTEBOOK(qp->notebook), FALSE); gtk_box_pack_start(GTK_BOX(vbox), qp->notebook, TRUE, TRUE, 0); g_object_set(G_OBJECT(qp->notebook), "scrollable", TRUE, NULL); if((c)?(!c->tabs):(!app->op_tabs)) gtk_notebook_set_show_tabs(GTK_NOTEBOOK(qp->notebook), FALSE); /* We need at least one graph tab to start with. */ qp->current_graph = qp_graph_create(qp, NULL); gtk_widget_show(qp->notebook); /******************************************************************* * Status Bar *******************************************************************/ qp->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_set_homogeneous(GTK_BOX(qp->statusbar), FALSE); gtk_box_pack_start(GTK_BOX(vbox), qp->statusbar, FALSE, FALSE, 0); qp->status_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(qp->statusbar), qp->status_entry, TRUE, TRUE, 0); { PangoFontDescription *pfd; pfd = pango_font_description_from_string("Monospace Bold 11"); if(pfd) { gtk_widget_override_font(qp->status_entry, pfd); pango_font_description_free(pfd); } } gtk_entry_set_text(GTK_ENTRY(qp->status_entry), "status bar"); // This "editable" does not work. //g_object_set_property(G_OBJECT(qp->status_entry), "editable", FALSE); gtk_widget_show(qp->status_entry); if((c)?(c->statusbar):(app->op_statusbar)) gtk_widget_show(qp->statusbar); /******************************************************************* *******************************************************************/ } g_signal_connect(G_OBJECT(qp->window), "key-press-event", G_CALLBACK(ecb_key_press), qp); g_signal_connect(G_OBJECT(qp->window), "key-release-event", G_CALLBACK(ecb_key_release), qp); #ifdef NO_BIG_WIN_COPY g_signal_connect(G_OBJECT(qp->window), "window-state-event", G_CALLBACK(ecb_window_state), qp); #endif g_signal_connect(G_OBJECT(qp->window), "delete_event", G_CALLBACK(ecb_close), qp); g_signal_connect(G_OBJECT(qp->notebook), "switch-page", G_CALLBACK(cb_switch_page), NULL); if(!app->grabCursor) { GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_new_from_xpm_data(imgGrabCursor); ASSERT(pixbuf); app->grabCursor = gdk_cursor_new_from_pixbuf( gdk_display_get_default(), pixbuf, 12, 16); ASSERT(app->grabCursor); pixbuf = gdk_pixbuf_new_from_xpm_data(imgHoldCursor); ASSERT(pixbuf); app->holdCursor = gdk_cursor_new_from_pixbuf( gdk_display_get_default(), pixbuf, 12, 16); ASSERT(app->holdCursor); //app->grabCursor = gdk_cursor_new(GDK_HAND2); //app->holdCursor = gdk_cursor_new(GDK_HAND1); app->pickCursor = gdk_cursor_new(GDK_CROSSHAIR); app->zoomCursor = gdk_cursor_new(GDK_DRAFT_LARGE); app->waitCursor = gdk_cursor_new(GDK_WATCH); } qp->last_shape_region = NULL; if(app->op_maximize == 1 && !c) { gtk_window_maximize(GTK_WINDOW(qp->window)); } else if(app->op_maximize == 2 && !c) { gtk_window_fullscreen(GTK_WINDOW(qp->window)); } gtk_widget_show(vbox); gtk_widget_show(qp->window); /* Setup/draw the plots in the tabs */ qp->init_front_page_num = -1; g_idle_add_full(G_PRIORITY_LOW + 10, qp_startup_idle_callback, qp, NULL); ++qp->ref_count; return qp; /* success */ } qp_win_t qp_win_create(void) { return _qp_win_create(NULL); } struct qp_win *qp_win_copy_create(struct qp_win *old_qp) { struct qp_win *qp = NULL; struct qp_graph *gr, *old_gr; int width, height; struct qp_win_config config; gtk_window_get_size(GTK_WINDOW(old_qp->window), &width, &height); config.border = old_qp->border; config.x11_draw = old_qp->x11_draw; config.width = width; config.height = height; if(!app->is_globel_menu) config.menubar = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(old_qp->view_menubar)); else config.menubar = 0; config.buttonbar = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(old_qp->view_buttonbar)); config.tabs = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(old_qp->view_graph_tabs)); config.statusbar = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(old_qp->view_statusbar)); qp = _qp_win_create(&config); ASSERT(qp_sllist_length(old_qp->graphs) == gtk_notebook_get_n_pages(GTK_NOTEBOOK(old_qp->notebook))); /* Copy all the graphs */ old_gr = qp_sllist_begin(old_qp->graphs); gr = qp_sllist_first(qp->graphs); ASSERT(gr); qp_graph_copy(gr, old_gr); for(old_gr=qp_sllist_next(old_qp->graphs); old_gr; old_gr=qp_sllist_next(old_qp->graphs)) { gr = qp_graph_create(qp, old_gr->name); qp_graph_copy(gr, old_gr); } gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), gtk_notebook_get_current_page(GTK_NOTEBOOK(old_qp->notebook))); qp->pointer_x = old_qp->pointer_x; qp->pointer_y = old_qp->pointer_y; return qp; } quickplot-0.10.6/shell_server_commands.c0000644000175000017500000020370112245002505015252 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /* This is just to process commands on the server side. * The program quickplot is a server to shells and the * program quickplot can also be a shell. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "quickplot.h" #include "shell.h" #include "config.h" #include "qp.h" #include "debug.h" #include "list.h" #include "spew.h" #include "term_color.h" #include "shell_common.h" #include "callbacks.h" #include "channel.h" #include "utils.h" #include "shell_get_set_values.h" #include "zoom.h" #ifdef DMALLOC # include "dmalloc.h" #endif /* TODO: clearly this straight follow approach could be * better optimized. For one thing strcmp() looks at the * whole string and calculates a total diff, when we just need * to know at the first character that differs. The command * strings could be in an ordered tree and/or etc ... * * Need to look into flex and bison???*/ /* returns 1 if it can keep running * returns 0 if the qp_shell is destroyed */ int do_server_commands(size_t argc, char **argv, struct qp_shell *sh) { FILE *out = sh->file_out; ASSERT(argc > 0); ASSERT(argv[0]); ASSERT(default_qp); ASSERT(default_qp->current_graph); if(argc == 1) { /********************************/ /* single argument commands */ /********************************/ if(!strcmp(argv[0], "app")) { struct command *c; fprintf(out, " You have the following app default value settings. They are not necessarily\n" " the values for any particular window, graph or plot. Setting them at the\n" " app level will set the parameter for all existing windows, graphs and plots.\n"); if(qp_sllist_length(app->qps) == 1) fprintf(out, " There is 1 window in this app.\n"); else fprintf(out, " There are %zu windows in this app.\n", qp_sllist_length(app->qps)); PrintParValDescHeader(out); for(c = app_commands; c->name; ++c) PrintValueDesc(out, c->name, app_get_value(c->name), "open", c->doc); for(c = window_commands; c->name; ++c) if(c->propagrate) PrintValueDesc(out, c->name, app_window_get_value(c->name), "window", c->doc); for(c = graph_commands; c->name; ++c) if(c->propagrate && strcmp(c->name, "draw")) PrintValueDesc(out, c->name, app_graph_get_value(c->name), "graph", c->doc); for(c = plot_commands; c->name; ++c) if(c->propagrate) PrintValueDesc(out, c->name, app_plot_get_value(c->name), "plot", c->doc); } else if(!strcmp(argv[0], "channels") || !strcmp(argv[0], "open") || !strcmp(argv[0], "close")) { struct qp_source *s; size_t count = 0; fprintf(out, " FileName Number Name\n" " ---------------- ------ ------------------\n"); for(s=qp_sllist_begin(app->sources);s;s=qp_sllist_next(app->sources)) { size_t i; fprintf(out," %s\n", s->name); for(i=0;inum_channels;++i) { char text[128]; fprintf(out, " %s %s\n", space_number(count++), qp_source_get_label(s, i, text, 128)); } } } else if(!strcmp(argv[0], "exit")) { qp_shell_destroy(sh); /* We cannot do anything more since * the sh is now destroyed. */ return 0; } else if(!strcmp(argv[0],"graph")) { if(default_qp && default_qp->current_graph) { struct command *c; struct qp_graph *gr; fprintf(out, " The current window %d graph %d with tab name \"%s\"\n" " There are %zu plot(s) in this graph.\n" "\n" " Possible graph numbers in window %d are:\n", default_qp->window_num, default_qp->current_graph->graph_num, default_qp->current_graph->name, qp_sllist_length(default_qp->current_graph->plots), default_qp->window_num); for(gr=qp_sllist_begin(default_qp->graphs);gr;gr=qp_sllist_next(default_qp->graphs)) fprintf(out, " %d \"%s\"\n", gr->graph_num, gr->name); gr = default_qp->current_graph; PrintParValDescHeader(out); for(c = graph_commands; c->name; ++c) if(strcmp(c->name, "create") && strcmp(c->name, "destroy") && strcmp(c->name, "list") && strcmp(c->name, "draw") && strcmp(c->name, "save") && strcmp(c->name, "zoom")) PrintValueDesc(out, c->name, graph_get_value(gr, c->name), "graph", c->doc); for(c = plot_commands; c->name; ++c) if(c->propagrate) PrintValueDesc(out, c->name, graph_plot_get_value(gr, c->name), "plot", c->doc); } else if(default_qp) fprintf(out, "There are no graphs in the current window %d\n", default_qp->window_num); else fprintf(out, "There are no graphs, or windows\n"); } else if(!strcmp(argv[0],"plot")) { if(default_qp && default_qp->current_graph && default_qp->current_graph->current_plot) { struct command *c; struct qp_graph *gr; struct qp_plot *p; gr = default_qp->current_graph; fprintf(out, " The current window %d graph %d \"%s\" plot %d \"%s\"\n" " There are %zu plots in the current graph.\n" "\n" " Possible plot numbers in graph %d \"%s\" are:\n", default_qp->window_num, gr->graph_num, gr->name, gr->current_plot->plot_num, gr->current_plot->name, qp_sllist_length(gr->plots), gr->graph_num, gr->name); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) fprintf(out, " %d \"%s\"\n", p->plot_num, p->name); p = gr->current_plot; PrintParValDescHeader(out); for(c = plot_commands; c->name; ++c) if(strcmp(c->name, "create") && strcmp(c->name, "destroy") && strcmp(c->name, "list")) PrintValueDesc(out, c->name, plot_get_value(p, c->name), "plot", c->doc); } else if(default_qp && default_qp->current_graph) fprintf(out, "There are no plots in the current graph %d of the current window %d\n", default_qp->current_graph->graph_num, default_qp->window_num); else if(default_qp) fprintf(out, "There are no plots or graph in the current window %d\n", default_qp->window_num); else fprintf(out, "There are no plots, graphs, or windows\n"); } else if(!strcmp(argv[0], "quit")) { qp_shell_destroy(sh); cb_quit(NULL, NULL); /* The app may still be running. * See qp_main.c */ /* We cannot do anything more since * the sh is now destroyed. */ return 0; } else if(!strcmp(argv[0], "start")) { /* This just writes back. This is just like a ping * to get the pipes flowing. This seems to be needed. * This is not intended to be a user command, but * they may use it. */ } else if(!strcmp(argv[0],"window")) { if(default_qp) { struct command *c; struct qp_win *qp; fprintf(out, " The current window number is %d\n" "\n" " Possible window numbers are:", default_qp->window_num); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) fprintf(out, " %d", qp->window_num); putc('\n', out); qp = default_qp; PrintParValDescHeader(out); for(c = window_commands; c->name; ++c) if(strcmp(c->name, "create") && strcmp(c->name, "destroy") && strcmp(c->name, "list") && strcmp(c->name, "copy")) PrintValueDesc(out, c->name, window_get_value(qp, c->name), "window", c->doc); for(c = graph_commands; c->name; ++c) if(c->propagrate && strcmp(c->name, "draw")) PrintValueDesc(out, c->name, window_graph_get_value(qp, c->name), "graph", c->doc); for(c = plot_commands; c->name; ++c) if(c->propagrate) PrintValueDesc(out, c->name, window_plot_get_value(qp, c->name), "plot", c->doc); } else fprintf(out, "There are no windows\n"); } else BadCommand("Unknown command", argc, argv, out); /********************************/ } else if(argc > 1) { /********************************/ /* multi argument commands */ /********************************/ if(!strcmp(argv[0], "app")) { if(!strcmp(argv[1], "default_graph")) { if(argc == 2) fprintf(out, "%s\n", BoolValue(app->op_default_graph)); else if(argc == 3) { app->op_default_graph = GetBool(argv[2], 0); fprintf(out, "%s\n", BoolValue(app->op_default_graph)); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "geometry")) { if(argc == 2) fprintf(out, "%s\n", app_get_value("geometry")); else if(argc == 3) { if(GetGeometry(argv[2], &(app->op_geometry.x), &(app->op_geometry.y), &(app->op_geometry.width), &(app->op_geometry.height), &(app->op_maximize))) fprintf(out, "Invalid geometry\n"); else fprintf(out, "%s\n", app_get_value("geometry")); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "label_separator")) { if(argc == 2) fprintf(out, "%s\n", app_get_value("label_separator")); else if(argc == 3) { if(app->op_label_separator) free(app->op_label_separator); app->op_label_separator = qp_strdup(argv[2]); fprintf(out, "%s\n", app_get_value("label_separator")); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "labels")) { if(argc == 2) fprintf(out, "%s\n", app_get_value("labels")); else if(argc == 3) { app->op_labels = GetBool(argv[2], 0); fprintf(out, "%s\n", app_get_value("labels")); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "linear_channel")) { if(argc == 2) fprintf(out, "%s\n", app_get_value("linear_channel")); else if(argc == 3 || argc == 4) { if(app->op_linear_channel) { qp_channel_destroy(app->op_linear_channel); app->op_linear_channel = NULL; } if(!(argv[2][0] >= 'A' && argv[2][0] <= 'Z') && !(argv[2][0] >= 'a' && argv[2][0] <= 'z')) { double start = 0.0, step = 1.0; char *s, *end; char *arg; arg = ArgsToString(&argv[2]); s = arg; start = strtod(s, &end); if(s == end || start == NAN || start == -NAN || start == HUGE_VAL || start == -HUGE_VAL) goto linear_channel_err; s = end; while(isspace(*s)) ++s; if(*s) { step = strtod(s, &end); if(s == end || step == NAN || step == -NAN || step == HUGE_VAL || step == -HUGE_VAL) goto linear_channel_err; } free(arg); app->op_linear_channel = qp_channel_linear_create(start, step); } else if(GetBool(argv[2], 0)) app->op_linear_channel = qp_channel_linear_create(0, 1); goto linear_channel_end; linear_channel_err: BadCommand2(out, argc, argv); linear_channel_end: fprintf(out, "%s\n", app_get_value("linear_channel")); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "new_window")) { if(argc == 3) app->op_new_window = GetBool(argv[2], 0); if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_get_value("new_window")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "number_of_plots")) { if(argc == 3) GetInt(out, argv[2], 1, 10000, &app->op_number_of_plots); if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_get_value("number_of_plots")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "skip_lines")) { if(argc == 3) GetSizeT(out, argv[2], 0, INT_MAX, &app->op_skip_lines); if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_get_value("skip_lines")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "border")) { if(argc == 3) { struct qp_win *qp; app->op_border = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) if((app->op_border && !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_border))) || (!app->op_border && gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_border)))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_border)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("border")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "buttons")) { if(argc == 3) { struct qp_win *qp; app->op_buttons = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) { int buttons; buttons = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar)); if((app->op_buttons && !buttons) || (!app->op_buttons && buttons)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_buttonbar)); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("buttons")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "menubar")) { if(argc == 3 && !app->is_globel_menu) { struct qp_win *qp; app->op_menubar = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) { int menubar; menubar = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar)); if((app->op_menubar && !menubar) || (!app->op_menubar && menubar)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_menubar)); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("menubar")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "shape")) { if(argc == 3) { struct qp_win *qp; app->op_shape = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) if((app->op_shape && !qp->shape) || (!app->op_shape && qp->shape)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_shape)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("shape")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "statusbar")) { if(argc == 3) { struct qp_win *qp; app->op_statusbar = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) { int statusbar; statusbar = !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar)); if((app->op_statusbar && !statusbar) || (!app->op_statusbar && statusbar)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_statusbar)); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("statusbar")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "tabs")) { if(argc == 3) { struct qp_win *qp; app->op_tabs = GetBool(argv[2], 0); for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) { int tabs; tabs = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs)); if((app->op_tabs && !tabs) || (!app->op_tabs && tabs)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_tabs)); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_window_get_value("tabs")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "bg")) { if(argc >= 3) { if(ParseColor(&app->op_background_color, &argv[2])) APP_FORALLGRAPHS(\ memcpy(&qp->background_color, &app->op_background_color, \ sizeof(qp->background_color)),\ memcpy(&gr->background_color, &app->op_background_color, \ sizeof(gr->background_color))); } fprintf(out, "%s\n", app_graph_get_value("bg")); } else if(!strcmp(argv[1], "grid")) { if(argc == 3) { app->op_grid = GetBool(argv[2], 0); APP_FORALLGRAPHS(qp->grid = app->op_grid, gr->show_grid = app->op_grid); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("grid")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_font")) { if(argc >= 3) { if(app->op_grid_font) free(app->op_grid_font); app->op_grid_font = ArgsToString(&argv[2]); APP_FORALLGRAPHS(\ if(qp->grid_font) free(qp->grid_font);\ qp->grid_font = qp_strdup(app->op_grid_font),\ if(gr->grid_font) free(gr->grid_font);\ gr->grid_font = qp_strdup(app->op_grid_font);\ if(gr->pangolayout)\ qp_graph_set_grid_font(gr)\ ); } fprintf(out, "%s\n", app_graph_get_value("grid_font")); } else if(!strcmp(argv[1], "grid_line_color")) { if(argc >= 3) { if(ParseColor(&app->op_grid_line_color, &argv[2])) { APP_FORALLGRAPHS(\ memcpy(&qp->grid_line_color, &app->op_grid_line_color, \ sizeof(qp->grid_line_color)),\ memcpy(&gr->grid_line_color, &app->op_grid_line_color, \ sizeof(gr->grid_line_color))); } } fprintf(out, "%s\n", app_graph_get_value("grid_line_color")); } else if(!strcmp(argv[1], "grid_line_width")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &app->op_grid_line_width)) APP_FORALLGRAPHS(qp->grid_line_width = app->op_grid_line_width,\ gr->grid_line_width = app->op_grid_line_width); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("grid_line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_numbers")) { if(argc == 3) { app->op_grid_numbers = GetBool(argv[2], 0); APP_FORALLGRAPHS(qp->grid_numbers = app->op_grid_numbers,\ gr->grid_numbers = qp->grid_numbers); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("grid_numbers")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_text_color")) { if(argc >= 3) { if(ParseColor(&app->op_grid_text_color, &argv[2])) { APP_FORALLGRAPHS(\ memcpy(&qp->grid_text_color, &app->op_grid_text_color, \ sizeof(qp->grid_text_color)),\ memcpy(&gr->grid_text_color, &app->op_grid_text_color, \ sizeof(gr->grid_text_color))); } } fprintf(out, "%s\n", app_graph_get_value("grid_text_color")); } else if(!strcmp(argv[1], "grid_x_space")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 100000, &app->op_grid_x_space)) APP_FORALLGRAPHS(qp->grid_x_space = app->op_grid_x_space,\ gr->grid_x_space = app->op_grid_x_space); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("grid_x_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_y_space")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 100000, &app->op_grid_y_space)) APP_FORALLGRAPHS(qp->grid_y_space = app->op_grid_y_space,\ gr->grid_y_space = app->op_grid_y_space); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("grid_y_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "cairo")) { if(argc == 3) { /* TODO: Clean this shit up */ app->op_x11_draw = GetBool(argv[2], 0)?0:1; APP_FORALLGRAPHS(\ _cairo_draw_ignore_event = 1;\ if(qp->x11_draw != app->op_x11_draw) \ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_cairo_draw),\ (app->op_x11_draw)?FALSE:TRUE);\ _cairo_draw_ignore_event = 0;\ qp->x11_draw = app->op_x11_draw,\ if((qp->x11_draw && !gr->x11) || (!qp->x11_draw && gr->x11))\ graph_switch_draw_mode(gr)\ ); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("cairo")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "draw")) { if(argc == 2) { struct qp_win *qp; for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) { gtk_widget_queue_draw(qp->current_graph->drawing_area); qp->current_graph->pixbuf_needs_draw = 1; gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_x_scale")) { if(argc == 3) { app->op_same_x_scale = GetBool(argv[2], 0); APP_FORALLGRAPHS(qp->same_x_scale = app->op_same_x_scale,\ if(gr->same_x_scale != app->op_same_x_scale)\ qp_graph_same_x_scale(gr, app->op_same_x_scale)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("same_x_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_y_scale")) { if(argc == 3) { app->op_same_y_scale = GetBool(argv[2], 0); APP_FORALLGRAPHS(qp->same_y_scale = app->op_same_y_scale,\ if(gr->same_y_scale != app->op_same_y_scale)\ qp_graph_same_y_scale(gr, app->op_same_y_scale)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_graph_get_value("same_y_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "gaps")) { if(argc == 3) { app->op_gaps = GetBool(argv[2], 0); APP_FORALLPLOTS(qp->gaps = app->op_gaps,\ gr->gaps = qp->gaps,\ if(p->gaps != gr->gaps)\ gr->pixbuf_needs_draw = 1;\ p->gaps = gr->gaps); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_plot_get_value("gaps")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "line_width")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &app->op_line_width)) APP_FORALLPLOTS(qp->line_width = app->op_line_width,\ gr->line_width = qp->line_width,\ if(p->line_width != gr->line_width)\ gr->pixbuf_needs_draw = 1;\ p->line_width = gr->line_width); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_plot_get_value("line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "lines")) { if(argc == 3) { app->op_lines = GetBool(argv[2], 0); APP_FORALLPLOTS(qp->lines = app->op_lines,\ gr->lines = qp->lines,\ if(p->lines != gr->lines)\ gr->pixbuf_needs_draw = 1;\ p->lines = gr->lines); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_plot_get_value("lines")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "point_size")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &app->op_point_size)) APP_FORALLPLOTS(qp->point_size = app->op_point_size,\ gr->point_size = qp->point_size,\ if(p->point_size != gr->point_size)\ gr->pixbuf_needs_draw = 1;\ p->point_size = gr->point_size); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_plot_get_value("point_size")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "points")) { if(argc == 3) { app->op_points = GetBool(argv[2], 0); APP_FORALLPLOTS(qp->points = app->op_points,\ gr->points = qp->points,\ if(p->points != gr->points)\ gr->pixbuf_needs_draw = 1;\ p->points = gr->points); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", app_plot_get_value("points")); else BadCommand2(out, argc, argv); } else BadCommand("Unknown command", argc, argv, out); } else if(!strcmp(argv[0], "close")) { int i; for(i=1;isources);s;s=qp_sllist_next(app->sources)) if(!strcmp(s->name, argv[i])) { qp_source_destroy(s); break; } if(s) fprintf(out, "removed source \"%s\"\n", argv[i]); else fprintf(out, "source named \"%s\" was not found\n", argv[i]); } } else if(!strcmp(argv[0], "graph")) { struct qp_graph *gr = NULL; if(argc == 2 && *argv[1] >= '0' && *argv[1] <= '9') { /* Set the current graph */ char *end = NULL; int gr_num; gr_num = strtol(argv[1], &end, 10); if(end && *end == '\0') { for(gr=qp_sllist_begin(default_qp->graphs);gr; gr=qp_sllist_next(default_qp->graphs)) if(gr_num == gr->graph_num) { if(gr != default_qp->current_graph) gtk_notebook_set_current_page(GTK_NOTEBOOK(default_qp->notebook), gtk_notebook_page_num(GTK_NOTEBOOK(default_qp->notebook), gr->drawing_area)); break; } if(!gr) { fprintf(out, "possible graph numbers are:"); for(gr=qp_sllist_begin(default_qp->graphs);gr; gr=qp_sllist_next(default_qp->graphs)) fprintf(out, " %d \"%s\"", gr->graph_num, gr->name); putc('\n', out); } else fprintf(out, "%d \"%s\"\n", gr->graph_num, gr->name); } return End_Reply(sh, argc, argv); } if(!strcmp(argv[1], "create")) { if(argc == 2) qp_graph_create(NULL, NULL); else { ssize_t *x = NULL, *y = NULL; size_t num; if(GetPlotNums(&argv[2], &x, &y, &num)) { if(qp_win_graph(NULL, x, y, num, NULL)) fprintf(out, "failed\n"); else fprintf(out, "made graph number %d with %zu plots\n", default_qp->current_graph->graph_num, qp_sllist_length(default_qp->current_graph->plots)); free(x); free(y); } else BadCommand2(out, argc, argv); } return End_Reply(sh, argc, argv); } if(default_qp && default_qp->current_graph) gr = default_qp->current_graph; else { /* There should always be a default graph */ VASSERT(0, "there is not current graph"); fprintf(out, "there is no graph\n"); return End_Reply(sh, argc, argv); } if(!strcmp(argv[1], "bg")) { if(argc >= 3) { if(ParseColor(&gr->background_color, &argv[2])) { if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); gr->pixbuf_needs_draw = 1; } } fprintf(out, "%s\n", graph_get_value(gr, "bg")); } else if(argc == 2 && !strcmp(argv[1], "destroy")) { qp_graph_destroy(gr); } else if(!strcmp(argv[1], "grid")) { if(argc == 3) { gr->show_grid = GetBool(argv[2], 0); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "grid")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_font")) { if(argc >= 3) { if(gr->grid_font) free(gr->grid_font); gr->grid_font = ArgsToString(&argv[2]); if(gr->pangolayout) qp_graph_set_grid_font(gr); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } fprintf(out, "%s\n", graph_get_value(gr, "grid_font")); } else if(!strcmp(argv[1], "grid_line_color")) { if(argc >= 3) { if(ParseColor(&gr->grid_line_color, &argv[2])) { if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); gr->pixbuf_needs_draw = 1; } } fprintf(out, "%s\n", graph_get_value(gr, "grid_line_color")); } else if(!strcmp(argv[1], "grid_line_width")) { if(argc == 3) { GetInt(out, argv[2], 1, 1000, &gr->grid_line_width); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "grid_line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_numbers")) { if(argc == 3) { gr->grid_numbers = GetBool(argv[2], 0); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "grid_numbers")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_text_color")) { if(argc >= 3) { if(ParseColor(&gr->grid_text_color, &argv[2])) { if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); gr->pixbuf_needs_draw = 1; } } fprintf(out, "%s\n", graph_get_value(gr, "grid_text_color")); } else if(!strcmp(argv[1], "grid_x_space")) { if(argc == 3) { GetInt(out, argv[2], 1, 100000, &gr->grid_x_space); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "grid_x_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_y_space")) { if(argc == 3) { GetInt(out, argv[2], 1, 100000, &gr->grid_y_space); if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "grid_y_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "cairo")) { if(argc == 3) { int x11_draw; x11_draw = GetBool(argv[2], 0)?0:1; if((x11_draw && !gr->x11) || (!x11_draw && gr->x11)) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(default_qp->view_cairo_draw), x11_draw?FALSE:TRUE); graph_switch_draw_mode(gr); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "cairo")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "draw")) { if(argc == 2) { gtk_widget_queue_draw(gr->drawing_area); gr->pixbuf_needs_draw = 1; } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "list")) { if(argc == 2) { for(gr=qp_sllist_begin(default_qp->graphs);gr; gr=qp_sllist_next(default_qp->graphs)) fprintf(out, "%d \"%s\"\n", gr->graph_num, gr->name); gr=qp_sllist_begin(default_qp->graphs); fprintf(out, "%d", gr->graph_num); for(gr=qp_sllist_next(default_qp->graphs);gr; gr=qp_sllist_next(default_qp->graphs)) fprintf(out, " %d", gr->graph_num); putc('\n', out); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_x_scale")) { if(argc == 3) { int new_same_x_scale; new_same_x_scale = GetBool(argv[2], 0); if(gr->same_x_scale != new_same_x_scale) qp_graph_same_x_scale(gr, new_same_x_scale); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "same_x_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_y_scale")) { if(argc == 3) { int new_same_y_scale; new_same_y_scale = GetBool(argv[2], 0); if(gr->same_y_scale != new_same_y_scale) qp_graph_same_y_scale(gr, new_same_y_scale); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_get_value(gr, "same_y_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "gaps")) { if(argc == 3) { struct qp_plot *p; gr->gaps = GetBool(argv[2], 0); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->gaps = gr->gaps; } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_plot_get_value(gr, "gaps")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "line_width")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &gr->line_width)) { struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->line_width = gr->line_width; if(default_qp->graph_detail) qp_win_graph_detail_init(default_qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_plot_get_value(gr, "line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "lines")) { if(argc == 3) { struct qp_plot *p; gr->lines = GetBool(argv[2], 0); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->lines = gr->lines; if(default_qp->graph_detail) qp_win_graph_detail_init(default_qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_plot_get_value(gr, "lines")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "point_size")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &gr->point_size)) { struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->point_size = gr->point_size; if(default_qp->graph_detail) qp_win_graph_detail_init(default_qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_plot_get_value(gr, "point_size")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "points")) { if(argc == 3) { struct qp_plot *p; gr->points = GetBool(argv[2], 0); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->points = gr->points; if(default_qp->graph_detail) qp_win_graph_detail_init(default_qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", graph_plot_get_value(gr, "points")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "save")) { if(argc == 3) { int spew_level; spew_level = qp_set_spew_level(5); /* spew off */ if(qp_win_save_png(default_qp, gr, argv[2])) fprintf(out, "failed to save file \"%s\" errno=%d:%s\n", argv[2], errno, strerror(errno)); else fprintf(out, "saved file %s\n", argv[2]); qp_set_spew_level(spew_level); /* spew reset */ } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "zoom")) { if(argc == 3 && !strcmp(argv[2], "out")) qp_graph_zoom_out(gr, 0); else if(argc == 3 && !strcmp(argv[2], "all")) qp_graph_zoom_out(gr, 1); else if(argc >= 3) { double val[4]; int i = 0; char *s, *end; val[3] = HUGE_VAL; s = ArgsToString(&argv[2]); while(*s) { double d; while(isspace(*s)) ++s; if(!*s) break; d = strtod(s, &end); if(end == s || d == HUGE_VAL || d == -HUGE_VAL) break; val[i++] = d; if(i == 4) break; s = end; } if(val[3] == HUGE_VAL || ABSVAL(val[0]) <= SMALL_DOUBLE || ABSVAL(val[1]) <= SMALL_DOUBLE) goto zoom_err; /* See ecb_graph_button_release() callbacks.c */ if(gr->grab_x || gr->grab_y) { qp_zoom_push_shift(&(gr->z), - gr->grab_x/gr->xscale, - gr->grab_y/gr->yscale); ++gr->zoom_level; gr->grab_x = 0; gr->grab_y = 0; } //fprintf(out, "w=%g h=%g x=%g y=%g\n", val[0], val[1], val[2], val[3]); /* We zoom with XScale=val[0] normalized to 1 about the center * XShift in the scaled normalized coordinates * YScale=val[2] normalized to 1 about the center * YShift in the scaled normalized coordinates * We figure that will be intuitive. */ qp_zoom_push(&(gr->z), val[0], val[2]+0.5-0.5*val[0], val[1], val[3]+0.5-0.5*val[1]); ++gr->zoom_level; gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); gr->pixbuf_needs_draw = 1; qp_win_set_status(gr->qp); gtk_widget_queue_draw(gr->drawing_area); } fprintf(out, "level %d%s\n", gr->zoom_level, (gr->grab_x || gr->grab_y)?" with shift":""); return End_Reply(sh, argc, argv); zoom_err: BadCommand2(out, argc, argv); fprintf(out, " Try:\ngraph zoom W H X Y\n For example:\n" "graph zoom .5 .5 0 0\n to zoom to half size\n and:\ngraph zoom 1 1 0 .25\n" " to move the graph up 1/4 of the view area\n"); return End_Reply(sh, argc, argv); } else BadCommand("Unknown command", argc, argv, out); } else if(!strcmp(argv[0], "open")) { /* open files */ char **filename; for(filename = &argv[1]; *filename; ++filename) { struct qp_source *s; s = qp_source_create(*filename, QP_TYPE_UNKNOWN); if(s && app->op_default_graph) qp_win_graph_default_source(NULL, s, NULL); } } else if(!strcmp(argv[0], "plot")) { struct qp_plot *p = NULL; struct qp_graph *gr = NULL; ASSERT(default_qp); ASSERT(default_qp->current_graph); gr = default_qp->current_graph; if(!strcmp(argv[1], "create") && (argc == 3 || argc == 4)) { size_t x, y; if(argc == 3) { char *end, *s; s = argv[2]; while(*s && (*s < '0' || *s > '9')) ++s; if(!*s) goto invalid; x = strtoul(s, &end, 10); if(!*end) goto invalid; s = end; while(*s && (*s < '0' || *s > '9')) ++s; if(!*s) goto invalid; y = strtoul(s, &end, 10); if(!*end) goto plot; invalid: fprintf(out, "invalid channel numbers\n"); return End_Reply(sh, argc, argv); } else if(!GetSizeT(out, argv[2], 1, INT_MAX, &x) || !GetSizeT(out, argv[3], 1, INT_MAX, &y)) return End_Reply(sh, argc, argv); plot: { /* Find the x and y channels */ struct qp_source *s, *xs = NULL, *ys = NULL; for(s=qp_sllist_begin(app->sources);s;s=qp_sllist_next(app->sources)) { if(!xs && x < s->num_channels) xs = s; else if(!xs) x -= s->num_channels; if(!ys && y < s->num_channels) ys = s; else if(!ys) y -= s->num_channels; } if(!xs || !ys) { fprintf(out, "channel numbers to high"); return End_Reply(sh, argc, argv); } qp_graph_add_plot(gr, xs, ys, x, y); gr->pixbuf_needs_draw = 1; return End_Reply(sh, argc, argv); } } if(!default_qp->current_graph->current_plot) { fprintf(out, "there is no current plot: try plot create\n"); return End_Reply(sh, argc, argv); } p = default_qp->current_graph->current_plot; if(argc == 2 && argv[1][0] >= '0' && argv[1][0] <= '9') { int plot_num; if(GetInt(out, argv[1], 1, INT_MAX, &plot_num)) { struct qp_plot *p; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) if(p->plot_num == plot_num) break; if(p) { gr->current_plot = p; fprintf(out, "%d\n", plot_num); } else fprintf(out, "plot numbered %d not found\n", plot_num); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "destroy")) { if(argc == 2) { qp_graph_remove_plot(gr, p); gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "gaps")) { if(argc == 3) { p->gaps = GetBool(argv[2], 0); gr->pixbuf_needs_draw = 1; } if(argc == 2 || argc == 3) fprintf(out, "%s\n", plot_get_value(p, "gaps")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "line_color")) { if(argc >= 3) { if(ParseColor((struct qp_colora *) &p->l, &argv[2])) { gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } } fprintf(out, "%s\n", plot_get_value(p, "line_color")); } else if(!strcmp(argv[1], "line_width")) { if(argc == 3) { if(GetDouble(out, argv[2], 1, 1000, &p->line_width)) { gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", plot_get_value(p, "line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "lines")) { if(argc == 3) { p->lines = GetBool(argv[2], 0); gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", plot_get_value(p, "lines")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "list") && argc == 2) { for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) fprintf(out, "%d \"%s\"\n", p->plot_num, p->name); p=qp_sllist_begin(gr->plots); fprintf(out, "%d", p->plot_num); for(p=qp_sllist_next(gr->plots);p;p=qp_sllist_next(gr->plots)) fprintf(out, " %d", p->plot_num); putc('\n', out); } else if(!strcmp(argv[1], "point_color")) { if(argc >= 3) { if(ParseColor((struct qp_colora *) &p->p, &argv[2])) { gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } } fprintf(out, "%s\n", plot_get_value(p, "point_color")); } else if(!strcmp(argv[1], "point_size")) { if(argc == 3) { if(GetDouble(out, argv[2], 1, 1000, &p->point_size)) { gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", plot_get_value(p, "point_size")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "points")) { if(argc == 3) { p->points = GetBool(argv[2], 0); gr->pixbuf_needs_draw = 1; if(gr->qp->graph_detail) qp_win_graph_detail_init(gr->qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", plot_get_value(p, "points")); else BadCommand2(out, argc, argv); } else BadCommand("Unknown command", argc, argv, out); } else if(!strcmp(argv[0], "window")) { struct qp_win *qp; if(!strcmp(argv[1], "create")) { if(argc == 2) qp_win_create(); else BadCommand2(out, argc, argv); return End_Reply(sh, argc, argv); } qp = default_qp; if(argc == 2 && argv[1][0] >= '0' && argv[1][0] <= '9') { int window_num; if(GetInt(out, argv[1], 1, 10000, &window_num)) { for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) if(window_num == qp->window_num) break; if(qp) default_qp = qp; else fprintf(out, "window number %d not found\n", window_num); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "copy")) { if(argc == 2) qp_win_copy_create(qp); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "destroy")) { if(argc == 2 && qp_sllist_length(app->qps) > 1) qp_win_destroy(qp); else if(argc == 2) fprintf(out, "there is only one window left, try quit\n"); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "border")) { if(argc == 3) { int border, current; border = GetBool(argv[2], 0); current = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_border)); if((border && !current) || (!border && current)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_border)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "border")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "buttons")) { if(argc == 3) { int buttons; buttons = GetBool(argv[2], 0); if((buttons && !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) || (!buttons && gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar)))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_buttonbar)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "buttons")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "fullscreen")) { if(argc == 3) { int fullscreen, current; fullscreen = GetBool(argv[2], 0); current = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_fullscreen)); if((current && !fullscreen) || (!current && fullscreen)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_fullscreen)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "fullscreen")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "geometry")) { if(argc == 3) { int x=-1, y=-1, w=-1, h=-1, maximize=0; if(!GetGeometry(argv[2], &x, &y, &w, &h, &maximize)) { if(maximize) { gtk_window_maximize(GTK_WINDOW(qp->window)); x = y = w = h = -1; } if(x != -1 && y != -1) gtk_window_move(GTK_WINDOW(qp->window), x, y); if(w != -1 && h != -1) gtk_window_resize(GTK_WINDOW(qp->window), w, h); } else { fprintf(out, "Invalid geometry\n"); return End_Reply(sh, argc, argv); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "geometry")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "list")) { if(argc == 2) { struct qp_win *qp; qp=qp_sllist_begin(app->qps); if(qp) fprintf(out, "%d", qp->window_num); for(qp=qp_sllist_next(app->qps);qp;qp=qp_sllist_next(app->qps)) fprintf(out, " %d", qp->window_num); putc('\n', out); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "menubar")) { if(argc == 3 && !app->is_globel_menu) { int menubar, current; menubar = GetBool(argv[2], 0); current = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar)); if((!menubar && current) || (menubar && !current)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_menubar)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "menubar")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "shape")) { if(argc == 3) { int shape; shape = GetBool(argv[2], 0); if((shape && !qp->shape) || (!shape && qp->shape)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_shape)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "shape")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "statusbar")) { if(argc == 3) { int statusbar, current; statusbar = GetBool(argv[2], 0); current = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar)); if((!statusbar && current) || (statusbar && !current)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_statusbar)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "statusbar")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "tabs")) { if(argc == 3) { int tabs, current; tabs = GetBool(argv[2], 0); current = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs)); if((!tabs && current) || (tabs && !current)) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_tabs)); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_get_value(qp, "tabs")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "bg")) { if(argc >= 3) { if(ParseColor(&qp->background_color, &argv[2])) { struct qp_graph *gr; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { memcpy(&gr->background_color, &qp->background_color, sizeof(gr->background_color)); gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } fprintf(out, "%s\n", window_graph_get_value(qp, "bg")); } else if(!strcmp(argv[1], "cairo")) { if(argc == 3) { struct qp_graph *gr; qp->x11_draw = GetBool(argv[2], 0)?0:1; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if((!gr->x11 && qp->x11_draw) || (gr->x11 && !qp->x11_draw)) { if(gr == qp->current_graph) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_cairo_draw), (qp->x11_draw)?FALSE:TRUE); else graph_switch_draw_mode(gr); } } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "cairo")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "draw")) { if(argc == 2) { gtk_widget_queue_draw(qp->current_graph->drawing_area); qp->current_graph->pixbuf_needs_draw = 1; gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid")) { if(argc == 3) { struct qp_graph *gr; qp->grid = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if(gr == qp->current_graph) { if(gr->show_grid != qp->grid) { gr->show_grid = qp->grid; gr->pixbuf_needs_draw = 1; if(qp->graph_detail) qp_win_graph_detail_init(qp); } continue; } gr->show_grid = qp->grid; gr->pixbuf_needs_draw = 1; } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "grid")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_font")) { if(argc >= 3) { struct qp_graph *gr; if(qp->grid_font) free(qp->grid_font); qp->grid_font = ArgsToString(&argv[2]); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if(gr->grid_font) free(gr->grid_font); gr->grid_font = qp_strdup(qp->grid_font); if(gr->pangolayout) qp_graph_set_grid_font(gr); gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } fprintf(out, "%s\n", window_graph_get_value(qp, "grid_font")); } else if(!strcmp(argv[1], "grid_line_color")) { if(argc >= 3) { if(ParseColor(&qp->grid_line_color, &argv[2])) { struct qp_graph *gr; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { memcpy(&gr->grid_line_color, &qp->grid_line_color, sizeof(gr->grid_line_color)); gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } fprintf(out, "%s\n", window_graph_get_value(qp, "grid_line_color")); } else if(!strcmp(argv[1], "grid_line_width")) { if(argc == 3) { struct qp_graph *gr; if(GetInt(out, argv[2], 1, 1000, &qp->grid_line_width)) { for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->grid_line_width = qp->grid_line_width; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "grid_line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_numbers")) { if(argc == 3) { struct qp_graph *gr; qp->grid_numbers = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if(gr == qp->current_graph) { if(gr->grid_numbers != qp->grid_numbers) { gr->grid_numbers = qp->grid_numbers; gr->pixbuf_needs_draw = 1; if(qp->graph_detail) qp_win_graph_detail_init(qp); } continue; } gr->grid_numbers = qp->grid_numbers; gr->pixbuf_needs_draw = 1; } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "grid_numbers")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_text_color")) { if(argc >= 3) { if(ParseColor(&qp->grid_text_color, &argv[2])) { struct qp_graph *gr; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { memcpy(&gr->grid_text_color, &qp->grid_text_color, sizeof(gr->grid_text_color)); gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } fprintf(out, "%s\n", window_graph_get_value(qp, "grid_text_color")); } else if(!strcmp(argv[1], "grid_x_space")) { if(argc == 3) { struct qp_graph *gr; if(GetInt(out, argv[2], 1, 1000, &qp->grid_x_space)) { for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->grid_x_space = qp->grid_x_space; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "grid_x_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "grid_y_space")) { if(argc == 3) { struct qp_graph *gr; if(GetInt(out, argv[2], 1, 1000, &qp->grid_y_space)) { for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->grid_y_space = qp->grid_y_space; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "grid_y_space")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_x_scale")) { if(argc == 3) { struct qp_graph *gr; qp->same_x_scale = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if(gr->same_x_scale != qp->same_x_scale) { qp_graph_same_x_scale(gr, qp->same_x_scale); if(gr == qp->current_graph && qp->graph_detail) qp_win_graph_detail_init(qp); } } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "same_x_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "same_y_scale")) { if(argc == 3) { struct qp_graph *gr; qp->same_y_scale = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { if(gr->same_y_scale != qp->same_y_scale) { qp_graph_same_y_scale(gr, qp->same_y_scale); if(gr == qp->current_graph && qp->graph_detail) qp_win_graph_detail_init(qp); } } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_graph_get_value(qp, "same_y_scale")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "gaps")) { if(argc == 3) { struct qp_graph *gr; struct qp_plot *p; qp->gaps = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->gaps = qp->gaps; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->gaps = gr->gaps; gr->pixbuf_needs_draw = 1; } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_plot_get_value(qp, "gaps")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "line_width")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &qp->line_width)) { struct qp_graph *gr; struct qp_plot *p; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->line_width = qp->line_width; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->line_width = gr->line_width; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_plot_get_value(qp, "line_width")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "lines")) { if(argc == 3) { struct qp_graph *gr; struct qp_plot *p; qp->lines = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->lines = qp->lines; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->lines = gr->lines; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_plot_get_value(qp, "lines")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "point_size")) { if(argc == 3) { if(GetInt(out, argv[2], 1, 1000, &qp->point_size)) { struct qp_graph *gr; struct qp_plot *p; for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->point_size = qp->point_size; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->point_size = gr->point_size; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_plot_get_value(qp, "point_size")); else BadCommand2(out, argc, argv); } else if(!strcmp(argv[1], "points")) { if(argc == 3) { struct qp_graph *gr; struct qp_plot *p; qp->points = GetBool(argv[2], 0); for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { gr->points = qp->points; for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) p->points = gr->points; gr->pixbuf_needs_draw = 1; } if(qp->graph_detail) qp_win_graph_detail_init(qp); } if(argc == 2 || argc == 3) fprintf(out, "%s\n", window_plot_get_value(qp, "points")); else BadCommand2(out, argc, argv); } else BadCommand("Unknown window command", argc, argv, out); } else BadCommand("Unknown command", argc, argv, out); /********************************/ } return End_Reply(sh, argc, argv); } quickplot-0.10.6/install-sh0000755000175000017500000003325512245423266012554 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: quickplot-0.10.6/get_opt.c0000644000175000017500000000335312244565775012364 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include "get_opt.h" #ifdef DMALLOC # include "dmalloc.h" #endif char *get_opt(const char * const shorT, const char * const lonG, int argc, char **argv, int *i) { // check for form long=VALUE size_t len = 0; if(*i < argc) { char *str = (char *) argv[*i]; for(;*str && *str != '=';str++); if(*str == '=') { len = (size_t) str - (size_t) argv[*i]; str++; } if(len && !strncmp(argv[*i],lonG,len) && *str != '\0') { (*i)++; return str; } } // check for -a VALUE or --long VALUE if(((*i + 1) < argc) && (!strcmp(argv[*i],lonG) || (shorT && shorT[0] && !strcmp(argv[*i],shorT)))) { (*i)++; return (char *) argv[(*i)++]; } if(!shorT || !shorT[0]) return 0; // check for -aVALUE len=strlen(shorT); if( (*i < argc) && !strncmp(argv[*i],shorT,len) && argv[*i][len] != '\0') return (char *) &(argv[(*i)++][len]); return 0; } quickplot-0.10.6/quickplot.xpm0000644000175000017500000000247412245423271013304 00000000000000/* XPM */ static const char *quickplot[] = { /* columns rows colors chars-per-pixel */ "32 32 5 1 ", " c #F57A63", ". c #2D13ED", "X c #FD5681", "o c #008080", "O c None", /* pixels */ "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOXX", " OOOOOOOOOOOOOO....OOOOOOOOOOXXX", " OOOOOOOOOOO........OOOOOOOXXXO", "oooOOOOOOOOO..........OOOOXXXXOO", "oooOOOOOOOO....OOOO....OOXXXXOOO", "ooo OOOOOO...OOOOOOOO...XXXOOOOO", "OO OOOO...OOOOOOOOOX...XOOOOOO", "OOO OO...OOOOOOOOXXXX...OOOOOO", "OOOO O...OOOOOOXXXXXO...OOOOOO", "OOOOO ..OOOOOOXXXXOOOO...OOOOO", "OOOOOO OOOOXXXXOOOOOO...OOOOO", "OOOOO.. oooOXXXXOOOOOOOO...OOOO", "OOOOO... oooXXXXOOOOOOOOO...OOOO", "OOOOO..OOooo XOOOOOOOOOOOO...OOO", "OOOO...OOO XOOOOOOOOOOOOO...OO", "OOOO..OOOOXX OOOOOOOOOOOOO...OO", "OOO...OOOXXX OOOOOOOOOOOOO...O", "OOO..OOOOXXXO OOOOOOOOOOOOOO...", "OO...OOOXXXOOO OOOOOOOOOOOOOO..", "OO..OOOOXXOOOO OOOOOOOOOOOOOO.", "O...OOOXXXOOOOO oooOOOOOOOOOOOOO", "O..OOOXXXOOOOOOOooo OOOOOOOOOOOO", "...OOOXXXOOOOOOOooo OOOOOOOOOOO", "..OOOXXXOOOOOOOOOOO OOOOOOOOO", "..OOOXXOOOOOOOOOOOOO oooOOOOOOO", ".OOOXXXOOOOOOOOOOOOOO ooo OOOOOO", ".OOXXXOOOOOOOOOOOOOOOOooo OOOOO", "OOOXXOOOOOOOOOOOOOOOOOOOO OOOO", "OOXXXOOOOOOOOOOOOOOOOOOOOO OOO", "OOXXOOOOOOOOOOOOOOOOOOOOOOO ooo", "OXXXOOOOOOOOOOOOOOOOOOOOOOOO ooo", "XXXOOOOOOOOOOOOOOOOOOOOOOOOOOooo" }; quickplot-0.10.6/graph_grid.c0000644000175000017500000004304212244565775013030 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include "quickplot.h" #include "config.h" #include "spew.h" #include "debug.h" #include "list.h" #include "callbacks.h" #include "channel.h" #include "channel_double.h" #include "qp.h" #include "plot.h" #ifdef DMALLOC # include "dmalloc.h" #endif #define SMALL_NUM SMALL_DOUBLE #define TICKMIN 5.0 #define TICKMAX 8.0 #define TWO_DIGIT_FORMAT "%.2g" #define SCAN_FORMAT "%lf" #define FORMAT_LEN 8 /* must be smaller than FORMAT_LEN */ #define H_GRID_PRINT_FORMAT "%.15g" // High res #define L_GRID_PRINT_FORMAT "%.6g" // Low res #define POW pow #define TEN 10.0 #define MAX_ABS(x,y) ((ABSVAL(x) > ABSVAL(y))?ABSVAL(x):ABSVAL(y)) /* This is not too trival. Number round-off must be avoided. We * require the grid lines be drawn with the same method that the plot * points plot lines, so that they are not off by one pixel. We must * not have plots that miss-lead the user in any way. */ static void PreDrawGrid(struct qp_graph *gr, struct qp_plot *z, int64_t *xmin_mat, int64_t *xmax_mat, int64_t *xinc, double *xpow_part, int64_t *ymin_mat, int64_t *ymax_mat, int64_t *yinc, double *ypow_part, int width, int height) { double xmin = qp_plot_get_xval(z, 0); double xmax = qp_plot_get_xval(z, width); double ymax = qp_plot_get_yval(z, 0); double ymin = qp_plot_get_yval(z, height); /***************************************************/ /* get the x value lines calculated */ /***************************************************/ //DEBUG("pix width=%d values xmin=%g xmax=%g\n", width, xmin, xmax); //DEBUG("pix height=%d values ymin=%g ymax=%g\n", height, ymin, ymax); double delta; /* change in x values between vertical grid lines */ delta = (xmax - xmin)/(2 + ((double) width/gr->grid_x_space)); //printf("xdelta=%g gr->grid_x_space=%d\n", delta, //gr->grid_x_space); gint delta_p = (gint) log10(ABSVAL(delta) > SMALL_NUM ? ABSVAL(delta) : SMALL_NUM); if(delta_p <= 0) delta_p--; *xpow_part = POW(TEN, delta_p); //printf("xdelta_p=%d xpow_part=%g\n", delta_p, *xpow_part); { // strip off the round-off error off of xpow_part. char s[16]; //for example: xpow_part=0.20005465 --> // s=0.20 --> xpow_part=0.2000000 sprintf(s, TWO_DIGIT_FORMAT, *xpow_part); sscanf(s, SCAN_FORMAT, xpow_part); //printf("s=%s xpow_part=%.15g\n",s, xpow_part); } *xmin_mat = (int64_t) (xmin/(*xpow_part)); *xmax_mat = (int64_t) (xmax/(*xpow_part)); //printf(" xmin = %ldx10%+d xmax = %ldx10%+d\n", // *xmin_mat, delta_p, *xmax_mat, delta_p); if(width > gr->grid_x_space) *xinc = (int64_t) ((*xmax_mat - *xmin_mat)/ ((double) width/ gr->grid_x_space)); else *xinc = *xmax_mat - *xmin_mat; //printf(" xinc=%ld\n", *xinc); // round to 1, 2, 5, times 10^N if (*xinc < (int64_t) 2) *xinc = 1; else if(*xinc < (int64_t) 5) *xinc = 2; else if(*xinc < (int64_t) 10) *xinc = 5; else if(*xinc < (int64_t) 20) *xinc = 10; else if(*xinc < (int64_t) 50) *xinc = 20; else if(*xinc < (int64_t) 100) *xinc = 50; else if(*xinc < (int64_t) 200) *xinc = 100; else *xinc = 200; //DEBUG("xinc=%ld xmin_mat=%ld\n", *xinc, *xmin_mat); if(*xmin_mat > (int64_t) 0 && (*xmin_mat)%(*xinc)) *xmin_mat -= (*xmin_mat)%(*xinc); else if(*xmin_mat < (int64_t) 0 && (*xmin_mat)%(*xinc)) *xmin_mat -= *xinc + (*xmin_mat)%(*xinc); //printf(" xinc=%ld\n", *xinc); /***************************************************/ /* get the y value lines calculated */ /***************************************************/ delta = (ymax - ymin)/(2 + ((double) height/ gr->grid_y_space)); delta_p = (gint) log10(ABSVAL(delta) > SMALL_NUM ? ABSVAL(delta) : SMALL_NUM); if(delta_p <= 0) delta_p--; //printf("ydelta_p=%d\n", delta_p); *ypow_part = POW(TEN, delta_p); { // strip off the round-off error off of ypow_part. char s[16]; //for example: ypow_part=0.20005465 --> // s=0.20 --> ypow_part=0.2000000 sprintf(s, TWO_DIGIT_FORMAT, *ypow_part); sscanf(s, SCAN_FORMAT, ypow_part); } *ymin_mat = (int64_t) (ymin/(*ypow_part)); *ymax_mat = (int64_t) (ymax/(*ypow_part)); //printf(" ymin = %ldx10%+d ymax = %ldx10%+d\n", // *ymin_mat, delta_p, *ymax_mat, delta_p); if(height > gr->grid_y_space) *yinc = (int64_t) ((*ymax_mat - *ymin_mat)/ ((double) height/ gr->grid_y_space)); else *yinc = *ymax_mat - *ymin_mat; if (*yinc < (int64_t) 2) *yinc = 1; else if(*yinc < (int64_t) 5) *yinc = 2; else if(*yinc < (int64_t) 10) *yinc = 5; else if(*yinc < (int64_t) 20) *yinc = 10; else if(*yinc < (int64_t) 50) *yinc = 20; else if(*yinc < (int64_t) 100) *yinc = 50; else if(*yinc < (int64_t) 200) *yinc = 100; else *yinc = 200; //printf("yinc=%ld\n", *yinc); if(*ymin_mat > (int64_t) 0 && (*ymin_mat)%(*yinc)) *ymin_mat -= (*ymin_mat)%(*yinc); else if(*ymin_mat < (int64_t) 0 && (*ymin_mat)%(*yinc)) *ymin_mat -= *yinc + (*ymin_mat)%(*yinc); } static inline void DrawXGrid(cairo_t *cr, PangoLayout *pangolayout, struct qp_graph *gr, struct qp_plot *z, int64_t xmin_mat, int64_t xmax_mat, int64_t xinc, double xpow_part, int64_t ymin_mat, int64_t ymax_mat, int64_t yinc, double ypow_part, int width, int height, int view_height) { /******************************************************/ /* find where to put the value text for x lines */ /******************************************************/ int64_t yLabel_start, yLabel_inc, yLabel_max; int64_t i, max; char FMT[FORMAT_LEN]; if(gr->grid_numbers) { /* We can get better Y position precision if we * increase the range of the numbers in Y. */ yinc *= 100; ymin_mat *= 100; ymax_mat *= 100; ypow_part /= 100; if(gr->same_y_scale) { yLabel_inc = (qp_plot_get_yval(z, 0) - qp_plot_get_yval(z, view_height))/ ypow_part; // make yLabel_inc a multiple of yinc if(yLabel_inc < 14*yinc/10) yLabel_inc = yinc; else if(yLabel_inc < 24*yinc/10) yLabel_inc = 2*yinc; else if(yLabel_inc < 34*yinc/10) yLabel_inc = 3*yinc; else yLabel_inc -= yLabel_inc%yinc; yLabel_start = qp_plot_get_yval(z, view_height - 15 + gr->pixbuf_y)/ ypow_part; yLabel_start -= ((int64_t)(yLabel_start - ymin_mat + yinc*0.5))%yinc; if(qp_plot_get_ypixel(z, yLabel_start*ypow_part) > view_height + gr->pixbuf_y - 10/* font height */ - 3 /* padding */) yLabel_start += yinc; yLabel_start += - ((int64_t)(yLabel_start - ymin_mat + yinc*0.5)) + ((int64_t)(yLabel_start - ymin_mat + yinc*0.5))%yLabel_inc; yLabel_max = ymax_mat - yinc*0.5; yLabel_max -= ((yLabel_max - yLabel_start)% yLabel_inc); } else { yLabel_inc = (qp_plot_get_yval(z,0) - qp_plot_get_yval(z,view_height))/ ypow_part; yLabel_start = qp_plot_get_yval(z,view_height - 15 + gr->pixbuf_y)/ ypow_part; yLabel_start += - ((int64_t)(yLabel_start - ymin_mat)) + ((int64_t)(yLabel_start - ymin_mat))%yLabel_inc; yLabel_max = ymax_mat; yLabel_max -= ((yLabel_max - yLabel_start)% yLabel_inc); } } max = ABSVAL(xmin_mat); if(ABSVAL(xmax_mat) > max) max = ABSVAL(xmax_mat); if(max/xinc > 10000) { strcpy(FMT, H_GRID_PRINT_FORMAT); //printf("x high res\n"); } else strcpy(FMT, L_GRID_PRINT_FORMAT); /**************************************************** * draw x labels ****************************************************/ if(gr->grid_numbers) { cairo_set_source_rgba(cr, gr->grid_text_color.r, gr->grid_text_color.g, gr->grid_text_color.b, gr->grid_text_color.a); for(i=xmin_mat; i <= xmax_mat; i += xinc) { char str[64]; int x; int64_t j; snprintf(str,64, FMT, i*xpow_part); //printf(" xpow_part=%.15g\n",xpow_part); //printf(GRID_PRINT_FORMAT" ", i*xpow_part); x = qp_plot_get_xpixel(z, i*xpow_part); for(j = yLabel_start; j <= yLabel_max; j += yLabel_inc) { cairo_translate(cr, x+3+ gr->grid_line_width/2, qp_plot_get_ypixel(z, j*ypow_part) - 5 /* 1/2 font height */); pango_layout_set_text(pangolayout, str, -1); pango_cairo_update_layout(cr, pangolayout); pango_cairo_show_layout(cr, pangolayout); /* clear the translation */ cairo_identity_matrix(cr); //printf("%g\n", j*ypow_part); } } } /**************************************************** * draw vertical lines at x values ****************************************************/ cairo_set_source_rgba(cr, gr->grid_line_color.r, gr->grid_line_color.g, gr->grid_line_color.b, gr->grid_line_color.a); cairo_set_line_width(cr, gr->grid_line_width); for(i=xmin_mat; i <= xmax_mat; i += xinc) { int x; x = qp_plot_get_xpixel(z, i*xpow_part); // gr->grid_line_width; cairo_move_to(cr, x, 0); cairo_line_to(cr, x, height); } /* draw the lines */ cairo_stroke(cr); } static inline void DrawYGrid(cairo_t *cr, PangoLayout *pangolayout, struct qp_graph *gr, struct qp_plot *z, int64_t xmin_mat, int64_t xmax_mat, int64_t xinc, double xpow_part, int64_t ymin_mat, int64_t ymax_mat, int64_t yinc, double ypow_part, int width, int height, int view_width) { /******************************************************/ /* find where to put the value text for y lines */ /******************************************************/ int64_t xLabel_start, xLabel_inc, xLabel_max; gint x_ylinetext; int64_t i, max; char FMT[FORMAT_LEN]; x_ylinetext = qp_plot_get_xpixel(z, (xmin_mat + xinc*0.2)*xpow_part); if(x_ylinetext < 3) x_ylinetext = qp_plot_get_xpixel(z, (xmin_mat + xinc*1.2)*xpow_part); if(gr->grid_numbers) { /* We can get better X position precision if we * increase the range of the numbers in X. */ xmin_mat *= 100; xmax_mat *= 100; xinc *= 100; xpow_part /= 100; if(gr->same_x_scale) { xLabel_inc = (qp_plot_get_xval(z, view_width) - qp_plot_get_xval(z, 0))/ xpow_part; // make xLabel_inc a multiple of xinc if(xLabel_inc < 14*xinc/10) xLabel_inc = xinc; else if(xLabel_inc < 24*xinc/10) xLabel_inc = 2*xinc; else if(xLabel_inc < 34*xinc/10) xLabel_inc = 3*xinc; else xLabel_inc -= xLabel_inc%xinc; xLabel_start = qp_plot_get_xval(z, gr->pixbuf_x - 14 /* padding from grid line */)/ xpow_part; xLabel_start -= ((int64_t)(xLabel_start - xmin_mat))%xinc; if(qp_plot_get_xpixel(z, xLabel_start*xpow_part) < gr->pixbuf_x - 14 /* padding */) xLabel_start += xinc; xLabel_start += - ((int64_t)(xLabel_start - xmin_mat)) + ((int64_t)(xLabel_start - xmin_mat))%xLabel_inc; xLabel_max = xmax_mat; xLabel_max -= ((xLabel_max - xLabel_start)%xLabel_inc); } else { xLabel_inc = ( qp_plot_get_xval(z, view_width) - qp_plot_get_xval(z, 0) )/xpow_part; xLabel_start = qp_plot_get_xval(z, gr->pixbuf_x)/xpow_part; xLabel_start += - ((int64_t)(xLabel_start - xmin_mat)) + ((int64_t)(xLabel_start - xmin_mat))%xLabel_inc; xLabel_max = xmax_mat; xLabel_max -= ((xLabel_max - xLabel_start)%xLabel_inc); } } max = ABSVAL(ymin_mat); if(ABSVAL(ymax_mat) > max) max = ABSVAL(ymax_mat); if(max/yinc > 10000) { strcpy(FMT, H_GRID_PRINT_FORMAT); //printf("y high res\n"); } else strcpy(FMT, L_GRID_PRINT_FORMAT); /**************************************************** * draw y labels ****************************************************/ if(gr->grid_numbers) { cairo_set_source_rgba(cr, gr->grid_text_color.r, gr->grid_text_color.g, gr->grid_text_color.b, gr->grid_text_color.a); for(i=ymin_mat; i <= ymax_mat; i += yinc) { char str[64]; int y; int64_t j; snprintf(str,64, FMT, i*ypow_part); //snprintf(str,64, "%*.*g", digit_count,digit_count, i*ypow_part); //printf(GRID_PRINT_FORMAT" ", str); y = qp_plot_get_ypixel(z, i*ypow_part); for(j = xLabel_start; j <= xLabel_max; j += xLabel_inc) { cairo_translate(cr, qp_plot_get_xpixel(z, j*xpow_part) + gr->grid_line_width/2 + 10, y+ gr->grid_line_width/2); pango_layout_set_text(pangolayout, str, -1); pango_cairo_update_layout(cr, pangolayout); pango_cairo_show_layout(cr, pangolayout); /* clear the translation */ cairo_identity_matrix(cr); } } } /**************************************************** * draw horizontal lines at y values ****************************************************/ cairo_set_source_rgba(cr, gr->grid_line_color.r, gr->grid_line_color.g, gr->grid_line_color.b, gr->grid_line_color.a); cairo_set_line_width(cr, gr->grid_line_width); for(i=ymin_mat; i <= ymax_mat; i += yinc) { int y; y = qp_plot_get_ypixel(z, i*ypow_part); // - gr->grid_line_width; cairo_move_to(cr, 0, y); cairo_line_to(cr, width, y); } /* draw the lines */ cairo_stroke(cr); } void qp_graph_set_grid_font(struct qp_graph *gr) { PangoFontDescription *desc = NULL; desc = pango_font_description_from_string(gr->grid_font); if(!desc) QP_WARN("Failed to get grid font \"%s\"\n", gr->grid_font); if(!desc) desc = pango_font_description_from_string(DEFAULT_GRID_FONT); ASSERT(desc); if(!desc) { QP_WARN("Failed to get default grid font \"%s\".\n" " Will not show numbers on the grid.\n", DEFAULT_GRID_FONT); gr->grid_numbers = 0; } else { pango_layout_set_font_description(gr->pangolayout, desc); pango_font_description_free(desc); } } static PangoLayout *get_pangolayout(struct qp_graph *gr, cairo_t *cr) { if(!gr->pangolayout) { gr->pangolayout = pango_cairo_create_layout(cr); qp_graph_set_grid_font(gr); } else { pango_cairo_update_layout(cr, gr->pangolayout); } if((gr->font_antialias_set && gr->qp->shape) || (!gr->font_antialias_set && !gr->qp->shape)) { /* Doing a lot of crap just to set one bit */ cairo_font_options_t *fopt; PangoContext *pc; fopt = cairo_font_options_create(); if(gr->qp->shape) { cairo_font_options_set_antialias(fopt, CAIRO_ANTIALIAS_NONE); gr->font_antialias_set = 0; } else { cairo_font_options_set_antialias(fopt, CAIRO_ANTIALIAS_DEFAULT); gr->font_antialias_set = 1; } pc = pango_layout_get_context(gr->pangolayout); pango_cairo_context_set_font_options(pc, fopt); cairo_font_options_destroy(fopt); } return gr->pangolayout; } void qp_graph_grid_draw(struct qp_graph *gr, struct qp_plot *p, cairo_t *cr, int width, int height) { int64_t xmin_mat, xmax_mat, xinc, ymin_mat, ymax_mat, yinc; double xpow_part, ypow_part; PangoLayout *pangolayout = NULL; int view_width, view_height; ASSERT(gr); ASSERT(p); ASSERT(gr->drawing_area); ASSERT(gr->qp); ASSERT(gr->qp->window); if(!gr->show_grid) return; PreDrawGrid(gr, p, &xmin_mat, &xmax_mat, &xinc, &xpow_part, &ymin_mat, &ymax_mat, &yinc, &ypow_part, width, height); view_width = gtk_widget_get_allocated_width(gr->drawing_area); view_height = gtk_widget_get_allocated_height(gr->drawing_area); if(gr->grid_numbers) pangolayout = get_pangolayout(gr, cr); #if 0 DEBUG("\nxmin=%g xmax=%g\n", qp_plot_get_xval(p, 0), qp_plot_get_xval(p, width)); APPEND("ymin=%g ymax=%g\n", qp_plot_get_yval(p, height), qp_plot_get_yval(p, 0)); APPEND("xmin_mat=%ld xmax_mat=%ld xinc=%ld xpow_part=%g \n", xmin_mat, xmax_mat, xinc, xpow_part); APPEND("ymin_mat=%ld ymax_mat=%ld yinc=%ld ypow_part=%g \n", ymin_mat, ymax_mat, yinc, ypow_part); APPEND("delta_x pixels between lines=%d\n", qp_plot_get_xpixel(p, xpow_part*(xmin_mat + xinc)) - qp_plot_get_xpixel(p, xpow_part*(xmin_mat))); APPEND("delta_y pixels between lines=%d\n", qp_plot_get_ypixel(p, ypow_part*ymin_mat) - qp_plot_get_ypixel(p, ypow_part*(ymin_mat + yinc))); #endif if(gr->same_x_scale) DrawXGrid(cr, pangolayout, gr, p, xmin_mat, xmax_mat, xinc, xpow_part, ymin_mat, ymax_mat, yinc, ypow_part, width, height, view_height); if(gr->same_y_scale) DrawYGrid(cr, pangolayout, gr, p, xmin_mat, xmax_mat, xinc, xpow_part, ymin_mat, ymax_mat, yinc, ypow_part, width, height, view_width); } quickplot-0.10.6/color_gen.h0000644000175000017500000000223412244565775012674 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ struct qp_color_gen { double hue, saturation, value, hue_x, saturation_x, value_x; }; extern struct qp_color_gen *qp_color_gen_create(void); extern void qp_color_gen_destroy(struct qp_color_gen *cg); /* returns the hue which is in [0,1) */ extern double qp_color_gen_next(struct qp_color_gen *cg, double *red, double *green, double *blue, double hue); quickplot-0.10.6/COPYING0000644000175000017500000010451312244565775011612 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . quickplot-0.10.6/channel_double.h0000644000175000017500000001313412244565775013670 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #ifndef _QP_DEBUG_H_ #error "You must include qp_debug.h before this file." #endif #ifndef NAN #error "number NAN is not defined" #endif #ifndef INFINITY #error "number INFINITY not defined" #endif #define END_DOUBLE (NAN) extern void qp_channel_series_double_append(qp_channel_t channel, double val); extern double qp_channel_series_double_begin(qp_channel_t channel); extern double qp_channel_series_double_end(qp_channel_t channel); /* Find the value that is less than and next to or as close as possible * For series that is increasing * *v in is the value to search on * *v out is the value found from the channel * sets the current read to that value in the channel * returns the index to the value in the channel * returns 0 if a value was not found and the value * is set to the first value * */ extern size_t qp_channel_series_double_find_lt(qp_channel_t channel, double *v); /* Find the value that is greater than and next to or as close as possible * For series that is increasing * *v in is the value to search on * *v out is the value found from the channel * sets the current read to that value in the channel * returns the index to the value in the channel * returns length - 1 if the value was not found * and the value is set to the last value * */ extern size_t qp_channel_series_double_find_gt(qp_channel_t channel, double *v); /* Check that i is in bounds before this call */ /* This is a little slow, so don't iterate with it * you can use it to start an iteration at a point * not necessarily at the first or last value. It is * a lot faster than iterating to the i-th value * with qp_channel_series_double_next() and * qp_channel_series_double_prev() * * Returns the i-th value where i = [ 0, length-1 ] and * sets the current value to that value */ static inline double qp_channel_series_double_index(qp_channel_t c, size_t i) { double *array; ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(i >= 0); ASSERT(i < qp_channel_series_length(c)); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(*(c->series.ref_count) > 0); array = qp_dllist_begin(c->series.arrays); for(;i >= ARRAY_LENGTH; i -= ARRAY_LENGTH) array = qp_dllist_next(c->series.arrays); c->series.array_current_index = i; return array[i]; } /* This is not so fast. Do not use in a tight loop. */ /* This returns the current index or (size_t) -1 if their is none. */ static inline size_t qp_channel_series_double_get_index(qp_channel_t c) { size_t ret = 0; void *current_array, *array; ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(qp_channel_series_is_reading(c)); ASSERT(*(c->series.ref_count) > 0); if(!qp_channel_series_is_reading(c)) return (size_t) -1; ret += c->series.array_current_index; current_array = qp_dllist_val(c->series.arrays); array = qp_dllist_begin(c->series.arrays); while(array != current_array) { ret += ARRAY_LENGTH; array = qp_dllist_next(c->series.arrays); ASSERT(array); } return ret; } static inline double qp_channel_series_double_next(qp_channel_t c) { double *array; struct qp_channel_series *cs; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES || c->form == QP_CHANNEL_FORM_FUNC); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.arrays); ASSERT(*(c->series.ref_count) > 0); cs = &c->series; ++(cs->array_current_index); array = (double *) qp_dllist_val(cs->arrays); if(!array) return END_DOUBLE; if(array != cs->last_array) { if(cs->array_current_index < ARRAY_LENGTH) return array[cs->array_current_index]; array = (double *) qp_dllist_next(cs->arrays); cs->array_current_index = 0; } if(array != cs->last_array) return array[cs->array_current_index]; if(array && cs->array_current_index <= cs->array_last_index) return array[cs->array_current_index]; if(array) { /* push it past the end */ qp_dllist_next(cs->arrays); ASSERT(!qp_dllist_val(cs->arrays)); return END_DOUBLE; } /* there are no values left or there are no values */ return END_DOUBLE; } static inline double qp_channel_series_double_prev(qp_channel_t c) { double *array; struct qp_channel_series *cs; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES || c->form == QP_CHANNEL_FORM_FUNC); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(*(c->series.ref_count) > 0); ASSERT(c->series.arrays); cs = &c->series; --(cs->array_current_index); array = (double *) qp_dllist_val(cs->arrays); if(array) { if(cs->array_current_index != (size_t) -1) { return array[cs->array_current_index]; } else { array = (double *) qp_dllist_prev(cs->arrays); if(array) { cs->array_current_index = ARRAY_LENGTH - 1; return array[cs->array_current_index]; } } } return END_DOUBLE; } quickplot-0.10.6/qp.c0000644000175000017500000005440412245003616011324 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "qp.h" #include "debug.h" #include "spew.h" #include "list.h" #include "channel.h" #include "channel_double.h" #include "term_color.h" #include "plot.h" #ifdef DMALLOC # include "dmalloc.h" #endif #if !(GTK_CHECK_VERSION(3, 0, 0)) # error "You need GTK+ version 3" #endif /* The default qp_win is always the last one * in the app qp list, which is the last one * created. */ struct qp_win *default_qp = NULL; struct qp_app *app = NULL; /* return 0 on success, -1 if it was initialized already * and 1 on failure. */ int qp_app_init(int *argc, char ***argv) { if(argc == NULL || *argc == 0) argc = NULL; if(!argc || !argv || !*argv) { argc = NULL; argv = NULL; } if(!app->is_gtk_init && gtk_init_check(argc, argv) == FALSE) { QP_ERROR("gtk_init_check() failed\n"); WARN("gtk_init_check() failed\n"); VASSERT(0, "gtk_init_check() failed\n"); return 1; } if(app->is_gtk_init) return -1; app->is_gtk_init = 1; app->argc = argc; app->argv = argv; /* This stupid code is to fix Quickplot when running with * Ubuntu Unity window manager. The libraries that * Quickplot runs with are not the same as `ldd PATHTOQUICKPLOT' * with tell you so the unity code that will run which I see from * /proc/PID/maps is libunity-gtk-module.so calling function * void gtk_module_init(void) which looks at environment variable * UBUNTU_MENUPROXY. They appear to load that after the linker * is done. I see no other reasonable interface to the state * of the globel menu shit in the libunity-gtk-module.so source code. * Here's to hoping they don't decide to unset UBUNTU_MENUPROXY * or change what OFF is. If they change stuff and brake this * this will still work as it did before. */ /* We need this so that we know whether or not we can hide the * main menu, and in doing so will cause a redraw event, * which in turn tells us whether or not we need to set * the wait cursor when we try to hide the main menu, because * you can't set the cursor in the redraw code, because * it's too late then. Ya what-ever! Once again: Unity === bad design */ { const char *env; env = g_getenv("UBUNTU_MENUPROXY"); app->is_globel_menu = dlopen("libunity-gtk-module.so", RTLD_NOLOAD | RTLD_LAZY) && !(env && env[0] && ( !g_ascii_strcasecmp(env, "0") || !g_ascii_strcasecmp(env, "no") || !g_ascii_strcasecmp(env, "off") || !g_ascii_strcasecmp(env, "false") ) ); } { /* The close buttons on the tabs were too big by default. * They made the tabs change height when the button * was added. This appears to fix them. */ #ifdef QP_DEBUG GError *error = NULL; #endif const char css[] = "GtkButton#tab_close_button {\n" " -GtkButton-default-border: 0px;\n" " -GtkButton-default-outside-border: 0px;\n" " -GtkButton-inner-border: 0px;\n" " -GtkWidget-focus-line-width: 0px;\n" " -GtkWidget-focus-padding: 0px;\n" " border-radius: 4px;\n" /* This looks prettier to me. */ " padding: 0px;\n" " }"; GtkCssProvider *provider; provider = gtk_css_provider_new(); if(gtk_css_provider_load_from_data( provider, css, strlen(css), #ifdef QP_DEBUG &error #else NULL #endif )) { gtk_style_context_add_provider_for_screen( gdk_screen_get_default(), GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } #ifdef QP_DEBUG else { WARN("Error=%s\n", error->message); } if(error) g_error_free(error); #endif } return 0; } struct qp_app *qp_app_create(void) { ASSERT(!app); if(app) return app; app = qp_malloc(sizeof(*app)); memset(app, 0, sizeof(*app)); app->pid = getpid(); app->argc = NULL; app->argv = NULL; app->sources = qp_sllist_create(NULL); app->shells = qp_sllist_create(NULL); app->op_grid_on_top = 1; app->op_number_of_plots = NUMBER_OF_PLOTS; /* Generated code */ # include "app_op_init.h" app->op_geometry.x = INT_MAX; app->op_geometry.y = INT_MAX; app->op_geometry.width = 800; app->op_geometry.height = 700; app->op_label_separator = qp_strdup(" "); /* default rgb(a) colors */ app->op_background_color.r = 0.01; app->op_background_color.b = 0.06; app->op_background_color.g = 0.02; app->op_background_color.a = 0.4; app->op_grid_line_color.r = 0.76; app->op_grid_line_color.g = 0.76; app->op_grid_line_color.b = 0.76; app->op_grid_line_color.a = 0.6; app->op_grid_text_color.r = 0.76; app->op_grid_text_color.g = 0.76; app->op_grid_text_color.b = 0.76; app->op_grid_text_color.a = 0.9; app->gui_can_exit = 1; app->root_window_width = 0; app->root_window_height = 0; /* these get set later */ app->grabCursor = NULL; app->pickCursor = NULL; app->zoomCursor = NULL; app->is_gtk_init = 0; app->qps = qp_sllist_create(NULL); app->main_window_count = 0; return app; } void qp_win_graph_remove(qp_win_t qp, qp_graph_t graph) { qp = qp_win_check(qp); ASSERT(qp->graphs); #ifdef QP_DEBUG ASSERT(qp_sllist_remove(qp->graphs, graph, 0) == 1); #else qp_sllist_remove(qp->graphs, graph, 0); #endif } void qp_app_source_remove(qp_source_t source) { qp_app_check(); ASSERT(app->sources); #ifdef QP_DEBUG ASSERT(qp_sllist_remove(app->sources, source, 0) == 1); #else qp_sllist_remove(app->sources, source, 0); #endif } void qp_win_destroy(qp_win_t qp) { qp = qp_win_check(qp); ASSERT(app); ASSERT(qp); ASSERT(qp->window); if(qp->ref_count != 1) { ASSERT(qp->ref_count > 1); qp->destroy_called = 1; /* We cannot use just a counter because there could be an * arbitary number of button destroying clicks that * we wish to delay acting on. */ // The time of destruction will come later. return; } { struct qp_graph *gr; while((gr=qp_sllist_first(qp->graphs))) { /* We do not iterate here because qp_graph_destroy() * modifies the list. */ qp_graph_destroy(gr); } } qp_sllist_destroy(qp->graphs, 0); qp_sllist_remove(app->qps, qp, 0); if(qp->graph_detail) qp_graph_detail_destory(qp); if(qp->window) { gtk_widget_destroy(qp->window); --(app->main_window_count); ASSERT(app->main_window_count >= 0); } free(qp); if(default_qp == qp) default_qp = qp_sllist_last(app->qps); if(qp->grid_font) free(qp->grid_font); if(app->main_window_count == 1) { /* We must make the other qp->delete_window_menu_item * have the correct sensitive state. */ ASSERT(qp_sllist_length(app->qps) > 0); for(qp=qp_sllist_begin(app->qps);qp; qp=qp_sllist_next(app->qps)) /* They do not all have windows */ if(qp->window) { ASSERT(qp->delete_window_menu_item); gtk_widget_set_sensitive(qp->delete_window_menu_item, FALSE); break; } ASSERT(qp); } } void qp_app_set_window_titles(void) { struct qp_win *qp; ASSERT(app); ASSERT(app->qps); for(qp = qp_sllist_begin(app->qps); qp; qp = qp_sllist_next(app->qps)) if(qp->window) qp_win_set_window_title(qp); } /* We reset the window titles has files are * loaded and unloaded. */ void qp_win_set_window_title(struct qp_win *qp) { #define END_LEN 256 #define BEG_LEN 24 char title_mem[BEG_LEN + END_LEN]; char *title; ASSERT(qp); ASSERT(qp->window); if(!qp->window) return; title = &title_mem[BEG_LEN]; if(qp_sllist_length(app->sources)) { size_t len = END_LEN, l; struct qp_source *s; char *str; str = title; s = qp_sllist_begin(app->sources); ASSERT(s); snprintf(str, len, "Quickplot: %s", s->name); l = strlen(str); str += l; len -= l; for(s= qp_sllist_next(app->sources); s && len > 1; s= qp_sllist_next(app->sources)) { snprintf(str, len, " %s", s->name); l = strlen(str); str += l; len -= l; } if(len == 1) snprintf(str-5, 5, " ..."); } else sprintf(title, "Quickplot"); if(qp->window_num > 1) { char beg[BEG_LEN]; size_t len, l; snprintf(beg, BEG_LEN, "[%d] ", qp->window_num); l = len = strlen(beg); ASSERT(len); ASSERT(lenwindow), title); DEBUG("Set main window title to: \"%s\"\n", title); #undef BEG_LEN #undef END_LEN } size_t qp_app_read(const char *filename) { struct qp_source *s; s = qp_source_create(filename, QP_TYPE_UNKNOWN); if(!s) return 0; return s->num_channels; } static inline size_t num_channels(struct qp_sllist *sources) { size_t num_chan = 0; struct qp_source *s; for(s=qp_sllist_begin(sources); s; s=qp_sllist_next(sources)) num_chan += s->num_channels; return num_chan; } static struct qp_source *get_source(struct qp_sllist *sources, size_t chan_num, size_t *ret_source_chan_num) { struct qp_source *s; size_t count = 0; for(s=qp_sllist_begin(sources); s; s=qp_sllist_next(sources)) { count += s->num_channels; if(count > chan_num) { if(ret_source_chan_num) *ret_source_chan_num = chan_num -(count - s->num_channels); return s; } } VASSERT(0, "Cannot get channel %zu\n", chan_num); return NULL; } static inline struct qp_source *get_source_channel_num( struct qp_sllist *sources, size_t chan_num, struct qp_channel **ret_channel, size_t *ret_source_chan_num) { struct qp_source *s; struct qp_channel **c; size_t schan_num; s = get_source(sources, chan_num, &schan_num); if(ret_source_chan_num) *ret_source_chan_num = schan_num; c = s->channels; while(schan_num--) ++c; ASSERT(*c); *ret_channel = *c; return s; } static inline void qp_append_channel_list(const char *xy, const ssize_t *a, size_t num) { size_t i; QP_APPEND(" %s channels={", xy); for(i=0; isources); for(;s; s = qp_sllist_next(app->sources)) qp_win_graph_default_source(qp, s, NULL); } /* Returns 1 on error 0 on success */ int qp_win_graph_default_source(qp_win_t qp, qp_source_t s, const char *name) { ssize_t *x,*y, i, i_offset = 0; size_t num_plots; struct qp_source *ss; int ret; ASSERT(s); /* Lets make a rule that says that sources must have at * least 2 channnels. */ ASSERT(s->num_channels >= 2); num_plots = app->op_number_of_plots; if(num_plots > s->num_channels - 1) num_plots = s->num_channels - 1; ss = qp_sllist_begin(app->sources); while(ss) { if(s == ss) break; i_offset += ss->num_channels; ss = qp_sllist_next(app->sources); } VASSERT(ss, "Source not found in list"); if(!ss) return 1; /* source not found */ x = qp_malloc(sizeof(ssize_t)*num_plots); y = qp_malloc(sizeof(ssize_t)*num_plots); for(i=0; i= 1); ret = qp_win_graph(qp, x, y, i, name); free(x); free(y); return ret; } /* Returns 1 on error * Returns 0 on success * * x and y are arrays of channel numbers starting at 0 * channels numbers start at zero in the first channel in * the first source and from there number all channels in * all sources. */ int qp_win_graph(qp_win_t qp, const ssize_t *x, const ssize_t *y, size_t num, const char *name) { size_t num_chan = 0, i; int same_extremes = 1; struct qp_channel *chan_0; struct qp_graph *gr, *last_graph; double dx_min = INFINITY, dy_min = INFINITY, xmin = INFINITY, xmax = -INFINITY, ymin = INFINITY, ymax = -INFINITY; ASSERT(x); ASSERT(y); ASSERT(num); if(!num) { WARN("Number of plots=0\n"); return 1; } ASSERT(app->sources); ASSERT(x); ASSERT(y); ASSERT(num); num_chan += num_channels(app->sources); { size_t max_channel = 0; for(i=0; i max_channel) max_channel = x[i]; if(y[i] > max_channel) max_channel = y[i]; } if(max_channel >= num_chan) { QP_WARN("Invalid plot list:\n"); qp_append_channel_list("x", x, num); qp_append_channel_list("y", y, num); QP_APPEND(" There are only %zu channels not %zu\n", num_chan, max_channel + 1); QP_APPEND(" Channel numbers start at 0\n"); return 1; } } if(!name || !name[0]) name = get_source(app->sources, y[0], 0)->name; if(app->op_new_window && !qp) { if(!(qp = qp_win_create())) return 1; } else qp = qp_win_check(qp); last_graph = qp_sllist_last(qp->graphs); gr = qp_graph_create(qp, name); get_source_channel_num(app->sources, x[0], &chan_0, NULL); same_extremes = 1; for(i=0; isources, x[i], &chan, NULL); if(chan->form == QP_CHANNEL_FORM_SERIES) { double dx; dx = chan->series.max - chan->series.min; if(xmin > chan->series.min) xmin = chan->series.min; if(xmax < chan->series.max) xmax = chan->series.max; if(dx > SMALL_DOUBLE && dx_min > dx) dx_min = dx; if(chan_0->series.max != chan->series.max || chan_0->series.min != chan->series.min) same_extremes = 0; } else VASSERT(0, "More code needed here"); } gr->same_x_scale = qp->same_x_scale; gr->same_x_limits = same_extremes; if(same_extremes) { /* same_extremes means they should be same scales */ gr->same_x_scale = 1; } if(gr->same_x_scale == -1) { if(dx_min == INFINITY) { if(xmax == xmin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ xmax += 1; xmin -= 1; } /* all the x channels were pretty constant */ else if(xmax - xmin < SMALL_DOUBLE) { xmax += SMALL_DOUBLE; xmin -= SMALL_DOUBLE; } } else if(dx_min < (xmax - xmin)/SCALE_FACTOR) { /* use different scales */ xmin = INFINITY; xmax = -INFINITY; } } else if(gr->same_x_scale) { if(xmax == xmin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ xmax += 1; xmin -= 1; } else if(xmax - xmin < SMALL_DOUBLE) { xmax += SMALL_DOUBLE; xmin -= SMALL_DOUBLE; } } else if(xmax == xmin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ xmax += 1; xmin -= 1; } else if(xmax - xmin < SMALL_DOUBLE) { /* they requested different scales but the values * are too close together, so we make it same scale */ xmax += SMALL_DOUBLE; xmin -= SMALL_DOUBLE; } else { /* use different scales */ xmin = INFINITY; xmax = -INFINITY; } get_source_channel_num(app->sources, y[0], &chan_0, NULL); same_extremes = 1; for(i=0; isources, y[i], &chan, NULL); if(chan->form == QP_CHANNEL_FORM_SERIES) { double dy = chan->series.max - chan->series.min; if(ymin > chan->series.min) ymin = chan->series.min; if(ymax < chan->series.max) ymax = chan->series.max; if(dy > SMALL_DOUBLE && dy_min > dy) dy_min = dy; if(chan_0->series.max != chan->series.max || chan_0->series.min != chan->series.min) same_extremes = 0; } else VASSERT(0, "More code needed here"); } gr->same_y_scale = qp->same_y_scale; gr->same_y_limits = same_extremes; if(same_extremes) { /* same_extremes means they should be same scales */ gr->same_y_scale = 1; } if(gr->same_y_scale == -1) { if(dy_min == INFINITY) { if(ymax == ymin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ ymax += 1; ymin -= 1; } /* all the y channels were pretty constant */ else if(ymax - ymin < SMALL_DOUBLE) { ymax += SMALL_DOUBLE; ymin -= SMALL_DOUBLE; } } else if(dy_min < (ymax - ymin)/SCALE_FACTOR) { /* use different scales */ ymin = INFINITY; ymax = -INFINITY; } } else if(gr->same_y_scale) { if(ymax == ymin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ ymax += 1; ymin -= 1; } else if(ymax - ymin < SMALL_DOUBLE) { ymax += SMALL_DOUBLE; ymin -= SMALL_DOUBLE; } } else if(ymax == ymin) { /* It could be just one point so lets give it a * decent scale, not like the 1e-14 crap. */ ymax += 1; ymin -= 1; } else if(ymax - ymin < SMALL_DOUBLE) { /* they requested different scales but the values * are too close together, so we make it same scale */ ymax += SMALL_DOUBLE; ymin -= SMALL_DOUBLE; } else { /* use different scales */ ymin = INFINITY; ymax = -INFINITY; } /* Okay here is what the scaling really is */ gr->same_x_scale = (xmax > xmin)?1:0; gr->same_y_scale = (ymax > ymin)?1:0; //DEBUG("xmax=%.30g xmin=%.30g\n", xmax, xmin); //DEBUG("x=[%g,%g] y=[%g,%g] dx_min=%g dy_min=%g\n", // xmin, xmax, ymin, ymax, dx_min, dy_min); for(i=0; isources, x[i], &chan_x, &cnx); sy = get_source_channel_num(app->sources, y[i], &chan_y, &cny); qp_source_get_plot_name(pname, 128, sx, sy, cnx, cny); qp_plot_create(gr, chan_x, chan_y, pname, xmin, xmax, ymin, ymax); } #if QP_DEBUG { struct qp_plot *p; size_t i = 0; INFO("Created graph \"%s\" with %zu plots:\n", gr->name, num); for(p=qp_sllist_begin(gr->plots); p; ++i, p=qp_sllist_next(gr->plots)) { size_t len = (size_t) -1; if(p->x->form == QP_CHANNEL_FORM_SERIES) len = qp_channel_series_length(p->x); if(p->y->form == QP_CHANNEL_FORM_SERIES && qp_channel_series_length(p->y) < len) len = qp_channel_series_length(p->y); APPEND(" plot %zu [%zu,%zu]: %s", i, x[i], y[i], p->name); if(len != (size_t) -1) APPEND(" with %zu points\n", len); else APPEND("\n"); } } #endif { struct qp_plot *p; size_t i = 0; QP_INFO("Created graph \"%s\" with %zu plots:\n", gr->name, num); for(p=qp_sllist_begin(gr->plots); p; ++i, p=qp_sllist_next(gr->plots)) { size_t len = (size_t) -1; if(p->x->form == QP_CHANNEL_FORM_SERIES) len = qp_channel_series_length(p->x); if(p->y->form == QP_CHANNEL_FORM_SERIES && qp_channel_series_length(p->y) < len) len = qp_channel_series_length(p->y); QP_APPEND(" plot %zu [%zu,%zu]: %s", i, x[i], y[i], p->name); if(len != (size_t) -1) QP_APPEND(" with %zu points\n", len); else QP_APPEND("\n"); } } /* remove the last graph if it is empty */ if(last_graph && qp_sllist_length(last_graph->plots) == 0) qp_graph_destroy(last_graph); qp_graph_detail_set_value_mode(gr); return 0; } #define STR_LEN 128 #define NUM_LEN 31 #define IMIN(x,y) (((x)<(y))?(x):(y)) /* if x == INT_MAX this will not use x,y */ void qp_win_set_status(struct qp_win *qp) { char status[STR_LEN]; struct qp_graph *gr; if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar))) return; gr = qp->current_graph; ASSERT(gr); if(qp_sllist_length(gr->plots) > 0) { char x_s[NUM_LEN], y_s[NUM_LEN]; char *shift; struct qp_plot *p; p = qp_sllist_first(gr->plots); if(!p->xscale || !p->yscale) /* The plot has not been drawn yet. */ return; if(!p->sig_fig_x || !p->sig_fig_y) { GtkAllocation a; gtk_widget_get_allocation(gr->drawing_area, &a); qp_plot_get_sig_fig(p, a.width, a.height); } /* we assume the plots have had the graph scales initialized */ shift = (gr->grab_x || gr->grab_y)?"with shift":""; if(gr->same_x_scale && gr->qp->pointer_x >= 0) snprintf(x_s, IMIN(NUM_LEN, p->sig_fig_x + 8), "%+.*g ", p->sig_fig_x, qp_plot_get_xval(p, qp->pointer_x + gr->pixbuf_x + gr->grab_x)); else snprintf(x_s, IMIN(NUM_LEN, 8), " "); if(gr->same_y_scale && gr->qp->pointer_y >= 0) snprintf(y_s, IMIN(NUM_LEN, p->sig_fig_y + 8), "%+.*g ", p->sig_fig_y, qp_plot_get_yval(p, qp->pointer_y + gr->pixbuf_y + gr->grab_y)); else snprintf(y_s, IMIN(NUM_LEN, 8), " "); snprintf(status, STR_LEN, "%s %s {%s} %s %zu plot%s," " Zoom Level %d %s", x_s, y_s, gr->name, (gr->x11)?"(x11 draw)":"(cairo draw)", qp_sllist_length(gr->plots), (qp_sllist_length(gr->plots) > 1)?"s":"", gr->zoom_level, shift); } else snprintf(status, STR_LEN, "%s no plots", gr->name); gtk_entry_set_text(GTK_ENTRY(qp->status_entry), status); } #undef NUM_LEN #undef STR_LEN quickplot-0.10.6/callbacks.h0000644000175000017500000000421012244565775012640 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #ifdef CB #error "Oh shit: CB() is defined already" #endif #ifdef ECB #error "Oh shit: ECB() is defined already" #endif #define CB(X) extern void cb_##X(GtkWidget *w, gpointer data) #define ECB(X) extern gboolean ecb_##X(GtkWidget *w,\ GdkEvent *event, gpointer data) extern int _cairo_draw_ignore_event; ECB(close); CB(quit); ECB(key_release); ECB(key_press); CB(zoom_out); CB(zoom_out_all); CB(view_menubar); CB(view_graph_tabs); CB(view_buttonbar); CB(view_statusbar); CB(view_border); //#undef NO_BIG_WIN_COPY /* Define NO_BIG_WIN_COPY to have the "copy window" disabled when the window * is in fullscreen or maximized. */ #define NO_BIG_WIN_COPY #ifdef NO_BIG_WIN_COPY extern gboolean ecb_window_state(GtkWidget *widget, GdkEventWindowState *event, struct qp_win *qp); #endif CB(view_fullscreen); CB(view_cairo_draw); CB(view_shape); CB(close_tab); CB(delete_window); extern gboolean ecb_graph_draw(GtkWidget *w, cairo_t *cr, gpointer data); CB(help); CB(about); ECB(graph_configure); ECB(graph_scroll); gboolean cb_switch_page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data); ECB(graph_button_press); ECB(graph_button_release); ECB(graph_pointer_motion); CB(open_file); CB(remove_source); CB(new_window); CB(copy_window); CB(new_graph_tab); CB(save_png_image_file); // graph_details.c CB(graph_detail_show_hide); CB(view_graph_detail); #undef ECB #undef CB quickplot-0.10.6/Repo_clean0000755000175000017500000000551012245030447012531 00000000000000#! /bin/bash # Quickplot - an interactive 2D plotter # # Copyright (C) 1998-2011 Lance Arsenault # This file is part of Quickplot. # # Quickplot 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. # # Quickplot 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 Quickplot. If not, see . # ###################################################################### # This script removes all auto generated file. If you don't have the # tools needed in your PATH to regenerate the auto generated files # this script will not do anything, or so it tries. # This will not remove any of your extra development cruft files # like joes_configure.bash which you may need but will not go in the # repository. Distribution files are not removed either. dir="$PWD" scriptdir="$(dirname ${BASH_SOURCE[0]})" cd $scriptdir || exit 1 if [ "$dir" != "$PWD" ] ; then echo "This script ($0) must be executed directly\ from the top $(dirname $0) source directory." exit 1 fi # This is not a complete list but if they have them # they will likely have any others that are needed. progs="svn svnversion lynx convert autoconf automake sed grep awk bash diff" inst= for prog in $progs ; do if ! which $prog &> /dev/null ; then echo " $prog is not installed in your PATH" inst="$inst $prog" fi done if [ -n "$inst" ] ; then echo echo " You need to have the following installed to run this:" echo echo " $inst" echo echo " or else you will not be able to recreate the files that" echo " running this removes." exit 1 fi ################################################################### set -x # generated directories rm -rf .deps .libs conftest.dir autom4te.cache m4 rm -f *.o *.la *.so *.lo rm -f\ aclocal.m4 config.cache config.h install-sh config.log\ Makefile Makefile.in missing mkinstalldirs ltmain.sh\ config.sub config.guess configure\ configure.scan autoscan-*x.log INSTALL\ libtool config.status autoscan.log depcomp confdefs.h\ last_release rm -f config.h* stamp-h* compile\ quickplot quickplot_shell *.xpm *.txt REPO_VERSION RELEASE_DATE paths.h\ *.htm _ScreenShot_*_thumb.png _ScreenShot_*_thumb-*.png\ about.html help.html index.html screenshots.html\ config.h.in config.h mk_options quickplot.pc\ quickplot.1.head quickplot.1.tail quickplot.1 quickplot_shell.1 # generated source files rm -f parse_args.h app_op_declare.h app_op_init.h quickplot-0.10.6/list.c0000644000175000017500000001365112244565775011700 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include "config.h" #include "debug.h" #include "list.h" #ifdef DMALLOC # include "dmalloc.h" #endif struct qp_sllist *qp_sllist_create(struct qp_sllist *orig) { struct qp_sllist *l; l = (struct qp_sllist *) qp_malloc(sizeof(struct qp_sllist)); if(orig) { ASSERT(*(orig->ref_count) > 0); l->first = orig->first; l->last = orig->last; l->length = orig->length; l->current = NULL; l->ref_count = orig->ref_count; ++(*(l->ref_count)); } else { l->first = l->last = l->current = NULL; l->length = 0; l->ref_count = (int *)qp_malloc(sizeof(int)); *(l->ref_count) = 1; } return l; } struct qp_dllist *qp_dllist_create(struct qp_dllist *orig) { struct qp_dllist *l; l = (struct qp_dllist *) qp_malloc(sizeof(struct qp_dllist)); if(orig) { ASSERT(*(orig->ref_count) > 0); l->first = orig->first; l->last = orig->last; l->length = orig->length; l->current = NULL; l->ref_count = orig->ref_count; ++(*(l->ref_count)); } else { l->first = l->last = l->current = NULL; l->length = 0; l->ref_count = (int *)qp_malloc(sizeof(int)); *(l->ref_count) = 1; } return l; } /** add val to the end */ void qp_sllist_append(struct qp_sllist *l, void *val) { struct qp_sllist_entry *new_e; ASSERT(l); ASSERT(*(l->ref_count) == 1); new_e = (struct qp_sllist_entry *) qp_malloc(sizeof(struct qp_sllist_entry)); new_e->next = NULL; new_e->val = val; if(l->last) { l->last->next = new_e; l->last = new_e; } else { l->current = l->first = l->last = new_e; } ++(l->length); } /** add val to the end */ void qp_dllist_append(struct qp_dllist *l, void *val) { struct qp_dllist_entry *new_e; ASSERT(l); ASSERT(*(l->ref_count) == 1); new_e = (struct qp_dllist_entry *) qp_malloc(sizeof(struct qp_dllist_entry)); new_e->next = NULL; new_e->prev = l->last; new_e->val = val; if(l->last) { l->last->next = new_e; l->last = new_e; } else { l->current = l->first = l->last = new_e; } ++(l->length); } void qp_sllist_destroy(struct qp_sllist *l, int free_vals) { ASSERT(l); ASSERT(*(l->ref_count) > 0); if(!l) return; if(*(l->ref_count) == 1) { /* This is the last reader of this * list so we may free the entries */ struct qp_sllist_entry *e; e = l->first; while(e) { struct qp_sllist_entry *prev_e; prev_e = e; e = e->next; if(free_vals && prev_e->val) free(prev_e->val); free(prev_e); } free(l->ref_count); } else --(*(l->ref_count)); free(l); } void qp_dllist_destroy(struct qp_dllist *l, int free_vals) { ASSERT(l); ASSERT(*(l->ref_count) > 0); if(!l) return; if(*(l->ref_count) == 1) { struct qp_dllist_entry *e; e = l->first; while(e) { struct qp_dllist_entry *prev_e; prev_e = e; e = e->next; if(free_vals && prev_e->val) free(prev_e->val); free(prev_e); } free(l->ref_count); } else --(*(l->ref_count)); free(l); } /* returns the number found */ int qp_sllist_find(struct qp_sllist *l, void *val) { void *v; int ret = 0; ASSERT(l); ASSERT(*(l->ref_count) > 0); for(v=qp_sllist_begin(l); v; v=qp_sllist_next(l)) if(v == val) ++ret; return ret; } /* returns the number found */ int qp_dllist_find(struct qp_dllist *l, void *val) { void *v; int ret = 0; ASSERT(l); ASSERT(*(l->ref_count) > 0); for(v=qp_dllist_begin(l); v; v=qp_dllist_next(l)) if(v == val) ++ret; return ret; } /* remove by pointer */ int qp_sllist_remove(struct qp_sllist *l, const void *val, int free_val) { struct qp_sllist_entry *e, *prev = NULL; int ret = 0; ASSERT(l); ASSERT(*(l->ref_count) == 1); for(e=l->first; e;) { struct qp_sllist_entry *next; next = e->next; if(e->val == val) { if(prev) { prev->next = e->next; if(l->last == e) l->last = prev; } else /* it is the first entry */ { l->first = e->next; if(l->last == e) l->last = NULL; } if(l->current == e) /* reset iterators */ l->current = NULL; /* free it once */ if(free_val && !ret) free(e->val); free(e); --(l->length); ASSERT(l->length != (size_t) -1); ++ret; } else prev = e; e = next; } return ret; } /* remove by pointer */ int qp_dllist_remove(struct qp_dllist *l, const void *val, int free_val) { struct qp_dllist_entry *e; int ret = 0; ASSERT(l); ASSERT(*(l->ref_count) == 1); for(e=l->first; e;) { struct qp_dllist_entry *next; next = e->next; if(e->val == val) { if(e->prev) e->prev->next = e->next; if(e->next) e->next->prev = e->prev; if(l->first == e) l->first = e->next; if(l->last == e) l->last = e->prev; if(l->current == e) /* reset iterators */ l->current = NULL; /* free it once */ if(free_val && !ret) free(e->val); free(e); --(l->length); ASSERT(l->length != (size_t) -1); ++ret; } e = next; } return ret; } quickplot-0.10.6/channel.c0000644000175000017500000001414312244565775012332 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "channel.h" #include "spew.h" #include "channel_double.h" #ifdef DMALLOC # include "dmalloc.h" #endif static uint64_t channel_create_count = 0; qp_channel_t qp_channel_func_double_create(double (*func)(double), double xmin, double xmax, double ymin, double ymax) { struct qp_channel *c; c = (struct qp_channel *) qp_malloc(sizeof(*c)); c->form = QP_CHANNEL_FORM_FUNC; c->value_type = QP_TYPE_DOUBLE; c->id = (++channel_create_count); c->func_double.func = func; c->func_double.xmin = xmin; c->func_double.xmax = xmax; c->func_double.ymin = ymin; c->func_double.ymax = ymax; return c; } qp_channel_t qp_channel_linear_create(double start, double step) { struct qp_channel *c; /* TODO: rewrite this making this a function and not a * big memory pig like it is now. */ c = qp_channel_create(QP_CHANNEL_FORM_SERIES, QP_TYPE_DOUBLE); c->data = qp_malloc(2*sizeof(double)); ((double *) c->data)[0] = start; ((double *) c->data)[1] = step; /* TODO: We setup the values in source.c */ return c; } qp_channel_t qp_channel_create(int form, int value_type) { struct qp_channel *channel; ASSERT(value_type >= 0 && value_type <= QP_TYPE_MAX); ASSERT(form == QP_CHANNEL_FORM_SERIES || form == QP_CHANNEL_FORM_FUNC); if(form != QP_CHANNEL_FORM_SERIES && form != QP_CHANNEL_FORM_FUNC) { WARN("Bad form arg\n"); QP_NOTICE("Bad form arg\n"); return NULL; } if(value_type < 0 || value_type > QP_TYPE_MAX) { WARN("Bad value_type arg\n"); QP_NOTICE("Bad value_type arg\n"); return NULL; } channel = (struct qp_channel *) qp_malloc(sizeof(*channel)); memset(channel, 0, sizeof(*channel)); channel->form = form; channel->value_type = value_type; channel->id = (++channel_create_count); channel->data = 0; switch(form) { case QP_CHANNEL_FORM_SERIES: { channel->series.array_current_index = (size_t) -1; channel->series.array_last_index = ARRAY_LENGTH -1; channel->series.last_array = NULL; channel->series.arrays = qp_dllist_create(NULL); channel->series.ref_count = (int *)qp_malloc(sizeof(int)); *(channel->series.ref_count) = 1; } break; /* TODO: add other value_type cases */ case QP_CHANNEL_FORM_FUNC: /* TODO: this code */ VASSERT(0, "Need more code here\n"); break; #ifdef QP_DEBUG default: VASSERT(0, "Bad form arg\n"); break; #endif } return channel; } void qp_channel_destroy(qp_channel_t channel) { ASSERT(channel); if(!channel) return; /* TODO: add other value types */ ASSERT(channel->value_type == QP_TYPE_UNKNOWN || channel->value_type == QP_TYPE_DOUBLE); ASSERT(channel->form == QP_CHANNEL_FORM_SERIES || channel->form == QP_CHANNEL_FORM_FUNC); switch(channel->form) { case QP_CHANNEL_FORM_SERIES: ASSERT(*(channel->series.ref_count) > 0); if(*(channel->series.ref_count) == 1) { /* This will free the arrays too */ qp_dllist_destroy(channel->series.arrays, 1); free(channel->series.ref_count); } else { /* This will not free the arrays, just the list reader */ qp_dllist_destroy(channel->series.arrays, 0); --(*(channel->series.ref_count)); } break; case QP_CHANNEL_FORM_FUNC: /* nothing needed here for QP_CHANNEL_FORM_FUNC */ break; #ifdef QP_DEBUG default: ASSERT(0); break; #endif } free(channel); } #ifdef QP_DEBUG void qp_channel_debug_append(struct qp_channel *c) { ASSERT(c); switch(c->form) { case QP_CHANNEL_FORM_SERIES: ASSERT(*(c->series.ref_count) > 0); switch(c->value_type) { case QP_TYPE_DOUBLE: { #if 1 double val; APPEND(" [%zu values, min=%G, max=%g " "is_increasing=%d is_decreasing=%d]", qp_channel_series_length(c), c->series.min, c->series.max, c->series.is_increasing, c->series.is_decreasing); for(val = qp_channel_series_double_begin(c); qp_channel_series_is_reading(c); val = qp_channel_series_double_next(c)) APPEND(" %G", val); #if 1 APPEND("\nreverse [%zu]", qp_channel_series_length(c)); for(val = qp_channel_series_double_end(c); qp_channel_series_is_reading(c); val = qp_channel_series_double_prev(c)) APPEND(" %G", val); #endif #else double *array; struct qp_channel_series *cs; cs = &c->series; for(array = (double *) qp_dllist_begin(cs->arrays); array; array = (double *) qp_dllist_next(cs->arrays)) { size_t i; size_t len; len = (array != cs->last_array)? ARRAY_LENGTH: cs->array_last_index+1; ASSERT(len > 0); for(i=0; i. */ extern void qp_plot_set_cairo_draw_mode(struct qp_plot *p, struct qp_graph *gr); extern void qp_plot_set_x11_draw_mode(struct qp_plot *p, struct qp_graph *gr); static inline int qp_plot_series_double_is_reading(struct qp_channel *c) { /* This qp_channel_series_is_reading() is inline too */ return qp_channel_series_is_reading(c); } static inline int qp_plot_is_reading(struct qp_plot *p) { return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); } /* qp_plot_begin() or qp_plot_end() must be called before this */ /* This is getting the inverse of the plots values. It gets the * plot value that would be for a particular graph pixel x position. */ static inline double qp_plot_get_xval(struct qp_plot *p, int x) { return (x - p->xshift)/p->xscale; } /* qp_plot_begin_y() or qp_plot_end_y() must be called before this */ /* This is getting the inverse of the plots values. It gets the * plot value that would be for a particular graph pixel y position. */ static inline double qp_plot_get_yval(struct qp_plot *p, int y) { return (y - p->yshift)/p->yscale; } /* qp_plot_begin_y() or qp_plot_end_y() must be called before this */ static inline int qp_plot_get_xpixel(struct qp_plot *p, double x) { return INT(p->xscale*x + p->xshift); } /* qp_plot_begin_y() or qp_plot_end_y() must be called before this */ static inline int qp_plot_get_ypixel(struct qp_plot *p, double y) { return INT(p->yscale*y + p->yshift); } static inline void qp_plot_get_sig_fig(struct qp_plot *p, int width, int height) { double a, b, k; if(p->sig_fig_x && p->sig_fig_y) return; a = qp_plot_get_xval(p, 0); b = qp_plot_get_xval(p, 1); ASSERT(b > a); k = 1.0/(b - a); b = ABSVAL(qp_plot_get_xval(p, width)); a = ABSVAL(a); if(b < a) b = a; a = log10(b*k); p->sig_fig_x = INT(a); if(p->sig_fig_x < 1) p->sig_fig_x = 1; a = qp_plot_get_yval(p, 1); b = qp_plot_get_yval(p, 0); ASSERT(b > a); k = 1.0/(b - a); a = ABSVAL(qp_plot_get_yval(p, height)); b = ABSVAL(b); if(b < a) b = a; a = log10(b*k); p->sig_fig_y = INT(a); if(p->sig_fig_y < 1) p->sig_fig_y = 1; } static inline void qp_plot_scale(struct qp_plot *p, double xscale, double xshift, double yscale, double yshift) { p->xscale = xscale*p->xscale0; p->xshift = INT(xscale*p->xshift0 + xshift); p->yscale = yscale*p->yscale0; p->yshift = INT(yscale*p->yshift0 + yshift); p->sig_fig_x = 0; p->sig_fig_y = 0; } static inline void qp_plot_x_rescale(struct qp_plot *p, double xmin, double xmax) { p->xscale0 = 1.0/(xmax - xmin); p->xshift0 = - xmin/(xmax - xmin); p->xscale = 0; p->sig_fig_x = 0; } static inline void qp_plot_y_rescale(struct qp_plot *p, double ymin, double ymax) { p->yscale0 = 1.0/(ymax - ymin); p->yshift0 = - ymin/(ymax - ymin); p->yscale = 0; p->sig_fig_y = 0; } /*****************************************************************/ /* All the functions below return a graph pixel x or y position. */ /*****************************************************************/ static inline int qp_plot_begin(struct qp_plot *p, double xscale, double xshift, double yscale, double yshift, int xpix_min, int ypix_min, int xpix_max, int ypix_max, double *x, double *y) { qp_plot_scale(p, xscale, xshift, yscale, yshift); p->num_read = (size_t) -1; if(p->x->form == QP_CHANNEL_FORM_SERIES && p->y->form == QP_CHANNEL_FORM_SERIES && p->x->series.is_increasing && qp_channel_series_length(p->x) == qp_channel_series_length(p->y) && !p->x->series.has_nan && !p->y->series.has_nan) { /* culling */ /* this is likely the most common case **************************************** * A UNIFORMLY INCREASING X CHANNEL ****************************************/ double xmin, xmax; size_t i, j, len; /* get the corresponding limiting plot channel values */ /* Any values outside [xmin,xmax] would be culled */ xmin = qp_plot_get_xval(p, xpix_min); xmax = qp_plot_get_xval(p, xpix_max); if(p->x->series.min > xmax || p->x->series.max < xmin) /* case: no data in bounds */ goto nodata; if((p->x->series.min >= xmin && p->x->series.max <= xmax) || p->x->series.min == p->x->series.max) /* all the channel data is in bounds */ goto begining; len = qp_channel_series_length(p->x); j = qp_channel_series_length(p->y); if(j < len) len = j; j = qp_channel_series_double_find_gt(p->x, &xmax); i = qp_channel_series_double_find_lt(p->x, &xmin); if(j < len -1) /* the number left to read after this returns */ p->num_read = j - i; //DEBUG("plot %s with indexes %zu to %zu \n", p->name, i, j); *x = p->xscale*xmin + p->xshift; *y = p->yscale*p->channel_series_y_index(p->y, i) + p->yshift; return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); } begining: *x = p->xscale*p->channel_x_begin(p->x) + p->xshift; *y = p->yscale*p->channel_y_begin(p->y) + p->yshift; return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); nodata: p->channel_x_end(p->x); p->channel_x_next(p->x); *x = END_DOUBLE; *y = END_DOUBLE; return 0; /* done reading, no values in bounds */ } static inline int qp_plot_end(struct qp_plot *p, double xscale, double xshift, double yscale, double yshift, double *x, double *y) { p->num_read = (size_t) -1; qp_plot_scale(p, xscale, xshift, yscale, yshift); *x = p->xscale*p->channel_x_end(p->x) + p->xshift; *y = p->yscale*p->channel_y_end(p->y) + p->yshift; return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); } static inline int qp_plot_next(struct qp_plot *p, double *x, double *y) { *x = p->xscale*p->channel_x_next(p->x) + p->xshift; *y = p->yscale*p->channel_y_next(p->y) + p->yshift; if(p->num_read != (size_t) -1) return ((p->num_read)--); return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); } static inline double qp_plot_prev(struct qp_plot *p, double *x, double *y) { *x = p->xscale*p->channel_x_prev(p->x) + p->xshift; *y = p->yscale*p->channel_y_prev(p->y) + p->yshift; if(p->num_read) { --p->num_read; return p->num_read; } return (p->x_is_reading(p->x) && p->y_is_reading(p->y)); } quickplot-0.10.6/channel_double.c0000644000175000017500000001356512244565775013673 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "channel.h" #include "spew.h" #include "channel_double.h" #ifdef DMALLOC # include "dmalloc.h" #endif size_t qp_channel_series_double_find_lt(qp_channel_t c, double *v) { size_t i, len; double val, r; struct qp_channel_series *cs; val = *v; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.is_increasing); cs = &c->series; ASSERT(cs->min != cs->max); len = qp_channel_series_length(c); if(val <= cs->min) { *v = qp_channel_series_double_begin(c); ASSERT(*v == cs->min); return 0; } if(val > cs->max) { *v = qp_channel_series_double_end(c); ASSERT(*v == cs->max); return len -1; } /* guess that the values increase linearly */ i = len*(cs->max - val)/(cs->max - cs->min); if(i < 0) i = 0; else if(i > len -1) i = len -1; r = qp_channel_series_double_index(c, i); while(r < val) r = qp_channel_series_double_next(c); ASSERT(qp_channel_series_is_reading(c)); while(r >= val) r = qp_channel_series_double_prev(c); ASSERT(qp_channel_series_is_reading(c)); *v = r; return qp_channel_series_double_get_index(c); } size_t qp_channel_series_double_find_gt(qp_channel_t c, double *v) { size_t i, len; double val, r; struct qp_channel_series *cs; val = *v; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.is_increasing); cs = &c->series; ASSERT(cs->min != cs->max); len = qp_channel_series_length(c); if(val < cs->min) { *v = qp_channel_series_double_begin(c); ASSERT(*v == cs->min); return 0; } if(val >= cs->max) { *v = qp_channel_series_double_end(c); ASSERT(*v == cs->max); return len -1; } /* guess that the values increase linearly */ i = len*(cs->max - val)/(cs->max - cs->min); if(i < 0) i = 0; else if(i > len -1) i = len -1; r = qp_channel_series_double_index(c, i); while(r > val) r = qp_channel_series_double_prev(c); ASSERT(qp_channel_series_is_reading(c)); while(r <= val) r = qp_channel_series_double_next(c); ASSERT(qp_channel_series_is_reading(c)); *v = r; return qp_channel_series_double_get_index(c); } double qp_channel_series_double_begin(qp_channel_t c) { double *array; struct qp_channel_series *cs; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.arrays); ASSERT(*(c->series.ref_count) > 0); cs = &c->series; array = (double *) qp_dllist_begin(cs->arrays); if(array) { cs->array_current_index = 0; return array[0]; } ASSERT(qp_dllist_length(cs->arrays) == 0); ASSERT(cs->last_array == NULL); return END_DOUBLE; } double qp_channel_series_double_end(qp_channel_t c) { double *array; struct qp_channel_series *cs; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.arrays); ASSERT(*(c->series.ref_count) > 0); cs = &c->series; array = (double *) qp_dllist_end(cs->arrays); if(array) { ASSERT(array == cs->last_array); cs->array_current_index = cs->array_last_index; return array[cs->array_current_index]; } ASSERT(qp_dllist_length(cs->arrays) == 0); ASSERT(cs->last_array == NULL); return END_DOUBLE; } static inline void check_min_max(struct qp_channel_series *cs, double val) { if(!is_good_double(val)) { cs->has_nan = 1; return; } if(val > cs->max) cs->max = val; else cs->is_increasing = 0; if(val < cs->min) cs->min = val; else cs->is_decreasing = 0; } void qp_channel_series_double_append(qp_channel_t c, double val) { double *array; struct qp_channel_series *cs; ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->value_type == QP_TYPE_DOUBLE); ASSERT(c->series.arrays); /* We disallow having the channel written to when there * is more than one copy of the channel. */ ASSERT(*(c->series.ref_count) == 1); cs = &c->series; /* get the last without moving the list current pointer */ array = (double *) qp_dllist_last(cs->arrays); ASSERT(array == cs->last_array); if(array) { ASSERT(cs->array_last_index < ARRAY_LENGTH); ASSERT(cs->last_array); ++(cs->array_last_index); if(cs->array_last_index == ARRAY_LENGTH) { /* add an array */ array = (double *) qp_malloc(sizeof(*array)*ARRAY_LENGTH); cs->array_last_index = 0; qp_dllist_append(cs->arrays, array); cs->last_array = array; } array[cs->array_last_index] = val; check_min_max(cs, val); return; } ASSERT(qp_dllist_length(cs->arrays) == 0); ASSERT(cs->last_array == NULL); /* We must make the first array */ array = (double *) qp_malloc(sizeof(*array)*ARRAY_LENGTH); qp_dllist_append(cs->arrays, array); cs->array_last_index = 0; cs->array_current_index = 0; cs->last_array = array; cs->max = -INFINITY; cs->min = INFINITY; check_min_max(cs, val); cs->is_increasing = 1; cs->is_decreasing = 1; /* and add the value */ array[0] = val; } quickplot-0.10.6/background_h1.png0000644000175000017500000004037012244565775013774 00000000000000‰PNG  IHDRBXW™ÐCbKGDÿÿÿ ½§“ IDATxœík{ÛÈ™¦Ÿ·ªŠ:Y²$S-S¶ÚÝšqg:›dzœÝ\W~Ñþ‰ýs³³³q’Þì¤'îõ!’MÉ¢)YòI":ì‡ ’ EI$…ûC·L‚$H‚¨ïáyé¿ÿÿ‹Y„ô‘ëe¥—%’Ä|pȯZÃ>]0~♲VkaödÞ¯¬ Ñ äÜéÙÖ—/w&qX ·Z QÞ…høh‘^ %þ+?åYå¹ÿ°\4™ÿQüƒ OžQ¡aÆÝNšø;zMê²y¯ ®Q+uqC?É‘Iê^h|moÑÏÐy(ÚƒÄ,Jµ’}$”¼Âÿ|oã c‹J/ÆdŸƒWK§Ç[r]6ñ`ä$MüØøhÀo™Êi¨ªR®öܲîC!ùŽ ¦”îC@É{Áø€0¬J‚Ÿz^ €Ö ­àÑõîéÍ@šxÃCعö\úœàG%È~?%Îåææ3ϻПÊêhž‰óõú?*%ÒÛ:“dBšø¡ýc|ïn(nìPdÍ9ÿïéÏqf €0^txa`$½A’˜ç²RùÙ÷Ïí?ð|tô8:@ ð ZÄšL—‡_3 zN£9Êž_µ,y“QH¼á¹ŸGtv€o 7™&‰úFµŒò$’ ý.+þ‰S“wÿÀì¯c®têyuÀPZéÅ0˜koruÊÞ­nZG牷×UGiî¹’‹Æ,UÒ j ÿ¯žâh‰¡?¯H¯·†kxP0ž)4ܬÊ­á‚”T+?¢ 0ܼÙ=¼6 3j#ìPrcU9¦¬ègç¤üì ”ßð|uñ°´ùŽ|ÿ|{ûG»ÍÞÞ·}Ÿ3I/¢5Ï@H¼áÉÊ(§»±3¡8ÔyÏ8;!tÉáÙ!$ÆÇñªðŒ§rWqÎt\úè9ÅZM†áek2˜’-’‡Ä1ÑëÆÁ‘9‚nŸø;_-Kü£€<£Ö³Ã“7‹;µÁ$vÁGÜÔ"fnÀÈøD³ò(um£M)”ë0ŸêïªZq{#§wÔœHŠ5m¼œ»ÄÐd¢ £ëæÎ¹iT“5lf–üØGxFoÇíÌ¢Í|+Ø.ù5‚öÄ[O¼MÜÉÂð6ó7¶s׎aæê4MNÕEç\·Ä±ÚVå NâEÓÞ»³óÔçŒoŒ0C¯"‘êµà‡~:úxsŒñPìsÞ0»2ÎYÚkXH€áiæÇŽ\'fNãX“kÈ¡_¸É¢g¸Qì%kx½Gã}±ë‚<¸S›ÜÑdü½ £È8ÀøƒhÊJ|¡õÅ—s[Ç©»Ü¯ƒ!à^ƒó/„€¯Ï×M°.ÿâ»ì2þ³sF 4|­ÊJÜe´Baö@ç p#9—‚ëDë;­f9u°)µ Â £‚áÉ©ºø'À܉6p!º§ö–dpN¯•ÿòÃç«€ÉýQëPìwÞSwgWÆ›T…HT†‘YXx¿ºrÈE³†`<(¦a3º´Œª ®†] pÎíR-)Ì«IüÑX’§¶y…÷":†‡¥Et©ßho^%”µ»”¨;íþ]hø:¼&aü‹O ]ʈô:tµžÓz®×%‘YRü½`„)éÔÏͺúŽœÌÓ}Áxé>Ø ®½¬ú_%Ò9GHFd”ߨtj*8G‹›÷/Ê'jCrÖÿÕ£Ò þQ{=.änŠ¡ÅÑÎ{…ŒËA¢6.•-êUªÙgÐ"„„Ò0ë‡)Áx±êóJÎOÊo£` —Ô+)‚0É Gꇀ„›óG/xòÍóü£aæ> H–r¢ïZRPP02f^áïGW(®œ°³ó”´Ô’}µü³º£û/¯,YgŸmi€¬œI 7I0È$¯¤œ;Ë*†ëÆM-N!™Ò/K’hAÁˆ@®å„]pf®»kAm~õº´ôÉÝboø8g»Ì¯Ë¬×ó_µD¥œ Om„`çœ}°–ŒFå4ìå“Ï ©Öä±÷YùÇ6Ùš.¡€($p¨D©«™Wø((Q§{¸M2ŽzèäfÔñêë<•p™ÏɆk”µ!À¼•ßtÎáZ³äh(Ë~ž @ÏGÏãÂo&¨Ù[R?²Ë,õüã"ÙÛðQ„â ÆNŸ€ÜÀP\&Rð“ãüT¯¯ÞÒG´‹çRb.º,§Ë$F;ÝM5·IÆ”ÜdÀÊὑ4ÛZÂBêÒ r9éê«((èû˜>uŽÐÆY°rJž‚Ò»úoR¿‚î~Õ>ä´2´Ï‚gl5çØ_¨  =r—©d0e¥>ñ£—¿P+ÊPRbŽ.8²®óžîì‰'WȤ3£2.ú†:Ò#&7Æ™^«þ<¢†ŒP€0CvA·ÍꊤjÁ$’dxÇ©s(=O@œéÕ­¿ÏmÇMòöø?/`嬾ìÜ×Á9­LFæJ}¦QkŸû.á?IŠr^-¸qºr¤‰µ’!)Ålñ\·˜;9üµBÆ -rëÛÔå,™fãˆM–‰Ž/xØä&ç²²ñÿ.ð?¦á3l¶¾»=¶ ` Va.}ûP‰†§údQ‰¶øY=§½hŸ|Œêov˜ßʤàòd¸ùÛŒóÂ+¶ZÍÄe±=£6Bæ…ÝqÜxÛç•Ü»äKQ=EgvÂ5(®Þù&©m’¦²×€J4‰Ãz]¾[Š¥Äœç¯o¼”a阯°(»ŸÃäx_†Ù”qÙ…eÃ$7íá"¤’•ÂPͦá,¦¬‡ÎÖ‡…Œ+š^ò(g¢ÁÀ0M€äüðM:yÚ㛨áÿ£Ðwú%æ°2)pÄ:l¤ˆWJé­¨ Ä /Y0¢ÐîWfeåðZ¼ÝzÇŠÉÚª•SˆK±}’ý\ŠÉZö˜>˜@„¯6:ÄœbêÍ–nùä‰îmœ'Y¯=LQ¯ï&ÿ9ð)H7‰'çbÛÞ‰¹{ { óçÛÛ¯3 6u¹ŸÃÄx_†Ù”q™…eù“›Nò·N×Þ7¾‘óPúR‡ã°ÅIFí±3ï-¸VzÈ£þyÕn÷Ýõú®dÁ°ÚjUІÇ?sSV½f¨\…ÕÈ Ó‘Äì‹—ÒùnîQ²$Ct¶ñ«û0pÈý5s7ñê€kñð _m˜@Èý5Si5þ!¹¾¦â‚9ÕRÇ£ÞÄ·ÛnZ¸9ø7<„T©<ï|}œ¥RyÞñŠ=¼¥Tvrùg–]“8pµŸƒRâÝÿû…Ðfí»ÿDVÄmër˜i×¹HhP³j²#õøà[£™) ?€¡“a‹“¬ñ¯·CÁ4âV‹Ò†ý§Ý¦Þø¶[ðõyÝTÜÎf{M dmUTO“bkîmž²¥»*äs8g1¤öލQ@$I ~ØåŸ3 t™†nêšffYÆe,fžA@„q‚”«]`<¼C]°&€›ÃU0QŒ0$I*$œpÉ8vÎØ%úÔ²MÖËK4YK”±[ÌIfȸ7ÇpÒä°Õ¥7Þ—^*MTOm¤Êª–P—RÕ#É|®ôäÙmYmÅJÙ¾`ô8M·JÐg@Gf/Á×çEÓUt^ü–Ù;¹ñ뿸ŠÉÚ*×j}ã%:“ËÁÅâñ_¿×-|¿ÖîxÞ-½è³b&¯{6@ÿZÉì6TgÉD„Iù0³)ãz–a(’qJ;ÃIOhÁˆ1È©!òª]ȸ‚—¬Æu!a¡ô½í¿e 8Ëeû¨§#h´@*ÏÜsNKrÍιZ§Æ~#)S²F€§¤¹Ü_3+"3 šüÒIï!$¥uRª&/ÿ›í)§€k¨(¿dX(2¬9ôuKÔÿüÏIýg¿DÎôjeonç(õ©úåÏ[OþÝ8¡óðÓP9ÙK^ªÍ}VÌn«‘n1gEö2.<œ›6˜‘3*ã 5ŒÈCIêþ¡t»û’ýfÇT¾c|HøCeMSÒý{ý n—®Æ¥Åà.;ò—ßsÿ}ZP/ÝÐË”ûÏèa4Á Z³E­”KÉõûíþ¹³ý§ž™PÀfBM¥Ù? êT ÂôÙé2}˜fÛ—øÍ&¢ž.Á­8Õ©jÞÜO>Ä­ .À‰Î¡ïHL#ˆsåmM/êþ…3Œñ†dV´LÚ ÒG~RÌÙ[¶¶~ÊÑ!m3ð‘çMO3*ãz`«åHuÄZ“—° ›b°uã"§ÿp“0E(®  WÎq®‰ÎGYGl4À^…²v×|ž WTŸÎë>vùéÈÑ9GˆñjÊOrÍNÞØÿCÈû(ä’´æ2¡I%_…jâu€ôëEâãdÕ]Üq˾/K”>ôR‡ ÷²µir6(Q/q¦×·?{s_ÜNÕÉý5SäËšy=ܤ䢹½zy”©ö‹¸×H|à³m@s»dœ]™¨3àÆ¤¦‡ IŒRåÝ‹œþö0®qHTÐçÁ?Õ^žºÉ"n)Kgj‹®<– È9;P}'=|º˜gìoŽÞ"~Æ0¾1ž¡ög˜Nkrœ—Râèè±»¬­Tž÷ væÏìM·TÆu÷¥fldMǘTå0Ü"HêU?N`¼BÆt0Ð°ÆÆq¿zð¿joÉ>¶EõÆ;´~V£;] }/Ì2s@¾ûwõfÍ´¢Õ:zšÄ÷%ê>4™ÕÆãq¼3ÙMiã=3øœ^âÔj¢Ü°žú@}cs冾l~)ß?ßÞúKØÜà=jì½ùY]DI†² Ÿdt;¨y™ë›Ñv×·qkž,ÇÄsegz} †k÷ë³S@ÉàœX‹iÑã@ w%Qp»‰ÛT³fE§Jß½ûsñ ‘ì›s ŒêCëóàÂ*ÉaVÙ›¶Ý RiSqÿÔ­BW]þÌl¼ÓvSÖýhÌnu_ÂD¥VSÃ'ú~5.Ìf¾”ìOØèpù\ïì< ‚ùúÑ?öòËH¶ÖN»û@.}²·÷Äu°ÚR9S30¶ëÖÉ8;;o°†3á17:¦¤èœQÀ±q‚¦sMF˜1† ¦—üC«8—ëKoY`¨¢owý`êbh}Ú] ý[ ­ß¼ÿLì§ïãÚŽcﳈÛÒápæjow_ÂD1B@:fSJ¾ù¥çU÷ovß?ß~ð£Ôë&äo/¾î£øg  ")…‡¤Y‘¶z}—3½¾óÑó.67Ÿ^ürÆvÍ Œ#C2½s9—<5C¶´|ÜmɦdP‘FLíÞ0§ï‚™§Û¬<›)¯î…rî¨ñOê¸_¹ÿxßbh}\¹[²Œ½{3ÎåÆR£Å¦½%uÚ½j›’ö¤9è~5«5ˆ· 3¯l˜ÍÒ\ôצS]Q[û¢Ž–¿*¿ðvŽÝÅ[lS¼ÌFÄhµ½2J³££ÇÛÛ?zÞÅÃøCíÝïó¸rN23(ãz)°¨/uoYÊR=+ßÔù$cp@íÆˆ¶3õG¡ït¾ •I)¸tš•wVÚ<ý;lÍVÕÖà0LÎa…½H^ne ¦Ø¤÷ï`K-d…H3k›F󵚨ÄÔÈŠ^µY™Ó¨¦½kl$üD’>ÌöNg5üðáS`!Gû¨ÛÛ{Ò«‘â¶Ñype*ÉN¥òܯŧ—™”qÙ Ì^¾\èµ³Ó*•´âÛ‚ƒ1¶©:ô])ÿÌMY¹8çP„â zÒYX™4õpr’kl9†VxkéW!žŠ–%‚j©/%l–ÏN«­ݦÝA— ?ä‰ùu‹3Q÷£>MW¨˜¬­šJÆé•(1Önô#f.Pø:u{<®^1Y[ ¿,œU•ŽíB'_,&ÍJúȲýý'¢^²•B–§çÎΪÁÆ€þ˜™§»ž8y™º·÷ÄýZS½«S×ñ0ƒ2.S9›ßÓOU­$¡ýÍ_Ašñµ^Tô‰óÓ¸¹¬ð(H²°²ÛR$ÿ/¹W^•‚Ä­ZIÔ’òÏØš÷¦¼s¼}oï‰8é;°È0¤˜Ôó@‡3p¢VâL¯¬Ô„×òvëáóJôX.“CÃ’âÌI.»± Døjƒ|‰öLØûkü«êíhX‚ײƒÒã÷Ò‹ÖÈC‡^ª 7-õ:Æ£èÛßZ¯ï*þðá£?ØÚ÷ë=ªw€#·9@m·0V—ºLM*9Î¥ ÑM]Çà ʸnÖaóË„¾ßÙ|Ö½¨e)šÌ^Á›’Ž/p €ÛM×¢va%%C>™í¨ÉÌ«ÕLú7úíì<5òE‰M¢) 9Ò£©Iš7ë’ ¤u„ñiÊöÆÄ^õ_þWì{§XnØ?­8óvë.¢f­U°|üô760)‰¶.<¤gH`€»²–çÞÛ5Z¸ï¶‰ß›èÿ¬$7~ùn°©‹±1ÛÖ_dmÕÜíX ëõÝÔ÷Þÿù R-®=Âö•À{€“Z—ÇB´ìì<•X?ª=võ—Q`o&úF¡³LÀÞÞ“Š¬ ÑÚÜ|æÎ¥S×ñ0ƒ2.¥ÀRqFHh@¥«©k?{Û·ó¤ýù…Ƀ°‚ ²'Pâ«m5œgof^µÈ¨:¬³ôZð\a"HY:Úÿg•0(ÊÓ±”l’ˆâ.7TÒÔᄈZ))V\yV¤Û¾îgvY[@¾4[çÉÙ†ñа#º§.éä9%¡ÔF€v¾´»ÛC2spô‹ø^‘âzýŸÿBõ9òãx¡Ü_«Tž—î­í¿úmŸçŠÈYï˜j²¡£òIø`sûoöŸlíK%|~tòmTé$òô÷=ä"‡-ÜÙiu}ã¥ç]<¬üŸƒÚúù:M&3)ã:XÊæ—„A{BC?®¬6Îb‡G¿¥BÃä#Y“̘ ;ÃÍøíV›öe:sH˜"£  ­ÀôÉ>ˆÔ‚Gçœ3½ro¿¼§Pëï¿EHôÑ ¹îæk8íøáßœWHÊ í0¤U«ìmÙT„5-®Eµí{§ØÞ›:²uÇaÒÅÝØGfäFƒNÒäÚÆ6Óï«~Üþ(Íêü}×j#4o €§î­…Ï+6¬xŸ¿´oß–Ã'cuÃŽe/î£] ÀúÆì=ÚÙyJ‹ÀòæÚ o'#Ç:ó$Ó½¢ã®hR™»îý3(㒠̥Ÿâ>+ãúž*¯È4.½›·0¦]0*QìgÉþ3uFa†›^îh“,Ìn:° lI±é3äýùÆã¼ò‰ÂD4í¾?×Y†Õ39Øî…4Ìø ¾ºpèñ/ñ„‰` €¨FBìá'Þû ï¿¥A¶Ãq,_Œ-€ko9Ê)ZV[ñçÐ)¿¢·Vî­&*ül¸nÓ—&R‹cïžR"ŽbÞà úD[«½Á¾d퀧µÚïo`÷nŽdÚ¡Ï)®^ßµßñ”v­Î¢Œ³¿G2œÇ­:.Âo„Ù÷Ï  >ž#WgWP—v×B2-¢7Ú>Ü·:ïnûß!¼©öÒ º¿ÿÄÊÍÛëífMÞ™ž®Af³#ã £"Üþ¡8 ‡çHQWpƒH‚0›wŸET Ž~ÕóH*®:Æ »à•ÊsZl Å‹zý‡œ+p¬&c"‹«„³5[É»¾§5Ícy‘o¡þ=©¥v¶ÿÔÑ9‘`oïIl 0í×¹è¾ûqÔÍÞë¡J¯L äþœÒºû!PA½¾›?fÖg'Þ| ú»³ µPKN²3LÊ’­•ÕZ=ÑŸhfGªb@ÿPyŽ »ZÓ¸‚‚^Ø£yº¿†+/삵üÂHÆ–Z°£Ç‡yø„ôý¹Œ!€Íí¿™@XŸ^õú®õ I….Y¹•To.mê:'ÄÓðyÅ©û)%_±ûsK>¡›ÓšÚ&U—zþÌg>Pß8íè”Vr·ëµÝÌý–½7?D9ÖÉSrÉ®ÌäHø;ÑÁJˆ)b†VE8—6tßoñcëé9B’ mi)˜|(à;ÿôïÖt4Ãx=Çx™‚‘¡Ü€æÂ©w½©RynKïÔþø;[èoàf6Œét—ª{³IL;Q ™*u¤Ô’•nÑ“  ‰_=X´úɽPò„¿÷æ»WÉÝvbn%§¡=ƒÎ’ùILžéö–+˜vfGÆÙ¾„ÍÍgØ[–²Ô]HÑgÐ"„„R×ù+]ȸ‚‚ýôYæTû‚q±¹öÂþ‘Òp“ÜÚ‹HCpD¤*™vº#…¬Eµ»ß~ IDATq÷{7«º²¼z=Rf©X¨•쮦ÄÜhJè°Až´æG÷OÚŽM¶"k°~˜0fGÆA’uØ ±|vZE¹ß‰ÉM-N!™®KD²—§¢uÜ «Ë¤,œ<èö'KMµ¦©N¶˜d8ËúÕ»þS“ÙšEr‘Nfô’ᨱLVµR¥ò‰8+˜r.-½Ä„Së¶¢µ¾ñ2µ 3 GÜ›M=s¥òy;)fš«†Œj½ïõØA·ÞÞô.\9&X3á ÔìaŒ¬#Ùðövs¾@©\\ÓNÎê¡xg14¡”RÈæ!:?vû[úŸX&ÛÂY?ª5}q¬Á{½…±ï¿{-Yù+?Y&ÉU+×KØ&÷Óþ3X$´Œ»·FeûGÕ¤q£>§n±Û-­«\´eû—•º= iÆN–µä•Íš ûm™óe €}éË?Û¸ï=ü*zûö`øiÌÉŸ°ùrj:Ë'ì½î{7AyØŸÉÍžg''„ptø0OÃp fHCbZÙþVo ò&3Ìß_~×§ÄÖM’±fIÏMYcü$cO §ïïÝôŽ\–¯¿ù[øb'u£[ůô\û N†›P?ª¦÷­3üi…HÎýï–zö*›µîÛSX šçUúCš‰úªûgž—¾fX[ÄÔª¸úcr0B‘äüdYnœÝô¾ŒÁÊ=ýÕ¦òKœiò.È—Æÿ'òKX9Ûv2~Ô¢&q^1åXÆ1ÅÉfQ³‰¬pœ/« ›Û¯5<üšüèK`3UeÖ9{/xËPI‘/Œ0ö±3{‡¢­”7âÍ%?RÏ:ÃuÔÃBþ'ò¬½m9΄—}¹ðµ}-^ºg˜Ñebl3ÿ7·/êõ_ug`]ãÂæöo÷“µàÉxo-óvßåF·/ìÏ @½¾Ë²\N€¡²mSk™[æDÔ}øqs†{iÖ£&ïê MäGÅyöÛ@~éîÚkkR–ȯ^ÿ©ãú¡snÏ“æ^È}X¹ã%¿ä¾©z}—ü57uVœ²R¾^¸É ý6Ò Vü~­í…Ÿ@ѦZ0 $‡ÃЇt„ÀÌ+$‰˜žÞÉ‚AÔJ©iôWA¥òœ7€ëi“¬×w×Ö^;_·¡B+°ºÅœ K§'[Á†²’+E#M÷ùK7ç¾{Üß²K·Ù[zšÕÕwíÉ?¿ñ¯Óp©·¹?7‚3¬¶¾ª–ß«ÉALw n¦d2 uMHQH À€>pXUÎá†ÙIä àÓm1Pp˜Ù£ÁxÞ1ñÏ„€oÔb®kLŠÉVrTCÇlõi€úvBåî‹ìÕÚ.Xã‹ÅœVWVk6%’œšó£ë¢ ¼ÖÆÊßíÄz‹©|9ùñ¿¸R­ú^Ôe™®9s±Ú¶‹º*ñœÑ¾u·hd‡Ùo'¡áv¶ÿ®“ùßÔ(°±Ó+ØýŒ‰÷ªÀroéï8õ•Çú;,N0SºÛtx¯K k`޵HÕ‹Š]p’Ï£,œ“Dgˆ_„â ® Á?yÞë¶”B‹x«ÄOÃðTK7¸oŽÌrÃÌÌN÷PvW^¢6±¼YmIà¤ö 9ÿÀ¿J¾hŸ×²úú»ÁÎõj‹Âøj S¬1„ɘât µv´š|™ à¹=L ™5š,9ŠÔ½wãæößL dmÕ½Dr ÅÕ‘Œöù£¯F1s^ª×w0ýJ5f :çHJÏ $—”ÛÙyªŽîhàøóÌÝàn^ŠYqsÐdÆl"k‘jÊÚÉy”¦¤èœQÀ± °ÐÅÄñ‚ w™n{Þ>` ˜ 7¤¾ @°÷Âk´çíkó­Ö7y6µº'³Œ†7o:­æ}[—Þš-&ÕSY[@¾OööžÀƒ¨Ç Xµû! œ´ÍIr'#QÛ…4ö;Rá–ÚàmǶVFe—&Wè¦Kz´ë§òïF2Óôö~¹Ít]ªaödºkã”5±Žþ•rýR¨’ì¯BÏOýbY0í$kÒSWÐ=–…(Zd–¿£6QNбk#Pš±…¦>7Ÿç¸Î‡Ò0ƒvIÍàgÑ”Y#ƒØÃ©º[ ¼ÖöÃ?¨Õ~ß½e¯¬â%‰"U€Ú÷öž°b¨r÷…ÜGiy»uçÖØ¥Šâ]¤¶Sõ]¡¶aÎ_1Y[5w£Ž„¨«T žnwÃj5¢zÚÜÛ<=øF½‰~Qj+0{:ÞNHÀøÝ©HSJd¦“•û¶ÌË}taX>:üŽêóãݱ‡Î9B2bÃóÈ}BœK§¤¥¦9¯=û+S&×z1s2Îíô)‘l×_ Æ3¦hS-˜$2gôB4ü©(Ê ¡ê¦RwO˜6Ѱ C7©ö뿮Ⱥ@k³úìèè10ä+ 1 ­Ý!œýW¿õbeµf?èJå¹ KÇ´®Ú‘9' Ôfìû? 3r#:.3ÔFXo|ÛùÛ{¯Ã Ø‘Tx)ÎxH>Ðj8p+9àâo¬u\R«çäŒq’BjŒ·n\_VöËÖÓ!q¦7ýßRéµAÚx:™}×m#b„¦§Ì “‚‚«FÊ’­•ÕÚÉÉpµÉü؇µ' ‰5<5y½Ñ8<Àý?uw›ìêûëDivtôx#x'Dkó»ÿÖš{{Oú'qèœ#ñ‘OÔȇ䞸2ÜcÕG ;BJx­õ—Þ£zÌ×é1½™ïYÌh,-èAªE£ÿÇÕÑ ج>3!çkØRÓÝØÜÛzð⢺™`dœb‚+«µwfHÖJƒ¤mS²SFÁ-çì´ZÆkÏ»ØÙyšiÓš$³øwÑzN«2ãD-ÁO“cU?µæÀZ/@ßÌ$®4UM{{O8—ëòÄVmmýÔ‘aœÚ ›þ«¾¬¶¬£ý…ú~\!Wýý¿ÆqmÓ¯÷ùK'M\6©áÔV”#S¤äRÃ-¸dt¯4Uî¾à=j¤äšõ«“µUñð$Öv2D{´WÃâáiü02„›–O4ñ€^“¦¤£`ÈÊÑ>Õ­_üÙÕ&C˜¬OefoJ/´z1 2®qö°Rz-D+úÚ’ëY;~3{VP0I¯²Ø|¤ý.U'ŒPn•ø+À襤Z ø™Öè‹Â0¥»lø‘Γ‰RâääA¥òÜØ £+úS)µ¥{’‰*²ÚJ#w¶ÿK“ê)¸Ne`x»õ ˜¯óÇtTÎÊ6ƒ™“tF¾ÜhŸe6=št—µÈý5£ù¾C]:ÂC;bA©D¹[ß[ª1eŠêÞø± øÑ赎R9Ú%È\ ÕX4!7MïàhèÜÅl0 2N±vh´{ ª&¬J   {{Oîßÿ«ç] 4¡ †Ô¥ª$&°YU›ùV°]òk퉷žx›¸“…ámn~‚Pù°§Ž”gêõ]èíÊ£Ÿ<·~ôþqjË<Þ¤IòNC¿v\@Îý³{›½7?&þÞCHxδkzµX?^Û‹j”„%’ÝÑ;»}Zlµ£PÉW'M^c’“Ÿ×ñ¤»Ç6ó™S8 Wý—ÿk²Èý5ˆ(=šzÖ¶±¨žfú\gÈlc{]é×n&ê¨È‰ë WëñäÙKVަjàˆ@KÍ£g¿2_äˆÃµ¦?Ê3 2Îé6ê¨ZP0µ=ÞÞþÑ+5+•çêaÒ4ÇA’ ¼ãRÕ”'´Y€ÖwZÍ2÷œ±þ#¾R *ÜИˆÝM.¥©€gæ´tpð=çÒ¶>˜W*ÏÅ·õýýxÁ*k“ª»š4ÿŽ<"Jü5<„d;|;¾÷À}\N ™@X=€€MÆOWÜà,ÀMÍJT­×wŒ.à“^Ä©Óí|JŒr.+ëÏÙ»’{f7û!Iø¼‚»@wnpã¼ì»°=éWï1™>.w;lóScË ûØî Oö^ ™ÐtE#©§K¡R@H5uå-5™‰}$Ú~}÷7ÿóí‡ÿ’¹ÚL‘9{)4ç¾PZò,ª0sÇüÄ6«Z4|Þ§ðä™\lëÃÇÑÒB•ügF_úð¢ÁkSW:fé?½Ê5À€×¡\»£w;¥ÞþÑ=PµRyzkŸ¼‹øV{PÝEú ™Þï}ø9ž(ßcfkD[Ã%¿ß8  ¾›ZMûÈߤꦻ·IÂ0“ì3a¼RyÎV¾¸[R5p™M]KM¦1ºÙ‹Yqhûøš0|²I#³·÷dkîïl,ï½ ·»ýG¨Å¿ÓÓ7†›(P7ñ­SÍë¿ý7þ^TªÏÜ-±˜Ë—ÚŽO.¿6µJ.?IÍ':²$Ô^"”•˜µå¢2&8@¾D§³a<êK’Ôp‘ðDF²µPìõ.F¨·Ã Õ; l/Xg¿hù÷ #[ŠTWÎˤœ>s³ÁLÈ87S<äœiU¬[3Ä»;kê¯>mn>ëèò´€.u …’Á9±ÓbrN¿+õÎÈZ¼½øVï}LúììÐdÊ…Œ?¢VŠ.û\ zF…ìèå¯h±ÙmNÏ]¼¸¦*ŸºW»K&‰&Ö…®`‰-´ 4£Ìþ>½ƒHÖ½éOe;€A–¨^ϸ.ÎØ¤-X.ïÓÛñž½YÂñÙ׺%ô…Ì<ȇê6畵½”/¹ÏSÄLɸh¦8¢™â‘p–ÿˆÍš“¼î=,(è‡g² Û­œ"p“TrB©•ÕÚ eû]iOsp°‘Îå2—ɰÌñ`ƒAÒÖÌ+|àÚN}'µ.…hkŸGñ9‹M*9 hJ:¿ãG~T!䎥[`_R02݃#µ¥iÌ—[[?¥¤:]ßh¼…žJq˜nSÃLtÌ÷k6“Ì”ŒCb¦8â¡Y'/‘aXPp³Ø•;ãÏ@‘KZ)À¹\¿x'DëÞÖßêïw»S‘+æ¨ Érq†e´§›-òg*ÕzÐÝvJš¨Q> À3æÍ–‹ÏYloD«5rþ+ÝäùGèœ; guÛŠœ fš”ßMš!k4mÔçáq¾ÙQô–ž[`Ü#꓎ʷê¢eÖd\²Ñ¤ôÇ!€¶Î/Eª`dìI-ãö¬ô¨RâìøáÊj­¼Pß^øÝƘ¶³aÔ|HÚÏlYò÷‚}äX*lz†Àýü“#¶:F­'Æ$ J¥ó­ßüoëak¶>õ³,i}ek2m_rEN×I¼¬ŒuM¡sŽLïA yj4S SsáÉ“P´ØÌ”nCìÛݦ3ï¨Ü‹Y“q°lkÀ믲eœ!sEÖq,i½kxê^€"êWÌ0O¯ô¨Òìì´*†ålmý”g±ÏC÷ùÝVk!$öi^/éÿð‚ÚÅ×v!ç}Rë±âÉ:žg]3K’O›Z’]‘Ó°ùÙ‚I mç6ÖùÀŽÎ^5š™µn–àÃÊûÆ7r^«ý~No1=~·­Ûô2Ì Œ‹Š{œ´2¬×án§‘‚ßg@’($p¨J€7< ‰}úNQ…W0:}Ò£J³ƒƒïmÇ÷ÏsºÊ ÄδNCÕª ™3s-”/ù ·W|-ê¾Z ùIT‚Ýg%v%tâ½Ï•Y[où«gö.×èêˆ'²#»²;.Ñ+R«ÓF\Ÿê™èà“’Š³Ø€œø„µG?•Jº SqT‚†žÏ+¿2k@sî[eeœRÂäVVkg§ÕžJPã:éæ”Gy(»ì}榬¢•¸ `²Ò£QI€½½'.~ÓËi6?½fZ_ëE…ø‡E}g´ç¾ÄËmHüÈп¿5‰ZRx/Þýü½5ôJEé,;Û’µUsWHÇ^&ÃF­cI­E#×IÊÎ ³Ú.ùá wÙ›ç«ýurh$†Çf&LûoÈ$ÙäÞQŠŠ™“q°­|B´VVkÙC—Ã5“„0yRsÊí²GŸ8?-Æ#ŒwÍ`ÿ™ì`ua9ð’kqÍÿÌ}ìšÔ²dgš$8ñ½ ‰¬¶F+oJ-r q!l-b²¶jA¾,WÛüÀÝ›Tó—O­¦³{(z`¯–n;7¸bG«äÞùjYb^ðéw‡»úäIÙÚu´Ô×ï+*ë"Á1šüRëAR›ƒÝƒ ’ÌšŒ³kO´¤áPˆV<Ô!…=Ãø€©kN¹Z–â GX˜)ps•IDAT錙Ô5¬.,×Ô_|­†t¦ †^vMSèó;§þß RŒ\\äRϰÿê·NšÍ‹M}îñ8P—J¿ŽÐúêè¡ݨÁý",wdÚ¹¡­äXãø{ÏBÞÚáÙû‚Õ»¯KÛïØR³ÏfñP¬ÓoÐ;)?r&´C›¶O+·Éøí’üqÓNçÊîlIEND®B`‚quickplot-0.10.6/Makefile.am0000644000175000017500000002325512245047260012577 00000000000000# Quickplot - an interactive 2D plotter # # Copyright (C) 1998-2011 Lance Arsenault # This file is part of Quickplot. # # Quickplot 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. # # Quickplot 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 Quickplot. If not, see . # #################################################################### EXTRA_DIST =\ house.png\ imgGrabCursor.png\ imgGrabCursor.xpm\ imgHoldCursor.png\ imgHoldCursor.xpm\ imgNewWindow.png\ imgNewWindow.xpm\ imgDeleteWindow.png\ imgDeleteWindow.xpm\ imgCopyWindow.png\ imgCopyWindow.xpm\ imgSaveImage.png\ imgSaveImage.xpm\ quickplot.png\ quickplot.xpm\ sample_plot.png\ screenshot_small.png\ favicon.ico\ background_ft.png\ background_h1.png\ background_h2.png\ style.css\ footer.htm.in\ about.htm.in\ help_head.htm.in\ help_tail.htm.in\ index.htm.in\ about.txt\ help.txt\ bootstrap\ quickplot.ebuild\ quickplot.1.head.in\ quickplot.1.tail.in\ Repo_clean\ release_date.sh\ repo_version.sh\ ax_lib_readline.m4 BUILT_SOURCES =\ imgGrabCursor.xpm\ imgHoldCursor.xpm\ imgNewWindow.xpm\ imgDeleteWindow.xpm\ imgCopyWindow.xpm\ imgSaveImage.xpm\ quickplot.xpm\ about.txt\ help.txt\ paths.h\ parse_args.h\ app_op_declare.h\ app_op_init.h man_MANS = quickplot.1 quickplot_shell.1 # The .xpm files are built but come in a tarball # .xpm files are not checked into the repository html_DATA =\ about.html\ help.html\ house.png\ index.html\ quickplot.png\ sample_plot.png\ screenshot_small.png\ background_ft.png\ background_h1.png\ background_h2.png\ favicon.ico\ about.txt\ help.txt DISTCLEANFILES =\ about.html\ app_op_declare.h\ app_op_init.h\ help.html\ index.html\ parse_args.h\ paths.h\ quickplot.1 if HAVE_LOCAL_SCREENSHOTS html_DATA +=\ screenshots.html DISTCLEANFILES +=\ screenshots.html endif noinst_PROGRAMS = mk_options mk_options_SOURCES = mk_options.c lib_LTLIBRARIES = libquickplot.la libquickplot_la_SOURCES =\ app_op_declare.h\ app_op_init.h\ callbacks.c\ callbacks.h\ channel.c\ channel_double.c\ channel_double.h\ channel.h\ color_gen.c\ color_gen.h\ config.h\ debug.h\ get_opt.c\ get_opt.h\ graph.c\ graph_detail.c\ graph_draw.c\ graph_grid.c\ imgCopyWindow.xpm\ imgDeleteWindow.xpm\ imgGrabCursor.xpm\ imgHoldCursor.xpm\ imgNewWindow.xpm\ imgSaveImage.xpm\ launch_browser.c\ list.c\ list.h\ parse_1st_pass_funcs.h\ parse_2nd_pass_funcs.h\ parse_args.h\ parse_args_utils.h\ parse_argument_options.c\ paths.h\ plot.c\ plot.h\ process_gtk_options.c\ qp.c\ qp.h\ quickplot.h\ quickplot.xpm\ shell.c\ shell_get_set_values.h\ shell.h\ source.c\ source_double.c\ shell_common.c\ shell_common.h\ shell_server_commands.c\ spew.c\ spew.h\ term_color.c\ term_color.h\ utils.h\ win.c\ zoom.h libquickplot_la_SHORTNAME = lib libquickplot_la_CFLAGS = $(gtk_3_CFLAGS) $(sndfile_CFLAGS) libquickplot_la_LDFLAGS = -version-info $(LIB_VERSION) # For making libquickplot.so executable if we are using GCC # and glibc which we tested in configure by compiling with the # gnu/lib-names.h file. if HAVE_GNU_LIB_NAMES_H libquickplot_la_SOURCES += exec_lib.c libquickplot_la_LDFLAGS += -shared -Wl,-e -Wl,qp_exec_lib libquickplot_la_CFLAGS += -fPIC else EXTRA_DIST += exec_lib.c endif # We look at a sndfile symbol when libquickplot runs libquickplot_la_LIBADD = $(sndfile_LIBS) if QP_DEBUG libquickplot_la_SOURCES += debug_spew.c else EXTRA_DIST += debug_spew.c endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = quickplot.pc quickplotinclude_HEADERS = quickplot.h quickplotincludedir = $(includedir) bin_PROGRAMS = quickplot quickplot_shell quickplot_SOURCES =\ config.h\ qp_main.c\ quickplot.h quickplot_SHORTNAME = qp quickplot_CFLAGS = $(gtk_3_CFLAGS) $(sndfile_CFLAGS) quickplot_LDADD = libquickplot.la $(gtk_3_LIBS) $(sndfile_LIBS) -lX11 -ldl #if USE_READLINE quickplot_LDADD += $(readline_LIBS) #endif quickplot_shell_SOURCES =\ list.c\ debug.h\ list.h\ qp_shell.c\ shell_common.c\ shell_common.h\ spew.c\ spew.h\ term_color.c\ term_color.h if QP_DEBUG quickplot_shell_SOURCES += debug_spew.c endif quickplot_shell_SHORTNAME = sh #if USE_READLINE quickplot_shell_LDADD = $(readline_LIBS) #endif gzfile = $(distdir).tar.gz bz2file = $(distdir).tar.bz2 xzfile = $(distdir).tar.xz SUFFIXES = .html .bz2 .xz .gz \ .gz.md5 .gz.sha1 .gz.sha256 .gz.sha512 \ .bz2.md5 .bz2.sha1 .bz2.sha256 .bz2.sha512 \ .xz.md5 .xz.sha1 .xz.sha256 .xz.sha512 if USE_CONVERT SUFFIXES += .png .xpm endif if USE_LYNX SUFFIXES += .txt endif if HAVE_LOCAL_SCREENSHOTS SCREENSHOT_URL = screenshots.html else SCREENSHOT_URL = @PACKAGE_URL@screenshots.html endif .PHONY: hash md5 sha1 sha256 sha512 # TODO: There should be a better way to find installed # from the running quickplot program. paths.h: echo "/* This file was generated using $(MAKE) */" > $@ echo >> $@ echo "#define HTMLDIR \"$(htmldir)\"" >> $@ echo "#define DOCDIR \"$(docdir)\"" >> $@ parse_args.h: mk_options ./mk_options -a > $@ app_op_declare.h: mk_options ./mk_options -I > $@ app_op_init.h: mk_options ./mk_options -i > $@ quickplot.1: quickplot.1.head quickplot.1.tail mk_options echo ".\\\" Do not edit this file" > $@ echo ".\\\" This file was generated using $(MAKE)" >> $@ cat quickplot.1.head >> $@ ./mk_options -m >> $@ cat quickplot.1.tail >> $@ echo ".\\\" Do not edit this file" >> $@ echo ".\\\" This file was generated using $(MAKE)" >> $@ index.html: index.htm sed $<\ -e "s!@SCREENSHOT_URL@!$(SCREENSHOT_URL)!g"\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ > $@ # We cannot have configure replace @release_date@ and @repo_version@ # because we need to generate about.html for two cases, one for # dist and one for installing, and the values for # @release_date@ and @repo_version@ differ for those two cases about.html: about.htm repo_version="`${top_srcdir}/repo_version.sh ${top_srcdir}/REPO_VERSION ${top_srcdir}`";\ rel_date="`${top_srcdir}/release_date.sh ${top_srcdir}/RELEASE_DATE`"; sed $<\ -e "s/@release_date@/$$rel_date/g"\ -e "s/@repo_version@/$$repo_version/g"\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ > $@ help.html: help_head.htm mk_options help_tail.htm cat help_head.htm > $@ ./mk_options -t >> $@ cat help_tail.htm | sed\ -e 's!@Top@!\ Top\ !'\ -e 's!@About@!\ About\ !'\ -e 's!@Help@!\ Help\ !'\ >> $@ if HAVE_LOCAL_SCREENSHOTS install-exec-hook: mkdir -p $(htmldir) cp ScreenShot_* _ScreenShot_* $(htmldir) thumbs.htm: mk_thumbs.htm.bash ./mk_thumbs.htm.bash > $@ screenshots.html: screenshots.html.in style.css thumbs.htm footer.htm ./mk_screenshots.html.bash < $< > $@ screenshots: rm -f screenshots.html thumbs.htm $(MAKE) screenshots.html endif help_head.htm: style.css help_tail.htm: footer.htm index.htm: style.css footer.htm about.htm: style.css footer.htm if USE_CONVERT .png.xpm: convert $< $@ mv $@ $@.in sed -e 's/static.*\schar/static const char/g' $@.in > $@ rm $@.in endif if USE_LYNX .html.txt: echo > $@ dir=`pwd` && lynx -dump $< | \ sed -e "s!//localhost$$dir/!!g" >> $@ endif # Add the repository revision number to the dist. # Fix any dist files that have RELEASE_DATE in them, like help.txt # Remove generated dist files that auto-tools is stupid about. # Remove the out-of-date hash files. dist-hook: if test -f RELEASE_DATE ; then mv RELEASE_DATE RELEASE_DATE.save ; fi if test -f REPO_VERSION ; then mv REPO_VERSION REPO_VERSION.save ; fi ${top_srcdir}/repo_version.sh ${top_srcdir}/REPO_VERSION ${top_srcdir} > REPO_VERSION.tmp mv REPO_VERSION.tmp REPO_VERSION date -u +"%d %b %G %H:%M:%S UTC" > RELEASE_DATE echo $(VERSION) > last_release cat RELEASE_DATE REPO_VERSION >> last_release if USE_LYNX rm -f about.html about.htm about.txt $(MAKE) about.txt mv REPO_VERSION RELEASE_DATE about.txt $(distdir) rm -f about.html about.htm $(MAKE) about.txt else mv REPO_VERSION RELEASE_DATE $(distdir) endif if test -f REPO_VERSION.save ; then mv REPO_VERSION.save REPO_VERSION ; fi if test -f RELEASE_DATE.save ; then mv RELEASE_DATE.save RELEASE_DATE ; fi cd $(distdir) && rm -f $(DISTCLEANFILES) config.h rm -f $(gzfile).md5 $(gzfile).sha* $(bz2file).md5 $(bz2file).sha* $(xzfile).md5 $(xzfile).sha* hash: md5 sha1 sha256 sha512 md5: $(gzfile).md5 $(bz2file).md5 $(xzfile).md5 sha1: $(gzfile).sha1 $(bz2file).sha1 $(xzfile).sha1 sha256: $(gzfile).sha256 $(bz2file).sha256 $(xzfile).sha256 sha512: $(gzfile).sha512 $(bz2file).sha512 $(xzfile).sha512 .gz.gz.md5: md5sum $< > $@ .gz.gz.sha1: sha1sum $< > $@ .gz.gz.sha256: sha256sum $< > $@ .gz.gz.sha512: sha512sum $< > $@ .bz2.bz2.md5: md5sum $< > $@ .bz2.bz2.sha1: sha1sum $< > $@ .bz2.bz2.sha256: sha256sum $< > $@ .bz2.bz2.sha512: sha512sum $< > $@ .xz.xz.md5: md5sum $< > $@ .xz.xz.sha1: sha1sum $< > $@ .xz.xz.sha256: sha256sum $< > $@ .xz.xz.sha512: sha512sum $< > $@ $(gzfile): $(MAKE) dist-gzip $(bz2file): $(MAKE) dist-bzip2 $(xzfile): $(MAKE) dist-xz quickplot-0.10.6/parse_1st_pass_funcs.h0000644000175000017500000000437312245017534015042 00000000000000/* A template of this file was generated with `./mk_options -1' */ /* Clearly this will edited too. */ static inline void parse_1st_File(const char *file) { if(!strcmp("-", file)) { if(app->op_pipe != 0) app->op_pipe = 1; } } static inline void parse_1st_about(void) { cb_about(NULL, (void *)1); } static inline void parse_1st_gtk_version(void) { printf("%d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); exit(0); } static inline void parse_1st_help(void) { cb_help(NULL, (void *) 1); } static inline void parse_1st_libsndfile_version(void) { char *str; str = (char *) sf_version_string(); while(*str && (*str < '0' || *str > '9')) ++str; printf("%s\n", str); exit(1); } static inline void parse_1st_no_pipe(void) { app->op_pipe = 0; } static inline void parse_1st_no_readline(void) { app->op_no_readline = 1; } static inline void parse_1st_pipe(void) { if(app->op_pipe != 0) app->op_pipe = 1; } static inline void parse_1st_print_about(void) { print_text("about.txt"); } static inline void parse_1st_print_help(void) { print_text("help.txt"); } static inline void parse_1st_read_pipe_here(void) { /* We will read the pipe when this options comes up in * parse_2nd_read_pipe_here(). We will not read the pipe * before of after that. */ app->op_read_pipe_here = 1; } static inline void parse_1st_silent(void) { qp_spew_init(5); parser->p1.silent = 1; } static inline void parse_1st_verbose(void) { if(!parser->p1.silent) qp_spew_init(1); } static inline void parse_1st_version(void) { printf("%s\n", VERSION); exit(0); } static inline void parse_1st_background_color(char *arg, int argc, char **argv, int *i) { check_color_opt("--background-color", arg); } static inline void parse_1st_grid_line_color(char *arg, int argc, char **argv, int *i) { check_color_opt("--grid-line-color", arg); } static inline void parse_1st_grid_text_color(char *arg, int argc, char **argv, int *i) { check_color_opt("--grid-text-color", arg); } static inline void parse_1st_linear_channel(char *arg, int argc, char **argv, int *i) { parse_linear_channel(0, arg, argc, argv, i, NULL, NULL); } static inline void parse_1st_local_menubars(void) { setenv("UBUNTU_MENUPROXY", "0", 1); } quickplot-0.10.6/parse_args_utils.h0000644000175000017500000001577012244565775014304 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include static inline void print_text(const char *filename) { int fd; char buf[1024]; ssize_t n, i; fd = qp_find_doc_file(filename, NULL); if(fd == -1) exit(1); while((n = read(fd, buf, 1024)) > 0) { while(n) { i = write(STDOUT_FILENO, buf, n); if(i < 1) exit(1); n -= i; } } exit(0); } static inline void version(void) { printf("%s\n", VERSION); exit(0); } static inline void print_arg_error(void) { QP_ERROR("Bad arguments:\n%s\n", parser->p1.err); exit(1); } #define ERR_LEN (1024*8) /* We do not bother using any memory unless there is a * fatal parsing error. * We accumulate all command line error messages and * when print them, saving the user time. */ static void add_error(const char *fmt, ...) { va_list ap; ssize_t n; char *err; size_t *len; len = &(parser->p1.elen); if(parser->p1.err == NULL) { parser->p1.err = qp_malloc(ERR_LEN); *len = 0; } err = parser->p1.err; va_start(ap, fmt); n = vsnprintf(&((err)[*len]), ERR_LEN-(*len), fmt, ap); va_end(ap); if(n <= 0) { QP_ERROR("internal parsing error\n"); exit(1); } *len += n; if(*len >= ERR_LEN) print_arg_error(); } static inline void check_color_opt(const char *long_opt, const char *arg) { /* This is just to test for color parse error */ GdkRGBA rgba; if(!gdk_rgba_parse(&rgba, arg)) add_error("for argument option %s=\"%s\"\n" " failed to parse string " "\"%s\" to a color\n", long_opt, arg, arg); #ifdef QP_DEBUG else DEBUG("opt %s=\"%s\" => color=rgba(%g,%g,%g,%g)\n", long_opt, arg, rgba.red, rgba.green, rgba.blue, rgba.alpha); #endif } /* returns 0 for not read ready * returns 1 for read ready */ static int check_stdin(void) { /* Check for read on stdin */ long usec; struct timeval tv; fd_set fds; int ret; tv.tv_sec = 0; tv.tv_usec = 400000; usec = tv.tv_usec; FD_ZERO(&fds); FD_SET(STDIN_FILENO, &fds); errno = 0; ret = select(STDIN_FILENO+1, &fds, NULL, NULL, &tv); if(ret > 0) { QP_NOTICE("Reading stdin\n"); return 1; } if(ret == 0) { QP_INFO("Nothing to read on stdin in %ld milli seconds\n", usec/1000); return 0; } QP_NOTICE("Error checking data on stdin: errno=%d: %s\n", errno, strerror(errno)); return 0; } static void load_file(const char *filename) { if(parser->p2.needs_graph && app->op_default_graph) { ASSERT(qp_sllist_last(app->sources)); if(qp_win_graph_default_source(NULL, (qp_source_t) qp_sllist_last(app->sources), NULL)) exit(1); parser->p2.needs_graph = NULL; } if(!strcmp(filename, "-") && (parser->p2.got_stdin || !app->op_pipe)) return; if(!qp_source_create(filename, QP_TYPE_UNKNOWN)) exit(1); parser->p2.needs_graph = (char *) filename; if(!strcmp(filename, "-")) parser->p2.got_stdin = 1; } static inline void check_load_stdin(int here) { if(!parser->p2.got_stdin && (!app->op_read_pipe_here || here) && app->op_pipe) { /* The loading of stdin cannot be done until before * the first file or plot option that is --plot, * --plot-file, --file, or FILE, so that we are * may catch any file reading options * that may effect the reading of the pipe, * that may be in arguments before those. */ load_file("-"); } } /* This should not fail given we checked colors in the 1st pass */ static inline void get_color(struct qp_colora *c, const char *str) { GdkRGBA rgba; gboolean ret; rgba.alpha = 1.0; ret = gdk_rgba_parse(&rgba, str); VASSERT(ret,"failed to parse color string\n"); if(!ret) { QP_ERROR("failed to parse color string %s\n", str); exit(1); } c->r = rgba.red; c->g = rgba.green; c->b = rgba.blue; c->a = rgba.alpha; } #if 0 /* This is being replaced by qp_startup_idle_callback() * in win.c. An idle callback is used for each qp_win in * qp_startup_idle_callback(). It's setup in qp_win_create() * and qp_win_copy_create() */ /* We flip back the tab and wait for the drawing to * finish and then flip back to the next tab and * so on, until we are at the first tab. */ static gboolean startup_idle_callback(gpointer data) { static struct qp_win *qp = NULL; struct qp_graph *first_graph; if(!qp) { qp = qp_sllist_first(app->qps); ASSERT(qp); ASSERT(qp->window); ASSERT(qp->initializing); } else if(qp->initializing == 2) { /* A user wants to delete this window, maybe * before we finished drawing all the tabs. */ struct qp_win *q; q = qp_sllist_begin(app->qps); while(q && q != qp) q = qp_sllist_next(app->qps); q = qp_sllist_next(app->qps); /* q == NULL or the next qp */ qp_win_destroy(qp); qp = q; if(!qp) return FALSE; ASSERT(qp->initializing); } first_graph = qp_sllist_first(qp->graphs); ASSERT(first_graph); if(first_graph == qp->current_graph) { /* we are at the first tab */ /* see if there are more main windows */ struct qp_win *q; q = qp_sllist_begin(app->qps); while(q && q != qp) q = qp_sllist_next(app->qps); /* done initializing */ qp->initializing = 0; qp = qp_sllist_next(app->qps); if(qp) { ASSERT(qp->initializing); /* now check that all the tabs have * been flipped in this qp */ return startup_idle_callback(NULL); } return FALSE; /* remove this idle callback */ } /* We flip back the tab */ gtk_notebook_prev_page(GTK_NOTEBOOK(qp->notebook)); /* call this when we are idle again. Hopefully * after drawing the graph. */ return TRUE; } #endif static inline int get_yes_no_auto_int(const char *arg, const char *option) { if(!strncasecmp(arg, "no", 1)) return 0; if(!strncasecmp(arg, "yes", 1)) return 1; if(!strncasecmp(arg, "auto", 1)) return -1; QP_ERROR("bad option: %s='%s'\n", option, arg); exit(1); return 1; } static inline long get_long(const char *s, long min, long max, const char *opt) { char *endptr = NULL; long val = 0; val = strtol(s, &endptr, 10); if(s == endptr || !endptr || val == LONG_MAX || val == LONG_MIN) { QP_ERROR("option has bad integer number: %s='%s'\n", opt, s); exit(1); } if(val < min) return min; if(val > max) return max; return val; } quickplot-0.10.6/shell_get_set_values.h0000644000175000017500000004264112245002357015112 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #define GET_BUF_LEN 64 static char get_buf[GET_BUF_LEN]; static void PrintRJ(FILE *out, int n, const char *str) { int len; ASSERT(str); len = strlen(str); if(len < n) { n -= len; while(n--) putc(' ', out); } #ifdef QP_DEBUG else VASSERT(0, "%s(,n=%d,\"%s\")\n", __func__, n, str); #endif fprintf(out, "%s", str); } /* pad with spaces after */ static void PrintLJ(FILE *out, int n, const char *format, ...) { va_list ap; char *fmt, *str; int i, j, len; j = strlen(format); len = n + j + 2; fmt = qp_malloc(len + 1); str = qp_malloc(len + 1); strcpy(fmt, format); for(i=j;i n) str[n-1] = '\0'; fprintf(out, "%s", str); free(fmt); free(str); } static inline char *GeometryValue(cairo_rectangle_int_t *g) { if(g->x == INT_MAX || g->y == INT_MAX) snprintf(get_buf, GET_BUF_LEN, "%dx%d", g->width, g->height); else { char x[32], y[32]; snprintf(x, 32, "%+d", g->x); snprintf(y, 32, "%+d", g->y); if(g->x == INT_MIN) snprintf(x, 32, "-0"); if(g->y == INT_MIN) snprintf(y, 32, "-0"); snprintf(get_buf, GET_BUF_LEN, "%dx%d%s%s", g->width, g->height, x, y); } return get_buf; } static inline char *ColorValue(struct qp_colora *c) { snprintf(get_buf, GET_BUF_LEN, "'rgba(%d,%d,%d,%.2g)'", (int)(c->r * 255.0), (int)(c->g * 255.0), (int)(c->b * 255.0), c->a); return get_buf; } static inline char *StringValue(const char *s) { snprintf(get_buf, GET_BUF_LEN, "'%s'", s); return get_buf; } static inline char *BoolValue(int val) { snprintf(get_buf, GET_BUF_LEN, (val==-1)?"auto":(val?"on":"off")); return get_buf; } static inline char *IntValue(int val) { if(val == -1) snprintf(get_buf, GET_BUF_LEN, "auto"); else snprintf(get_buf, GET_BUF_LEN, "%d", val); return get_buf; } static inline char *DoubleValue(double val) { if(val == -1.0) snprintf(get_buf, GET_BUF_LEN, "auto"); else snprintf(get_buf, GET_BUF_LEN, "%g", val); return get_buf; } static inline int GetBool(const char *arg, int with_auto) { if(!strcasecmp(arg, "on") || arg[0] == 'y' || arg[0] == 'Y' || !strcasecmp(arg, "true") || (arg[0] >= '1' && arg[0] <= '9') || !strcasecmp(arg, "set")) return 1; if(with_auto && !strncasecmp(arg, "auto", 2)) return -1; else return 0; } /* returns 1 on success. 0 on error */ static inline int GetDouble(FILE *out, const char *arg, double min, double max, double *val) { char *end; int ret; ret = strtod(arg, &end); if(*end != '\0') { fprintf(out, "bad double value: %s\n", arg); return 0; } else if(ret > max) ret = max; else if(ret < min) ret = min; *val = ret; return 1; } /* returns 1 on success. 0 on error */ static inline int GetInt(FILE *out, const char *arg, int min, int max, int *val) { char *end; int ret; ret = strtol(arg, &end, 10); if(*end != '\0') { fprintf(out, "bad int value: %s\n", arg); return 0; } else if(ret > max) ret = max; else if(ret < min) ret = min; *val = ret; return 1; } static inline int GetSizeT(FILE *out, const char *arg, size_t min, size_t max, size_t *val) { char *end; size_t ret; ret = strtoul(arg, &end, 10); if(*end != '\0') { fprintf(out, "bad size_t value: %s\n", arg); return 0; } else if(ret > max) ret = max; else if(ret < min) ret = min; *val = ret; return 1; } static inline int End_Reply(struct qp_shell *sh, int argc, char **argv) { #ifdef QP_DEBUG if(SPEW_LEVEL() <= 1) spew_args("Processed command", argc, argv, sh->file_out); #endif if(sh->pid != app->pid) { /* The protocol is: the user writes a one line and then * the server responds with any number of lines and ends * with END_REPLY"\n" * meaning this is the end of the returned data from * the last command. */ fprintf(sh->file_out, "%c\n", END_REPLY); } fflush(sh->file_out); return 1; } static char *ArgsToString(char **argv) { size_t len = 1; char **s, *ret; for(s=argv;*s;++s) len += strlen(*s)+1; ret = qp_malloc(sizeof(char)*len); len = 0; for(s=argv;*s;++s) { strcpy(&ret[len], *s); len += strlen(*s); ret[len++] = ' '; } ret[len-1] = '\0'; return ret; } /* return 1 on success 0 on error */ static inline int ParseColor(struct qp_colora *c, char **argv) { GdkRGBA rgba; char *arg; arg = ArgsToString(argv); rgba.alpha = 1.0; if(!gdk_rgba_parse(&rgba, arg)) { free(arg); return 0; } c->r = rgba.red; c->g = rgba.green; c->b = rgba.blue; c->a = rgba.alpha; free(arg); return 1; } /* returns 1 on success, 0 on error */ static int GetPlotNums(char **argv, ssize_t **X, ssize_t **Y, size_t *num) { char *arg; ssize_t max_chan = -1; struct qp_source *s; int ret = 0; for(s=qp_sllist_begin(app->sources);s;s=qp_sllist_next(app->sources)) max_chan += s->num_channels; arg = ArgsToString(argv); printf("arg=\"%s\"\n", arg); if(max_chan > -1 && get_plot_option(arg, X, Y, num, NULL, 0, max_chan)) ret = 1; free(arg); return ret; } static inline void BadCommand(const char *prefix, size_t argc, char **argv, FILE *file) { spew_args(prefix, argc, argv, file); fprintf(file, "Try: help\n"); } static inline void BadCommand2(FILE *file, int argc, char **argv) { fprintf(file, "Bad %s %s command: ", argv[0], argv[1]); spew_args(NULL, argc, argv, file); fprintf(file, "Try: help\n"); } static inline void graph_switch_draw_mode(struct qp_graph *gr) { qp_graph_switch_draw_mode(gr); ecb_graph_configure(NULL, NULL, gr); gtk_widget_queue_draw(gr->drawing_area); } #define APP_FORALLGRAPHS(QP, GR) \ do { \ struct qp_win *qp; \ for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) \ { \ struct qp_graph *gr; \ QP; \ for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs))\ { \ GR; \ gr->pixbuf_needs_draw = 1; \ } \ if(qp->graph_detail) qp_win_graph_detail_init(qp); \ } \ } while(0) #define APP_FORALLPLOTS(QP, GR, P) \ do { \ struct qp_win *qp; \ for(qp=qp_sllist_begin(app->qps);qp;qp=qp_sllist_next(app->qps)) \ { \ struct qp_graph *gr; \ QP; \ for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs))\ { \ struct qp_plot *p; \ GR; \ gr->pixbuf_needs_draw = 1; \ for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) \ { \ P; \ } \ } \ if(qp->graph_detail) qp_win_graph_detail_init(qp); \ } \ } while(0) #define P_LEN 19 #define V_LEN 28 static inline void PrintValueDesc(FILE *out, const char *par, const char *val, const char *_class, const char *desc) { PrintRJ(out, P_LEN, par); fprintf(out, " "); PrintLJ(out, V_LEN, "%s", val); fprintf(out, " %s%s%s %s\n", tur, _class, trm, desc); } static inline void PrintParValDescHeader(FILE *out) { fprintf(out, "\n" " parameter value %sobject%s description\n" " ------------------- ------------------------------ -------------------------------------\n", tur, trm); } static char *app_get_value(const char *name) { if(!strcmp(name, "default_graph")) return BoolValue(app->op_default_graph); if(!strcmp(name, "geometry")) return GeometryValue(&app->op_geometry); if(!strcmp(name, "label_separator")) return StringValue(app->op_label_separator); if(!strcmp(name, "labels")) return BoolValue(app->op_labels); if(!strcmp(name, "linear_channel")) { if(app->op_linear_channel) snprintf(get_buf, GET_BUF_LEN, "'%g %g'", ((double*)(app->op_linear_channel->data))[0], ((double*)(app->op_linear_channel->data))[1]); else snprintf(get_buf, GET_BUF_LEN, "off"); return get_buf; } if(!strcmp(name, "new_window")) return BoolValue(app->op_new_window); if(!strcmp(name, "number_of_plots")) return IntValue(app->op_number_of_plots); if(!strcmp(name, "skip_lines")) return IntValue(app->op_skip_lines); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *app_window_get_value(const char *name) { if(!strcmp(name, "border")) return BoolValue(app->op_border); if(!strcmp(name, "buttons")) return BoolValue(app->op_buttons); if(!strcmp(name, "menubar")) return BoolValue(app->op_menubar); if(!strcmp(name, "shape")) return BoolValue(app->op_shape); if(!strcmp(name, "statusbar")) return BoolValue(app->op_statusbar); if(!strcmp(name, "tabs")) return BoolValue(app->op_tabs); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *app_graph_get_value(const char *name) { if(!strcmp(name, "bg")) return ColorValue(&app->op_background_color); if(!strcmp(name, "grid")) return BoolValue(app->op_grid); if(!strcmp(name, "grid_font")) return StringValue(app->op_grid_font); if(!strcmp(name, "grid_line_color")) return ColorValue(&app->op_grid_line_color); if(!strcmp(name, "grid_line_width")) return IntValue(app->op_grid_line_width); if(!strcmp(name, "grid_numbers")) return BoolValue(app->op_grid_numbers); if(!strcmp(name, "grid_text_color")) return ColorValue(&app->op_grid_text_color); if(!strcmp(name, "grid_x_space")) return IntValue(app->op_grid_x_space); if(!strcmp(name, "grid_y_space")) return IntValue(app->op_grid_y_space); if(!strcmp(name, "cairo")) return BoolValue(app->op_x11_draw?0:1); if(!strcmp(name, "same_x_scale")) return BoolValue(app->op_same_x_scale); if(!strcmp(name, "same_y_scale")) return BoolValue(app->op_same_y_scale); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *app_plot_get_value(const char *name) { if(!strcmp(name, "gaps")) return BoolValue(app->op_gaps); if(!strcmp(name, "line_width")) return IntValue(app->op_line_width); if(!strcmp(name, "lines")) return BoolValue(app->op_lines); if(!strcmp(name, "point_size")) return IntValue(app->op_point_size); if(!strcmp(name, "points")) return BoolValue(app->op_points); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *window_get_value(struct qp_win *qp, const char *name) { if(!strcmp(name, "border")) return BoolValue(qp->border); if(!strcmp(name, "buttons")) return BoolValue(gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(qp->view_buttonbar))?1:0); if(!strcmp(name, "fullscreen")) return BoolValue(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_fullscreen))); if(!strcmp(name, "geometry")) { int x, y, w, h; gtk_window_get_size(GTK_WINDOW(qp->window), &w, &h); gtk_window_get_position(GTK_WINDOW(qp->window), &x, &y); snprintf(get_buf, GET_BUF_LEN, "%dx%d%+d%+d", w, h, x, y); return get_buf; } if(!strcmp(name, "menubar")) { if(!app->is_globel_menu) return BoolValue( gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(qp->view_menubar))?1:0); else return BoolValue(1); } if(!strcmp(name, "shape")) return BoolValue(qp->shape); if(!strcmp(name, "statusbar")) return BoolValue(gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(qp->view_statusbar))?1:0); if(!strcmp(name, "tabs")) return BoolValue(gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(qp->view_graph_tabs))?1:0); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *window_graph_get_value(struct qp_win *qp, const char *name) { if(!strcmp(name, "bg")) return ColorValue(&qp->background_color); if(!strcmp(name, "grid")) return BoolValue(qp->grid); if(!strcmp(name, "grid_font")) return StringValue(qp->grid_font); if(!strcmp(name, "grid_line_color")) return ColorValue(&qp->grid_line_color); if(!strcmp(name, "grid_line_width")) return IntValue(qp->grid_line_width); if(!strcmp(name, "grid_numbers")) return BoolValue(qp->grid_numbers); if(!strcmp(name, "grid_text_color")) return ColorValue(&qp->grid_text_color); if(!strcmp(name, "grid_x_space")) return IntValue(qp->grid_x_space); if(!strcmp(name, "grid_y_space")) return IntValue(qp->grid_y_space); if(!strcmp(name, "cairo")) return BoolValue(qp->x11_draw?0:1); if(!strcmp(name, "same_x_scale")) return BoolValue(qp->same_x_scale); if(!strcmp(name, "same_y_scale")) return BoolValue(qp->same_y_scale); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *window_plot_get_value(struct qp_win *qp, const char *name) { if(!strcmp(name, "gaps")) return BoolValue(qp->gaps); if(!strcmp(name, "line_width")) return IntValue(qp->line_width); if(!strcmp(name, "lines")) return BoolValue(qp->lines); if(!strcmp(name, "point_size")) return IntValue(qp->point_size); if(!strcmp(name, "points")) return BoolValue(qp->points); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *graph_get_value(struct qp_graph *gr, const char *name) { if(!strcmp(name, "bg")) return ColorValue(&gr->background_color); if(!strcmp(name, "grid")) return BoolValue(gr->show_grid); if(!strcmp(name, "grid_font")) return StringValue(gr->grid_font); if(!strcmp(name, "grid_line_color")) return ColorValue(&gr->grid_line_color); if(!strcmp(name, "grid_line_width")) return IntValue(gr->grid_line_width); if(!strcmp(name, "grid_numbers")) return BoolValue(gr->grid_numbers); if(!strcmp(name, "grid_text_color")) return ColorValue(&gr->grid_text_color); if(!strcmp(name, "grid_x_space")) return IntValue(gr->grid_x_space); if(!strcmp(name, "grid_y_space")) return IntValue(gr->grid_y_space); if(!strcmp(name, "cairo")) return BoolValue((gr->x11)?0:1); if(!strcmp(name, "same_x_scale")) return BoolValue(gr->same_x_scale); if(!strcmp(name, "same_y_scale")) return BoolValue(gr->same_y_scale); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *graph_plot_get_value(struct qp_graph *gr, const char *name) { if(!strcmp(name, "gaps")) return BoolValue(gr->gaps); if(!strcmp(name, "line_width")) return DoubleValue(gr->line_width); if(!strcmp(name, "lines")) return BoolValue(gr->lines); if(!strcmp(name, "point_size")) return DoubleValue(gr->point_size); if(!strcmp(name, "points")) return BoolValue(gr->points); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } static char *plot_get_value(struct qp_plot *p, const char *name) { if(!strcmp(name, "gaps")) return BoolValue(p->gaps); if(!strcmp(name, "line_color")) return ColorValue((struct qp_colora *)&p->l); if(!strcmp(name, "line_width")) return DoubleValue(p->line_width); if(!strcmp(name, "lines")) return BoolValue(p->lines); if(!strcmp(name, "point_color")) return ColorValue((struct qp_colora *)&p->p); if(!strcmp(name, "point_size")) return DoubleValue(p->point_size); if(!strcmp(name, "points")) return BoolValue(p->points); VASSERT(0, "name=\"%s\" not found\n", name); return NULL; } quickplot-0.10.6/shell_common.h0000644000175000017500000001201112244565775013376 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #ifdef HAVE_LIBREADLINE # if defined(HAVE_READLINE_READLINE_H) # include # elif defined(HAVE_READLINE_H) # include # else /* !defined(HAVE_READLINE_H) */ # undef HAVE_LIBREADLINE # endif #endif #ifdef HAVE_READLINE_HISTORY # if defined(HAVE_READLINE_HISTORY_H) # include # elif defined(HAVE_HISTORY_H) # include # else /* !defined(HAVE_HISTORY_H) */ # undef HAVE_READLINE_HISTORY # endif #endif /* HAVE_READLINE_HISTORY */ #ifndef HAVE_LIBREADLINE /* We do not use history without readline */ # ifdef HAVE_READLINE_HISTORY # undef HAVE_READLINE_HISTORY # endif #endif #define FIFO_PATH_LEN (128) extern char *get_window_nums(int state); extern char *get_graph_nums(int state); extern char *get_plot_nums(int state); struct command { char *name; char *args; char *doc; int propagrate; }; extern struct command commands[], app_commands[], window_commands[], graph_commands[], plot_commands[], help_commands[]; #ifdef HAVE_READLINE_HISTORY extern void Save_history(void); #endif static inline char *space_number(size_t i) { static char text[64]; const char space[] = " "; int nspace; if(i<10) nspace = 5; else if(i<100) nspace = 4; else if(i>1000) nspace = 3; else if(i>10000) nspace = 2; else if(i> 100000) nspace = 1; else // 10000000 nspace = 0; snprintf(text, 64, "%.*s%zu", nspace, space, i); return text; } /* To client */ #define END_REPLY 'E' // "E\n" End of reply from server /* returns 1 if there is data to read * returns 0 if not */ static inline int check_file_in(FILE *file, long sec, long usec) { fd_set rfds; struct timeval tv; int ret; tv.tv_sec = sec; tv.tv_usec = usec; FD_ZERO(&rfds); FD_SET(fileno(file), &rfds); ret = select(fileno(file)+1, &rfds, NULL, NULL, &tv); //DEBUG("select(,fd=%d,)=%d\n", fileno(file), ret); if(ret > 0) return 1; VASSERT(ret != -1, "select(,fd=%d,,) failed\n", fileno(file)); if(ret == -1) QP_EERROR("reading input failed\n"); return 0; } static inline char *allocate_prompt(void) { char *prompt; prompt = getenv("QP_PROMPT"); if(!prompt) prompt = getenv("PS2"); if(!prompt) return qp_strdup("QP> "); return qp_strdup(prompt); } static inline char *set_to_qp_fifo_path(char *str, pid_t qp_pid, pid_t shell_pid) { snprintf(str, FIFO_PATH_LEN, "/tmp/quickplot_to_%d_%d", qp_pid, shell_pid); return str; } static inline char *set_from_qp_fifo_path(char *str, pid_t qp_pid, pid_t shell_pid) { snprintf(str, FIFO_PATH_LEN, "/tmp/quickplot_from_%d_%d", qp_pid, shell_pid); return str; } extern void qp_shell_initialize(int use_readline); /* returns allocated pointers to white space seperated args in the line * with \" and ' escaping just on the edges */ static inline char **get_args(char *line, int *argc) { /* this is a single process, single thread server * so we can use one allocated arg array */ char **arg = NULL; size_t arg_len = 0; size_t count = 0; int sq_escape = 0, dq_escape = 0; char *s; ASSERT(line); arg = qp_malloc((arg_len = 4)*sizeof(char *)); for(s = line; *s; ) { while(isspace(*s)) ++s; if(*s == '\'') { sq_escape = 1; ++s; } if(*s == '"') { dq_escape = 1; ++s; } if(!*s) break; ++count; if(count+1 > arg_len) arg = qp_realloc(arg, (arg_len += 4)*sizeof(char *)); arg[count-1] = s; while(*s && ((!isspace(*s) && !sq_escape && !dq_escape) || (*s != '\'' && sq_escape) || (*s != '"' && dq_escape))) ++s; sq_escape = dq_escape = 0; if(*s) { *s = '\0'; ++s; } } arg[count] = NULL; *argc = count; return arg; } static inline void spew_args(const char *prefix, size_t argc, char **argv, FILE *file) { size_t i; if(prefix) fprintf(file, "%s(%zu args): ", prefix, argc); if(argc) fprintf(file, "%s", argv[0]); for(i=1; i. */ #include #include #include #include #include #include #include #include #include "paths.h" #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "channel.h" #include "spew.h" #include "channel_double.h" #include "qp.h" #ifdef DMALLOC # include "dmalloc.h" #endif static int LaunchBrowser(const char * const url) { int i=0; pid_t pid; const char *browser; // now try the list of browsers const char * const browsers[] = { "firefox", "chromium-browser", "galeon", "konqueror", "mozilla", "epiphany", "opera", "netscape", "dillo", "seamonkey", /* "amaya", "browsex", "light", */ NULL }; /* Lynx is so cool I've got to try it */ //execlp("lynx", "lynx", url, NULL); /* It worked. That was cool. */ pid = vfork(); if(pid < 0) //error { QP_WARN("vfork() failed"); return 1; } if(pid > 0) // parent return 0; // I'm the child. // First see if the user has set a prefered browser in the BROWSER // environment variable. browser = getenv("BROWSER"); if(browser) execlp(browser, browser, url, NULL); browser = getenv("QP_BROWSER"); if(browser) execlp(browser, browser, url, NULL); for(browser=browsers[i]; browser; browser=browsers[++i]) { INFO("executing: %s %s\n", browser, url); execlp(browser, browser, url, NULL); } QP_WARN("Failed to launch a browser"); exit(EXIT_FAILURE); // child exits } /* for finding the full path to * help.txt about.txt about.html help.html index.html * Returns an open fd or -1 on failure * Returns fullpath from malloc() */ int qp_find_doc_file(const char *filename, char **fullpath_ret) { int i; char *fullpath; char *htmldir[4]; ASSERT(strlen(filename) > 5); htmldir[0] = getenv("QUICKPLOT_HTMLDIR"); htmldir[1] = getenv("QUICKPLOT_DOCDIR"); htmldir[2] = HTMLDIR; htmldir[3] = DOCDIR; for(i=0;i<4;++i) { int fd; if(!htmldir[i]) continue; fullpath = qp_malloc(strlen(filename) + 2 + strlen(htmldir[i])); sprintf(fullpath, "%s%c%s", htmldir[i], DIR_CHAR, filename); fd = open(fullpath, O_RDONLY); if(fd == -1) { QP_INFO("Can't open file \"%s\"\n", fullpath); free(fullpath); continue; } else { if(fullpath_ret) *fullpath_ret = fullpath; return fd; } } if(fullpath_ret) *fullpath_ret = NULL; { int is_txt; is_txt = strcmp(".txt", &filename[strlen(filename)-4])?0:1; QP_WARN("Can't open Quickplot documentation file \"%s\"\n" "Try setting environment variable QUICKPLOT_%s to\n" "the directory where this file was installed to.\n", filename, is_txt?"DOCDIR":"HTMLDIR"); } return -1; /* failed */ } int qp_launch_browser(const char *fileName) // Returns 0 on success { int ret = 1; int fd; char *fullpath = NULL; ASSERT(fileName); ASSERT(fileName[0]); ASSERT(fileName[0] != DIR_CHAR); fd = qp_find_doc_file(fileName, &fullpath); if(fullpath) { close(fd); ret = LaunchBrowser(fullpath); free(fullpath); } return ret; } quickplot-0.10.6/graph_draw.c0000644000175000017500000007342312244565775013046 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include "quickplot.h" #include "config.h" #include "spew.h" #include "debug.h" #include "list.h" #include "callbacks.h" #include "channel.h" #include "channel_double.h" #include "qp.h" #include "plot.h" #ifdef DMALLOC # include "dmalloc.h" #endif static inline void x11_DrawLine(struct qp_graph *gr, int *new_line, double from_x, double from_y, double to_x, double to_y) { /* This draws a line at least 10 times faster than Cairo */ XDrawLine(gr->x11->dsp, gr->x11->pixmap, gr->x11->gc, INT(from_x), INT(from_y), INT(to_x), INT(to_y)); } /* * This must be FAST! * * terminate is a boolean 1 -> terminate the line and next time * start a new line * * new_line is a boolean that tells us if the last time this was * called the line terminated, and we need to start a * new line. This must be initialized to 1 on the first call. */ static inline void cairo_DrawLine(struct qp_graph *gr, int *new_line, double from_x, double from_y, double to_x, double to_y) { /* Tests show that defining this EXTRA_CULL makes * drawing a little faster when there are greater * than 1,000,000 points. But this speed * increase is not significant. Just like 0.25 * seconds out of 4 seconds. We think simple is * better. It appears that the cairo line drawing * is already doing something to give good results. */ //#define EXTRA_CULL #ifdef EXTRA_CULL /* yes this is not thread safe */ static int prev_to_x = INT_MAX, prev_to_y = INT_MAX; int x, y; #endif /* If numbers of out of range we need to know. If the line width * is too large this will not work. */ ASSERT(to_x > -50. && to_x < 3.0*app->root_window_width + 50); ASSERT(from_x > -50. && from_x < 3.0*app->root_window_width + 50); ASSERT(to_y > -50. && to_y < 3.0*app->root_window_height + 50); ASSERT(from_y > -50. && from_y < 3.0*app->root_window_height + 50); if(*new_line) { /* Tests show that casting to int makes drawing faster in cairo */ cairo_move_to(gr->cr, INT(from_x), INT(from_y)); #ifdef EXTRA_CULL /* reset the prev_to values */ prev_to_x = INT_MAX; prev_to_y = INT_MAX; #endif } #ifdef EXTRA_CULL x = INT(to_x); y = INT(to_y); /* Do not draw if we are drawing to the same point again. * This is slower for small data files, but a big gain * in speed for large data files. */ if(prev_to_x != x || prev_to_y != y) cairo_line_to(gr->cr, x, y); prev_to_x = x; prev_to_y = y; #else cairo_line_to(gr->cr, INT(to_x), INT(to_y)); #endif *new_line = 0; } /* * This must be FAST! * * new_line is a boolean that tells us if the last time this was * called the line terminated, and we need to start a * new line. This must be initialized to 1 on the first call. * * Quickplot must cull when drawing lines, after zooming, * so that we do not try to draw lines "out of bounds". * Like for example, after zooming we may have points that * are way out side the drawing area. Drawing lines with * end points outside the drawing area will/may give undefined * results. We have seen examples without culling where * the lines look like they are drawn from random end points, * when that was clearly not what we wanted to see. Even * though cario uses doubles it does not map end points of * lines that are outside the drawing area to edges where * we would expect to see them, at least not all the time. * * Besides that, it turns out that culling out lines * is faster than trying to draw them. Which is what * you would expect. * * In this function, we find the points on the drawing area * edges where the line would intersect and draw lines "in * bounds" to represent lines that would otherwise be drawn * off the drawing area. */ static inline void CullDrawLine(struct qp_graph *gr, int *new_line, /* if (*new_line) then we start a * new line, else we continue the last * line */ /* We treat the drawing area (x0,y0) to (x1,y1) like it is * (minusLWidthP1,minusLWidthP1) to (widthPlus,heightPlus) * though the real drawing area is smaller we use a larger * area in order to catch edges of thick lines that may * pass through the edge of the real drawing area. */ double minusLWidthP1, double widthPlus, double heightPlus, /* fromX, fromY and toX, toY are in pixels that define * a line that we wish to draw. But if they are * not in the drawing region we must find the line that * they would make though the drawing region by finding * side intersection points. You can not draw lines from * points like (x,y) 10, -1e10 to 10, 1e10 but we can find * edge intersections of a line that we can draw from. * The number 1e10 is to large to be used to draw lines * with. */ double fromX, double fromY, double toX, double toY) { if(!is_good_double(fromX) || !is_good_double(fromY) || !is_good_double(toX) || !is_good_double(toY)) { /* We need to do this uncommon case first because bad * values can not be used well in the code that follows. */ *new_line = 1; return; } // The common cases come first. // If both points are in the drawing area if(fromX > minusLWidthP1 && fromX < widthPlus && toX > minusLWidthP1 && toX < widthPlus && fromY > minusLWidthP1 && fromY < heightPlus && toY > minusLWidthP1 && toY < heightPlus) { gr->DrawLine(gr, new_line, fromX, fromY, toX, toY); return; } // Do some quick Culls for both points way off to one side: right, // left, up, or down. This will Cull MOST points out! Speed is // the result. //points all on right side, if((fromX >= widthPlus && toX >= widthPlus) || // on the left side, (fromX <= minusLWidthP1 && toX <= minusLWidthP1) || // on top (up), (fromY <= minusLWidthP1 && toY <= minusLWidthP1) || // or on bottom (down) (fromY >= heightPlus && toY >= heightPlus)) { /* we start over the next line draw */ *new_line = 1; return; // Culled } // now both points are not in the drawing area (maybe one point is). // Below we refer to the line formed by the two points fromX, fromY and // toX, toY as "line" or "the line" ... /* close to horizontal lines are more common than close * to vertical lines */ if(ABSVAL(toX - fromX) > 0.01) { double m; /* slope of the line */ m = (toY - fromY)/(toX - fromX); if(ABSVAL(m) < 1.0e+5) { /* The slope is not large */ double a; a = fromY - m * fromX; /* the equation for the line is: Y = m * X + a */ if(fromX < minusLWidthP1) { fromX = minusLWidthP1; fromY = m * fromX + a; } else if(fromX > widthPlus) { fromX = widthPlus; fromY = m * fromX + a; } if(toX < minusLWidthP1) { toX = minusLWidthP1; toY = m * toX + a; } else if(toX > widthPlus) { toX = widthPlus; toY = m * toX + a; } if((fromY < minusLWidthP1 && toY < minusLWidthP1) || (fromY > heightPlus && toY > heightPlus)) { /* The line is above or below the drawing area */ *new_line = 1; return; // Culled } if(toY < minusLWidthP1) { toY = minusLWidthP1; toX = (toY - a)/m; } else if(toY > heightPlus) { toY = heightPlus; toX = (toY - a)/m; } if(fromY < minusLWidthP1) { fromY = minusLWidthP1; fromX = (fromY - a)/m; } else if(fromY > heightPlus) { fromY = heightPlus; fromX = (fromY - a)/m; } gr->DrawLine(gr, new_line, fromX, fromY, toX, toY); return; } } /* Now we do the more vertical line case */ if(ABSVAL(toY - fromY) > 0.01) { double u; /* inverse slope of the line */ u = (toX - fromX)/(toY - fromY); if(ABSVAL(u) < 1.0e5) { /* The inverse slope is not too large */ double b; b = fromX - u * fromY; /* the equation for the line is: X = u * Y + b */ if(fromY < minusLWidthP1) { fromY = minusLWidthP1; fromX = u * fromY + b; } else if(fromY > heightPlus) { fromY = heightPlus; fromX = u * fromY + b; } if(toY < minusLWidthP1) { toY = minusLWidthP1; toX = u * toY + b; } else if(toY > heightPlus) { toY = heightPlus; toX = u * toY + b; } if((fromX < minusLWidthP1 && toX < minusLWidthP1) || (fromX > widthPlus && toX > widthPlus)) { /* The line is to the left or right of the drawing area */ *new_line = 1; return; // Culled } /* The line goes through the drawing area */ if(toX < minusLWidthP1) { toX = minusLWidthP1; toY = (toX - b)/u; } else if(toX > widthPlus) { toX = widthPlus; toY = (toX - b)/u; } if(fromX < minusLWidthP1) { fromX = minusLWidthP1; fromY = (fromX - b)/u; } else if(fromX > widthPlus) { fromX = widthPlus; fromY = (fromX - b)/u; } gr->DrawLine(gr, new_line, fromX, fromY, toX, toY); return; } } /* The points are close to each other and not in the * drawing area */ *new_line = 1; // Culled } static inline void draw_grid(struct qp_graph *gr, cairo_t *cr, double xscale, double xshift, double yscale, double yshift, int width, int height) { if((gr->same_x_scale || gr->same_y_scale) && qp_sllist_length(gr->plots) > 0 && gr->show_grid) { struct qp_plot *p; p = qp_sllist_first(gr->plots); ASSERT(p); /* We need to initialize the plot scaling for this * graph grid drawing */ qp_plot_scale(p, xscale, xshift, yscale, yshift); qp_graph_grid_draw(gr, p, cr, width, height); } } /* width, height give the size of the thing being drawn * on in pixels * * x, y draw at x, y on this cairo surface. * translate the plots, in pixels, which * is where the origin is on the * width by height surface * * the graph (gr) keep a shift and scale that map the plot * data from qp_plot_begin_x() and qp_plot_nextx() and etc * from an square area of in doubles x,y [0,0 to 1,1] to an * area that is the size of the drawing_area in pixels like * x,y [0,0 to 800,600] * * width, height is not necessarily the same size as the * drawing_area widget, likely it is larger * like 2000 by 3000 */ static inline void graph_draw(struct qp_graph *gr, cairo_t *cr, int x, int y, int width, int height) { struct qp_plot *p; /* These doubles will hold the net result of zoom and pixel scaling * the zoom, gr->z, changes as the user zooms in and out and the * pixel scaling changes with the drawing area widget size allocation */ double xscale, xshift, yscale, yshift; xscale = gr->xscale*gr->z->xscale; yscale = gr->yscale*gr->z->yscale; xshift = gr->xscale*gr->z->xshift + gr->xshift + x; yshift = gr->yscale*gr->z->yshift + gr->yshift + y; if(gr->x11 && gr->background_color.a < 0.05) { /* For some reason when drawing with X11 * and having mostly-transparent background the * drawing seems to fail to cover the old * drawing. Painting the whole area to * start with seems to fix it. */ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); cairo_set_source_rgba(cr, 1,1,1,1.0); cairo_paint(cr); } cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); cairo_paint(cr); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(cr, gr->background_color.r, gr->background_color.g, gr->background_color.b, gr->background_color.a); cairo_paint(cr); cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); if(gr->qp->shape) cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); else cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); draw_grid(gr, cr, xscale, xshift, yscale, yshift, width, height); if(gr->show_grid && (gr->same_x_scale || gr->same_y_scale) && qp_sllist_length(gr->plots) > 0) { struct qp_plot *p; p = (struct qp_plot *)qp_sllist_first(gr->plots); /* We need to initialize the plot scaling for this * graph grid drawing */ qp_plot_scale(p, xscale, xshift, yscale, yshift); qp_graph_grid_draw(gr, p, cr, width, height); } if(gr->x11) { /* Get ready to draw with X11 API calls now */ cairo_surface_flush(cairo_get_target(cr)); gr->DrawLine = x11_DrawLine; } else { gr->DrawLine = cairo_DrawLine; gr->cr = cr; } p = (struct qp_plot *) qp_sllist_begin(gr->plots); while(p) { double x_val, y_val; if(p->lines) { /* draw lines */ double minusLineWidthPlus1, widthPlus, heightPlus; double prev_x, prev_y; int new_line = 1; minusLineWidthPlus1 = - p->line_width - 1; widthPlus = width + p->line_width; heightPlus = height + p->line_width; if(gr->x11) { XSetLineAttributes(gr->x11->dsp, gr->x11->gc, INT(p->line_width), LineSolid, CapRound, JoinRound); XSetForeground(gr->x11->dsp, gr->x11->gc, p->l.x); } else { cairo_set_source_rgba(cr, p->l.c.r, p->l.c.g, p->l.c.b, p->l.c.a); cairo_set_line_width(cr, p->line_width); } if(qp_plot_begin(p, xscale, xshift, yscale, yshift, INT(minusLineWidthPlus1), INT(minusLineWidthPlus1), INT(widthPlus), INT(heightPlus), &prev_x, &prev_y)) { /* We start with a good point in prev_x, prev_y */ while((!is_good_double(prev_x) || !is_good_double(prev_y)) && qp_plot_next(p, &prev_x, &prev_y)); while(qp_plot_next(p, &x_val, &y_val)) { CullDrawLine(gr, &new_line, minusLineWidthPlus1, widthPlus, heightPlus, prev_x, prev_y, x_val, y_val); if(p->gaps) { prev_x = x_val; prev_y = y_val; } else /* no gaps */ { /* do not lift up the pen if no gaps */ if(is_good_double(x_val) && is_good_double(y_val)) { /* This may be any number of points from before * if there where an NAN or something. */ prev_x = x_val; prev_y = y_val; } if(new_line) new_line = 0; } } if(!gr->x11) cairo_stroke(cr); } } if(p->points) { double point_w, point_w2; int ipoint_w; double point_min, point_xmax, point_ymax; point_w2 = (point_w = p->point_size)/2; point_min = - point_w2 - 2; point_xmax = width + point_w2 + 1; point_ymax = height + point_w2 + 1; ipoint_w = INT(point_w); if(gr->x11) XSetForeground(gr->x11->dsp, gr->x11->gc, p->p.x); else cairo_set_source_rgba(cr, p->p.c.r, p->p.c.g, p->p.c.b, p->p.c.a); /* Putting the point width offset (point_w2) into * the plot data reader object is faster than adding * the point width offset in the tight loop in the * cairo_rectangle() call where we would add it * every loop interation. */ if(qp_plot_begin(p, xscale, xshift - point_w2, yscale, yshift - point_w2, INT(point_min), INT(point_min), INT(point_xmax), INT(point_ymax), &x_val, &y_val)) { int prev_x = INT_MAX, prev_y = INT_MAX; do { //DEBUG("%g %g\n", x_val, y_val); if(is_good_double(x_val) && is_good_double(y_val) && /* point culling is easy */ point_min < x_val && point_min < y_val && x_val < point_xmax && y_val < point_ymax) { int x, y; x = INT(x_val); y = INT(y_val); /* speed up point drawing by not drawing points * that are on top of adjacent points more than once. * This can be the biggest time saver when there are * over 100,000 points. Note this assumes that * points that as close in x,y space are adjacent * in the series (channel). This will slow down * plotting of small files, but not enough that * we can measure. Tests show that cairo rectangle * drawing is much slower than line drawing. Cairo * does not appear to be opimised for small rectangle * drawing. Single pixel drawing in cairo uses * 1x1 rectangles, which are no faster to draw. * We convert the doubles to ints in the call to * cairo_rectangle() just because it speeds up * drawing. */ if(prev_x != x || prev_y != y) { if(gr->x11) XFillRectangle(gr->x11->dsp, gr->x11->pixmap, gr->x11->gc, x, y, ipoint_w, ipoint_w); else cairo_rectangle(cr, x, y, point_w, point_w); } prev_x = x; prev_y = y; } } while(qp_plot_next(p, &x_val, &y_val)); if(!gr->x11) cairo_fill(cr); } } /* The mouse pointer value picker needs this to be reset from the * - point_w2 offset above. Needed for all plots when * using the value picker GUI */ qp_plot_scale(p, xscale, xshift, yscale, yshift); p = (struct qp_plot *) qp_sllist_next(gr->plots); } } static inline void draw_from_pixbuf(cairo_t *cr, struct qp_graph *gr, int gr_pixel_width, int gr_pixel_height) { /* This is where we draw from the back buffer to another buffer */ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); cairo_set_source_surface(cr, gr->pixbuf_surface, -INT(gr->pixbuf_x+gr->grab_x), -INT(gr->pixbuf_y+gr->grab_y)); cairo_rectangle(cr, 0, 0, gr_pixel_width, gr_pixel_height); cairo_fill(cr); // debuging by seeing a PNG of what we drew //cairo_surface_write_to_png(cairo_get_target(gdk_cr), "y.png"); } static gboolean idle_callback(gpointer data) { struct qp_graph *gr; gr = (struct qp_graph*) data; --gr->ref_count; if(gr->destroy_called) { qp_graph_destroy(gr); return FALSE; } ASSERT(gr->ref_count > 0); gr->waiting_to_resize_draw = 0; gtk_widget_queue_draw(gr->drawing_area); //WARN("QUEUED the draw\n"); return FALSE; } static inline void draw_zoom_box(cairo_t *gdk_cr, struct qp_graph *gr) { cairo_set_operator(gdk_cr, CAIRO_OPERATOR_OVER); cairo_set_source_rgba(gdk_cr, 0.84, 0.9, 1.0, 0.5); cairo_rectangle(gdk_cr, gr->z_x, gr->z_y, gr->z_w, gr->z_h); cairo_fill(gdk_cr); gr->draw_zoom_box = 2; } static inline void draw_value_pick_line(cairo_t *gdk_cr, struct qp_graph *gr, int width, int height) { int x, y, mode; mode = gr->value_mode & 3; x = gr->value_pick_x - gr->pixbuf_x - gr->grab_x; y = gr->value_pick_y - gr->pixbuf_y - gr->grab_y; cairo_set_operator(gdk_cr, CAIRO_OPERATOR_OVER); cairo_set_line_width(gdk_cr, 4); cairo_set_source_rgba(gdk_cr, 0.94, 0.94, 1.0, 0.65); cairo_move_to(gdk_cr, x, 0); cairo_line_to(gdk_cr, x, height); if(!mode) { cairo_move_to(gdk_cr, 0, y); cairo_line_to(gdk_cr, width, y); } cairo_stroke(gdk_cr); cairo_set_line_width(gdk_cr, 2); cairo_set_source_rgba(gdk_cr, 0.004, 0.004, .004, 0.7); cairo_move_to(gdk_cr, x, 0); cairo_line_to(gdk_cr, x, height); if(!mode) { cairo_move_to(gdk_cr, 0, y); cairo_line_to(gdk_cr, width, y); } cairo_stroke(gdk_cr); } static inline cairo_region_t * get_cairo_region_create_from_surface(struct qp_graph *gr, cairo_surface_t *surface, int width, int height) { /* TODO: this is a resource pig. Make it better. */ cairo_rectangle_int_t rect; cairo_surface_t *image; cairo_region_t *region; cairo_t *cr; uint32_t *data, bg; int x, y, stride; if(!gr->x11) /* Creates region that covers the area where the * given surface is more than 50% opaque. * The below code copies this method. This GDK * code is a pig too. */ return gdk_cairo_region_create_from_surface(surface); if(!gr->x11->background_set) { /* We need to see what the background color is when it is * applied to an image. A small image. */ image = cairo_image_surface_create(CAIRO_FORMAT_RGB24, 1, 1); cr = cairo_create(image); cairo_set_source_rgba(cr, gr->background_color.r, gr->background_color.g, gr->background_color.b, gr->background_color.a); cairo_paint (cr); cairo_destroy (cr); data = (void *) cairo_image_surface_get_data(image); gr->x11->background = (data[0] & 0x00FFFFFF); cairo_surface_destroy(image); gr->x11->background_set = 1; } bg = gr->x11->background; image = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height); cr = cairo_create(image); cairo_set_source_surface(cr, surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); data = (void *) cairo_image_surface_get_data(image); stride = cairo_image_surface_get_stride(image); region = cairo_region_create(); for(y=0; y < height; y++) { for(x=0; x < width; x++) { /* Search for a continuous range of "background pixels"*/ gint x0=x; while(x < width) { if((data[x] & 0x00FFFFFF) == bg) /* This pixel is the background color */ break; x++; } if(x > x0) { /* Add the pixels (x0, y) to (x, y+1) as a new rectangle * in the region */ rect.x = x0; rect.width = x - x0; rect.y = y; rect.height = 1; cairo_region_union_rectangle(region, &rect); } } data += stride/4; } cairo_surface_destroy(image); return region; } /* We double buffer the image. It looks nice and it enables * grabing the graph with the pointer and translating it. * We draw on our own larger surface and then copy part of that * to the gdk surface. * * We assume that this function is drawing to an exposed/showing * drawing area, so the status update will reflect the current * exposed/showing drawing area. */ void qp_graph_draw(struct qp_graph *gr, cairo_t *gdk_cr) { GtkAllocation allocation; if(gr->waiting_to_resize_draw && !gr->qp->shape) { //WARN("gr=%p gr->name=\"%s\" gr->ref_count=%d\n", gr, gr->name, gr->ref_count); cairo_set_source_rgba(gdk_cr, gr->background_color.r, gr->background_color.g, gr->background_color.b, gr->background_color.a); cairo_paint(gdk_cr); g_idle_add_full(G_PRIORITY_LOW, idle_callback, gr, NULL); /* fight qp_graph_destroy() race condition with flag */ ++gr->ref_count; /* We draw after the other widgets are drawn, incase drawing * takes a long time. This waiting also gives a chance * for the watch cursor to show. But that seems to only * show if the window had focus at the right time. */ return; } gtk_widget_get_allocation(gr->drawing_area, &allocation); if(gr->pixbuf_needs_draw) { cairo_t *db_cr; /* double buffer cr */ db_cr = cairo_create(gr->pixbuf_surface); graph_draw(gr, db_cr, gr->pixbuf_x, gr->pixbuf_y, gr->pixbuf_width, gr->pixbuf_height); cairo_destroy(db_cr); // debuging //cairo_surface_write_to_png(gr->pixbuf_surface, "x.png"); qp_win_set_status(gr->qp); } /* the GTK cairo_t *gdk_cr has no alpha bits so all the * alpha drawn to it will be smushed. */ //WARN("content=0x%lx\n", (unsigned long)cairo_get_target(gdk_cr)); if(!gr->qp->shape) { /* Not using the shape X11 extension */ /* This is where we go from the back buffer to the drawing area */ draw_from_pixbuf(gdk_cr, gr, allocation.width, allocation.height); if(gr->draw_zoom_box == 1) draw_zoom_box(gdk_cr, gr); if(gr->draw_value_pick) draw_value_pick_line(gdk_cr, gr, allocation.width, allocation.height); if(gr->pixbuf_needs_draw) { gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), NULL); gr->pixbuf_needs_draw = 0; // gr->qp->wait_warning_showing = 0; } } else { /* Use the X11 shape extension */ /* TODO: This is a resource pig. Fix it. */ cairo_region_t *reg_draw_area, *window_region; /* empty flag */ int empty; cairo_surface_t *mask_surface; GtkAllocation all; /* Make sure the surface is up to date */ //cairo_surface_flush(gr->pixbuf_surface); /* make a sub surface that is the size of the graph drawing area */ mask_surface = cairo_surface_create_for_rectangle(gr->pixbuf_surface, INT(gr->pixbuf_x+gr->grab_x), INT(gr->pixbuf_y+gr->grab_y), allocation.width, allocation.height); reg_draw_area = get_cairo_region_create_from_surface(gr, mask_surface, allocation.width, allocation.height); cairo_surface_destroy(mask_surface); cairo_region_translate(reg_draw_area, allocation.x, allocation.y); gtk_widget_get_allocation(gr->qp->window, &all); all.x = all.y = 0; window_region = cairo_region_create_rectangle(&all); cairo_region_subtract_rectangle(window_region, &allocation); empty = cairo_region_is_empty(reg_draw_area); if(!empty) cairo_region_union(window_region, reg_draw_area); cairo_region_destroy(reg_draw_area); /* window_region is a region with a hole in it the * size of the drawing area with the graph and grid added back. */ if(gr->draw_zoom_box && !empty) { cairo_rectangle_int_t rec; rec.x = allocation.x + gr->z_x; rec.y = allocation.y + gr->z_y; rec.width = gr->z_w; rec.height = gr->z_h; /* regions do not like negitive values or * maybe shapes do not like negitive values * in any case we keep width and height * positive */ if(rec.width < 0) { rec.width *= -1; rec.x -= rec.width; } if(rec.height < 0) { rec.height *= -1; rec.y -= rec.height; } cairo_region_union_rectangle(window_region, &rec); /* now we have the zoom box added to window_region */ } /* This is where we go from the back buffer to the drawing area */ draw_from_pixbuf(gdk_cr, gr, allocation.width, allocation.height); if(gr->draw_zoom_box) draw_zoom_box(gdk_cr, gr); if(gr->draw_value_pick) draw_value_pick_line(gdk_cr, gr, allocation.width, allocation.height); if(empty) { /* we have nothing to make a shape with */ if(gr->qp->last_shape_region) { cairo_region_destroy(gr->qp->last_shape_region); gr->qp->last_shape_region = NULL; } cairo_region_destroy(window_region); /* remove the old shape region */ gtk_widget_shape_combine_region(gr->qp->window, NULL); } else if(!gr->qp->last_shape_region || !cairo_region_equal(gr->qp->last_shape_region, window_region)) { // DEBUG("creating new shape region\n"); /* We need to undo the old shape first */ gtk_widget_shape_combine_region(gr->qp->window, NULL); gtk_widget_shape_combine_region(gr->qp->window, window_region); if(gr->qp->last_shape_region) cairo_region_destroy(gr->qp->last_shape_region); gr->qp->last_shape_region = window_region; } else cairo_region_destroy(window_region); gr->pixbuf_needs_draw = 0; gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), NULL); // debuging //cairo_surface_write_to_png(cairo_get_target(gdk_cr), "y.png"); } if(gr->qp->update_graph_detail && gr->qp->graph_detail) { gr->qp->update_graph_detail = 0; /* make the graph configure window show stuff about this graph */ qp_win_graph_detail_init(gr->qp); } } int qp_win_save_png(struct qp_win *qp, struct qp_graph *gr, const char *filename) { cairo_surface_t *surface; cairo_t *cr; GtkAllocation allocation; int ret = 0; ASSERT(qp); ASSERT(qp->window); if(!gr) { int page_num; GtkWidget *w; page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); w = gtk_notebook_get_nth_page(GTK_NOTEBOOK(qp->notebook), page_num); gr = (struct qp_graph*) g_object_get_data(G_OBJECT(w), "qp_graph"); } gtk_widget_get_allocation(gr->drawing_area, &allocation); surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, allocation.width, allocation.height); cr = cairo_create(surface); /* This is where we go from the back buffer to the image */ draw_from_pixbuf(cr, gr, allocation.width, allocation.height); errno = 0; if(CAIRO_STATUS_SUCCESS == cairo_surface_write_to_png(surface, filename)) QP_NOTICE("Saved %s\n", filename); else { WARN("Failed to save: %s\n", filename); QP_WARN("Failed to save: %s\n", filename); ret = 1; } cairo_destroy(cr); cairo_surface_destroy(surface); return ret; } quickplot-0.10.6/color_gen.c0000644000175000017500000001133012244565775012664 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include "color_gen.h" #include "config.h" #include "debug.h" #ifdef DMALLOC # include "dmalloc.h" #endif #define DELTA_HUE (6.0/4.6575324428) #define DELTA_SAT (0.18255); #define DELTA_VAL (0.160324/6.0); #if 1 /* constants for hue_func() */ #define HM0 (1.0/1.3) #define HM1 (2.0/1.3) #define HA1 (HM0 * 0.2 - 0.2 * HM1) #define HM2 HM0 #define HA2 (HA1 + HM1 * 0.5 - 0.5 * HM2) static double hue_func(double x) { /* This makes the colors tend to be less green. */ double y; while(x < 0.0) x += 1.0; while(x >= 1.0) x -= 1.0; if(x < 0.2) return HM0 * x; if(x < 0.5) return HA1 + HM1 * x; /* x < 1.0 */ y = HA2 + HM2 * x; if(y >= 1.0) y -= 1.0; return y; } #else static double hue_func(double x) { return x; } #endif #define SAT_MAX 0.85 #define VAL_MAX 0.92 #define SAT_MIN 0.40 #define VAL_MIN 0.50 static void GetNextHue(struct qp_color_gen *cg) { cg->hue_x += DELTA_HUE; if(cg->hue_x > 1.0) { cg->hue_x -= 1.0; //#define SINES #ifndef SINES /* This looks better */ cg->value -= DELTA_VAL; if(cg->value < VAL_MIN) { cg->value += VAL_MAX - VAL_MIN; cg->saturation += DELTA_SAT; if(cg->saturation > SAT_MAX) cg->saturation += SAT_MIN - SAT_MAX; } #endif } #ifdef SINES cg->saturation_x += 0.2121212*2*M_PI; cg->value_x = 0.02233233124*2*M_PI; cg->saturation = 0.5*(SAT_MAX + SAT_MIN) + 0.5*(SAT_MAX - SAT_MIN) * cos(cg->saturation_x); cg->value = 0.5*(VAL_MAX + VAL_MIN) + 0.5*(VAL_MAX - VAL_MIN) * sin(cg->value_x); #endif cg->hue = hue_func(cg->hue_x); } struct qp_color_gen *qp_color_gen_create(void) { struct qp_color_gen *cg; cg = qp_malloc(sizeof(*cg)); cg->hue = 0; cg->hue_x = -DELTA_HUE + 0.0001; cg->saturation = SAT_MAX; cg->value = VAL_MAX; #ifdef SINES cg->saturation_x = 0; cg->value_x = 0; #endif return cg; } void qp_color_gen_destroy(struct qp_color_gen *cg) { ASSERT(cg); free(cg); } double qp_color_gen_next(struct qp_color_gen *cg, double *red, double *green, double *blue, double hue) /* Returns red, blue, and green as determined from the * value, saturation, and hue which are all bounded by [0,1). */ #if 1 /* See reference: http://en.wikipedia.org/wiki/HSL_color_space * * We use difference normalization than that reference does. */ { double max, lower, slope; if(hue < 0.0 || hue >= 1.0) { GetNextHue(cg); hue = cg->hue; } lower = cg->value*(1.0 - cg->saturation); max = cg->value; slope = 6*(max-lower); /* One color chances linearly with hue in the space of hue * that is divided into 6 parts. */ if(hue < 1 * 1.0/6.0) { *red = max; *blue = lower; *green = lower + hue*slope; } else if(hue < 2 * 1.0/6.0) { *red = - lower + 2*max - hue*slope; *blue = lower; *green = max; } else if(hue < 3 * 1.0/6.0) { *red = lower; *blue = hue*slope - 2*max + 3*lower; *green = max; } else if(hue < 4 * 1.0/6.0) { *red = lower; *blue = max; *green = 4*max - 3*lower - hue*slope; } else if(hue < 5 * 1.0/6.0) { *red = hue*slope - 4*max + 5*lower; *blue = max; *green = lower; } else if(hue < 6 * 1.0/6.0) { *red = max; *blue = 6*max - 5*lower - hue*slope; *green = lower; } return hue; } #else { /* Lets try three shifted and scaled sine waves in place of the * piece-wise linear stuff above. The piece-wise linear method * incases the sine waves when plotted together. Okay that was fun. */ double amp, shift; if(hue < 0.0 || hue >= 1.0) { GetNextHue(cg); hue = cg->hue; } amp = cg->value*cg->saturation/2.0; shift = cg->value*(1.0 - cg->saturation) + amp; *red = shift + amp*cos(hue*2.0F*M_PI); *blue = shift + amp*cos(hue*2.0F*M_PI - 2.0F*M_PI*2/3); *green = shift + amp*cos(hue*2.0F*M_PI - 2.0F*M_PI/3); return hue; } #endif quickplot-0.10.6/imgCopyWindow.png0000644000175000017500000000141712244565775014063 00000000000000‰PNG  IHDRóÿaÖIDATxœ}ÒOh›eÀñïó¼Ï›?Mkmš´]kºÆn,mYƒÿެl:'(nQE¼"ó èÁ“ìI&l"ÜNzq";”Te]3RÜêfk•¥&¤Y^³æÏû$ïãÁ[mýÝ¿ŸÃï÷ÙlÆcðùl„h­±”…­l„”ÀƒÖzj||2Í–Q¹Ü…BžZ­†”Ïó…Bðˆ,Ö65=‘~Fâñ­í¿ÀüüŸ=KYo 6¦mˆôF‘5÷*ÒÅ:É#OòöéÓÛÿÁ2ƒ+8w€?¢ÏáØ6u'[ú–¡îböp·í‘%ÅçƒD©Ò;†(¦é©d(õMqáx’«d·Ôß‹ðMå~½§ãÍyæù2U³›ØtžÌðctÍnŰö‹ä•+?ðûRb x^Õ²%Õ@7ý‹¯Ñj½zYòÔêGN¼‡²âÐX–…Öz&à ””­[(·7Å ßôÿò)«UÖÏh.¼x›;ŸM¡Çq@ „ £#DL¹„ýW7šž>Š Z+Œ:³èJ†‡"Q&θ,ØÅÂÏ®ÝÈP¾»[ðÊÏ@¤—qYa°ÓââšÃî½£¨¨‚C1§ëQ´epB6C8}²ÄÞ¥? æòâ;TzìÜì ~…ü©…ÉT"ž˜JÄ[—›”ç~ŸY+…™;¹‰wë¡ô[L °<ô4çOýFð…Yx\ R©ÔÞsnnŽ[×%7ë{XeòÝ1¯w³ÏW¦y_‘fXâm< ÔN÷u;Ô3õý&Ymóêá&ë5CñÒ2îDÉÉÁÁƒÿÄN’ûasýøq¦ë,½;­¡óæ:íZug Üþ’ñ|–š¯ÍD©‡àÅnôån6_Y套’ãCõÙ;©ûfß©8fƒ.%è²%}Ʀ±Ü„¸!´ˆìáGª˜%:IEND®B`‚quickplot-0.10.6/debug.h0000644000175000017500000001424412244565775012017 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #ifndef _QP_DEBUG_H_ #define _QP_DEBUG_H_ #include #include #include #include #include #include #ifndef PACKAGE_TARNAME # error "You must include config.h before this file" #endif #ifndef QP_DEBUG #define DEBUG(fmt, ...) /* empty macro */ #define INFO(fmt, ...) /* empty macro */ #define NOTICE(fmt, ...) /* empty macro */ #define WARN(fmt, ...) /* empty macro */ #define ERROR(fmt, ...) /* empty macro */ #define EDEBUG(fmt, ...) /* empty macro */ #define EINFO(fmt, ...) /* empty macro */ #define ENOTICE(fmt, ...) /* empty macro */ #define EWARN(fmt, ...) /* empty macro */ #define EERROR(fmt, ...) /* empty macro */ #define APPEND(fmt, ...) /* empty macro */ #define ASSERT(x) /* empty macro */ #define VASSERT(x, ...) /* empty macro */ #define APPEND_ON() (0) #define SPEW_LEVEL() (5) /* no debug spew */ #else /* #ifndef QP_DEBUG */ /* This adds addition compiler checks for the printf formating. */ #define __printf(a,b) __attribute__((format(printf,a,b))) extern void _qp_spew(const char *file, int line, const char *func, int level, int show_errno, const char *format, ...) __printf(6,7); extern void _qp_spew_append(const char *format, ...) __printf(1,2); extern void _qp_assert(const char *file, int line, const char *func, long bool_arg, const char *arg, const char *format, ...) __printf(6,7); #define DEBUG(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 0, 0, fmt, ##__VA_ARGS__ ) #define INFO(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 1, 0, fmt, ##__VA_ARGS__ ) #define NOTICE(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 2, 0, fmt, ##__VA_ARGS__ ) #define WARN(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 3, 0, fmt, ##__VA_ARGS__ ) #define ERROR(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 4, 0, fmt, ##__VA_ARGS__ ) #define EDEBUG(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 0, 1, fmt, ##__VA_ARGS__ ) #define EINFO(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 1, 1, fmt, ##__VA_ARGS__ ) #define ENOTICE(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 2, 1, fmt, ##__VA_ARGS__ ) #define EWARN(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 3, 1, fmt, ##__VA_ARGS__ ) #define EERROR(fmt, ...) \ _qp_spew(__FILE__, __LINE__, __func__, 4, 1, fmt, ##__VA_ARGS__ ) #define APPEND(fmt, ...) \ _qp_spew_append(fmt, ##__VA_ARGS__ ) #define ASSERT(x) _qp_assert(__FILE__, __LINE__, \ __func__, (long) (x), #x, " ") #define VASSERT(x, fmt, ...) \ _qp_assert(__FILE__, __LINE__, __func__, \ (long) (x), #x, fmt, ##__VA_ARGS__) extern int _qp_spew_debug_append_is_on(void); #define APPEND_ON() _qp_spew_debug_append_is_on() extern int _qp_spew_level(void); #define SPEW_LEVEL() _qp_spew_level() #endif /* #ifndef QP_DEBUG #else */ #define qp_malloc(x) _qp_malloc((x), __FILE__, __LINE__, __func__) /** malloc() wrapper that checks for failure */ static inline void *_qp_malloc(size_t s, const char *file, int line, const char *func) { void *p; errno = 0; p = malloc(s); #ifdef QP_DEBUG _qp_assert(file, line, func, (long) p, "malloc()", " malloc(%zu) failed\n", s); #endif if(!s) /* for non-debug build case failure */ { char errstr[128]; strerror_r(errno, errstr, 128); printf("%s:%d:%s() malloc(%zu) failed: errno=%d: %s\n", file, line, func, s, errno, errstr); exit(1); } return p; } #define qp_realloc(x,s) _qp_realloc((x),(s), __FILE__, __LINE__, __func__) /** realloc() wrapper that checks for failure */ static inline void *_qp_realloc(void *x, size_t s, const char *file, int line, const char *func) { void *p; errno = 0; p = realloc(x,s); #ifdef QP_DEBUG _qp_assert(file, line, func, (long) p, "realloc()", " realloc(%p,%zu) failed\n", x, s); #endif if(!s) /* for non-debug build case failure */ { char errstr[128]; strerror_r(errno, errstr, 128); printf("%s:%d:%s() realloc(%p,%zu) failed: errno=%d: %s\n", file, line, func, x, s, errno, errstr); exit(1); } return p; } #define qp_strdup(x) _qp_strdup((x), __FILE__, __LINE__, __func__) /** strdup() wrapper that checks for failure */ static inline char *_qp_strdup(const char *s, const char *file, int line, const char *func) { char *p; errno = 0; p = strdup(s); #ifdef QP_DEBUG _qp_assert(file, line, func, (long) p, "strdup()", " strdup(\"%s\") failed\n", s); #endif if(!s) /* for non-debug build case failure */ { char errstr[128]; strerror_r(errno, errstr, 128); printf("%s:%d:%s() strdup(\"%s\") failed: errno=%d: %s\n", file, line, func, s, errno, errstr); exit(1); } return p; } #define qp_strndup(x, n) _qp_strndup((x), (n), __FILE__, __LINE__, __func__) /** strndup() wrapper that checks for failure */ static inline char *_qp_strndup(const char *s, size_t n, const char *file, int line, const char *func) { char *p; errno = 0; p = strndup(s, n); #ifdef QP_DEBUG _qp_assert(file, line, func, (long) p, "strndup()", " strndup(\"%s\", %zu) failed\n", s, n); #endif if(!s) /* for non-debug build case failure */ { char errstr[128]; strerror_r(errno, errstr, 128); printf("%s:%d:%s() strndup(\"%s\", %zu) failed: errno=%d: %s\n", file, line, func, s, n, errno, errstr); exit(1); } return p; } #else /* #ifndef _QP_DEBUG_H_ */ #error "You included this file twice." #endif /* #ifndef _QP_DEBUG_H_ */ quickplot-0.10.6/imgDeleteWindow.png0000644000175000017500000000061512244565775014352 00000000000000‰PNG  IHDRóÿaTIDATxœ•“=KA†ŸM.E"˜(©llŒ°³ñ0b©b!B´±ö؈,vþA°Ká°ˆ¤Ig‘Â.MPÄÆg\‹ìžwÙ“ƒÙåžwÞv 0 #, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: quickplot-0.10.6/parse_argument_options.c0000644000175000017500000001170312244565775015510 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "spew.h" #include "list.h" #include "qp.h" #include "callbacks.h" #include "get_opt.h" #include "channel.h" #include "shell.h" #include "utils.h" #ifdef DMALLOC # include "dmalloc.h" #endif union qp_parser { struct { char *err; size_t elen; int silent; } p1; struct { /* needs_graph = last file loaded and not plotted yet */ char *needs_graph; int got_stdin; } p2; }; /* This is the one globel pointer used to do * argument parsing. * We allocate it and then free it when we are done * with it. */ static union qp_parser *parser = NULL; #include "parse_args_utils.h" #include "parse_1st_pass_funcs.h" #include "parse_2nd_pass_funcs.h" #include "parse_args.h" /* exits on failue */ void qp_getargs_1st_pass(int argc, char **argv) { parser = qp_malloc(sizeof(*parser)); parser->p1.err = NULL; parser->p1.elen = 0; parser->p1.silent = 0; /* make sure that app exists */ qp_app_check(); #ifdef QP_DEBUG /* default spew INFO 1 */ qp_spew_init(1); #else /* default spew WARN 3 */ qp_spew_init(3); #endif /* This is the an auto-generated function */ parse_args_1st_pass(argc, argv); if(parser->p1.err) print_arg_error(); if(app->op_pipe == -1) { /* yes 1 no 0 */ app->op_pipe = check_stdin(); /* so now app->op_pipe is a bool */ } } /* exits on failure */ void qp_getargs_2nd_pass(int argc, char **argv) { if(!parser) { QP_ERROR("qp_getargs_1st_pass() was not called yet" " when calling %s()\n", __func__); exit(1); } /* reinitialize parser */ parser->p2.needs_graph = NULL; parser->p2.got_stdin = 0; /* This is the an auto-generated function */ parse_args_2nd_pass(argc, argv); /* load stdin file if it needs to be */ check_load_stdin(0); if(parser->p2.needs_graph) { /* the last file loaded has no graph yet */ ASSERT(qp_sllist_last(app->sources)); if(app->op_default_graph) if(qp_win_graph_default_source(NULL, (qp_source_t) qp_sllist_last(app->sources), NULL)) exit(1); } { struct qp_win *qp; /* There should be at least one qp window */ if(!qp_sllist_first(app->qps)) qp_win_create(); for(qp = qp_sllist_begin(app->qps); qp; qp = qp_sllist_next(app->qps)) { /* At startup we want the first graph * showing to be the first one in each * window. By default the current * graph is the last one created, which * works when the user creates it while * interacting with the window which is not * the case at startup. */ gtk_notebook_set_current_page(GTK_NOTEBOOK(qp->notebook), 0); } } if(app->op_shell) { /* We must make the shell last of all so the shell is usable. */ if(parser->p2.got_stdin) /* we are reading stdin for plot data so we'll open the * controlling tty to read input for the quickplot shell. */ { int stdin_fd, tty_fd; errno = 0; tty_fd = open("/dev/tty", O_RDONLY); if(tty_fd == -1) { VASSERT(0, "open(\"/dev/tty\", O_RDONLY) failed\n"); QP_EERROR("failed to open controlling tty\n"); exit(1); } /* We replace the old stdin file desciptor with * this tty_fd so that readline() can use stdin */ stdin_fd = fileno(stdin); errno = 0; if(close(stdin_fd)) { VASSERT(0, "close(%d) failed\n", stdin_fd); QP_EERROR("failed to close the original standard input\n"); exit(1); } errno = 0; if(dup2(tty_fd, stdin_fd) == -1) { VASSERT(0, "dup2(%d, %d) failed\n", tty_fd, stdin_fd); QP_EERROR("failed to dup controlling tty to standard input\n"); exit(1); } /* reset the standard input file stream */ clearerr(stdin); } app->op_shell = qp_shell_create(stdin, stdout, 0, getpid()); if(!app->op_shell) exit(1); } free(parser); } quickplot-0.10.6/parse_2nd_pass_funcs.h0000644000175000017500000002623212244565775015032 00000000000000/* running `./mk_options -2' generates a template of this file. * But then we have to edit it too. */ /* This looks kind of stupid but it makes it very easy * to keep track of argument options and it should be * pretty efficient given these all short inline functions. */ static inline void parse_2nd_File(const char *filename) { /* by default pipe is read before the * first non-pipe file. */ check_load_stdin(0); load_file(filename); } static inline void parse_2nd_auto_scale(void) { app->op_same_x_scale = -1; app->op_same_y_scale = -1; if(default_qp) { default_qp->same_x_scale = -1; default_qp->same_y_scale = -1; } } static inline void parse_2nd_border(void) { app->op_border = TRUE; } static inline void parse_2nd_buttons(void) { app->op_buttons = 1; } static inline void parse_2nd_cairo_draw(void) { app->op_x11_draw = 0; if(default_qp) default_qp->x11_draw = 0; } static inline void parse_2nd_default_graph(void) { app->op_default_graph = 1; if(qp_sllist_last(app->sources) && qp_win_graph_default_source(NULL, (qp_source_t) qp_sllist_last(app->sources), NULL)) exit(1); parser->p2.needs_graph = NULL; } static inline void parse_2nd_different_scale(void) { app->op_same_x_scale = 0; app->op_same_y_scale = 0; if(default_qp) { default_qp->same_x_scale = 0; default_qp->same_y_scale = 0; } } static inline void parse_2nd_fullscreen(void) { app->op_maximize = 2; } static inline void parse_2nd_gaps(void) { app->op_gaps = 1; if(default_qp) default_qp->gaps = 1; } static inline void parse_2nd_grid(void) { app->op_grid = 1; if(default_qp) default_qp->grid = 1; } static inline void parse_2nd_grid_numbers(void) { app->op_grid_numbers = 1; if(default_qp) default_qp->grid_numbers = 1; } static inline void parse_2nd_gui(void) { app->op_menubar = 1; app->op_buttons = 1; app->op_tabs = 1; app->op_statusbar = 1; } static inline void parse_2nd_labels(void) { app->op_labels = 1; } static inline void parse_2nd_maximize(void) { app->op_maximize = 1; } static inline void parse_2nd_menubar(void) { app->op_menubar = 1; } static inline void parse_2nd_new_window(void) { app->op_new_window = 1; } static inline void parse_2nd_no_border(void) { app->op_border = 0; } static inline void parse_2nd_no_buttons(void) { app->op_buttons = 0; } static inline void parse_2nd_no_default_graph(void) { app->op_default_graph = 0; } static inline void parse_2nd_no_fullscreen(void) { if(app->op_maximize == 2) app->op_maximize = 0; } static inline void parse_2nd_no_gaps(void) { app->op_gaps = 0; if(default_qp) default_qp->gaps = 0; } static inline void parse_2nd_no_grid(void) { app->op_grid = 0; if(default_qp) default_qp->grid = 0; } static inline void parse_2nd_no_grid_numbers(void) { app->op_grid_numbers = 0; if(default_qp) default_qp->grid_numbers = 0; } static inline void parse_2nd_no_gui(void) { app->op_menubar = 0; app->op_buttons = 0; app->op_tabs = 0; app->op_statusbar = 0; } static inline void parse_2nd_no_labels(void) { app->op_labels = 0; } static inline void parse_2nd_no_linear_channel(void) { if(app->op_linear_channel) { qp_channel_destroy(app->op_linear_channel); app->op_linear_channel = NULL; } } static inline void parse_2nd_no_lines(void) { app->op_lines = 0; if(default_qp) default_qp->lines = 0; } static inline void parse_2nd_no_menubar(void) { app->op_menubar = 0; } static inline void parse_2nd_no_maximize(void) { if(app->op_maximize == 1) app->op_maximize = 0; } static inline void parse_2nd_no_new_window(void) { app->op_new_window = 0; } static inline void parse_2nd_no_points(void) { app->op_points = 0; if(default_qp) default_qp->points = 0; } static inline void parse_2nd_no_shape(void) { app->op_shape = 0; } static inline void parse_2nd_no_statusbar(void) { app->op_statusbar = 0; } static inline void parse_2nd_no_tabs(void) { app->op_tabs = 0; } static inline void parse_2nd_pipe(void) { check_load_stdin(1); } static inline void parse_2nd_points(void) { app->op_points = 1; if(default_qp) default_qp->points = 1; } static inline void parse_2nd_read_pipe_here(void) { check_load_stdin(1); } static inline void parse_2nd_same_scale(void) { app->op_same_x_scale = 1; app->op_same_y_scale = 1; if(default_qp) { default_qp->same_x_scale = 1; default_qp->same_y_scale = 1; } } static inline void parse_2nd_shape(void) { app->op_shape = 1; } static inline void parse_2nd_shell(void) { /* just set it to non-zero value as a flag */ app->op_shell = (void *) 1; } static inline void parse_2nd_statusbar(void) { app->op_statusbar = 1; } static inline void parse_2nd_tabs(void) { app->op_tabs = 1; } static inline void parse_2nd_x11_draw(void) { app->op_x11_draw = 1; if(default_qp) default_qp->x11_draw = 1; } static inline void parse_2nd_background_color(char *arg, int argc, char **argv, int *i) { get_color(&app->op_background_color, arg); if(default_qp) memcpy(&default_qp->background_color, &app->op_background_color, sizeof(default_qp->background_color)); } static inline void parse_2nd_file(char *arg, int argc, char **argv, int *i) { parse_2nd_File(arg); } static inline void parse_2nd_geometry(char *arg, int argc, char **argv, int *j) { if(GetGeometry(arg, &(app->op_geometry.x), &(app->op_geometry.y), &(app->op_geometry.width), &(app->op_geometry.height), &(app->op_maximize))) { DEBUG("bad option: %s='%s'\n", "--geometry", arg); QP_ERROR("bad option: %s='%s'\n", "--geometry", arg); exit(1); } DEBUG("now geometry=%dx%d%+d%+d app->op_maximize=%d\n", app->op_geometry.width, app->op_geometry.height, app->op_geometry.x, app->op_geometry.y, app->op_maximize); } static inline void graph_plots(ssize_t *x, ssize_t *y, size_t len) { ASSERT(len); if(qp_win_graph(NULL, x, y, len, NULL)) exit(1); free(x); free(y); parser->p2.needs_graph = 0; } static inline void parse_2nd_graph(char *arg, int argc, char **argv, int *i) { ssize_t *x = NULL, *y = NULL, max_channel_num = -1; size_t len = 0; struct qp_source *s; if(!qp_sllist_last(app->sources)) { ERROR("\n"); QP_ERROR("got option --graph='%s' but have no files read yet\n", arg); exit(1); } for(s=qp_sllist_begin(app->sources);s; s=qp_sllist_next(app->sources)) max_channel_num += s->num_channels; check_load_stdin(0); get_plot_option(arg, &x, &y, &len, "--graph", 0, max_channel_num); graph_plots(x, y, len); } static inline void parse_2nd_graph_file(char *arg, int argc, char **argv, int *i) { ssize_t *x = NULL, *y = NULL, offset = 0, j; size_t len = 0; struct qp_source *s, *last_s; last_s = qp_sllist_last(app->sources); if(!last_s) { ERROR("\n"); QP_ERROR("got option --graph-file='%s' but have no files read yet\n", arg); exit(1); } for(s=qp_sllist_begin(app->sources);s != last_s; s=qp_sllist_next(app->sources)) offset += s->num_channels; check_load_stdin(0); get_plot_option(arg, &x, &y, &len, "--graph-file", -offset, last_s->num_channels - 1); if(!len) { QP_ERROR("bad option --graph-file=\"%s\"\n", arg); exit(1); } for(j=0;jop_grid_font); if(app->op_grid_font) free(app->op_grid_font); app->op_grid_font = qp_strdup(arg); if(default_qp) { if(default_qp->grid_font) free(default_qp->grid_font); default_qp->grid_font = qp_strdup(arg); } } static inline void parse_2nd_grid_line_width(char *arg, int argc, char **argv, int *i) { app->op_grid_line_width = get_long(arg, 1, 101, "--grid-line-width"); if(default_qp) default_qp->grid_line_width = app->op_grid_line_width; } static inline void parse_2nd_grid_line_color(char *arg, int argc, char **argv, int *i) { get_color(&app->op_grid_line_color, arg); if(default_qp) memcpy(&default_qp->grid_line_color, &app->op_grid_line_color, sizeof(default_qp->grid_line_color)); } static inline void parse_2nd_grid_text_color(char *arg, int argc, char **argv, int *i) { get_color(&app->op_grid_text_color, arg); if(default_qp) memcpy(&default_qp->grid_text_color, &app->op_grid_text_color, sizeof(default_qp->grid_text_color)); } static inline void parse_2nd_grid_x_space(char *arg, int argc, char **argv, int *i) { app->op_grid_x_space = get_long(arg, 10, 10000000, "--grid-x-space"); if(default_qp) default_qp->grid_x_space = app->op_grid_x_space; } static inline void parse_2nd_grid_y_space(char *arg, int argc, char **argv, int *i) { app->op_grid_y_space = get_long(arg, 10, 10000000, "--grid-y-space"); if(default_qp) default_qp->grid_y_space = app->op_grid_y_space; } static inline void parse_2nd_label_separator(char *arg, int argc, char **argv, int *i) { ASSERT(app->op_label_separator); free(app->op_label_separator); app->op_label_separator = qp_strdup(arg); } static inline void parse_2nd_line_width(char *arg, int argc, char **argv, int *i) { if(!strcasecmp(arg, "auto")) app->op_line_width = -1; else app->op_line_width = get_long(arg, 1, 101, "--line-width"); if(default_qp) default_qp->line_width = app->op_line_width; } static inline void parse_2nd_linear_channel(char *arg, int argc, char **argv, int *i) { double start, step; if(app->op_linear_channel) { qp_channel_destroy(app->op_linear_channel); app->op_linear_channel = NULL; } if(parse_linear_channel(1, arg, argc, argv, i, &start, &step)) { QP_ERROR("bad option argument --linear-channel='%s'\n", arg); exit(1); } app->op_linear_channel = qp_channel_linear_create(start, step); } static inline void parse_2nd_lines(char *arg, int argc, char **argv, int *i) { app->op_lines = get_yes_no_auto_int(arg, "--lines"); if(default_qp) default_qp->lines = app->op_lines; } static inline void parse_2nd_number_of_plots(char *arg, int argc, char **argv, int *i) { app->op_number_of_plots = get_long(arg, 1, INT_MAX - 10, "--number-of-plots"); } static inline void parse_2nd_point_size(char *arg, int argc, char **argv, int *i) { if(!strcasecmp(arg, "auto")) app->op_point_size = -1; else app->op_point_size = get_long(arg, 1, 101, "--point-size"); if(default_qp) default_qp->point_size = app->op_point_size; } static inline void parse_2nd_same_x_scale(char *arg, int argc, char **argv, int *i) { app->op_same_x_scale = get_yes_no_auto_int(arg, "--same-x-scale"); if(default_qp) default_qp->same_x_scale = app->op_same_x_scale; } static inline void parse_2nd_same_y_scale(char *arg, int argc, char **argv, int *i) { app->op_same_y_scale = get_yes_no_auto_int(arg, "--same-y-scale"); if(default_qp) default_qp->same_y_scale = app->op_same_y_scale; } static inline void parse_2nd_signal(char *arg, int argc, char **argv, int *i) { /* just set it to non-zero value as a flag */ app->op_signal = get_long(arg, 0, INT_MAX, "--signal"); } static inline void parse_2nd_skip_lines(char *arg, int argc, char **argv, int *i) { app->op_skip_lines = get_long(arg, 0, INT_MAX - 10, "--skip-lines"); } quickplot-0.10.6/imgNewWindow.xpm0000644000175000017500000001047012245423271013702 00000000000000/* XPM */ static const char *imgNewWindow[] = { /* columns rows colors chars-per-pixel */ "16 16 256 2 ", " c None", ". c black", "X c black", "o c black", "O c black", "+ c black", "@ c black", "# c black", "$ c black", "% c black", "& c black", "* c black", "= c black", "- c black", "; c black", ": c black", "> c black", ", c #DADAD6", "< c #E6E6E1", "1 c #E1E1DD", "2 c #E0E0DC", "3 c #EAEAE6", "4 c #E6E6E2", "5 c #DFDFDB", "6 c #EBECE7", "7 c #F3F2EE", "8 c #EDF0EC", "9 c #E9EEEB", "0 c #EDF0EC", "q c #F2F2ED", "w c #F2F2EE", "e c black", "r c black", "t c #C3C3C3", "y c #959592", "u c #7F807D", "i c #7F7F7C", "p c #7F7F7D", "a c #7F7F7D", "s c #7E7E7C", "d c #8F8E8C", "f c #848786", "g c #9C8A82", "h c #B7978A", "j c #9C8B84", "k c #80807E", "l c #C3C3C3", "z c black", "x c black", "c c #C3C3C3", "v c black", "b c black", "n c black", "m c black", "M c black", "N c black", "B c black", "V c black", "C c black", "Z c black", "A c black", "S c black", "D c #C3C3C3", "F c black", "G c black", "H c #C3C3C3", "J c black", "K c black", "L c black", "P c black", "I c black", "U c black", "Y c black", "T c black", "R c black", "E c black", "W c black", "Q c black", "! c #C3C3C3", "~ c black", "^ c black", "/ c #C3C3C3", "( c black", ") c black", "_ c black", "` c black", "' c black", "] c black", "[ c black", "{ c black", "} c black", "| c black", " . c black", ".. c black", "X. c #C3C3C3", "o. c black", "O. c black", "+. c #C3C3C3", "@. c black", "#. c black", "$. c black", "%. c black", "&. c black", "*. c black", "=. c black", "-. c black", ";. c black", ":. c black", ">. c black", ",. c black", "<. c #C3C3C3", "1. c black", "2. c black", "3. c #C3C3C3", "4. c black", "5. c black", "6. c black", "7. c black", "8. c black", "9. c black", "0. c black", "q. c black", "w. c black", "e. c black", "r. c black", "t. c black", "y. c #C3C3C3", "u. c black", "i. c black", "p. c #C3C3C3", "a. c black", "s. c black", "d. c black", "f. c black", "g. c black", "h. c black", "j. c black", "k. c black", "l. c black", "z. c black", "x. c black", "c. c black", "v. c #C3C3C3", "b. c black", "n. c black", "m. c #C3C3C3", "M. c black", "N. c black", "B. c black", "V. c black", "C. c black", "Z. c black", "A. c black", "S. c black", "D. c black", "F. c black", "G. c black", "H. c black", "J. c #C3C3C3", "K. c black", "L. c black", "P. c #C3C3C3", "I. c black", "U. c black", "Y. c black", "T. c black", "R. c black", "E. c black", "W. c black", "Q. c black", "!. c black", "~. c black", "^. c black", "/. c black", "(. c #C3C3C3", "). c black", "_. c black", "`. c #C3C3C3", "'. c black", "]. c black", "[. c black", "{. c black", "}. c black", "|. c black", " X c black", ".X c black", "XX c black", "oX c black", "OX c black", "+X c black", "@X c #C3C3C3", "#X c black", "$X c black", "%X c #C3C3C3", "&X c black", "*X c black", "=X c black", "-X c black", ";X c black", ":X c black", ">X c black", ",X c black", " , < 1 2 3 4 5 6 7 8 9 0 q w e ", "r t y u i p a s d f g h j k l z ", "x c v b n m M N B V C Z A S D F ", "G H J K L P I U Y T R E W Q ! ~ ", "^ / ( ) _ ` ' ] [ { } | ...X.o.", "O.+.@.#.$.%.&.*.=.-.;.:.>.,.<.1.", "2.3.4.5.6.7.8.9.0.q.w.e.r.t.y.u.", "i.p.a.s.d.f.g.h.j.k.l.z.x.c.v.b.", "n.m.M.N.B.V.C.Z.A.S.D.F.G.H.J.K.", "L.P.I.U.Y.T.R.E.W.Q.!.~.^./.(.).", "_.`.'.].[.{.}.|. X.XXXoXOX+X@X#X", "$X%X&X*X=X-X;X:X>X,X. prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ datarootdir=@datarootdir@ datadir=@datadir@ lib_version=@LIB_VERSION@ lib_age=@LIB_AGE@ lib_current=@LIB_CURRENT@ lib_revision=@LIB_REVISION@ homepage=@PACKAGE_URL@ about=quickplot version: @VERSION@ ################################### # standard pkg-config options Name: quickplot Description: @PACKAGE_NAME@ Version: @VERSION@ Homepage: @PACKAGE_URL@ URL: @PACKAGE_URL@ Requires: gtk+-3.0 sndfile Libs: -Wl,-rpath -Wl,${libdir} -L${libdir} -lquickplot Cflags: -I${includedir} quickplot-0.10.6/quickplot.1.head.in0000644000175000017500000000233512245421416014140 00000000000000.TH QUICKPLOT 1 "Quickplot Version @VERSION@: @RELEASE_DATE@" .SH NAME quickplot \- a fast interactive 2D plotter .SH SYNOPSIS .B "quickplot [OPTIONS]" .br .SH DESCRIPTION .I Quickplot is an interactive 2D plotter. It's primary focus is to interactively display 2D plots. It can generate PNG image files. .I Quickplot has a graphical user interface, lots of command line options, and a command line shell interface as well. .I Quickplot can load ASCII text files and many sound file formats using the libsndfile library. .I Quickplot can read standard input as a pipe or regular file. .PP The full documentation for .I Quickplot is maintained as a HTML document in a file named help.html. You can get the latest version at <@PACKAGE_URL@help.html>. The options part in this man page is generated from the same source as the options part of the HTML document. .PP The order of argument options matters. Options take effect in the order that they are given with later options overriding earlier ones. The options that cause actions like graph "something" must come after the option that says to read the file that has "something" in it. In general, the order of argument options gives the order in which things happen as Quickplot starts up. quickplot-0.10.6/source.c0000644000175000017500000006652312244565775012233 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "qp.h" #include "debug.h" #include "spew.h" #include "term_color.h" #include "list.h" #include "channel.h" #include "channel_double.h" #ifdef DMALLOC # include "dmalloc.h" #endif #define BUF_LEN (4096) static __thread ssize_t (*sys_read)(int fd, void *buf, size_t count) = NULL; static __thread off_t (*sys_lseek)(int fd, off_t offset, int whence) = NULL; static __thread struct qp_reader *qp_rd = NULL; struct qp_reader { int fd; FILE *file; /* We use this buffer to virtualize read() * We think that libsndfile will know that * the file good by reading just RD_LEN. */ uint8_t *buf; size_t len, /* bytes read from system read() */ rd; /* bytes read by reader */ int past; /* read past the buffer */ char *filename; }; /* Wrapping the system read() just so we can read * a pipe with the libsndfile API and if the * pipe was not sound data then we can read * what was in the front of the pipe from * the qp_rd buffer. It turns out that stdio * streams are in the same library as the read() * function and do not call my wrapper. * So we use our own Getline() that starts by * copying from the qp_rd buffer and than switches * to calling getline() after the buffer is all * copied. This function does more than we * need, because we wrongly thought that getline would * call it. We are lucky that libsndfile does not * use stdio streams to read. */ ssize_t read(int fd, void *buf, size_t count) { if(!sys_read) { char *error; dlerror(); sys_read = dlsym(RTLD_NEXT, "read"); if((error = dlerror()) != NULL) { EERROR("dlsym(RTLD_NEXT, \"read\") failed: %s\n", error); QP_EERROR("Failed to virtualize read(): %s\n", error); exit(1); } } if(qp_rd && qp_rd->fd == fd && !qp_rd->past) { ssize_t n; size_t rcount; //DEBUG("count=%zu rd=%zu len=%zu\n", count, qp_rd->rd, qp_rd->len); if(BUF_LEN == qp_rd->rd) { /* The read before this one was the last * read that was buffered. Now it is reading * past the buffer and we are no longer * buffering the read. We are screwed if * we need more buffering. */ qp_rd->past = 1; DEBUG("Finished virtualizing read()\n"); return sys_read(fd, buf, count); } if(qp_rd->len >= qp_rd->rd + count) { /* pure virtual read */ memcpy(buf, &qp_rd->buf[qp_rd->rd], count); qp_rd->rd += count; return (ssize_t) count; } if(BUF_LEN == qp_rd->len) { /* We cannot read any more and * we still have unread buffer data. * pure virtual read with less than * requested returned */ /* count is greater than what is buffered */ n = BUF_LEN - qp_rd->rd; memcpy(buf, &qp_rd->buf[qp_rd->rd], n); qp_rd->rd = BUF_LEN; return n; } /* At this point we will read more into * the buffer */ if(count > BUF_LEN - qp_rd->rd) /* Giving less than asked for. * We may fill the buffer full. */ rcount = BUF_LEN - qp_rd->len; else /* Try to give what was asked for. */ rcount = count + qp_rd->rd - qp_rd->len; errno = 0; n = sys_read(fd, &qp_rd->buf[qp_rd->rd], rcount); if(n < 0) { EWARN("read(fd=%d, buf=%p, count=%zu) failed\n", fd, &qp_rd->buf[qp_rd->rd], rcount); QP_EWARN("reading file \"%s\" failed", qp_rd->filename); qp_rd->past = 1; return n; } if(n == 0 && qp_rd->rd == qp_rd->len) { /* virtual and real end of file */ //DEBUG("read(fd=%d, buf=%p, count=%zu)=0 end of file\n", // fd, &qp_rd->buf[qp_rd->rd], rcount); return n; } /* assuming that the OS is not a piece of shit */ ASSERT(n <= rcount); qp_rd->len += n; n = qp_rd->len - qp_rd->rd; memcpy(buf, &qp_rd->buf[qp_rd->rd], n); qp_rd->rd += n; return n; } else return sys_read(fd, buf, count); } /* We virtualize lseek() to work around a bug in libsndfile 1.0.25: * it calls lseek() when reading a pipe with Ogg file format data. */ off_t lseek(int fd, off_t offset, int whence) { if(!sys_lseek) { char *error; dlerror(); sys_lseek = dlsym(RTLD_NEXT, "lseek"); if((error = dlerror()) != NULL) { EERROR("dlsym(RTLD_NEXT, \"lseek\") failed: %s\n", error); QP_EERROR("Failed to virtualize lseek(): %s\n", error); ASSERT(0); exit(1); } } if(qp_rd && qp_rd->fd == fd && !qp_rd->past && whence == SEEK_SET) { if(offset > BUF_LEN || offset > qp_rd->rd) { ERROR("Virtualized lseek(fd=%d, offset=%ld, SEEK_SET) failed\n", fd, offset); QP_ERROR("Failed to virtualize lseek(fd=%d, offset=%ld, SEEK_SET)" " values where not expected.\n", fd, offset); ASSERT(0); exit(1); } DEBUG("Virtualizing lseek(fd=%d, offset=%ld, SEEK_SET)\n", fd, offset); qp_rd->rd = offset; return offset; /* success */ } return sys_lseek(fd, offset, whence); } /* This starts by copying data from the qp_rd * read() buffer and then when that is empty it * finishes reading the file to complete a line, * and after that it just calls getline() */ static inline ssize_t Getline(char **lineptr, size_t *n, FILE *file) { ssize_t i; int c; if(!qp_rd || qp_rd->rd == qp_rd->len) return getline(lineptr, n, file); i = qp_rd->rd; while(i < qp_rd->len && qp_rd->buf[i] != '\n') ++i; if(qp_rd->buf[i] == '\n') { i -= qp_rd->rd; ++i; /* copy the '\n' too */ if(*n < i + 1) *lineptr = qp_realloc(*lineptr, i + 1); memcpy(*lineptr, &qp_rd->buf[qp_rd->rd], i); qp_rd->rd += i; (*lineptr)[i] = '\0'; *n = i + 1; return i; } /* i == qp_rd->len && qp_rd->buf[i] != '\n' */ i -= qp_rd->rd; /* copy i bytes from the qp_rd buffer */ if(*n < i + 1) { *n = i + 1 + 128; *lineptr = qp_realloc(*lineptr, *n); } memcpy(*lineptr, &qp_rd->buf[qp_rd->rd], i); qp_rd->rd = qp_rd->len; /* Now we need to read the file until '\n' or EOF */ c = getc(file); while(c != EOF) { (*lineptr)[i++] = c; /* we now have i chars in *lineptr */ if(*n == i + 1) *lineptr = qp_realloc(*lineptr , (*n += 128)); if(c == '\n') break; c = getc(file); } (*lineptr)[i] = '\0'; return i; } static int read_ascii(qp_source_t source, struct qp_reader *rd) { char *line = NULL; size_t line_buf_len = 0; ssize_t n; size_t line_count = 0; int (*parse_line)(struct qp_source *source, char *line); int data_flag = -1; /* TODO: check for other types */ source->value_type = QP_TYPE_DOUBLE; switch(source->value_type) { /* TODO: brake these cases up into * other data parsers. */ case QP_TYPE_DOUBLE: parse_line = qp_source_parse_doubles; break; /* TODO: add other cases */ default: ASSERT(0); break; } if(app->op_skip_lines) { size_t skip_lines; skip_lines = app->op_skip_lines; while(skip_lines--) { errno = 0; n = Getline(&line, &line_buf_len, rd->file); ++line_count; if(n == -1 || errno) { if(!errno) { /* end-of-file so it is zero length */ WARN("getline() read no data in file %s\n", source->name); QP_WARN("read no data in file %s\n", source->name); } else { EWARN("getline() read no data in file %s\n", source->name); QP_EWARN("read no data in file %s\n", source->name); } if(line) free(line); return 1; /* error */ } } } #define CHUNK 16 if(app->op_labels) { char *s, *sep; size_t sep_len, num_labels = 0, mem_len = CHUNK; source->labels = qp_malloc(sizeof(char *)*(mem_len+1)); errno = 0; n = Getline(&line, &line_buf_len, rd->file); ++line_count; if(n == -1 || errno) { if(!errno) { /* end-of-file so it is zero length */ WARN("getline() read no data in file %s\n", source->name); QP_WARN("read no data in file %s\n", source->name); } else { EWARN("getline() read no data in file %s\n", source->name); QP_EWARN("read no data in file %s\n", source->name); } if(line) free(line); return 1; /* error */ } s = line; sep = app->op_label_separator; sep_len = strlen(sep); do { char *end; size_t len; end = s; /* find the next seperator */ end = s; while(*end && *end != '\n' && *end != '\r' && strncmp(end, sep, sep_len)) ++end; /* *end == '\0' or end == "the seperator" */ len = end - s; /* get a label */ source->labels[num_labels] = qp_strndup(s, len); ++num_labels; if(!(*end) || *end == '\n' || *end == '\r') break; /* skip the seperator */ s = end + sep_len; if(!(*s)) break; if(num_labels == mem_len) { mem_len += CHUNK; source->labels = qp_realloc(source->labels, sizeof(char *)*(mem_len+1)); } } while(*s); source->labels[num_labels] = NULL; source->num_labels = num_labels; } #undef CHUNK do { /* we seperate the first read because it shows * the error case when the file has no data at all. */ errno = 0; n = Getline(&line, &line_buf_len, rd->file); ++line_count; if(n == -1 || errno) { if(!errno) { /* end-of-file so it is zero length */ WARN("getline() read no data in file %s\n", source->name); QP_WARN("read no data in file %s\n", source->name); } else { EWARN("getline() read no data in file %s\n", source->name); QP_EWARN("read no data in file %s\n", source->name); } if(line) free(line); return 1; /* error */ } data_flag = parse_line(source, line); } while(data_flag == 0); /* Now we have an least one line of values. * We would have returned if we did not. */ errno = 0; while((n = Getline(&line, &line_buf_len, rd->file)) > 0) { ++line_count; parse_line(source, line); errno = 0; } if(line) free(line); /* n == -1 and errno == 0 on end-of-file */ if((n == -1 && errno != 0) || errno) { #if QP_DEBUG if(errno) EWARN("getline() failed to read file %s\n", source->name); else WARN("getline() failed to read file %s\n", source->name); #endif QP_WARN("failed to read file %s\n", source->name); return 1; /* error */ } return 0; /* success */ } /* returns an allocated string */ static char *unique_name(const char *name) { size_t num = 1, len = 0; char *buf = NULL; ASSERT(name && name[0]); ASSERT(name[strlen(name)-1] != DIR_CHAR); if(name[0] == '-' && !name[1]) { name = "stdin"; /* Sometimes the user wants to know why the * program is just hanging. It is hanging * because it is waiting for input from the * terminal? */ QP_NOTICE("Reading stdin\n"); } { /* we use just the base name without the directory part */ char *s; s = (char *) &name[strlen(name)-1]; while(s != name && *s != DIR_CHAR) --s; if(*s == DIR_CHAR) ++s; buf = (char *) (name = qp_strdup(s)); } while(1) { struct qp_source *s; for(s=(struct qp_source*) qp_sllist_begin(app->sources); s; s=(struct qp_source*) qp_sllist_next(app->sources)) if(strcmp(s->name, buf) == 0) break; if(s) { ++num; if(buf == name) buf = (char*) qp_malloc(len= strlen(buf)+16); snprintf(buf, len, "%s(%zu)", name, num); } else { if(buf != name) free((char*)name); return buf; } } } static inline struct qp_source * make_source(const char *filename, int value_type) { qp_app_check(); ASSERT(filename && filename[0]); struct qp_source *source; source = (struct qp_source *) qp_malloc(sizeof(struct qp_source)); source->name = unique_name(filename); source->num_values = 0; source->value_type = (value_type)?value_type:QP_TYPE_DOUBLE; source->num_channels = 0; source->labels = NULL; source->num_labels = 0; /* NULL terminated array on channels */ source->channels = qp_malloc(sizeof(struct qp_channel *)); *(source->channels) = NULL; qp_sllist_append(app->sources, source); return source; } /* Returns 0 if the file is read as a libsndfile * Returns 1 is not. * Returns -1 and spews if we have a system read error */ static int read_sndfile(struct qp_source *source, struct qp_reader *rd) { double *x, rate; size_t count; SNDFILE *file; SF_INFO info; size_t skip_lines; skip_lines = app->op_skip_lines; file = sf_open_fd(rd->fd, SFM_READ, &info, 0); if(!file) { QP_INFO("file \"%s\" is not readable by libsndfile\n", rd->filename); return 1; /* not a libsndfile */ } else if(info.frames < skip_lines) { QP_INFO("file \"%s\" is readable by libsndfile with %"PRId64 " samples which is less the lines to skip from --skip-lines=%zu\n", rd->filename, info.frames, skip_lines); return -1; /* error */ } rate = info.samplerate; x = qp_malloc(sizeof(double)*(info.channels+1)); source->num_channels = info.channels+1; source->channels = qp_realloc(source->channels, sizeof(struct qp_channel *)*(info.channels+2)); source->channels[source->num_channels] = NULL; source->value_type = QP_TYPE_DOUBLE; /* use count as dummy index for now */ for(count=0; countnum_channels; ++count) source->channels[count] = qp_channel_create(QP_CHANNEL_FORM_SERIES, QP_TYPE_DOUBLE); count = 0; while(1) { int i; if(sf_readf_double(file, x, 1) < 1) break; if(skip_lines) { --skip_lines; continue; } /* TODO: use other channel types like load as shorts or ints */ qp_channel_series_double_append(source->channels[0], count/rate); for(i=0;ichannels[i+1], x[i]); ++count; } source->num_values = count; free(x); sf_close(file); if(count) { char label0[128]; snprintf(label0, 128, "time (1/%d sec)", info.samplerate); source->labels = qp_malloc(sizeof(char *)*2); source->labels[0] = qp_strdup(label0); source->labels[1] = NULL; source->num_labels = 1; DEBUG("read\nlibsndfile \"%s\" with %d sound channel(s), " "at rate %d Hz with %zu values, %g seconds of sound\n", rd->filename, info.channels, info.samplerate, count, count/rate); return 0; /* success */ } QP_WARN("No sound data found in file \"%s\"\n", rd->filename); return -1; /* fail no data in file, caller cleans up */ } /* returns non-zero if fd is a pipe */ static int is_pipe(struct qp_reader *rd) { struct stat st; if(fstat(rd->fd, &st) == -1) { QP_ERROR("fstat() failed to stat file \"%s\"\n", rd->filename); exit(1); } return (st.st_mode & S_IFIFO); } qp_source_t qp_source_create(const char *filename, int value_type) { struct qp_source *source; struct qp_reader rd; int r; source = make_source(filename, value_type); rd.fd = -1; rd.rd = 0; rd.len = 0; rd.past = 0; rd.file = NULL; rd.buf = NULL; rd.filename = (char *) filename; qp_rd = &rd; if(strcmp(filename,"-") == 0) { rd.file = stdin; rd.fd = STDIN_FILENO; } if(rd.fd == -1) rd.fd = open(filename, O_RDONLY); if(rd.fd == -1) { EWARN("open(\"%s\",O_RDONLY) failed\n", filename); QP_EWARN("%sFailed to open file%s %s%s%s\n", bred, trm, btur, filename, trm); goto fail; } if(!is_pipe(&rd)) { /* don't buffer read() and lseek() */ qp_rd = NULL; } else { /* this is a pipe */ DEBUG("Virturalizing a pipe%s%s\n", (filename[0] == '-' && filename[1] == '\0')? "":" with name ", (filename[0] == '-' && filename[1] == '\0')? "":filename); rd.buf = qp_malloc(BUF_LEN); } if((r = read_sndfile(source, &rd))) { if(r == -1) goto fail; if(rd.past && qp_rd) { VASSERT(0, "libsndfile read to much data " "to see that the file was not a sndfile\n"); QP_WARN("%sFailed to read file%s %s%s%s:" " read wrapper failed\n", bred, trm, btur, filename, trm); goto fail; } if(qp_rd) { /* Start reading the data from the qp_rd read() buffer */ rd.rd = 0; /* no need to add more to the qp_rd read() buffer */ rd.fd = -1; } /* The above lseek() should work fine. */ else if(lseek(rd.fd, 0, SEEK_SET)) { EWARN("lseek(fd=%d, 0, SEEK_SET) failed\n", rd.fd); QP_EWARN("%sFailed to read file%s %s%s%s: lseek() failed\n", bred, trm, btur, filename, trm); } if(!rd.file) { errno = 0; rd.file = fdopen(rd.fd, "r"); ASSERT(fileno(rd.file) == rd.fd); } if(!rd.file) { EWARN("fopen(\"%s\",\"r\") failed\n", filename); QP_EWARN("%sFailed to open file%s %s%s%s\n", bred, trm, btur, filename, trm); goto fail; } errno = 0; if(read_ascii(source, &rd)) goto fail; } if(rd.buf) { free(rd.buf); rd.buf = NULL; } { /* remove any channels that have very bad data */ struct qp_channel **c; size_t i = 0, chan_num = 0; ASSERT(source->channels); c = source->channels; while(c[i]) { ASSERT(c[i]->form == QP_CHANNEL_FORM_SERIES); if(!is_good_double(c[i]->series.min) || !is_good_double(c[i]->series.max)) { struct qp_channel **n; qp_channel_destroy(c[i]); /* move of all pointers from c[i+1] back one */ for(n=&c[i]; *n;++n) *n = *(n+1); /* re-malloc copying and removing one */ source->channels = qp_realloc(source->channels, sizeof(struct qp_channel *)* ((source->num_channels)--)); /* reset c to the next one which is now at the * same index */ c = source->channels; QP_NOTICE("removed bad channel number %zu\n", chan_num); } else ++i; ++chan_num; } ASSERT(source->num_channels == i); } if(source->num_channels == 0) goto fail; if(source->num_channels > 1) { /****** Check that there is at least one point in all the channels */ ssize_t i, num; double *x; num = source->num_values; x = qp_malloc(sizeof(double)*source->num_channels); for(i=0;inum_channels;++i) x[i] = qp_channel_series_double_begin(source->channels[i]); while(num) { int found = 0; for(i=0;inum_channels;++i) if(is_good_double(x[i])) ++found; if(found >= 2) /* that means there is at least one x/y point * in all the channels. */ break; --num; if(!num) break; for(i=0;inum_channels;++i) x[i] = qp_channel_series_double_next(source->channels[i]); } if(!num) { QP_WARN("Failed to find a good point in data from file \"%s\"\n", filename); goto fail; } } if(source->num_channels == 0) goto fail; if(app->op_linear_channel || source->num_channels == 1) { /* Prepend a linear channel */ /* TODO: Make this use less memory */ struct qp_channel *c, **new_channels; double start = 0, step = 1; size_t len, i; if(app->op_linear_channel) { c = app->op_linear_channel; ASSERT(c->data); start = ((double*)c->data)[0]; step = ((double*)c->data)[1]; } else { c = qp_channel_linear_create(start, step); } len = source->num_values; for(i=0;ichannels */ /* reuse dummy len */ len = source->num_channels + 1; new_channels = qp_malloc(sizeof(c)*len+1); new_channels[0] = c; for(i=1;ichannels[i-1]; new_channels[i] = NULL; free(source->channels); source->channels = new_channels; ++(source->num_channels); /* Another source may have more values so * we must make a new one in case it is used again. */ if(app->op_linear_channel) app->op_linear_channel = qp_channel_linear_create(start, step); } add_source_buffer_remove_menus(source); { char skip[64]; skip[0] = '\0'; if(app->op_skip_lines) snprintf(skip, 64, "(after skipping %zu) ", app->op_skip_lines); INFO("created source with %zu sets of values %s" "in %zu channels from file %s\n", source->num_values, skip, source->num_channels, filename); QP_INFO("created source with %zu sets of " "values %sin %zu channels from file \"%s\"\n", source->num_values, skip, source->num_channels, filename); #if QP_DEBUG if(source->labels) { char **labels; APPEND("Read labels:"); for(labels = source->labels; *labels; ++labels) APPEND(" \"%s\"", *labels); APPEND("\n"); } #endif } qp_rd = NULL; if(strcmp(filename,"-") == 0) /* We do not close stdin */ return source; if(rd.file) fclose(rd.file); else if(rd.fd != -1) close(rd.fd); qp_app_graph_detail_source_remake(); qp_app_set_window_titles(); return source; fail: QP_WARN("No data loaded from file \"%s\"\n", filename); if(rd.buf) free(rd.buf); if(strcmp(filename,"-") != 0) { if(rd.file) fclose(rd.file); else if(rd.fd != -1) close(rd.fd); } if(source) qp_source_destroy(source); qp_rd = NULL; return NULL; } qp_source_t qp_source_create_from_func( const char *name, int val_type, void (* func)(const void *)) { struct qp_source *source; source = make_source(name, val_type); /* TODO: add code here */ add_source_buffer_remove_menus(source); qp_app_graph_detail_source_remake(); qp_app_set_window_titles(); return source; } static inline void remove_source_menu_item(struct qp_win *qp, struct qp_source *source) { GList *l, *l_alloc; l_alloc = (l = gtk_container_get_children(GTK_CONTAINER(qp->file_menu))); for(l=g_list_first(l); l; l=g_list_next(l)) { /* The menu_item has a pointer to the source * in g_object_get_data(). */ if(g_object_get_data(G_OBJECT(GTK_WIDGET(l->data)), "quickplot-source") == (void*) source) { /* this will remove from file menu */ gtk_widget_destroy(GTK_WIDGET(l->data)); break; } } if(l_alloc) /* no memory leak here */ g_list_free(l_alloc); } /* returns 0 if there were no plots removed */ static inline int remove_plots_from_graph(struct qp_graph *gr, struct qp_source *source) { struct qp_plot *p; int ret = 0; p = qp_sllist_begin(gr->plots); while(p) { struct qp_channel **c; struct qp_plot *rp = NULL; for(c=source->channels; *c; ++c) if(qp_channel_equals(p->x, *c) || qp_channel_equals(p->y, *c)) { rp = p; break; } p = qp_sllist_next(gr->plots); if(rp) { ASSERT(rp != p); /* qp_sllist_remove() works so long as the * current plot, p, is not rp, and that * should be so since rp is the one before p. */ qp_sllist_remove(gr->plots, rp, 0); qp_plot_destroy(rp, gr); ret = 1; } } return ret; } /* fix stuff when plots are removed from a graph * plots are removed because a source is removed. */ static inline void fix_or_remove_changed_graph(struct qp_win *qp, struct qp_graph *gr) { gint pnum; ASSERT(qp); ASSERT(qp->window); if(qp_sllist_length(gr->plots) == 0) { qp_graph_destroy(gr); /* remove */ if(qp_sllist_length(qp->graphs) == 0) { struct qp_sllist_entry *current; /* we save and restore the list iterator * because qp_graph_create() uses the app qp list. */ /* TODO: fix this Kludgey List Hack */ current = app->qps->current; qp_graph_create(qp, NULL); app->qps->current = current; } return; } /* TODO: add rescale fixes due to max and min changes */ /* fix it by queuing redraw if it's showing */ pnum = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); gr->pixbuf_needs_draw = 1; if(gtk_notebook_get_nth_page(GTK_NOTEBOOK(qp->notebook), pnum) == gr->drawing_area) gtk_widget_queue_draw(qp->notebook); } void qp_source_destroy(qp_source_t source) { ASSERT(source); ASSERT(source->name); ASSERT(source->channels); if(!source) return; { /* remove this source from buffers list from file menu * in all main windows (qp) */ struct qp_win *qp; for(qp=qp_sllist_begin(app->qps); qp; qp=qp_sllist_next(app->qps)) { if(qp->window) remove_source_menu_item(qp, source); { /* remove all plots that use the channels in this source. */ struct qp_graph *gr; gr = qp_sllist_begin(qp->graphs); while(gr) { struct qp_graph *prev_gr; prev_gr = gr; gr = qp_sllist_next(qp->graphs); /* if we remove prev_gr from the qp_sllist in the * middle of this iteration it is okay because * we are not removing at the current list entry. * That is why we check the previous entry and * not the current. */ if(remove_plots_from_graph(prev_gr, source)) fix_or_remove_changed_graph(qp, prev_gr); } } } } { struct qp_channel **c; c = source->channels; for(c=source->channels; *c; ++c) qp_channel_destroy(*c); free(source->channels); } qp_sllist_remove(app->sources, source, 0); if(source->labels) { char **s; for(s = source->labels; *s; ++s) free(*s); free(source->labels); } free(source->name); free(source); qp_app_graph_detail_source_remake(); qp_app_set_window_titles(); } #ifdef QP_DEBUG void qp_source_debug_print(struct qp_source *source) { struct qp_channel **c; size_t i = 0; ASSERT(source); DEBUG("\nQP source with %zu sets of values in " "%zu channels from file %s\n", source->num_values, source->num_channels, source->name); if(APPEND_ON()) { for(c=source->channels; *c; ++c) { APPEND("Channel %zu =", i++); qp_channel_debug_append(*c); APPEND("\n"); } } } #endif quickplot-0.10.6/config.sub0000755000175000017500000010535412245423266012533 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-08-10' # 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 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 . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # 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 1992-2013 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-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | 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/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) 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*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -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 \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | 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 \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | 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 \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-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-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | 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-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | 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-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | 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-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | 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 ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 | 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*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 ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-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-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; 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 ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; 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 | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) 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 | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) 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 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; tile*) basic_machine=$basic_machine-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 ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; 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* | -plan9* \ | -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* \ | -bitrig* | -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* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -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 ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) 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 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) 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: quickplot-0.10.6/imgGrabCursor.xpm0000644000175000017500000000171512245423271014034 00000000000000/* XPM */ static const char *imgGrabCursor[] = { /* columns rows colors chars-per-pixel */ "25 25 9 1 ", " c black", ". c gray19", "X c #585858", "o c #808080", "O c #A0A0A0", "+ c #C3C3C3", "@ c gray96", "# c gray100", "$ c None", /* pixels */ "$$$$$$$$$$$$+ +$$$$$$$$$", "$$$$$$$+ +$ ## $$$$$$$$$", "$$$$$$$ ## $ ## $+ +$$$$$", "$$$$$$$ ## $ ## $ # $$$$$", "$$$$$$$ ## $ ## $ # $+.+$", "$$$$$$$ ## $ ## $ # $ @ $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ## $ # $ # $", "$$$$$$$ ## $ ##.$ #.$ # $", "$$$$$$$ ## $O##.$ #.$o# $", "oX o$$$X###X###@X@#@X@# $", " ## $$ ###########@@@# $", " ### $ ###############.$", "o#### $X###############X$", "o ####X ##############O+$", "$o ###################.$$", "$$ ###################.$$", "$$$ o#################.$$", "$$$$ ################O+$$", "$$$$ ################.$$$", "$$$$o ###############X$$$" }; quickplot-0.10.6/compile0000755000175000017500000001624512245423266012126 00000000000000#! /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: quickplot-0.10.6/quickplot_shell.1.in0000644000175000017500000000573512244565775014456 00000000000000.\" Licensed under version 3 of the GNU General Public License. .\" Written by Lance Arsenault .TH QUICKPLOT_SHELL 1 "Quickplot Version @VERSION@: @RELEASE_DATE@" .SH NAME quickplot_shell \- a remote command line shell for quickplot .SH SYNOPSIS .B "Usage: quickplot_shell [PID]|[-h|--help]|[QUICKPLOT_OPTIONS]" .br .SH DESCRIPTION \fBQuickplot\fR is an interactive 2D plotter. It's primary focus is to interactively display 2D plots. \fBquickplot_shell\fR connects to a running Quickplot program. \fBquickplot_shell\fR provides a command line interface for most of the graphical user interfaces that are in the Quickplot program. \fBquickplot_shell\fR reads and writes to standard input and standard output respectively. When standard input is a tty device \fBquickplot_shell\fR enables readline tab completion and history. If you would like to save your Quickplot shell history between sessions just create a .quickplot_history in your home directory with a command like `touch ~/.quickplot_history'. .PP If the argument option \fBPID\fR is not given, \fBquickplot_shell\fR will launch Quickplot as a new process and connect to that new process. In this case Quickplot will be started with \fBQUICKPLOT_OPTIONS\fR if any are given. .PP If \fBPID\fR is given, \fBquickplot_shell\fR will connect to a running Quickplot program with process ID \fBPID\fR. .PP \fBquickplot_shell\fR sets up two named pipes, signals the running Quickplot program and writes commands and reads responses to and from the pipe. The named pipes will be unlinked as soon as they are connected, and hence will be removed automatically when the two programs are no longer running. .PP \fBquickplot_shell\fR, the remote Quickplot shell, acts just like running \fBquickplot\fR \fB--shell\fR, a local Quickplot shell, but \fBquickplot_shell\fR runs as a separate process and talks to the Quickplot program using pipes, where as \fBquickplot\fR \fB--shell\fR runs one process with both the GUI and the shell with no pipes. You may connect any number of remote Quickplot shells to a Quickplot program. .br .TP \fB\-h\fR, \fB\-\-help\fR display help and exit .br .SH "SEE ALSO" .BR quickplot (1) .br .SH COPYRIGHT Copyright (C) 1998-2011 Lance Arsenault .PP Quickplot 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. .PP Quickplot 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. .PP You should have received a copy of the GNU General Public License along with Quickplot. If not, see . .SH AUTHOR .PP Lance Arsenault .br Send bug reports or comments to the above address. .br For more information, see the Quickplot homepage at .br <@PACKAGE_URL@>. quickplot-0.10.6/imgGrabCursor.png0000644000175000017500000000054212244565775014030 00000000000000‰PNG  IHDRÄé…csBIT|dˆ pHYsÄÄ•+IDATH‰í•1–… ES²Ë,'{pq'عÖÛLñÁAÅù¨ßfÎÜŠŽ< '‰1`i|ƒZ&ÍݦöÁ].oæ¨2× òZè\^˜+â_§êj$ÆhDÔ|fMvå\«ê?R xï—ñc"%ÿ"L„ˆ~/‹„Þ®‘]˜٘ˆ¬^(3[É6VUcfSÕjŒôk½(çQε0Ïó2öÞ¯zÙjwI}×B®@D¯¶²õ¯Ü937WQ£ë:éà ›!f¶iš. Œãˆ¾ïéÀoYsdÕ–ÇDÊwâœs†á²Eg¸]Eáí_ñ£V•¶""»Ûv–|u3ß§ïCÚ•]ÌrIEND®B`‚quickplot-0.10.6/process_gtk_options.c0000644000175000017500000000631012244565775015015 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "spew.h" #include "list.h" #include "qp.h" #include "get_opt.h" #ifdef DMALLOC # include "dmalloc.h" #endif struct qp_gtk_options { int argc; char **argv; }; static inline void strip_opt(struct qp_gtk_options *gop, int from_i, int to_i, int *argc, char ***argv, char *op) { int num, i; num = to_i - from_i + 1; gop->argc += num; gop->argv = qp_realloc(gop->argv, sizeof(char *)*(gop->argc+1)); for(i=0;iargv[gop->argc-num + i] = (*argv)[from_i + i]; gop->argv[gop->argc] = NULL; for(i=from_i;i<=((*argc)-num);++i) (*argv)[i] = (*argv)[i + num]; *argc -= num; } struct qp_gtk_options *strip_gtk_options(int *argc, char ***argv) { struct qp_gtk_options *opt = NULL; int i = 1; char *with_arg[] = { "--class", "--display", "--gdk-debug", "--gdk-no-debug", "--gtk-debug", "--gtk-module", "--gtk-no-debug", "--gxid-host", "--gxid-port", "--name", "--screen", 0 }; char *no_arg[] = { "--g-fatal-warnings", "--sync", 0 }; opt = qp_malloc(sizeof(*opt)); opt->argc = 1; opt->argv = qp_malloc(sizeof(char *)*2); opt->argv[0] = (*argv)[0]; opt->argv[1] = NULL; while(i < *argc) { char **op; int j; j = i; op = with_arg; while(*op) { if(get_opt(0, *op, *argc, *argv, &i)) { strip_opt(opt, j, i-1, argc, argv, *op); i = j; break; } ++op; } if(*op) continue; op = no_arg; while(*op) { if(!strcmp(*op, (*argv)[i])) { strip_opt(opt, j, i, argc, argv, *op); /* no need to increment i given we removed * that index from the argv array */ break; } ++op; } if(!(*op)) ++i; } #if 1 #ifdef QP_DEBUG { char **a; DEBUG("%d ARGS left now are:\n", *argc); for(a=(*argv);*a;++a) APPEND("%s ", *a); APPEND("%s\n", *a); } #endif #endif return opt; } int qp_gtk_init_check(struct qp_gtk_options *opt) { int ret; ASSERT(opt); #if 1 #ifdef QP_DEBUG { char **argv; DEBUG("%d GTK ARGS are:\n", opt->argc); for(argv = opt->argv;*argv;++argv) APPEND("%s ", *argv); APPEND("%s\n", *argv); } #endif #endif ret = qp_app_init(&opt->argc, &opt->argv); if(opt->argv); free(opt->argv); free(opt); return ret; /* success */ } quickplot-0.10.6/utils.h0000644000175000017500000001437512244565775012076 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ static inline long get_plot_num(const char *s, char **endptr) { while(*s && *s < '0' && *s > '9') ++s; if(!(*s)) return INT_MAX; /* got nothing more */ long val; errno = 0; val = strtol(s, endptr, 10); if(*endptr == s) return INT_MAX; if((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) || (errno != 0 && val == 0)) return INT_MAX; /* got error */ return val; } /* Returns 1 on success 0 on failure * * x and y must be freed * * parsing --plot '0 1 0 2 0 3' * or --plot-file '0 1 0 2 0 3' * * str="0 1 0 2 0 3" */ static inline int get_plot_option(const char *str, ssize_t **x, ssize_t **y, size_t *num_plots, const char *opt, ssize_t min_chan, ssize_t max_chan) { char *endptr; char *s; long nx, ny; int i = 1; ASSERT(x); ASSERT(y); ASSERT(num_plots); if(!qp_sllist_last(app->sources)) { if(!opt) return 0; QP_ERROR("No files loaded yet, bad option %s='%s'\n", opt, str); exit(1); } s = (char *) str; nx = get_plot_num(s, &endptr); if(nx < min_chan || nx > max_chan) goto fail; s = endptr; ny = get_plot_num(s, &endptr); if(ny < min_chan || ny > max_chan) goto fail; s = endptr; if(x && y) { *x = qp_malloc(sizeof(ssize_t)*(strlen(s)+1)/2); *y = qp_malloc(sizeof(ssize_t)*(strlen(s)+1)/2); (*x)[0] = nx; (*y)[0] = ny; } while(*s) { nx = get_plot_num(s, &endptr); if(nx < min_chan || nx > max_chan) goto fail; (*x)[i] = nx; s = endptr; ny = get_plot_num(s, &endptr); if(ny < min_chan || ny > max_chan) goto fail; s = endptr; (*y)[i++] = ny; } *num_plots = i; #ifdef QP_DEBUG if(opt) { DEBUG("got %s='", opt); if(*num_plots > 0) APPEND("%zu %zu", (*x)[0], (*y)[0]); for(i=1; i<(*num_plots); ++i) APPEND(" %zu %zu", (*x)[i], (*y)[i]); APPEND("\n"); } #endif return 1; fail: if(opt) { ERROR("got bad option %s='%s'\n", opt, str); QP_ERROR("got bad option %s='%s'\n", opt, str); exit(1); } if(x && *x) free(*x); if(y && *y) free(*y); return 0; } /* returns 0 on success */ static inline int parse_linear_channel(int pass, const char *arg, int argc, char **argv, int *i, double *start, double *step) { char *s; int err = 0, j = 0; double val[2]; if(start) *start = 0; if(step) *step = 1; if(arg == NULL || arg[0] == '\0') goto ret; s = (char *) arg; while(1) { char *endptr = NULL; struct lconv *lc; errno = 0; val[j] = strtod(s, &endptr); if(errno || s == endptr) { if(argv[*i - 1] != arg) { /* The argument is part of the option like: * '--linear-channel=0 1' or -l'0 3'. * arg is not part of another option so * this is an error */ err = 1; break; } else { /* The optional arg is not ours */ *i -= 1; break; } } if(j == 1) { if(start) *start = val[0]; if(step) *step = val[1]; break; } lc = localeconv(); s = endptr; /* go to the next number */ while(*s && (*s < '0' || *s > '9') && *s != '+' && *s != '-' && *s != 'e' && *s != 'E' && strcmp(s, lc->decimal_point)) ++s; if(!(*s)) { if(start) *start = val[0]; break; } ++j; } if(err && pass == 0) return 1; /* we should not get an error on the 2nd pass */ ASSERT(!err); if(err) return 1; ret: #ifdef QP_DEBUG if(start && step) DEBUG("got option --linear-channel with start=%.22g step=%.22g\n", *start, *step); #endif return 0; } /* returns 0 on success and sets maximize * if maximize=0 is is a regular window size * if maximize=1 is is maximized ?? * if maximize=2 it is fullscreen * * returns 1 on error and sets err */ static inline int GetGeometry(char *arg, int *X, int *Y, int *W, int *H, int *maximize) { int n[4], count = 0, x_count = -1; int w, h; char *endptr, *s; endptr = s = arg; while(1) { long val; val = strtol(s, &endptr, 10); if(s == endptr || !endptr || val == LONG_MAX || val == LONG_MIN) return 1; if(*s == '-' && *(s+1) == '0') /* mark a "-0" position as in --geometry=600x700-0+0 */ n[count++] = INT_MIN; else n[count++] = val; if(!(*endptr)) break; s = endptr; while(*s && (*s < '0' || *s > '9') && *s != '-' && *s != '+') { if(*s == 'x' || *s == 'X') /* this is where the 'x' is */ x_count = count; ++s; } if(!(*s)) break; } if( !(count == 2 && (x_count == 1 || x_count == -1)) && !(count == 4 && (x_count == 1 || x_count == 3)) ) return 1; if(x_count == 1) { w = n[0]; h = n[1]; } else if(x_count == 3) { w = n[2]; h = n[3]; } if(w < 1 || h < 1) return 1; if(x_count == -1 || x_count == 3) { *X = n[0]; *Y = n[1]; } else if(count == 4) { *X = n[2]; *Y = n[3]; } if(app->root_window_width < 1) qp_get_root_window_size(); if(w > app->root_window_width) w = app->root_window_width; if(h > app->root_window_height) h = app->root_window_height; if(w == app->root_window_width && h == app->root_window_height) /* We do not want to set app->op_geometry if it is * full screen so that they can still toggle out of * full screen if they choose to. */ *maximize = 2; /* Fullscreen */ else { *maximize = 0; *W = w; *H = h; } return 0; } quickplot-0.10.6/quickplot.h0000644000175000017500000000576012245240513012724 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /** installed library header file for libquickplot */ #ifndef _QUICKPLOT_H_ #define _QUICKPLOT_H_ #include #include #define QP_CHANNEL_FORM_SERIES 0 #define QP_CHANNEL_FORM_FUNC 1 /* quickplots stored buffer data types. * We save memory space by using the * smallest type needed to hold the * values that are plotted. We may * never use some of these. */ #define QP_TYPE_UNKNOWN 0 #define QP_TYPE_SHORT 1 #define QP_TYPE_INT 2 #define QP_TYPE_LONG 3 #define QP_TYPE_LONG_LONG 4 #define QP_TYPE_UNSIGNED_SHORT 5 #define QP_TYPE_UNSIGNED_INT 6 #define QP_TYPE_UNSIGNED_LONG 7 #define QP_TYPE_UNSIGNED_LONG_LONG 8 #define QP_TYPE_FLOAT 9 #define QP_TYPE_DOUBLE 10 #define QP_TYPE_LONG_DOUBLE 11 /* A source can have multiple types, * different types in different channels. */ #define QP_TYPE_MULTIPLE 12 /* Added to make coding easier */ #define QP_TYPE_MAX 12 /** \brief the object that holds all quickplot state data */ typedef struct qp_win *qp_win_t; /** \brief holds x,y channels to plot */ typedef struct qp_plot *qp_plot_t; /** \brief holds all loaded data or functions from a file or * other source */ typedef struct qp_source *qp_source_t; /** \brief holds a series of values or function that can be plotted */ typedef struct qp_channel *qp_channel_t; /** \brief hold a list of plots to put on a graph */ typedef struct qp_graph *qp_graph_t; #ifdef __cplusplus extern "C" { #endif extern qp_win_t qp_win_create(void); extern void qp_win_destroy(qp_win_t qp); /** /return the number of channels created from this */ extern size_t qp_app_read(const char *filename); /** * x and y are channel numbers starting at 0 * \return 0 on success and 1 on failure */ extern int qp_win_graph(qp_win_t qp, const ssize_t *x, const ssize_t *y, size_t num, const char *name); extern void qp_win_graph_default(qp_win_t qp); extern int qp_win_graph_default_source(qp_win_t qp, qp_source_t s, const char *name); /** \return 0 on success, -1 if it was initialized already * and 1 on failure. */ extern int qp_app_init(int *argc, char ***argv); #ifdef __cplusplus } #endif #endif /* #ifndef _QUICKPLOT_H_ */ quickplot-0.10.6/help_head.htm.in0000644000175000017500000003310212245207215013561 00000000000000 Quickplot Help

Quickplot Help

Terminology

We need to distinguish between the two terms plot and graph.  In Quickplot a graph displays one or more plots.  Quickplot displays each graph in a page tab, like pages in a web browser.

Quickplot can load data from: GUIs (graphical user interfaces), files listed on the command line, and from standard input (pipes) too.  Data is loaded into channels.  A channel represents a series of numbers, like for example the values for one variable, or a column of numbers in a spreadsheet.  Other names for channel may be dimension, coordinate, degree-of-freedom, field, or component.  We call them all channels in Quickplot.  Any two channels may be plotted against each other whether they are from the same file or not.  A plot is a graphically representation of two channels, call them the X and Y channels.  Any number of plots may be made on a graph.  The graph is like the paper we put the plots on.

Zooming

  • Grab Zooming    Put the pointer (mouse) in the graph window.  Press the left mouse button and hold it while dragging the graph by moving the pointer.  Release the left mouse button and the graph will stop moving with the pointer.

  • Zooming In   Put the pointer (mouse) on a corner of a graph region you want to zoom to.  Press the right mouse button and hold and drag the zoom box.  Release the right mouse button then it is at another corner of the zoom region.  Now Quickplot will zoom into that zoom region.  You can zoom in as many times as you like.

    While holding the left mouse button you can press the shift key or the control key while pulling the zoom box to "shift" or "resize about the center" respectively.

    You can zoom to a view of smaller plots by just pressing and releasing the right mouse button, without moving the pointer.  Do it again and the plots get even smaller.  You can do this any number of times.

  • Zooming Out    Put the pointer (mouse) in the graph window.  Press the right mouse button and hold and drag the zoom box.  Release the right mouse button then it (the zoom box) is past one edge of the graph window.  Now Quickplot will zoom out to the previous zoom level.  Pressing the z key will do the same thing.

    Or to zoom out to a full view (top zoom level) of the graph: put the pointer (mouse) in the graph window.  Press the right mouse button and hold and drag the zoom box.  Release the right mouse button then the zoom box is past two edges (a corner) of the graph window.  Now Quickplot will zoom out to the top zoom level (no zoom).  Pressing Z (shift-z) will do the same thing.

Graph Value Picking

First open the Graph Details window by typing 'g', by using the View menu, or by clicking the Graph Details button on the button bar.  Then select the "Plots List and Values" tab.  The middle mouse button is used for picking and displaying X and Y values from the graph.  Just try it and see.

There are three modes of number display value picking, which may be selected on the top of the "Plots List and Values" page (tab):

  • Pointer Values   shows values where the mouse pointer is in the scale of the respective plot
  • Interpolate Plot Values   shows values where the X position of the mouse pointer is with the Y value displayed being a linearly interpolated value.  This requires that all plots be functions of one particular channel.
  • Pick Plot Point Values   shows X and Y plot point positions that are closest to mouse pointer X position.  This also requires that all plots be functions of one particular channel.

For the "Pointer Values" and "Interpolate Plot Values" modes the number of significant digits displayed will vary with the value change per pixel.  So you will not see digits that are not representative of the mouse position.  Zooming will change the number of significant digits displayed.

Loadable File Formats

Quickplot can read ASCII text and sound files:

ASCII text

Quickplot can load ASCII text (plan text) files.  The number of values on each line need not be the same, but any missing values will be filled with NAN.  Any number of non-number characters other than a new line character may used to separate numbers on a given line.  NAN, INF, -NAN, -INF, +NAN, and +INF (lower case too) are numbers that can be read by quickplot.  Any line starting with zero or more white space characters and then a any one of    ! " # $ % & ' ( ) / < = > ? @ C c    is a comment line that is ignored.  Any lines with no numbers that can be read will be ignored.  If you wish to have a break in a plot line put a NAN (stands for not-a-number) in the channel (column) at the point (or non-point) where you wish to put the break at.

Example:

1e2 0 -1
2.1e2 1 0
3e2 NAN 1
4.01e2 1 2
5e2 0.87 3
6.1e2 -0.65 3.2
7e2 1 3
5.4e2 0.7 2
example plot
Graph with two plots: column 1 versus column 0 and column 2 versus column 0.  Note that when Quickplot plots a point with a x or y value of NAN (or INF) the point is skipped and there is not a connecting line to the adjacent points.

In Austria it may look like:

1e2 0 -1
2,1e2 1 0
3e2 NAN 1
4,01e2 1 2
5e2 0,87 3
6,1e2 -0,65 3,2
7e2 1 3
5,4e2 0,7 2

The above example has three channels and eight samples (set of values) for each channel.  A file may have any counting number of channels, that's 1,2,3,4 or more channels.

With the use of NAN, as a kind of plot line terminator, you can use Quickplot to draw figures composed of straight line segments.  Here's a silly example.  Copy and paste the following command to draw this house:

picture of house
echo -e "-10 8 -8 1 -1.5 -6\n-10 -6 -4 1 1.5 -6\n\
10 -6 -4 5 1.5 3\n10 8 -8 5 -1.5 3\nnan nan -8 1 -1.5 -6\n\
-13 8 nan nan\n13 8 4 1\n0 20 8 1\n-13 8 8 5\nnan nan 4 5\n\
nan nan 4 1" | quickplot -P --line-width=2 --no-grid \
--no-border --cairo-draw -C 'rgba(0,0,0,0)' --no-gui \
--no-points --geometry 79x87 -F -g "0 1 2 3 4 5"

Using NAN as a line terminator can be very handy when drawing phase plots when you need to avoid connecting points that should not be connected and you don't want to make more channels (degrees of freedom).  For phase space plots the NAN can be thought of as a place holder where you removed part of the series because it is not accessible in the current model sampling.

If a file is loaded with a single channel an additional channel, with the same number of values as the channel in the file, will be added before the channel from the file.

Quickplot can read CSV files.

libsndfile sound file

Using the package libsndfile Quickplot can read many sound file formats.  An incomplete list of readable sound file formats includes: Ogg/Vorbis, Microsoft WAV, SGI/Apple AIFF/AIFC, and Sun/DEC/NeXT AU/SND.  See the libsndfile home-page for a full list of supported sound file formats.

When loading a sound file the first channel (sequence) loaded will be the time sequence, then each sound channel will follow in separate channels.  Quickplot may be a little slow with sound files larger than thirty seconds long.  Thirty seconds of sound sampled at 44 kHz with one channel would load 1.32 million data points.

Command Line Options

Usage: quickplot [OPTIONS]

Graphs will be generated for each file loaded, unless options are given that tell Quickplot to do otherwise.  The default number of plots in a graph will be up to @NUMBER_OF_PLOTS@ plots or just the number channels in the file minus one if that is less, unless options override that.  The default initial plots will be of all channels except the first channel in the order that the channel was loaded from a file plotted against the first channel in the file.  A time channel will be the first channel generated for all sound files loaded.

The order of argument options matters.  Options take effect in the order that they are given with later options overriding earlier ones.  The options that cause actions like graph "something" must come after the option that says to read the file that has "something" in it.  In general, the order of argument options gives the order in which things happen as Quickplot starts up.

Short options, like -n20, that require a sub-argument, may not be grouped with other short options in one argument.  For example the argument -on20, is not valid, but -oN is a valid argument with two options o (--no-points) and N (--no-pipe), and -n20 is a valid option (--number-of-plots=20) that sets the default number of plots to 20.

All of the command line options set things that can be changed with the Quickplot graphical user interface (GUI).  For example, if you start with a graph with no lines and just points showing, you can click a GUI to add the lines after the program starts. 

OPTIONS

quickplot-0.10.6/imgSaveImage.xpm0000644000175000017500000001122012245423271013614 00000000000000/* XPM */ static const char *imgSaveImage[] = { /* columns rows colors chars-per-pixel */ "16 16 256 2 ", " c gray24", ". c gray27", "X c #393939", "o c gray22", "O c #373737", "+ c #373636", "@ c #484746", "# c #3A3A3A", "$ c #373737", "% c gray22", "& c #353535", "* c #414141", "= c gray26", "- c #353535", "; c #373837", ": c gray21", "> c #101010", ", c #282828", "< c black", "1 c #010101", "2 c black", "3 c black", "4 c #2D2E2E", "5 c #070707", "6 c black", "7 c #010101", "8 c black", "9 c #1B1B1B", "0 c gray12", "q c black", "w c #010101", "e c #000100", "r c #2F2F2F", "t c #3C3C3C", "y c #222222", "u c #282626", "i c #1F2729", "p c #462017", "a c #BD2907", "s c #2E2220", "d c #212627", "f c #282726", "g c #232323", "h c #353535", "j c #383937", "k c #211B23", "l c #305226", "z c #54D82C", "x c #282828", "c c #373737", "v c #1E1D1D", "b c #211E1E", "n c #0F1B1E", "m c #9C2C13", "M c #FF3001", "N c #A43016", "B c #161D1E", "V c #1F1D1D", "C c #191919", "Z c #2F2F2F", "A c #333732", "S c #100015", "D c #3F7E2A", "F c #6FFF3A", "G c #101010", "H c #282828", "J c black", "K c #000001", "L c #080100", "P c #C62300", "I c #7F3827", "U c #D82A05", "Y c #3D0900", "T c #000001", "R c black", "E c #1C1D1B", "W c #1E1D1F", "Q c #000D00", "! c #51CC29", "~ c #66FC36", "^ c gray24", "/ c gray27", "( c #393736", ") c #2C383A", "_ c #6D3326", "` c #D52E08", "' c #31484C", "] c #A8351A", "[ c #A33017", "{ c #1D353A", "} c #393534", "| c #414241", " . c #3A2840", ".. c #55B734", "X. c #5FDD35", "o. c #4E9B36", "O. c #101010", "+. c #282828", "@. c black", "#. c #000002", "$. c #9C2004", "%. c #871600", "&. c #0F252E", "*. c #461207", "=. c #E62A00", "-. c #451005", ";. c black", ":. c #1A1C17", ">. c #52AA35", ",. c #5EF331", "<. c #12360C", "1. c #102907", "2. c #282626", "3. c #373636", "4. c gray9", "5. c #1F1714", "6. c #D62A03", "7. c #4E1A16", "8. c #2E4535", "9. c #121B19", "0. c #972416", "q. c #D12E05", "w. c #110B16", "e. c #2F5321", "r. c #67FF3A", "t. c #68F335", "y. c #292916", "u. c #14241E", "i. c #262E30", "p. c #413D3C", "a. c #092228", "s. c #772E1E", "d. c #CF2C05", "f. c #283729", "g. c #62E438", "h. c #68E943", "j. c #32502E", "k. c #D12704", "l. c #4F1E22", "z. c #2F8431", "x. c #7FE62F", "c. c #A48217", "v. c #96311A", "b. c #3A2D2A", "n. c #4E1B11", "m. c #202729", "M. c #630C00", "N. c #E31600", "B. c #8E7D17", "V. c #49E92D", "C. c #5ADC2E", "Z. c #5FED2E", "A. c #39B823", "S. c #971700", "D. c #A60300", "F. c #3C9B1F", "G. c #5C9A1F", "H. c #580000", "J. c #F42D00", "K. c #D22300", "L. c #C75117", "P. c #7B392E", "I. c #EB3407", "U. c #9A3325", "Y. c #5AC734", "T. c #73FF3B", "R. c #5BB73C", "E. c #3F5437", "W. c #5AEB38", "Q. c #552829", "!. c #C25815", "~. c #77FF36", "^. c #3D7138", "/. c #352A32", "(. c #B13719", "). c #DC310A", "_. c #BC6212", "`. c #F62507", "'. c #7C1501", "]. c #033214", "[. c #5EE632", "{. c #266C10", "}. c #416436", "|. c #0D0E0D", " X c #5BE52F", ".X c #275C1D", "XX c #3DB627", "oX c #55BB38", "OX c #1F1520", "+X c #040403", "@X c #000306", "#X c #8F1C03", "$X c #79D42B", "%X c #D05B0E", "&X c #2E0005", "*X c #27731A", "=X c #58CA30", "-X c #010007", ";X c #333133", ":X c #100C12", ">X c #53C42E", ",X c #72FF3B", " , < 1 2 3 4 5 6 7 8 9 0 q w e ", "r t y u i p a s d f g h j k l z ", "x c v b n m M N B V C Z A S D F ", "G H J K L P I U Y T R E W Q ! ~ ", "^ / ( ) _ ` ' ] [ { } | ...X.o.", "O.+.@.#.$.%.&.*.=.-.;.:.>.,.<.1.", "2.3.4.5.6.7.8.9.0.q.w.e.r.t.y.u.", "i.p.a.s.d.f.g.h.j.k.l.z.x.c.v.b.", "n.m.M.N.B.V.C.Z.A.S.D.F.G.H.J.K.", "L.P.I.U.Y.T.R.E.W.Q.!.~.^./.(.).", "_.`.'.].[.{.}.|. X.XXXoXOX+X@X#X", "$X%X&X*X=X-X;X:X>X,X. */ #include #include #include #include #ifndef _QP_DEBUG_H_ #error "You must include qp_debug.h before this file." #endif /* QP_CHANNEL_FORM_SERIES 0 QP_CHANNEL_FORM_FUNC 1 QP_TYPE_UNKNOWN 0 QP_TYPE_SHORT 1 QP_TYPE_INT 2 . . etc . . . QP_TYPE_MAX */ #define ARRAY_LENGTH (4*1024) /* a small positive double used to avoid dividing * by zero when scaling plot values. */ #define SMALL_DOUBLE (100.0*DBL_EPSILON) #define LARGE_DOUBLE (DBL_MAX/10.0) struct qp_channel_series { /* TYPE_SHORT or TYPE_INT ... etc type in the arrays */ /* each element in the qp_dllist is an array of values */ size_t array_current_index; /* index of the current value read in the current array */ size_t array_last_index; /* the index of the last value in the last array */ void *last_array; /* points to last array */ /* The copies of this channel will share these arrays. * So the larger memory usage is not replicated. */ struct qp_dllist *arrays; /* list of arrays. The value * in each list element is just * the array of value_types that * was made with malloc(). */ int is_increasing; int is_decreasing; int has_nan; /* has values like +/-NAN or +/-INF */ double min, max; /* for zoom/scale calculations */ /* We can make copies of qp_channel_series. * The qp_channel_series is just a writer/reader of the * arrays. Once you start making copies you can no * longer write. */ int *ref_count; }; struct qp_channel_func_double { double (*func)(double x); double xmax, xmin; double ymax, ymin; }; struct qp_channel { int form; int value_type; /* A pointer to put extra stuff at */ void *data; uint64_t id; /* unique id for this channel and all copies */ union { struct qp_channel_series series; struct qp_channel_func_double func_double; }; }; static inline int is_good_double(double x) { if(x > -LARGE_DOUBLE && x < LARGE_DOUBLE && x != NAN && x != -NAN) return 1; return 0; } /* return 1 if the value last read is valid and not past * a leading or trailing edge. */ static inline int qp_channel_series_is_reading(qp_channel_t channel) { ASSERT(channel->form == QP_CHANNEL_FORM_SERIES); return (qp_dllist_val(channel->series.arrays))?1:0; } extern qp_channel_t qp_channel_create(int channel_form, int value_type); extern qp_channel_t qp_channel_linear_create(double start, double step); /* if orig != NULL this returns a channel that points to the * same data as orig. After a copy is made you may not write * to the channel any more. */ extern qp_channel_t qp_channel_func_double_create(double (*func)(double), double xmin, double xmax, double ymin, double ymax); static inline qp_channel_t qp_channel_series_create(qp_channel_t orig, int value_type) { if(orig) { /* make a copy that is a channel reader */ struct qp_channel *c; ASSERT(orig->value_type > 0 && orig->value_type <= QP_TYPE_MAX); ASSERT(orig->form == QP_CHANNEL_FORM_SERIES); ASSERT(orig->series.arrays); c = (struct qp_channel *) qp_malloc(sizeof(*c)); c->form = QP_CHANNEL_FORM_SERIES; c->id = orig->id; c->value_type = orig->value_type; c->series.array_current_index = (size_t) -1; c->series.array_last_index = orig->series.array_last_index; c->series.last_array = orig->series.last_array; c->series.arrays = qp_dllist_create(orig->series.arrays); c->series.ref_count = orig->series.ref_count; c->series.is_increasing = orig->series.is_increasing; c->series.is_decreasing = orig->series.is_decreasing; c->series.min = orig->series.min; c->series.max = orig->series.max; c->series.has_nan = orig->series.has_nan; ++(*(c->series.ref_count)); return c; } else /* make a new one */ return qp_channel_create(QP_CHANNEL_FORM_SERIES, value_type); } extern void qp_channel_destroy(qp_channel_t channel); static inline size_t qp_channel_series_length(struct qp_channel *c) { ASSERT(c); ASSERT(c->form == QP_CHANNEL_FORM_SERIES); ASSERT(c->series.arrays); return (qp_dllist_length(c->series.arrays)-1)*ARRAY_LENGTH + c->series.array_last_index + 1; } static inline int qp_channel_equals(struct qp_channel *c1, struct qp_channel *c2) { ASSERT(c1); ASSERT(c2); if(!c1 || !c2) return 0; if(c1->id == c2->id) return 1; return 0; } #ifdef QP_DEBUG extern void qp_channel_debug_append(struct qp_channel *c); #endif quickplot-0.10.6/RELEASE_DATE0000644000175000017500000000003112245423272012327 0000000000000027 Nov 2013 17:07:06 UTC quickplot-0.10.6/background_ft.png0000644000175000017500000002276112244565775014101 00000000000000‰PNG  IHDRq'’²¹bKGDÿÿÿ ½§“ IDATxœíër·•Ç0=%EŠä)‘¢k㬭¢v×oµ›Ê+í[ä!òm+ْ˹hK%‘鄌dÉ´g¦±F 1 €ºq›™ÿ¯Êej¦§û4.çì7¿ýýïH ú„ ¶9åâÏ‚ig_=$"â£ý×ò³Fðÿ˜1úJP;%"j¨iÚvºßrú£é>×sÁÍ©=2ú®ìË)Hûf«KZú÷–øßG¬ý„1ÁGïZ/åõ Œ: þ«©˜Þ'1ºÏZÚ˜°öÿÒ¿ájCo*èûÒSBg°C†‘Kg°Câ‘Cg°Câ’Cg°Câ[gDÝãÕÞÞ³{꿞žöƒõ¤„Þ`‡ #—Î`‡Ä#‡Î`‡Ä%‡Î`‡Ä%¶Î8cœ z D{«eì¯é$__Jè 6Èpré vH>yüNÊ^±õHzRµµe´8¢ifl]ÚìôÄÖìô„êLöOÞŠÇœ‹kŒšéLÐ÷óó—²[\JbëlÇ»A[[>bëlìö›ßþþw¥…X%ÚÙW‰ˆøh¹Ñ—èlù€Î–è­nšfÆvv¾¾«~öÍ v“(¾Îv¶ŸßiÆç#™^Rþ]³S{Y@;[> ³å:+ƒi÷­o7§Îl ¢ÔqöððÉY­Á›½½g÷¦“Y \´µå:3S³í -ÐÙò-ÐÙr½-ЙK ÀrÓ43¶³ýüÎ2œ µê˜Îé{¸ûòVŠg©i&Õ“¨º²û65ên;]N¹—¨Î³qU[Lî®=µrišfÆPFËM.ýÙlßÏË ‚¸€µ'æùjÀŸ¦™±­Í·UtP†½½g÷¤Ÿœ¥~–ü{: }—œ¡tlöAmvƒ ÎÊ`­ÎR‹@®iÇ¢Œ–©ÃœÏÔm_ÔЂ¸€µFŸ8׿ \UööžÝÛÙùú®šVLý®”\`î\Rw¥Ú«rpðôTÖƒ¯ïÖV°cæÈ~pgûùQDÉ`­N­»qõЇ‡OÎÔ3|KÊV+r!"Êh91-&MgW³’ר,êBlØçXešÒ@IÖiâ¬OnK¥#\؉©œ¹¶®“o—)‡Žlg÷¥FÖñÉãw¹œi¡˜vŒ×œÎ³6ô:^ËY‹€0ÔñB®rŸç(ûÞƒƒ§§5Ù z@ÛÕ¿Ÿ<~'²5ÍŒ•î MÁøét$T91î-Ò43¦Úµè˜é Øîl?¿“Ò.¹yëìÑt:någjû"ºì_k±‘†œAž“|è§°ª ˆ ŒØ&:µL*ra+LV5…ìÎÎ×w‰æz_µ:nšè¦vX˜˜ïêÜý ÿ­:U‡lŽIx Ή.têrpí¢:8xzº½ýjS^£ž¸ž7ŽÄáÑgosÖj  ¡d}×ÇÑf|>’ým :ô#×¢›®¿¥í6}qZW`[îÆ-×QS@«²¬š-=mv-ºWñÙq›Zwîß "zûvëù™Ú¾jX £âJ__ƒÝæj‘ &âVHiGÑU‡«D:^×!˜ërÜcr°zÔæP‹‰m¢+ß5W[æ¼]£« ¥ì me’«mëý‹Þ§ªß§”Éæ¸½”kÜ6ã Õ&ºÎ ¬Ü bà:ï-÷b yÞ²jcØvæ§” ŽžµAþ;ǼÅ6vÔf·É>ÌçÚZvãª;JM²/㸧’*Ûˆ^fêŽJP>6FÓÌXêçM3áDDÞßýIý\öaW®/Ø/˜27-™+ñU-Î_j“±FjÉÊÊcóu¢N@½ ˆ[ÒÙZËÊËÃÃ'gÒVW±– ææ0>}Ò½.£#¸ÑÓZå G}6MtÕö,wÄ¥”ˆhsóxC—CçààééÎöó;©²z™älÛ¦²þž9&êýmNç““­óí×7cµ‰®³‰êr«ºZÆþÞ´û¤d RY‡õ6'Á]–‡œTÛØQÂnÓY˜7”C ‹ÕE>ÓÉÆÌÇÎX–àˆi“Ô•_bd¨0—¡|R Ës2yu‹ˆèèh¿ yˆÜ‹Ärê«‹Sý(‘\ó úEM__R.ÛüE•qmÉ¿ô<«] ©×lV€åAÜŠðIõ“Õ˜‘©.õ`n.CÞflÄN «?Ç–îU^[CúUZý9¿,ųM»ãb;l]yÖY®>goïÙ½Éd¾ ½k—Jê3ØLe’3°ÕµûUÛaâz?[k[~ñy̺rŸÒi€‰w™‚Ì5®lWÇjÝA‘+PîÚ¥ÿ[·tg{jùlrå¤ÔYßËŽO¹ÉÏKPõ±Cý÷2ÏJž9k#l×ÖÀñÁç¨ ×w>™bôÏJäKSÛù¤®ù¼‰R ¥Eý¬ÔâÎ[暣¨r•8’Ç„þ|}n[‹œ©©ÑHä–«Dß`[@š33YilsVÝÇ©~ ¢q±²)Û¤‡(ùù8oÔ`n.CÞ5ÙŽ¹ÚÒÇ_*¥PÊ”˜«žÎÒV¯]©]Ó¥Ó²Ÿ7Úùcr~ªÏÊå¼èª[)ëž+pŸÃÓ•¶P'–#§ëì[×o§“q;ÏÛK.ÇdWP=—ƒÍGW;ÛÏïèŸÕ°ŠÙÀ­ýLdIª²´Õ¯e ErÕ¡T”Z\à*7cÐ*S;é:×f?éïóÍ çmËÖGG9wqÚú<ß1¢dÀ9לƕ>2dngš?ä¼ Yœ’b±™ÏâÇA´Ö…Pbq ç-ÛÜ<ÞhÆ÷ßÛu,È¥ø_rÚ™]m@·%M§l¿MÎzhò-¨Ï3•[Žy¿+°œ{±Iª_f¹®:iš{×<Öƒ´`> @ âvïºáTã Pjµ¾+(wqMÆt0¡»ÐtC>…ƒßTFj9豘ƒ«¼K¬HïJ‰jdÙ‚‰%ÚlWÝ29Ôï­Ö‘`Ú|gꢈÏ Õc̶¤ÊñúÕ£÷Üã ST}wÁ¦"4m¡zÍròÞ''[ç{¿¼l/¹0½kÎ4Àªs^×ÕÂyçD©êÃÝ—·šñî¢yÿfz~ê3-û7l+ÂcŽE&'Ʋì2ÓÇî,‹ í¤è3†ÙúˆZQ¾}Zjù»ä(yžy׳MÁ3Óû<Ü}yëõ«GïsÊæCŽþÇ£–!mp×îKWæŒ=˜æ¾eÑ'°3t—«q÷Ù@ý¹âíŒÝ|¸ûòQy_F¨ý‘bîѵÅDîÝóî„wõ zà‹èRÇ©mÞr4É©’rqÍÇ—cQ¢zšŠOv”Çö¨r¹6°äÈ ¤>GÏLV»ßz¾›UôkkµŸS"ûšÚlœœ¬Ã¢–‘  nˆóÔf8•JúÛòu¥Lmlºd±!õœbe¶í,?õ¹Ú2†ó#ÔY˜sEºÍ äv¥Ú9<|rfk³òyCßEǧ½ÚtÛÇbºm7¦¬Û!÷×1½Ÿi’+Xçzn52b—‰-pŸz7n®… Ï Üý«3O©<|ØéãÄÒÉ™îÎ×9ïÚé“Ãy©·uyÝ…|›!¥“php£k7v,L©aSÖ-Ó;IÇÂiƒuä÷¡Kòùº­;£ŒÏ{šl‚ZQ>u»”ü¦]cHÊ€^׳uûÉu/ÎÛ¨Ûqcéjÿ“¢,c-`«ÕN Þ¹ÚPènZ›žlm5´ïZðݧ_Œ1îûÌ¿^¿zôþÚõ/æ•©ú0[9 }V¬¶ØÇJ¹³ÛäP¼ñɘ$ëŽé˜­TþªÐ~Ì”ªZ]€™JV—¯%õâ—{§ìÏ»2_É¿sìüìê¯lGLåÈ"k·vèstû3fY ]l“u<9>yüî§ÄK»ÊúøÄ“ȵ&»ÓX6¼ƒ¸]“bW:Óï“8Ç=v¶ú’"˜ë̹øÎ&Õ„yÈä>öÊlÓd³kðê|;uÂü:º<9VWšžëãäóÙ *?³µY¢ôç›Ê϶H Tg‡‡OÎ|'ÃÒÁ¡§_r騖¢GÿÌ[à ™Äv$ê»pC~«×í!òÄ8ÿØ×éî#Cè${Hà2t÷¯‹!:(¹“«]Îù.±éŒ×X}€op³ëyI„‚)‚ö¶…I9Æô!».ÕßÊ1Êu} ôgÚ+˜l|ùwŸ… }vÓºv×é²–L1îZÈi’-G ×Ô&Ô@Z×®ËÐйs¼¾äódÚûÍÍã“ïúJ°Hß1ÝÄt:©Õ ]È¥SKZåR¦±í³(Éæ¸õµMóu^ÕçCæ6¦cR-RˆåàNØêÓþRÖEW1ô9ê1[jZÚ$"Ù•©dÕÛ¸ºð>U°t¾ã}žy§O½OÕŸûúm;?Õï†àë1ù­SíÌ}¸ûò–\´i’7wÛÆÂ‚>[~!ÛÖgum$)i›;wìï|}W_h«c¡oÊqýó xk[° bÿù_ÿý?® .Ïǘ¯Î# wÄ«ÈÔ:DósöNN¶Îç»|†¡ÞWÒGNý>¡2¶í›Oˆˆ8¿ÿù™© Cåã¼eÛ;¯oöùmê;>üÐW÷ï{cž†gܾyóà‡¡²…•¿þ[ß2jÛ7ŸlmýãÚõŸ½ë#»úÜØiÚBÞÉÔLôiwz»í«_Ih¿¢×Ñéô䞪3y½þªíæõ«Gïå}ä³ô»äë’ÓUþ!e&ïÓ·-öm*1Ú²Iž—×®-ö¹ä ½‡o{2a+ó!ï1¤ŸR§ä˜¶½-~ˆÕ¿gRÜË„Þw ¹WŒ6©ÊÕÕ7™ìùb–eªòz/[JïLeÝGW=:{´÷Óú5®ñ2fÝ ‘×v WÊ{ºêµëw1dí[f]íÌw QŸÿþ·7löY.]«:QÛŠí¹]m]Ž{òß¡ýLH_â*#Î[vÿþWˆˆŽŽþíÈ÷ù.bÚJDqûM•Ør¥­:¦¶»=«t•W—žls S;s¿êsLßëmK¿·ë]†Ô Ÿßšt–¢JbÛ1±ý.¶:ÑEê¶«–W¨íh"—¿*Æ}cËj3õ1H~ËÚ¶o>yøðø:Ý}«?/„ØeÛ×·k\‰å{Õï1´y¸ûòV;;»CD$uæ"¶.úÞÓ×o'mX¢ù‚9Ùg¹Æk—­l›ë¸dÁ5÷˜NÆ-Q3žp ;è}‚Í'®ö11c)6¹$)m¼TÄÓ@^ 3?¬;qc ~&ÔκOxŒÉjÌÀ°>X¨2ö‘3V'¨¿O¬sô´bC9°4ã ç¼e¡NšÍÍã õ³Ð÷Ó _><¾.ÿ–†GßçÆÔKhytB>÷pýNN>šñ„yÏ> C^¿zô^Nd7778?YЙ¼Ÿj0Í H¢KCL•Áõ¼¶åB½¯Z¶¦z废ì“\ÏÓ¯7½‹º}u4¤-Ûä™ËòæºëúTò¨í¢O×é Ød”u~h?Rªbõï}ïCIh;Ñû®¶aë;ú ÷ÍCúϘ‹ê$Cú©Êϧì\ U.Û»êvªëY® ›¯L¶g›~§ÿÖvýÐàrˆ¼}žÑõ¹éþ¶÷ •Uï b£Lö›KW]²õ#¦2ì»rqaÁÕßšdv=ƒó–Ér–ýLè¼/¤/qÝS•3–­>dL7‘BF¢ør]­¾}a R-—tÙ;¾uRµÕlíÌ5þªÏ1½Ÿ:OQ?7õ ºî]ïè»%´>©ÏŒé$Že窤ò»„Óö&ºªÛØí5GûELû,vWŸÍªø°†Ü'¦/kHÓý°}d‰åÃn[.¤¥ª¯ÎlvaׂĨºè¿hq^]sY9–É¿}6ç¸svE¡åÓµáÂfK´íÅ&ãœÄGVõúbW¹è¤ˆ¥H|ç/€²4|´ÿZÿp¾}žѼ£RSð ÷ŽŽö¯¤øôñe’Ja.ë<…ÈüÞOO‰ •Ó$£.§+…Á§ÅG™æ²Å(ã£ý…” Ÿ>ƒS8ÌS»ì¾—©N†–£wæé6ÂÒ2Ï帞žö‘åèhÿ"]¯ |ôòcŠŒÝbýž«¦×ª½ýù—ÇÑѾrK.RÔïxÌz¿ç¥Lów m§g_°­Í·oÜ<És{¤ÎNÏæ©ÁÆc">Ú¿éÆÍ¹^NNžœñÑH0º~Q7ˆˆdÝç#s=9=›÷|ôÙ[õ·z½ÒÛÑ•ôI§g_ßŇ˜í¹o[¶É£–±iÜI)ÏBúÏ6®÷·DîvÔÕ÷4ÍŒÇânˆ :®:hæƒð‡ï¿–í?´^J¤úþ^%´ècÌîîu§¡÷CåÕëS×óu.í‘ûˆ.S´¹ê‘o;ÒçØˆ]~jvɸÐÎ>"ǪyùÏ˯K.“ h:Ãk<&ÚÙqÛ¬ºêÏùhÿµ©ïq—¦ë}ë—.‘´sýäõEÚ&‹Ï]D¦’µ½«é=¯]ÿâLÕ·¯¬'ßÙS”Ùl½>üðAÌw°Åvf²gMϱ׻ܦy€®?"¿zItUÿzÛÒõf“ÍÖ·«ãÏéÙâysê|ŠÈ^N1ûÕÞÚ×ÅÓM¨}ݵë_œ M+¸ ãˆr-ÖÇñ˜hï—DDsqS¤ùã£ýשæý:ÒÞ1é «Nšl5Ûæ}꾚ÜÙ7to³éli>¯àQŸt;DÚò¦kûÖ÷hv®FL¿ËûWê)Ž¡{lï3GSQË-†¯ŠhQö6‰D×qh¼üí¥¿ïôìñ;[{µù@CÊHýýdr÷cÿ2|Lóµ³]„Ø»}e±‰rùÝU?Óü>árH¤JÕ™¯¿Z÷ëMèãæˆÑþk“=¯¿cŸ6tYGâÛòWÇ•Ýã±ë÷îñZŽg®cGôï»Êg±½]µ—ôØaK¨}£ÍçêâÒNÚ]¸†Ú1]±½ÆIò>¡çì¨r¨g‡Ä¡ë¼€½½g÷&“ùßCÏϱé%ä>®óçBå ýï}ûœÍÖçœcét$ŽOæN@UùüÌTïä¿Mç?ºê¾|¦í·ÏŒxÖXß3b·ç¡gã¦<ƒ-äw®É^¡×»úžçÁ†–Al A¯‡ÒNÔr¸øìã/¦~h¡Žhÿ¸Î²-°žgQ®Ø6^Ìs"%¾gãªíL?3V½ÎG.Õ4ÉÓu¦Z¨MÖç:ýzŸ³«B)m Óç]¶“z¾éгÊLíNâ 2ËËðêâ6•ö¬ ›Ü&gL×9µ¦ßáÊhÊø#Û“ÔþÛ.ÝÇ(Ë… ϘLuÆ{Šó8S¢÷…òó!¶— Ó‚)σó9ŸØVt[ÍU6[¦Ï8jêºÎ£”ò™lŽå+çqêâ¨!õ=µë'|á,Þ0Ð÷ľgbÆ ï\¶ËŽ…^ý?™ñ©¿&hHÐÊuÝ|íl1ý²6Yôr°Î‘"û°g{ÚÙR¦Ÿ~dWŽ©Ðéëo³=;f{íû<»ë7¦ò1ý®«]ÅÀ´À×Äáᓳ˜g·»b)¾úqÕSÙvÞ/oð€UÅšN™(^àÑ…iP¶9ßÔŽNu@øLPbɩ˪ÿ[M¿ eDì‘hÅ'œ¸h©=m9½”÷49êLØý>M¦Ó‘ð™øJtƒ/†&‡¼O E×KèdT—§Vǯ᤯þ¾ï³¥ÁÒÎ~ü¸*Lù®§Ã¥«ÎÉïm×¥X„´!¢4í9´-ë¨ýsìvÝ׉‘g 1‚“)´cë@ÒÇùÂáí[?u[Ar¨“•ØÁf“ÃÛw–radh`ƒ(]p£ }!KŸÅm!ÈE>ê ×õ9ú,SýêZì§Ê–Úß…oýÖ} p«»„‰ˆîÝ}ó WŠË”íÔ¥½^ªúïZßS_l[ cÓ©/OÑO'ãv<ž÷SCì씣¾‹ÖtÔòKðôXôÜ/sÏœÉäÕ•4…©û§!:г×ÚOßqT£©ýU-˜G…,¾ÖIeçª nݼuvˆh:íw¼„mÞ­_cû}‰nhpÞ×N%»:.™s)ì;Ÿ`XWRcg"Ïî8Lá—µ-þ²‘ʇfÞ¹èçS •i¨¿-圱kç+QZXÊP*¨ï’Éõ}ŠzéÛO©ePÊLjCS‹#Ü'ÈæêpRʦã³*nh¹Žˆ¶ˆÄÏÑŸgÔçô˜·´Õr:–÷w9cVŠiNÙÔÆ|Èd,U ¾Ë0Ö¿›§5‰óܦ™§ö ™Œ–\!Û‡ÃIÿ]*™t‡‹Íq¢/JŠ€…k¬îœÑqÄ,㾎•»üûP" ±°˜ã£îRú}‚m±ÌC‚ú)Þ>NVÓ. uW¿ËqšÊ àZ=k#uý¢[•”»b\ŽTÛ‚°äåæÑžsçzý’zõ Ü•¶=|ûG×.é!¸lÇ+«Ó?ž•ÆGû§%ÆúnXÓbϘ›€—IwªÝ¬~žÂ¾:9Ù:ßûåå˜4”TÙªäßCÖ”XPcs(ö¹îŸŸ…›ÎßS}²˜lþ!ãhHÆuLísèeí[çkÊ6ãâÎãDDoßn]9'Õ—.¿†o™åÔ«ï¸àk §^ˆ¢/0ʵûÕôyŽ„¶û‡ÕkˆâúeõÍúw1žÑßyÜP9»üm.Ÿt©Í 9ƒ€¾;ÕkÝ›±?µ,€t8wâ–¦«c.½bÄÔ¶³X+âØ'ÔŠo§óùé[Nl«%q,¯P ½,l©arLÒ|&cz:u $W*–Á«ØRsæØ©š“Ð4G¹é6çUŒ< )ÏÔaÓ.X½œMŽÙØeâX±-*I•޶ftÝÅt¤úÛRŽcìÊضK£ke‡`M}½K·!+vs슑¨ýQÎÌ,:5éQ¥k±_)¹j'Eê·ØôŸbîd²T9B~¯Úë)ì«¶åBžÛÚ7«GêŒ DqÖ”p…¤„tíº»œ[Ç9³}¾öœi‘¥ Ýæ_h¯k²+&tç&Q^{ô@Ó÷·M3ÏØðáýÝŸ†Ê ÖUf%õÉ dó-äÝ'0WbAp Ïö{Ƕ¿MvLMöV®]íDåw«×Ì:¾3`}©:ˆ+YÇŽ™ v}ÆÙ;¢yæÆ›wm;Ý3]ksȘRè¤,Wu2¦§¥1:•2LRí†ÎWgS„â2€õr¸*ÏrQ£Ì® Cvð¸œj±ëpWšN}Gq*=ø8VJ¬ö95‡&®ì /p6p’ôÅ=wåpxÛD®²wÉ¿.ŽS‰M·¶¶mÛsìÀ7õGµìü¯Óî’Çl†T;–]È…¥DÃÆ[:æÜ˜Æº;\‡¤˜%ª( ›ôšIDAT§ü|RÁÚ~—Nª0ú,ÜÔ˼ë}b¥ˆ¥d°H'¤Î—÷]s@=K’©Íµ"¾)+õz)lAæ’í¿–¾§†2¨!cP ;¦F|ÒæÖRw¤c)‚¸ëc‚µ‚ZöÑÞŸˆYÛpÆäêqÛdÁ伓ää»ÒÒäØIíÚ¹—#% ‘_Zðò¬+1ëWÎɲMîõÄõÞ ;>3´é>ç ¦’ņ-}}Š3¿m¤ÚÓgwP g¤ºÚSm©PKѵûß¶˸È$aàZà²nÁwà¹é3þ¸R»ÆÆ•š]Eöuú9½9v¸®R_’E¥¦1xèÂÍw)¹à¦–2÷­ó¥Æ}Û\há+-ZêEŒ®Å•%³ªÏµ.̰À Ã'sB-ýÇ:2€õAÜJ‚ Έ -јxÛNñ«×ví&*y&‚--MÎTØ¥W»V3–N ¾j躎4r¥ LA-Fº+%Vî4¦¾ôÒiK’rNŸ… ¹Òæ/ì– h›µ´³Òèçò©ß©eÔ•r.wêü\ÏØQwÉÅKqZª]ÛR‘—Já²·F{é¹XrïrÄ‚›î:_ËÙ½¶l4jà_ååçÉä²,6(¹˜ÕDéù#ˆGí}7°ª ˆ[)‚‰y+nÏ8‰vz›;o ;qk§C2¬2@žêþj:ìZ&ȹ)’ÎÌ㌥Òæhï¡çrÅ ÏW¦ßF•ÉàÀ‚s(U?2U²«üjHõ¨5hÑÇ&È™Á,r‡²Î òlývî…›ÀM ‹\Kôó;Õ£¬Rö¦Å¹2ôÇ`„cØ× j@qJœ°–6XKÄéAKb©&¿”àààééÁÁÓÓãÏަɀ­ºCc& ª³dgûù¤1-‡Zõïr§OëJ‘˜:-&Ñeû“;Hkw^- ©ÂV ™vH†iÃåÐȱÓ5fíl?¿#ÿÎeóøœƒ§Rã.ÜUaÝnæÂTçkà-Ú›¶£$ŽO¿ÓëHÒcf ÷Ι1  ]Ÿ˜?ôAÜJi½!bß3¢ÏÑç¢åß·œŽKËÀº£Nàågë6-qƶíyúΈup`šê $‡“Ñ”Þ.G°ÖÆt:ò}wv¾¾«î"]·¶9©[¤úôa:‰eé7žžªc‡)P¤^“+­® ì-ÃÞÞ³{XV†Z¸D~Ç9È´Ø%¤\/²$uuUçi)@·bf$^¶œþ8ÿ¯}YZÀúlUžž>9S„¥&à¦Ý¨%‰9ÑÏåR¿Ëå¸1éýŠ,wë;°‹´?àÖÓ®9¢Å1K^3lÌŸœ•X¸¶ÆÈmšSw #8’Œé±Õßêu 2¸Pû‡ZêªÐ.•m`ÙÁ™¸È:O<å óÒr¨g@™‚·«®#Ó9°¹Ï–e¼³ýüŽ~þ—”QýJj©—«¸€uÁgì)Råßy$[Dž7¬Žµú >(ãrÔlÇ×&›ZO·üé"MY©@L°ÀÒár¤Öæ\I騒²˜œEÍø|„±Ë¸°Hé4Ѧ³6¯œ-Yh§ð:²µÃø¼›‚í °Z`'.€¥diòX}ìt²1˽#UßÉ$ËHË ÄA޵ë˜}¤$([° <=mš“;öa{¬âKˆš^‘¨žs`áðÒ€1`BîØßÚ|q»´, .âKÎ-žá Vœ‰ ÀƒTÊ«Çÿ‘dÎZ‹ªÊÊIEND®B`‚quickplot-0.10.6/quickplot.ebuild0000644000175000017500000000176112244565775013761 00000000000000# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-visualization/quickplot/quickplot.ebuild,v 1.2 2011/03/02 19:35:12 jlec Exp $ EAPI=4 inherit autotools-utils DESCRIPTION="A fast interactive 2D plotter." HOMEPAGE="http://quickplot.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" SLOT="0" LICENSE="GPL-3" KEYWORDS="~amd64 ~ppc ~x86" IUSE="static-libs" RDEPEND=" media-libs/libsndfile >=sys-libs/readline-0.6.2 x11-libs/gtk+:3" DEPEND="${RDEPEND} dev-util/pkgconfig" AUTOTOOLS_IN_SOURCE_BUILD=1 src_configure() { local myeconfargs=( --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" ) autotools-utils_src_configure } src_install () { autotools-utils_src_install newicon quickplot.png ${PN}.png make_desktop_entry 'quickplot --no-pipe' Quickplot quickplot Graphics mv "${D}"/usr/share/applications/quickplot*.desktop \ "${D}"/usr/share/applications/quickplot.desktop || die } quickplot-0.10.6/get_opt.h0000644000175000017500000000153712244565775012373 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ extern char *get_opt(const char * const shorT, const char * const lonG, int argc, char **argv, int *i); quickplot-0.10.6/favicon.ico0000644000175000017500000000627612244565775012707 00000000000000 ¨ ( @   VýVýVý€€€€€€VýVýVýczõ€€€€€€VýVýczõczõ€€€€€€VýVýVýczõczõczõVýVýczõczõczõí-VýVýVý€€€€€€czõczõí-VýVýVýczõ€€€€€€czõí-í-VýVýczõczõ€€€€€€í-í-VýVýVýczõczõczõczõí-í-í-VýVýVý€€€€€€czõczõí-í-VýVýVý€€€€€€czõí-í-í-VýVýVýczõ€€€€€€í-í-VýVýczõczõczõí-í-í-í-VýVýVýczõczõí-í-í-í-VýVýVýczõczõí-í-í-í-í-í-VýVýVýczõczõczõí-í-í-í-í-VýVýczõczõí-í-í-í-í-í-czõczõczõVýí-í-í-í-í-€€€€€€czõVýí-í-í-í-í-í-czõ€€€€€€VýVýVýVýí-í-í-í-í-czõczõ€€€€€€VýVýVýVýí-í-í-czõczõczõczõVýVýVýVýí-í-í-czõczõczõí-í-VýVýVýVýí-í-í-czõczõczõí-í-í-VýVýVýVýVýí-í-í-czõczõczõí-í-í-VýVýVýVýí-í-í-czõczõczõí-í-í-Výí-í-í-Vý€€€€€€czõí-í-í-í-í-í-VýVýVý€€€€€€í-í-í-í-í-í-í-í-VýVýVýVý€€€€€€í-í-í-í-í-í-í-í-í-í-VýVýVýVýczõczõí-í-í-í-í-í-í-í-VýVýVýczõí-í-í-í-VýVýVýVýVýÿÿøÿÿðÏÿÿàÇÿÿÇçÿÿcÿüqÿø?9ÿð8ÿáÿÿœÿŽ>ÿÏ<þÇÿüç‰ÿøãÿñóÃÿãñÃÿãùƒÿÇøÿøü9s5 Hg+°ïÓýÛ§‘qdé8l†2ʾ¾¡Ñ(®nÒ~‚ž8fò,ÒL†–‹Œ™j ‰ö•+æ2Ðg–†›¦V`î4é¾*Wœt6~Å©ìyð}¤SÙóŽë­^ã‘îòi¿²IEND®B`‚quickplot-0.10.6/INSTALL0000644000175000017500000003660512245423266011603 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. quickplot-0.10.6/imgHoldCursor.xpm0000644000175000017500000000173712245423271014053 00000000000000/* XPM */ static const char *imgHoldCursor[] = { /* columns rows colors chars-per-pixel */ "25 25 10 1 ", " c black", ". c gray19", "X c #585858", "o c #808080", "O c #A0A0A0", "+ c #C3C3C3", "@ c gainsboro", "# c gray96", "$ c gray100", "% c None", /* pixels */ "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%XX%%%XX%%%X.%%%%%", "%%%%%%%X$$$X$$$#X#$#X %%", "%%%%%%% $$$$$$$$$$$###$ %", "%%%%%%% $@@$$@@$$@@$@$$.%", "%%%X oX$@$$$$$$$$$$@@$X%", "%%X+$$X $$$$$$$$$$$$$$Oo%", "%% $$$$$$$$$$$$$$$$$$$.%%", "%% $$$$$$$$$$$$$$$$$$$.%%", "%%% $$$$$$$$$$$$$$$$$$.%%", "%%%% $$$$$$$$$$$$$$$$OO%%", "%%%% $$$$$$$$$$$$$$$$.%%%", "%%%%o $$$$$$$$$$$$$$$X%%%" }; quickplot-0.10.6/ltmain.sh0000644000175000017500000105204412245423256012365 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.3ubuntu1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* 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 /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 quickplot-0.10.6/depcomp0000755000175000017500000005601612245423266012125 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: quickplot-0.10.6/shell.c0000644000175000017500000003037112244710224012007 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ /* This file provides a Command line interface (CLI) or Command-line shell * for a running quickplot program. * * TODO: Add a language to this like Ruby. * * All class objects are containers of parameters. * Example * class object: plot * has parameter: line_width * Therefore it's parent graph has line_width which sets and gets * all the plot line_width values. * Therefore it's parent win has line_width which sets and gets * all the graph, plot line_width values. * Therefore it's parent app has line_width which sets and gets * all the win, graph, plot line_width values. * * Classes: * * app * Global parameter settings. Factory of wins. Factory of sources. * app is a singlet. You cannot create or destroy app. * * source * Source parameter settings. Factory of channels. * * channel * Holds the loaded data. * * window * Window parameters settings. Factory of graphs. * * graph * Graph parameter settings. Factory of plots. * * plot * Plot parameter settings. * * * Commands: * * set * Set class object(s) parameters. * * get * Get/display/print parameter(s) for class objects. * * create * Create a class object. * * destroy * Destroy a class object. * * * Examples of Parameters: * * plot::line_width double * graph::grid bool (int) show the grid * graph::grid_x bool (int) show the x grid * graph::grid_line_color double {r, g, b, a} both x and y * graph::grid_x_line_color double {r, g, b, a} * win::border bool (int) show the window border * win::maximize bool (int) window maximized * * graph::line_width doubles all plots line_width * win::line_width doubles all graphs,plots line_width * app::line_width doubles all wins,graphs,plots line_width */ #include #include #include #include #include #include #include #include #include #include #include #include #include "quickplot.h" #include "shell.h" #include "config.h" #include "qp.h" #include "debug.h" #include "list.h" #include "spew.h" #include "term_color.h" #include "shell_common.h" #include "callbacks.h" #include "channel.h" #include "utils.h" #ifdef DMALLOC # include "dmalloc.h" #endif #ifdef HAVE_LIBREADLINE /* There can only be one readline shell */ static struct qp_shell *rdln_shell = NULL; #endif char *get_window_nums(int state) { struct qp_win *qp; if(state) qp = qp_sllist_next(app->qps); else if(!state) qp = qp_sllist_begin(app->qps); if(qp) { char *str; str = qp_malloc(sizeof(char)*30); snprintf(str, 30, "%d", qp->window_num); return str; } return NULL; } char *get_graph_nums(int state) { struct qp_graph *gr; ASSERT(default_qp); if(state) gr = qp_sllist_next(default_qp->graphs); else if(!state) gr = qp_sllist_begin(default_qp->graphs); if(gr) { char *str; str = qp_malloc(sizeof(char)*30); snprintf(str, 30, "%d", gr->graph_num); return str; } return NULL; } char *get_plot_nums(int state) { struct qp_plot *p; ASSERT(default_qp); ASSERT(default_qp->current_graph); if(state) p = qp_sllist_next(default_qp->current_graph->plots); else if(!state) p = qp_sllist_begin(default_qp->current_graph->plots); if(p) { char *str; str = qp_malloc(sizeof(char)*30); snprintf(str, 30, "%d", p->plot_num); return str; } return NULL; } static gboolean prepare(GSource *source, gint *timeout) { *timeout = -1; /* block */ return FALSE; } static gboolean check(GSource *source) { struct qp_shell *sh; sh = (struct qp_shell *) source; if(sh->fd.revents & G_IO_IN) return TRUE; return FALSE; } void qp_shell_destroy(struct qp_shell *sh) { ASSERT(sh); ASSERT(&(sh->gsource)); if(!sh) return; if(qp_sllist_find(app->shells, sh) == 0) { /* I don't know how to flush out the G main * loop pending events. We have a problem * with G main loop calling shell callbacks * after the shell has been removed and * qp_shell_destroy() has been called. */ WARN("Quickplot Shell exiting again!\n"); return; } if(sh->file_out) { errno = 0; fprintf(sh->file_out, "\nQuickplot Shell exiting\n"); } NOTICE("Quickplot Shell exiting\n"); #ifdef HAVE_LIBREADLINE if(sh == rdln_shell) { /* cleanup readline */ rl_callback_handler_remove(); rdln_shell = NULL; #ifdef HAVE_READLINE_HISTORY Save_history(); #endif } #endif if(sh->line) free(sh->line); if(sh->prompt) free(sh->prompt); sh->fd.revents = 0; g_source_remove_poll(&sh->gsource, &(sh->fd)); /* g_source_remove() removes a source from its' GMainContext */ g_source_remove(sh->tag); /* g_source_destroy() removes a source from its' GMainContext */ g_source_destroy(&sh->gsource); /* free the gsource object in memory */ g_source_unref(&sh->gsource); if(sh->close_on_exit) { if(sh->file_in) fclose(sh->file_in); if(sh->file_out) fclose(sh->file_out); } if(app->op_shell == sh) app->op_shell = NULL; qp_sllist_remove(app->shells, sh, 0); } static int qp_shell_process_command(struct qp_shell *sh, char *line); #ifdef HAVE_LIBREADLINE static void readline_handler(char *line) { ASSERT(rdln_shell); if(line) { qp_shell_process_command(rdln_shell, line); free(line); } else qp_shell_destroy(rdln_shell); } #endif /* returns 1 if it keeps running * returns 0 if the qp_shell is destroyed */ static int qp_shell_process_command(struct qp_shell *sh, char *line) { char **argv; int argc; size_t len; int ret = 1; char *history_mem = NULL; len = strlen(line) + 1; argv = get_args(line, &argc); //DEBUG(" command \"%s\"\n", line); if(sh->pid == app->pid && argc > 0) { #ifdef HAVE_LIBREADLINE int use_readline; use_readline = (rdln_shell)?1:0; #endif /* This is the commands that are processed on the * client side. If sh->pid == app->pid then this * is a client and a server. If sh->pid != app->pid * then this is not a client and we do not want to * do this stuff. */ if(process_client_side_commands(&argc, &argv, sh->file_in, sh->file_out, len, &history_mem #ifdef HAVE_LIBREADLINE , app->op_no_readline, &use_readline #endif )) { if(argc > 1 && !strcmp(argv[0], "input")) { #ifdef HAVE_LIBREADLINE if(use_readline != ((rdln_shell)?1:0)) { if(use_readline) { rl_callback_handler_install(sh->prompt, readline_handler); rdln_shell = sh; } else { rl_callback_handler_remove(); rdln_shell = NULL; } } #endif sh->file_in_isatty = isatty(fileno(sh->file_in)); } fflush(sh->file_out); free(argv); if(history_mem) free(history_mem); return 1; } } if(argc >= 1) ret = do_server_commands(argc, argv, sh); #if QP_DEBUG else if(SPEW_LEVEL() <= 2) { fprintf(sh->file_out, "Recieved no command data\n" "%c\n", END_REPLY); fflush(sh->file_out); } #endif if(history_mem) free(history_mem); free(argv); return ret; } /* returns 1 if the shell is done * returns 0 if not */ static inline int do_getline(struct qp_shell *sh) { size_t len; int running; if(getline(&sh->line, &sh->len, sh->file_in) == -1) { DEBUG("getline returned -1\n"); qp_shell_destroy(sh); return 1; } len = strlen(sh->line); ASSERT(len > 0); /* remove newline '\n' */ if(sh->line[len-1] == '\n') sh->line[len-1] = '\0'; if(sh->pid == app->pid && !sh->file_in_isatty) /* echo the command to the user */ fprintf(sh->file_out, "%s\n", sh->line); if(*sh->line) running = qp_shell_process_command(sh, sh->line); if(sh->pid == app->pid && !rdln_shell && running) { /* local shell prompt without readline */ fprintf(sh->file_out, "%s", sh->prompt); fflush(sh->file_out); } return 0; } static gboolean dispatch(GSource *source, GSourceFunc callback, gpointer data) { struct qp_shell *sh; sh = (struct qp_shell *) source; do { #ifdef HAVE_LIBREADLINE if(sh == rdln_shell) { rl_callback_read_char(); if(!rdln_shell) break; } else #endif if(do_getline(sh)) return FALSE; } while(check_file_in(sh->file_in, 0, 0)); return TRUE; } static GSourceFuncs source_funcs = { prepare, check, dispatch, NULL, NULL, NULL }; struct qp_shell *qp_shell_create(FILE *file_in, FILE *file_out, int close_on_exit, pid_t pid) { struct qp_shell *sh; GSource *s; ASSERT(file_out); if(file_in == NULL) file_in = stdin; if(file_out == NULL) file_out = stdout; setlinebuf(file_in); #if 1 errno = 0; if(fcntl(fileno(file_in), F_SETFL, FNDELAY)) { VASSERT(0, "fcntl(fd=%d, F_SETFL, FNDELAY) failed\n", fileno(file_in)); QP_EWARN("fcntl(fd=%d, F_SETFL, FNDELAY) failed\n", fileno(file_in)); return NULL; } #endif sh = (struct qp_shell *) g_source_new(&source_funcs, sizeof(*sh)); sh->fd.fd = fileno(file_in); sh->fd.events = G_IO_IN; sh->fd.revents = 0; sh->file_in = file_in; sh->file_out = file_out; sh->line = NULL; sh->len = 0; sh->close_on_exit = close_on_exit; sh->pid = pid; sh->file_in_isatty = isatty(fileno(file_in)); sh->prompt = allocate_prompt(); s = &(sh->gsource); /* this g_source_set_priority() is very important: * The priority of the shell needs to be the lowest thing * so that we do not have stuff changing while is shell * is changing something. Having the wrong priority * made a bug which happened * when a open FILE was recieved while the graph was being * exposed but was not drawn yet, then the graph was removed * from the open FILE, and then it tried to draw the graph * that had been removed and segfaulted. */ /* See the g_idle_add_full(qp_startup_idle_callback()) in win.c */ g_source_set_priority(s, G_PRIORITY_LOW + 11 /* larger number == lower priority */); VASSERT(s, "g_source_new() failed\n"); /* Adds source to a GMainContext */ sh->tag = g_source_attach(s, NULL); VASSERT(sh->tag > 0, "g_source_attach() failed\n"); g_source_add_poll(s, &(sh->fd)); qp_shell_initialize(!app->op_no_readline); fprintf(sh->file_out, "\nQuickplot version: %s\n", VERSION); #ifdef HAVE_LIBREADLINE if(isatty(fileno(file_in)) && !app->op_no_readline && file_in == stdin /* readline() can only use the stdin stream */ ) { fprintf(sh->file_out, "Using readline version: %d.%d\n", RL_VERSION_MAJOR, RL_VERSION_MINOR); rdln_shell = sh; /* setup readline */ rl_callback_handler_install(sh->prompt, readline_handler); } else { #endif /* printing "Quickplot using getline()" may confuse * a user into thinking that their terminal is not * using readline when it may indeed be using readline. */ //fprintf(sh->file_out, "Quickplot server using getline()\n"); if(sh->pid == app->pid) /* local shell prompt */ fprintf(sh->file_out, "%s", sh->prompt); #ifdef HAVE_LIBREADLINE } #endif fflush(sh->file_out); qp_sllist_append(app->shells, sh); DEBUG("\n"); return sh; } quickplot-0.10.6/index.htm.in0000644000175000017500000000745612245423077013002 00000000000000 Quickplot

Quickplot

Quickplot is a fast interactive 2D plotter with infinite zooming, value picking, pipe and regular file input, with unlimited simultaneous plots displayed per graph.  Quickplot is meant for looking at your data quickly and of secondary importance is making static pictures of your data.  It's a data viewer, not a plot editor.  It reads ASCII text and sound files.  It has lots of command line options, making it very shell script friendly.  It currently runs on GNU/Linux systems and we hear it works on Mac OS X Darwin.  small screen shot

Quickplot is GNU GPL free software.

Quickplot is hosted by

SourceForge.net Logo

To check-out the current source from the SourceForge Subversion repository run:

svn co https://quickplot.svn.sf.net/svnroot/quickplot/trunk quickplot

This will create a directory named quickplot in the current directory.

News

Dec 11 2011   A complete re-write was done and there is a new release that requires the use of GTK+ version 3, without GTKmm.  We consider this rewrite, version 0.10.*, much better than version 0.8.15 in many ways.  See the new features list at about.html#features.

Nov 27 2013   Made a new release with some new options and minor bug fixes.

@FOOTER_HTM@ quickplot-0.10.6/imgHoldCursor.png0000644000175000017500000000044312244565775014043 00000000000000‰PNG  IHDRÄé…csBIT|dˆ pHYsÄÄ•+ÅIDATH‰í’±à E)5‰KÆQéQ4Š=‹×€ÚàV)’øìĹ'%ïŽ;>’ø4Fãªêªê5g1Fç[TÕ·<ëRŠ«ª—Rvx,‡<î^_ܲ,ë^D!„KÍãœ39çZD˜ç ÆølûU3[íI)y-)¥õþsßPUŸ¦iç?7»N1 ƒ›Ù‹×§±´ªžüÊ6I¸OÃß9ŠêþÅØ1Ž#}ß¿­ú¯ý€ƒž˜¿ÚÖuÝN_oƒŒcåIEND®B`‚quickplot-0.10.6/callbacks.c0000644000175000017500000012364012245007176012627 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "debug.h" #include "list.h" #include "callbacks.h" #include "channel.h" #include "channel_double.h" #include "qp.h" #include "plot.h" #include "zoom.h" #ifdef DMALLOC # include "dmalloc.h" #endif int save_x, save_y, start_x, start_y; int mouse_num = 0, got_motion = 0; #define L_SHIFT (01<<0) #define R_SHIFT (01<<1) #define L_CNTL (01<<2) #define R_CNTL (01<<3) /* optionally, we use the shift/cntl key press/release * in the zoom box adjusting */ static int got_mod_key = 0; gboolean ecb_close(GtkWidget *w, GdkEvent *event, gpointer data) { ASSERT(data); ASSERT(app && app->is_gtk_init); ASSERT(app->main_window_count > 0); if(app->gui_can_exit && app->main_window_count == 1) { cb_quit(NULL, data); return TRUE; } cb_delete_window(NULL, data); return TRUE; /* TRUE means event is handled */ } void cb_delete_window(GtkWidget *w, gpointer data) { ASSERT(data); VASSERT(app->main_window_count > 1, "the delete window menu item should be deactivated if" " there is just one main quickplot window"); qp_win_destroy((struct qp_win *) data); } void cb_quit(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(app && app->is_gtk_init); while((qp = qp_sllist_last(app->qps))) qp_win_destroy(qp); ASSERT(qp_sllist_length(app->qps) == 0); gtk_main_quit(); } gboolean ecb_key_release(GtkWidget *w, GdkEvent *event, gpointer data) { switch(event->key.keyval) { case GDK_KEY_Shift_L: got_mod_key &= ~L_SHIFT; break; case GDK_KEY_Shift_R: got_mod_key &= ~R_SHIFT; break; case GDK_KEY_Control_L: got_mod_key &= ~L_CNTL; break; case GDK_KEY_Control_R: got_mod_key &= ~R_CNTL; break; } return FALSE; } static inline void toggle_all_guis(struct qp_win *qp) { int showing = 0; if(qp->view_menubar) showing = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar)); showing |= gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar)) || gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs)) || gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar)) || gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail)); if(showing) { /* Hide them */ if(qp->view_menubar && gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_menubar)); if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_buttonbar)); if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_tabs)); if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_statusbar)); if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_detail)); return; } /* Show them */ if(qp->view_menubar && !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_menubar)); if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_buttonbar)); if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_tabs)); if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_statusbar)); #if 0 /* Maybe not this one */ if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_detail))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_detail)); #endif } gboolean ecb_key_press(GtkWidget *w, GdkEvent *event, gpointer data) { struct qp_win *qp; ASSERT(data); ASSERT(event->type == GDK_KEY_PRESS); qp = data; //DEBUG("got press keyval=0x%x\n", event->key.keyval); // Since the key accelerators that are associated with the menus // above do not work if the menu is not visible we just handle the // key press here. We still need the key letter to be labeled on // the menu item which the accelerator does, so we setup the // accelerators just for the label, but otherwise the accelerators // could be removed since we override them here. /******************************************************************** * MAP KEY PRESSES for main window * ********************************************************************/ // KEEP THESE KEY MAPPING CONSISTENT WITH THE MENU ITEMS ABOVE. // Yes, this is a not so nice hack. And GTK+ sucks, because it // stops accelerators when widgets are not visible, but it beats QT // (with butt ugly moc preprocessor) and GTKmm (which is a wrapper // that makes you go under the covers to get shit done). I prefer // this hack to making another abstraction layer that you put keys // and actions into. This is the most straight forward method. switch(event->key.keyval) { case GDK_KEY_A: case GDK_KEY_a: cb_about(NULL, NULL); break; case GDK_KEY_B: case GDK_KEY_b: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_buttonbar)); break; case GDK_KEY_C: case GDK_KEY_c: if(gtk_widget_get_sensitive(qp->copy_window_menu_item)) cb_copy_window(NULL, qp); break; case GDK_KEY_D: case GDK_KEY_d: if(app->main_window_count > 1) ecb_close(NULL, NULL, qp); break; case GDK_KEY_Escape: if(qp->graph_detail && qp->graph_detail->window == w) cb_graph_detail_show_hide(NULL, qp); else if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_fullscreen))) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_fullscreen)); else if(app->main_window_count > 1) ecb_close(NULL, NULL, qp); break; case GDK_KEY_E: case GDK_KEY_e: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_border)); break; case GDK_KEY_F: case GDK_KEY_f: case GDK_KEY_F11: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_fullscreen)); break; case GDK_KEY_G: case GDK_KEY_g: case GDK_KEY_F9: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_detail)); break; case GDK_KEY_H: case GDK_KEY_h: case GDK_KEY_F1: cb_help(NULL, NULL); break; case GDK_KEY_I: case GDK_KEY_i: cb_save_png_image_file(NULL, qp); break; case GDK_KEY_M: case GDK_KEY_m: if(qp->view_menubar) gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_menubar)); break; case GDK_KEY_N: case GDK_KEY_n: cb_new_graph_tab(NULL, qp); break; case GDK_KEY_O: case GDK_KEY_o: cb_open_file(NULL, qp); break; case GDK_KEY_P: case GDK_KEY_p: break; case GDK_KEY_Q: case GDK_KEY_q: cb_quit(qp->window, NULL); break; case GDK_KEY_R: case GDK_KEY_r: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_cairo_draw)); break; case GDK_KEY_S: case GDK_KEY_s: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_statusbar)); break; case GDK_KEY_T: case GDK_KEY_t: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_graph_tabs)); break; case GDK_KEY_U: case GDK_KEY_u: toggle_all_guis(qp); break; case GDK_KEY_W: case GDK_KEY_w: cb_new_window(NULL, NULL); break; case GDK_KEY_X: case GDK_KEY_x: gtk_menu_item_activate(GTK_MENU_ITEM(qp->view_shape)); break; case GDK_KEY_Z: qp_graph_zoom_out(qp->current_graph, 1); break; case GDK_KEY_z: qp_graph_zoom_out(qp->current_graph, 0); break; case GDK_KEY_Shift_L: got_mod_key |= L_SHIFT; break; case GDK_KEY_Shift_R: got_mod_key |= R_SHIFT; break; case GDK_KEY_Control_L: got_mod_key |= L_CNTL; break; case GDK_KEY_Control_R: got_mod_key |= R_CNTL; break; case GDK_KEY_Left: case GDK_KEY_leftarrow: if(gtk_notebook_get_show_tabs(GTK_NOTEBOOK(qp->notebook)) || gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) return FALSE; else gtk_notebook_prev_page(GTK_NOTEBOOK(qp->notebook)); break; case GDK_KEY_Right: case GDK_KEY_rightarrow: if(gtk_notebook_get_show_tabs(GTK_NOTEBOOK(qp->notebook)) || gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) return FALSE; else gtk_notebook_next_page(GTK_NOTEBOOK(qp->notebook)); break; default: return FALSE; /* FALSE means the event is not handled. */ } return TRUE; /* TRUE means the event is handled. */ } void cb_zoom_out(GtkWidget *w, gpointer data) { struct qp_win *qp; qp = data; qp_graph_zoom_out(qp->current_graph, 0); } void cb_zoom_out_all(GtkWidget *w, gpointer data) { struct qp_win *qp; qp = data; qp_graph_zoom_out(qp->current_graph, 1); } /* this will not be called if qp->view_menubar is not set */ void cb_view_menubar(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_menubar))) gtk_widget_show(qp->menubar); else gtk_widget_hide(qp->menubar); gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } void cb_view_graph_tabs(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_graph_tabs))) { struct qp_graph *gr; /* GTK+ does not like having a showing widget in a * hidden tab. */ for(gr = qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) gtk_widget_show(gr->tab_label_hbox); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(qp->notebook), TRUE); } else { struct qp_graph *gr; /* GTK+ does not like having a showing widget in a * hidden tab. */ for(gr = qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) gtk_widget_hide(gr->tab_label_hbox); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(qp->notebook), FALSE); } gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } void cb_view_buttonbar(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_buttonbar))) gtk_widget_show(qp->buttonbar); else gtk_widget_hide(qp->buttonbar); gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } void cb_view_statusbar(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_statusbar))) gtk_widget_show(qp->statusbar); else gtk_widget_hide(qp->statusbar); gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } void cb_view_border(GtkWidget *w, gpointer data) { struct qp_win *qp; gboolean i; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_border))) { gtk_window_set_decorated(GTK_WINDOW(qp->window), qp->border = TRUE); i = gtk_window_get_decorated(GTK_WINDOW(qp->window)); if(!i) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_border), FALSE); qp->border = FALSE; } } else { gtk_window_set_decorated(GTK_WINDOW(qp->window), qp->border = FALSE); i = gtk_window_get_decorated(GTK_WINDOW(qp->window)); if(i) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(qp->view_border), TRUE); qp->border = TRUE; } } } #ifdef NO_BIG_WIN_COPY gboolean ecb_window_state(GtkWidget *widget, GdkEventWindowState *e, struct qp_win *qp) { if((e->changed_mask & ( GDK_WINDOW_STATE_MAXIMIZED |GDK_WINDOW_STATE_FULLSCREEN))) { if((e->new_window_state & ( GDK_WINDOW_STATE_MAXIMIZED |GDK_WINDOW_STATE_FULLSCREEN))) gtk_widget_set_sensitive(qp->copy_window_menu_item, FALSE); else gtk_widget_set_sensitive(qp->copy_window_menu_item, TRUE); } return TRUE; } #endif void cb_view_fullscreen(GtkWidget *w, gpointer data) { struct qp_win *qp; ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_fullscreen))) gtk_window_fullscreen(GTK_WINDOW(qp->window)); else gtk_window_unfullscreen(GTK_WINDOW(qp->window)); /* if we set the waitCursor but do not have a redraw happen it would * be bad, given the wait cursor would not change back until the * next redraw. So maybe it would be better to force the redraw * which would do nothing if it works and will add an extra redraw * if the set fullscreen failed and the wait cursor will not be stuck. * * tracking the window-state-event may not work, because the * wait cursor will get set too late to show. * * If will work in all cases and in the off chance that * gtk_window_*fullscreen() fails the results not too bad. * */ gtk_widget_queue_draw(qp->current_graph->drawing_area); qp->current_graph->pixbuf_needs_draw = 1; gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } int _cairo_draw_ignore_event = 0; void cb_view_cairo_draw(GtkWidget *w, gpointer data) { struct qp_win *qp; if(_cairo_draw_ignore_event) { //DEBUG("ignoring\n"); return; } ASSERT(data); qp = data; if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_cairo_draw))) qp->x11_draw = 0; else qp->x11_draw = 1; qp_graph_switch_draw_mode(qp->current_graph); ecb_graph_configure(NULL, NULL, qp->current_graph); gtk_widget_queue_draw(qp->current_graph->drawing_area); gdk_window_set_cursor(gtk_widget_get_window(qp->window), app->waitCursor); } void cb_view_shape(GtkWidget *w, gpointer data) { struct qp_win *qp; struct qp_graph *gr; ASSERT(data); qp = data; /* this must set the gr->background_color consistant * with qp_graph_create() in graph.c */ if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(qp->view_shape))) { DEBUG("shape on\n"); /* turn on shape */ for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { /* Full redraw needed to unset anti-aliasing */ gr->pixbuf_needs_draw = 1; if(gr->background_color.a >= 0.5) gr->background_color.a = 0.4; } qp->shape = 1; gdk_window_set_cursor(gtk_widget_get_window(qp->window),app->waitCursor); } else { DEBUG("shape off\n"); /* turn off shape */ for(gr=qp_sllist_begin(qp->graphs);gr;gr=qp_sllist_next(qp->graphs)) { /* Full redraw needed to set anti-aliasing */ gr->pixbuf_needs_draw = 1; if(gr->background_color.a != gr->bg_alpha_preshape) gr->background_color.a = gr->bg_alpha_preshape; } qp->shape = 0; /* This should remove the current shape thingy */ /* by applying a NULL shape_region */ gtk_widget_shape_combine_region(qp->window, NULL); if(qp->last_shape_region) { cairo_region_destroy(qp->last_shape_region); qp->last_shape_region = NULL; /* now it is NULL in our record of it */ } if(qp->current_graph->pixbuf_needs_draw) gdk_window_set_cursor(gtk_widget_get_window(qp->window),app->waitCursor); } gtk_widget_queue_draw(qp->current_graph->drawing_area); } void cb_close_tab(GtkWidget *w, gpointer data) { ASSERT(data); qp_graph_destroy((struct qp_graph *) data); } gboolean ecb_graph_draw(GtkWidget *w, cairo_t *cr, gpointer data) { struct qp_graph *gr; ASSERT(data); gr = data; qp_graph_draw(gr, cr); return TRUE; /* TRUE means the event is handled. */ } void cb_about(GtkWidget *w, gpointer data) { qp_launch_browser("about.html"); if(data) { printf("Quickplot version " VERSION "\n" "The Quickplot home-page is at <" PACKAGE_URL ">\n" "This was compiled on: " __DATE__ " at the time: " __TIME__ "\n" "Quickplot is free software, distributed under the terms of the\n" "GNU General Public License (version 3 or higher).\n" #ifdef QP_DEBUG "This Quickplot installation was built with extra debuging code.\n" "You do not want that unless you are writing/debuging Quickplot code.\n" #endif ); exit(0); } } void cb_help(GtkWidget *w, gpointer data) { qp_launch_browser("help.html"); if(data) { printf("Quickplot is a fast interactive 2D plotter.\n" "\n" "Quickplot uses html files for its reference documentation.\n" "Quickplot also has a man page.\n" "If you're not seeing a browser now with the\n" "Quickplot Help document loaded than you may not be using a\n" "windowing system or something else went wrong.\n" "\n" "The Quickplot text help document can be printed to standard\n" "output by running `quickplot --print-help'.\n" "\n" "The lastest copy of the Quickplot reference documentation can be\n" "found at <" PACKAGE_URL "help.html>.\n" "The Quickplot home-page is at <" PACKAGE_URL ">.\n"); exit(1); } } gboolean ecb_graph_configure(GtkWidget *wdgt, GdkEvent *event, gpointer data) { struct qp_graph *gr; GtkAllocation allocation; int w1, w2, h1, h2, h, w; int old_xscale, old_yscale; ASSERT(data); gr = data; ASSERT(gr->drawing_area); gtk_widget_get_allocation(gr->drawing_area, &allocation); w1 = 2*allocation.width; w2 = 1.5*app->root_window_width; h1 = 2*allocation.height; h2 = 1.5*app->root_window_height; w = (w1 > w2)?w1:w2; h = (h1 > h2)?h1:h2; if(!gr->pixbuf_surface || w > gr->pixbuf_width || h > gr->pixbuf_height) { if(gr->x11) { /* Drawing with X11 and Cairo */ unsigned int depth; Display *dsp; Window win; int screen; if(!gr->x11->dsp) dsp = (gr->x11->dsp = gdk_x11_get_default_xdisplay()); else dsp = gr->x11->dsp; screen = DefaultScreen(gr->x11->dsp); depth = DefaultDepth(dsp, screen); ASSERT(depth > 7); win = gdk_x11_window_get_xid(gtk_widget_get_window(gr->drawing_area)); if(gr->pixbuf_surface) cairo_surface_destroy(gr->pixbuf_surface); if(gr->x11->gc) XFreeGC(dsp, gr->x11->gc); if(gr->x11->pixmap) XFreePixmap(dsp, gr->x11->pixmap); gr->x11->pixmap = XCreatePixmap(dsp, win, w, h, depth); gr->x11->gc = XCreateGC(dsp, gr->x11->pixmap, 0, 0); XSetLineAttributes(dsp, gr->x11->gc, 4, LineSolid, CapButt, JoinRound); gr->pixbuf_surface = cairo_xlib_surface_create(dsp, gr->x11->pixmap, DefaultVisual(dsp, screen), w, h); //DEBUG("Using X11 Pixmap\n"); } else { /* Drawing just with Cairo */ if(gr->pixbuf_surface) cairo_surface_destroy(gr->pixbuf_surface); gr->pixbuf_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); } /* The drawing_area widget fits inside the pixbuf */ ////////pixbuf//////// // // // ********** // // * * // gr->pixbuf_width = w; // * widget * // gr->pixbuf_height = h; // * * // // ********** // // // ////////////////////// } gr->pixbuf_x = (gr->pixbuf_width - allocation.width)/2; gr->pixbuf_y = (gr->pixbuf_height - allocation.height)/2; gr->pixbuf_needs_draw = 1; gr->draw_value_pick = 0; // TODO: Too bad this does not work gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); /* plot_val = scale*(zoomed plot val) + shift */ /* if we have any grab shifting we scale that to work * with the new tranformation */ old_xscale = gr->xscale; old_yscale = gr->yscale; gr->xscale = allocation.width; gr->yscale = - allocation.height; gr->xshift = 0; gr->yshift = allocation.height; /* multiply out the new scale to the grab. */ /* If this is the first configure event the * old gr->scale will be zero, but the * gr->grab_x (y) may not be 0 if this is a copied gr. * So we have gr->scale start at 0 to catch this case. */ if(gr->grab_x && old_xscale) gr->grab_x *= ((double)gr->xscale)/((double)old_xscale); if(gr->grab_y && old_xscale) gr->grab_y *= ((double)gr->yscale)/((double)old_yscale); gr->waiting_to_resize_draw = 1; if(ABSVAL(gr->grab_x) > gr->pixbuf_x || ABSVAL(gr->grab_y) > gr->pixbuf_y) { qp_zoom_push_shift(&(gr->z), - gr->grab_x/gr->xscale, - gr->grab_y/gr->yscale); ++gr->zoom_level; gr->grab_x = 0; gr->grab_y = 0; } gr->qp->pointer_x = -1; gr->qp->pointer_y = -1; //DEBUG("graph named: \"%s\" surface=%p\n", gr->name, gr->surface); return TRUE; /* TRUE means the event is handled. */ } /* We use this to zoom in and out at the pointer */ gboolean ecb_graph_scroll(GtkWidget *w, GdkEvent *event, gpointer data) { #ifdef QP_DEBUG const char *dir[] = { "up", "down", "left", "right"}; DEBUG("x=%g y=%g direction=%s time=%u\n", event->scroll.x, event->scroll.y, dir[((int) (event->scroll.direction)) % 4], event->scroll.time); #endif return TRUE; } gboolean cb_switch_page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data) { struct qp_graph *gr; ASSERT(page); gr = g_object_get_data(G_OBJECT(page), "qp_graph"); ASSERT(gr); /* gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)) is broken * so we catch this event to get the current graph that is showing here. */ gr->qp->current_graph = gr; //WARN("page_num=%d graph named=\"%s\"\n", page_num, gr->name); qp_win_set_status(gr->qp); if((gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(gr->qp->view_cairo_draw)) && gr->x11) || (!gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(gr->qp->view_cairo_draw)) && !gr->x11) ) { _cairo_draw_ignore_event = 1; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gr->qp->view_cairo_draw), (gr->x11)?FALSE:TRUE); _cairo_draw_ignore_event = 0; } // redraw queuing is not needed //gtk_widget_queue_draw(gr->drawing_area); /* a new graph will use the draw mode of this graph */ gr->qp->x11_draw = (gr->x11)?1:0; if(gr->qp->shape) gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window),app->waitCursor); gr->qp->update_graph_detail = 0; if(gr->qp->graph_detail) if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gr->qp->view_graph_detail))) /* qp->graph_detail is showing * We need to update it, but if there is a new graph we will * wait until after the graph drawn. */ gr->qp->update_graph_detail = 1; return TRUE; } /* i is the current index starting at 0 and * ending at num_points-1. So when i == -1 * we must start over and when i == num_points * we end (start). */ static inline void get_next_val(struct qp_plot *p, ssize_t *i) { double x = NAN, y; if(*i == -1) { x = p->channel_x_begin(p->x_picker); y = p->channel_y_begin(p->y_picker); ++(*i); } while((!is_good_double(x) || !is_good_double(y)) && *i < p->num_points-1) { x = p->channel_x_next(p->x_picker); y = p->channel_y_next(p->y_picker); ++(*i); } if(is_good_double(x) && is_good_double(y)) { p->xval = x; p->yval = y; } } static inline void get_prev_val(struct qp_plot *p, ssize_t *i) { double x = NAN, y; if(*i == p->num_points) { x = p->channel_x_end(p->x_picker); y = p->channel_y_end(p->y_picker); --(*i); } while((!is_good_double(x) || !is_good_double(y)) && *i > 0) { x = p->channel_x_prev(p->x_picker); y = p->channel_y_prev(p->y_picker); --(*i); } if(is_good_double(x) && is_good_double(y)) { p->xval = x; p->yval = y; } } void set_value_pick_entries(struct qp_graph *gr, int x, int y) { struct qp_plot *p; int mode; mode = ((gr->value_mode) & 3); ASSERT(mode == 0 || mode == 1 || mode == 2); if(mode == 0) { for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { char text[64]; snprintf(text, 64, "%.*g", p->sig_fig_x, qp_plot_get_xval(p, x)); gtk_entry_set_text(GTK_ENTRY(p->x_entry), text); snprintf(text, 64, "%.*g", p->sig_fig_y, qp_plot_get_yval(p, y)); gtk_entry_set_text(GTK_ENTRY(p->y_entry), text); } return; } for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) { double xval, yval, x_pix; char text[64]; ssize_t i; /* the channel p->x_picker is assumed to be * monotonically increasing. */ x_pix = qp_plot_get_xval(p, x); if(!p->x_picker) { ssize_t j; ASSERT(p->x->form == QP_CHANNEL_FORM_SERIES); p->x_picker = qp_channel_series_create(p->x, 0); p->y_picker = qp_channel_series_create(p->y, 0); i = -1; get_next_val(p, &i); p->picker_i = i; p->num_points = qp_channel_series_length(p->x_picker); j = qp_channel_series_length(p->y_picker); if(p->num_points > j) p->num_points = j; } else i = p->picker_i; /* TODO: Make work for the case when values can be NAN and INFINTY */ xval = p->xval; yval = p->yval; if(xval == x_pix || (i == p->num_points-1 && xval <= x_pix) || p->num_points == 1 || (i == 0 && xval >= x_pix)) goto finish; while(i < p->num_points-1 && p->xval < x_pix) { xval = p->xval; yval = p->yval; get_next_val(p, &i); } if(i == p->num_points-1 && p->xval <= x_pix) { xval = p->xval; yval = p->yval; goto finish; } if(i < p->num_points-1 && xval < x_pix) /* p->xval >= x_pix */ { if(mode == 1) { /* interpolate the y value */ yval = yval + (x_pix - xval)*(p->yval - yval)/(p->xval - xval); xval = x_pix; } else /* mode == 2 */ { /* pick the closest value */ if(p->xval - x_pix < x_pix - xval) { xval = p->xval; yval = p->yval; } else /* xval, yval are the closest values */ { /* go to the previous value */ if(i>1) { /* goto i-1 */ get_prev_val(p, &i); xval = p->xval; yval = p->yval; } else { /* i == 1 goto i = 0 */ i = -1; get_next_val(p, &i); } } } goto finish; } ASSERT(p->xval >= x_pix); /* Now: p->xval >= x_pix */ while(i > 0 && p->xval > x_pix) { xval = p->xval; yval = p->yval; get_prev_val(p, &i); } if(p->xval > x_pix) { /* i == 0 */ xval = p->xval; yval = p->yval; goto finish; } /* p->xval <= x_pix && xval > x_pix */ /* interpolate the y value */ if(mode == 1) { yval = p->yval + (x_pix - p->xval)*(yval - p->yval)/(xval - p->xval); xval = x_pix; } else /* mode == 2 */ { /* pick the closest value */ if(x_pix - p->xval < xval - x_pix) { xval = p->xval; yval = p->yval; } else if(i < p->num_points-2) { get_next_val(p, &i); } else { /* i == p->num_points-2 goto i = num_points -1 */ i = p->num_points; get_prev_val(p, &i); xval = p->xval; yval = p->yval; } } finish: if(xval == p->xval) { gr->value_pick_x = qp_plot_get_xpixel(p, xval); gr->value_pick_y = qp_plot_get_ypixel(p, yval); snprintf(text, 64, "%.16g", xval); gtk_entry_set_text(GTK_ENTRY(p->x_entry), text); snprintf(text, 64, "%.16g", yval); gtk_entry_set_text(GTK_ENTRY(p->y_entry), text); } else { snprintf(text, 64, "%.*g", p->sig_fig_x, xval); gtk_entry_set_text(GTK_ENTRY(p->x_entry), text); snprintf(text, 64, "%.*g", p->sig_fig_y, yval); gtk_entry_set_text(GTK_ENTRY(p->y_entry), text); } if(i == 0) { i = -1; get_next_val(p, &i); } else if(i == p->num_points-1) { i = p->num_points; get_prev_val(p, &i); } p->picker_i = i; } } static inline void get_value_picks(struct qp_graph *gr, int x, int y) { gr->value_pick_x = x + gr->pixbuf_x + gr->grab_x; gr->value_pick_y = y + gr->pixbuf_y + gr->grab_y; } gboolean ecb_graph_button_press(GtkWidget *w, GdkEvent *event, gpointer data) { struct qp_graph *gr; gr = data; ASSERT(data); ASSERT(event->type == GDK_BUTTON_PRESS || event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS); /* We can get a button press without a release when * we include the double and triple press events. * Double presses can come without a single press * before. */ gr->qp->pointer_x = event->button.x; gr->qp->pointer_y = event->button.y; //ERROR("graph named: \"%s\" [type=%d] mouse at=(%g,%g) button=%d\n", // gr->name, event->type, // event->button.x, event->button.y, event->button.button); if(event->button.button == GRAB_BUTTON || event->button.button == PICK_BUTTON || event->button.button == ZOOM_BUTTON) { if(mouse_num) { /* we do not do multi-button stuff * We just take care of the first button press * hoping we will get a button release event that resets * mouse_num to 0. */ return TRUE; } start_x = save_x = (int) event->button.x; start_y = save_y = (int) event->button.y; mouse_num = event->button.button; got_motion = 0; /* we use the shift in the zoom box drawing to * shift the zoom box instead of just pulling it. * We ignore all shift key presses before the box * is started from this button press. */ got_mod_key = 0; } else return FALSE; switch(mouse_num) { case GRAB_BUTTON: gdk_window_set_cursor(gtk_widget_get_window(gr->drawing_area), app->grabCursor); break; case PICK_BUTTON: if(gr->qp->graph_detail) { struct qp_plot *p; get_value_picks(gr, save_x, save_y); if((p = qp_sllist_last(gr->plots)) && !p->sig_fig_x) { GtkAllocation a; gtk_widget_get_allocation(gr->drawing_area, &a); for(p=qp_sllist_begin(gr->plots);p;p=qp_sllist_next(gr->plots)) qp_plot_get_sig_fig(p, a.width, a.height); } set_value_pick_entries(gr, gr->value_pick_x, gr->value_pick_y); gr->draw_value_pick = 1; gtk_widget_queue_draw(gr->drawing_area); } break; case ZOOM_BUTTON: gdk_window_set_cursor(gtk_widget_get_window(gr->drawing_area), app->zoomCursor); break; } return TRUE; /* TRUE means the event is handled. */ } /* sort it so that y >= x */ static inline void Order(int *x, int *y) { if(*x > *y) { int i; i = *x; *x = *y; *y = i; } } gboolean ecb_graph_button_release(GtkWidget *w, GdkEvent *event, gpointer data) { double width, height; struct qp_graph *gr; gr = data; ASSERT(data); ASSERT(event->type == GDK_BUTTON_RELEASE); //DEBUG("graph named: \"%s\"\n", gr->name); if(qp_sllist_length(gr->plots) == 0) return TRUE; gr->qp->pointer_x = event->button.x; gr->qp->pointer_y = event->button.y; if(mouse_num != GRAB_BUTTON) qp_win_set_status(gr->qp); if(event->button.button != GRAB_BUTTON && event->button.button != PICK_BUTTON && event->button.button != ZOOM_BUTTON) return FALSE; /* in order to keep things working in the most cases we * accept any button release event to finish the mouse * press and pointer/motion action. */ // this test shows the the pointer can move // between motion and this release event // We just ignore this motion since it would // just make things looks jiggley (bad). //ASSERT(save_x == (int) event->button.x); //ASSERT(save_y == (int) event->button.y); width = gtk_widget_get_allocated_width(gr->drawing_area); height = gtk_widget_get_allocated_height(gr->drawing_area); switch(mouse_num) { case GRAB_BUTTON: gdk_window_set_cursor(gtk_widget_get_window(gr->drawing_area), NULL); if(ABSVAL(gr->grab_x) > gr->pixbuf_x || ABSVAL(gr->grab_y) > gr->pixbuf_y) { qp_zoom_push_shift(&(gr->z), - gr->grab_x/gr->xscale, - gr->grab_y/gr->yscale); ++gr->zoom_level; gr->grab_x = 0; gr->grab_y = 0; gr->pixbuf_needs_draw = 1; gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); gtk_widget_queue_draw(gr->drawing_area); gr->draw_value_pick = 0; } else /* In case there is mouse motion */ qp_win_set_status(gr->qp); break; case PICK_BUTTON: if(gr->qp->graph_detail) { get_value_picks(gr, gr->qp->pointer_x, gr->qp->pointer_y); set_value_pick_entries(gr, gr->value_pick_x, gr->value_pick_y); gtk_widget_queue_draw(gr->drawing_area); } break; case ZOOM_BUTTON: { int queue_draw = 0; int starting_zoom_level; starting_zoom_level = gr->zoom_level; gr->draw_value_pick = 0; gdk_window_set_cursor(gtk_widget_get_window(gr->drawing_area), NULL); if(gr->draw_zoom_box) { gr->draw_zoom_box = 0; queue_draw = 1; } /* order the x and y values so save >= start */ Order(&start_x, &save_x); Order(&start_y, &save_y); /* We will zoom in under these conditions * But we will save the grab to a zoom first * if we zoom in at all */ if((start_x >= 0 && save_x < width && start_y >= 0 && start_y < height) || save_x - start_x < 2 || save_y - start_y < 2) { if(gr->grab_x || gr->grab_y) { qp_zoom_push_shift(&(gr->z), - gr->grab_x/gr->xscale, - gr->grab_y/gr->yscale); ++gr->zoom_level; gr->grab_x = 0; gr->grab_y = 0; } } /* We have a zoom box defined by start_x, start_y, * and save_x, save_y. */ if((save_x - start_x)*(save_y - start_y) < 9) { /* we just shrink the plots a little */ /* We make a zoom level that zooms out */ qp_zoom_push(&(gr->z), 0.8, 0.1, 0.8, 0.1); ++gr->zoom_level; } else if(start_x >= 0 && save_x < width && start_y >= 0 && save_y < height) { /* We make a new zoom from the zoom box */ double xmin, ymin, xmax, ymax; xmin = start_x; xmax = save_x; ymin = height - save_y; ymax = height - start_y; xmin /= width; xmax /= width; ymin /= height; ymax /= height; qp_zoom_push_mm(&(gr->z), xmin, ymin, xmax, ymax); ++gr->zoom_level; } else if((start_x >= 0 && save_x < width) || (start_y >= 0 && save_y < height)) { if(gr->grab_x || gr->grab_y) { gr->grab_x = gr->grab_y = 0; queue_draw = 1; } else if(gr->zoom_level) { /* zoom out one level */ qp_zoom_pop(&(gr->z)); --gr->zoom_level; } } else { if(gr->zoom_level) { /* zoom out all levels */ qp_zoom_pop_all(&(gr->z)); gr->zoom_level = 0; } if(gr->grab_x || gr->grab_y) { gr->grab_x = gr->grab_y = 0; queue_draw = 1; } } if(gr->zoom_level != starting_zoom_level) { gdk_window_set_cursor(gtk_widget_get_window(gr->qp->window), app->waitCursor); queue_draw = 1; gr->pixbuf_needs_draw = 1; } if(queue_draw) { qp_win_set_status(gr->qp); gtk_widget_queue_draw(gr->drawing_area); } break; } } /* reset the mouse_num */ mouse_num = 0; return TRUE; /* TRUE means the event is handled. */ } gboolean ecb_graph_pointer_motion(GtkWidget *w, GdkEvent *event, gpointer data) { struct qp_win *qp; struct qp_graph *gr; gr = data; ASSERT(data); ASSERT(event->type == GDK_MOTION_NOTIFY); if(qp_sllist_length(gr->plots) == 0) return TRUE; qp = gr->qp; gr->qp->pointer_x = event->motion.x; gr->qp->pointer_y = event->motion.y; if(mouse_num != GRAB_BUTTON) qp_win_set_status(gr->qp); if(!mouse_num) return FALSE; //DEBUG("graph named: \"%s\"\n", gr->name); switch(mouse_num) { case GRAB_BUTTON: if(!got_motion) { gdk_window_set_cursor(gtk_widget_get_window(gr->drawing_area), app->holdCursor); } //DEBUG("from (x,y) %d, %d to %d, %d\n", save_x, save_y, // (int)event->motion.x, (int) event->motion.y); gr->grab_x += save_x - (int) event->motion.x; gr->grab_y += save_y - (int) event->motion.y; gtk_widget_queue_draw(gr->drawing_area); if(!got_motion) qp_win_set_status(qp); break; case PICK_BUTTON: if(gr->qp->graph_detail) { get_value_picks(gr, gr->qp->pointer_x, gr->qp->pointer_y); set_value_pick_entries(gr, gr->value_pick_x, gr->value_pick_y); gr->draw_value_pick = 1; gtk_widget_queue_draw(gr->drawing_area); } break; case ZOOM_BUTTON: { if(got_mod_key & (L_SHIFT | R_SHIFT)) { start_x -= save_x - (int) event->motion.x; start_y -= save_y - (int) event->motion.y; } else if(got_mod_key & (L_CNTL | R_CNTL)) { start_x += save_x - (int) event->motion.x; start_y += save_y - (int) event->motion.y; } if(start_x != (int) event->motion.x && start_y != (int) event->motion.y) { gr->draw_zoom_box = 1; gr->z_x = start_x; gr->z_y = start_y; gr->z_w = (int) event->motion.x - start_x; gr->z_h = (int) event->motion.y - start_y; /* clear the old zoom box and draw a new one */ gtk_widget_queue_draw(gr->drawing_area); } else if(gr->draw_zoom_box) { gr->draw_zoom_box = 0; /* clear the old zoom box and do not draw a new one */ gtk_widget_queue_draw(gr->drawing_area); } } break; } save_x = (int) event->motion.x; save_y = (int) event->motion.y; got_motion = 1; return TRUE; /* TRUE means the event is handled. */ } void cb_open_file(GtkWidget *w, gpointer data) { GtkWidget *dialog; struct qp_win *qp; struct qp_source *s = NULL; ASSERT(data); qp = data; dialog = gtk_file_chooser_dialog_new ("Open File", GTK_WINDOW(qp->window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); ASSERT(filename && filename[0]); gtk_widget_destroy(dialog); s = qp_source_create(filename, QP_TYPE_UNKNOWN); #if 0 #ifdef QP_DEBUG if(s) qp_source_debug_print(s); #endif #endif g_free(filename); } else gtk_widget_destroy(dialog); /* TODO: make defaults plots or open the plot builder gui */ if(s && app->op_default_graph) qp_win_graph_default_source(qp, s, NULL); #if 0 if(s) qp_win_make_default_plots(qp, s); #endif } void cb_remove_source(GtkWidget *w, gpointer data) { ASSERT(data); qp_source_destroy((struct qp_source*)data); } void cb_new_window(GtkWidget *w, gpointer data) { qp_win_create(); } void cb_copy_window(GtkWidget *w, gpointer data) { ASSERT(data); qp_win_copy_create((struct qp_win*) data); } void cb_new_graph_tab(GtkWidget *w, gpointer data) { ASSERT(data); qp_graph_create((struct qp_win*)data, NULL); } void cb_save_png_image_file(GtkWidget *w, gpointer data) { struct qp_win *qp; struct qp_graph *gr; int page_num; char *filename = NULL; ASSERT(data); qp = data; page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(qp->notebook)); w = gtk_notebook_get_nth_page(GTK_NOTEBOOK(qp->notebook), page_num); gr = g_object_get_data(G_OBJECT(w), "qp_graph"); { GtkWidget *dialog; char name[64]; snprintf(name, 64, "%.60s.png", gr->name); dialog = gtk_file_chooser_dialog_new ("Save PNG File", GTK_WINDOW(qp->window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation( GTK_FILE_CHOOSER(dialog), TRUE); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), name); if(gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); gtk_widget_destroy (dialog); } if(filename) { qp_win_save_png(qp, gr, filename); g_free(filename); } } quickplot-0.10.6/qp_shell.c0000644000175000017500000002162212244565775012531 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "debug.h" #include "spew.h" #include "list.h" #include "term_color.h" #include "shell_common.h" #ifdef DMALLOC # include "dmalloc.h" #endif static char *prompt = NULL; static FILE *file_to = NULL; static int stdin_isatty; static pid_t pid = -1; /* quickplot shell server pid */ #ifdef HAVE_LIBREADLINE int use_readline = 0; #endif char *get_window_nums(int state) { return NULL; } char *get_graph_nums(int state) { return NULL; } char *get_plot_nums(int state) { return NULL; } #ifdef QP_DEBUG static void debug_sighandler(int sig_num) { VASSERT(0, "We caught signal %d", sig_num); } #endif static void signal_exit(void) { fprintf(file_to, "exit\n"); } static void term_sighandler(int sig_num) { printf("We caught signal %d\n", sig_num); signal_exit(); printf("exiting\n"); exit(1); } static inline int Getline(char **line, size_t *len) { #ifdef HAVE_LIBREADLINE if(use_readline) { if(*line) free(*line); *line = readline(prompt); if(*line) { return 1; } else return 0; } else { #endif size_t l; printf("%s", prompt); fflush(stdout); if(getline(line, len, stdin) == -1) { return 0; } l = strlen(*line); ASSERT(l > 0); /* remove newline '\n' */ (*line)[l-1] = '\0'; if(!stdin_isatty) printf("%s\n", *line); return 1; #ifdef HAVE_LIBREADLINE } #endif } void usage(void) { printf( " Usage: quickplot_shell [PID]|[-h|--help]|[QUICKPLOT_OPTIONS]\n" "\n" " If PID is not given, this will launch quickplot as a new process and\n" " connect to that new process. In this case Quickplot will be started\n" " with QUICKPLOT_OPTIONS if any are given.\n" "\n" " If PID is given, connect to a running Quickplot program with process ID\n" " (pid) PID.\n" "\n"); exit(1); } /* returns 1 on error * returns 0 on success */ static inline int read_and_spew_until_end(char **reply, size_t *len, FILE *from, pid_t pid) { do { size_t rlen; if(getline(reply, len, from) == -1) { printf("Quickplot pid %d: broke the connection.\n", pid); return 1; } rlen = strlen(*reply); if(rlen == 2 && **reply == END_REPLY && *((*reply)+1) == '\n') { DEBUG("END\n"); return 0; } printf("%s", *reply); } while(1); return 0; } static int got_usr1 = 0; void usr1_catcher(int sig_num) { got_usr1 = 1; } int main (int argc, char **argv) { char *user_line = NULL, *qp_reply = NULL; size_t qp_reply_len = 0, user_len = 0; int ret = 0; /* reading to the from Quickplot */ FILE *file_from = NULL; char path_to[FIFO_PATH_LEN], path_from[FIFO_PATH_LEN]; *path_to = '\0'; *path_from = '\0'; if(argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) usage(); if(argc == 2 && argv[1][0] > '0' && argv[1][0] < '9') { char *end; pid = strtoul(argv[1], &end, 10); if(*end != '\0') { printf("Cannot parse PID from \"%s\"\n\n", argv[1]); usage(); } } if(pid == -1) { char *qp_path; size_t len; len = strlen(argv[0]); /* remove the _shell part of stuff/path_to/quickplot_shell */ if(len >= 15) { qp_path = qp_strdup(argv[0]); qp_path[len-6] = '\0'; } else qp_path = qp_strdup("quickplot"); signal(SIGUSR1, usr1_catcher); errno = 0; pid = fork(); if(pid == -1) { QP_EERROR("failed to fork()\n"); return 1; } if(pid != 0) { // parent runs quickplot char **e_argv; int i; char last_arg[64]; e_argv = qp_malloc((argc+2)*sizeof(*e_argv)); e_argv[0] = qp_strdup("quickplot"); for(i=1;i 0) { if(!strcmp("exit", *argv)) // exit break; if(!strcmp("quit", *argv)) // quit { fprintf(file_to, "quit\n"); fflush(file_to); break; } if(process_client_side_commands(&argc, &argv, stdin, stdout, len, &history_mem #ifdef HAVE_LIBREADLINE , 0, &use_readline #endif )) { if(!strcmp("input", *argv) && argc > 1) { stdin_isatty = isatty(fileno(stdin)); } } else // command to server { int i; #ifdef QP_DEBUG if(SPEW_LEVEL() <= 1) { printf("Read user line: \"%s\"", argv[0]); for(i=1; i. */ /* This file will not be used if --enable-debug was not set * as a ./configure option. */ #include #include #include #include #include #include #include "config.h" #include "spew.h" #include "term_color.h" #ifdef DMALLOC # include "dmalloc.h" #endif static int spew_level = -1; static FILE *spew_file = NULL; static int last_spewed = 0; /* bool */ int qp_set_spew_level(int level) { int old_level = spew_level; spew_level = level; return old_level; } int qp_get_spew_level(void) { return spew_level; } void qp_spew_init(int level) { char *env; qp_term_color_init(); spew_file = stdout; /* default value */ #ifdef QP_DEBUG spew_level = 0; /* DEBUG default value */ #else spew_level = 2; /* non-DEBUG default value */ #endif env = getenv("QUICKPLOT_SPEW_FILE"); if(env && env[0]) { if(strncasecmp(env, "none", 4) == 0 || env[0] == '\0') { spew_level = 5; /* OFF */ spew_file = NULL; } else if(strncasecmp(env, "stdout", 4) == 0 || strncasecmp(env, "out", 1) == 0 || env[0] == '1') ; else if(strncasecmp(env, "stderr", 4) == 0 || strncasecmp(env, "err", 1) == 0 || env[0] == '2') spew_file = stderr; else { spew_file = fopen(env, "a"); if(!spew_file) spew_file = stdout; } } env = getenv("QUICKPLOT_SPEW_LEVEL"); if(spew_level == 5 /* NO SPEW */) env = NULL; if(env && env[0]) { if(strncasecmp(env, "off", 2) == 0 || strcasecmp(env, "no") == 0) spew_level = 5; /* NO SPEW */ else if( strncasecmp(env, "error", 1) == 0 || env[0] == '4') spew_level = 4; /* ERROR */ else if(strncasecmp(env, "on", 1) == 0 || strncasecmp(env, "info", 1) == 0 || strncasecmp(env, "yes", 1) == 0 || strncasecmp(env, "debug", 1) == 0 || /* there is no debug level so we set * debug to info */ env[0] == '1') spew_level = 1; /* INFO */ else if(strncasecmp(env, "notice", 3) == 0 || env[0] == '2') spew_level = 2; /* NOTICE */ else if(strncasecmp(env, "debug", 1) == 0 || env[0] == '0') spew_level = 1; /* INFO, there is no DEBUG */ else if(strncasecmp(env, "warn", 1) == 0|| env[0] == '3') spew_level = 3; /* WARN */ } else if(level >= 0) spew_level = level; } void qp_spew(int level, int show_errno, const char *format, ...) { if(spew_level == -1) qp_spew_init(-1); if(level > 4) level = 4; else if(level < 1) level = 1; if(level >= spew_level) { va_list ap; last_spewed = 1; if(level == 2) fprintf(spew_file, "%sQP:%s ", blu, trm); else if(level == 3) fprintf(spew_file, "%sQP:%s ", byel, trm); else if(level == 4) fprintf(spew_file, "%sQP:%s ", bred, trm); else fprintf(spew_file, "QP: "); va_start(ap, format); vfprintf(spew_file, format, ap); fflush(spew_file); va_end(ap); if(show_errno) { char errstr[128]; /* thread safe strerror() */ strerror_r(errno, errstr, 128); fprintf(spew_file, " errno=%d:\"%s\"\n", errno, errstr); } } else last_spewed = 0; } void qp_spew_append(const char *format, ...) { if(last_spewed) { va_list ap; va_start(ap, format); vfprintf(spew_file, format, ap); fflush(spew_file); va_end(ap); } } quickplot-0.10.6/source_double.c0000644000175000017500000001004112244565775013545 00000000000000/* Quickplot - an interactive 2D plotter Copyright (C) 1998-2011 Lance Arsenault This file is part of Quickplot. Quickplot 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. Quickplot 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 Quickplot. If not, see . */ #define _GNU_SOURCE #include #include #include #include #include #include "quickplot.h" #include "config.h" #include "qp.h" #include "debug.h" #include "spew.h" #include "term_color.h" #include "list.h" #include "channel.h" #include "channel_double.h" #ifdef DMALLOC # include "dmalloc.h" #endif /* Gets doubles ignoring any chars that cannot * be part of a decimal number. * +/-NAN +/-INF are valid doubles to get. * returns 1 if gets a double * returns 0 if there is no more doubles to get */ static inline int get_next_double(double *val, char **line) { char *s, *ptr; ASSERT(line); ASSERT(val); if(**line == '\0') return 0; s = ptr = *line; while(*s) { *val = strtod(s, &ptr); if(s != ptr) { *line = ptr; return 1; } ++s; } return 0; } /* returns: 0 line was skipped or empty * 1 got data */ int qp_source_parse_doubles(struct qp_source *source, char *line_in) { char *s, *line; struct qp_channel **c; double value; line = line_in; if(!line_in || !line_in[0]) return 0; /* take off any ending '\n' or '\r' */ for(s = &line[strlen(line)-1]; s >= line && (*s == '\n' || *s == '\r'); ++s) *s = '\0'; //DEBUG("parsing line: %s\n", line); for(; *line && isspace(*line); ++line); if(line[0] == '\0' || (line[0] >= '!' && line[0] <= ')') || line[0] == '/' || (line[0] >= '<' && line[0] <= '@') || line[0] == 'C' || line[0] == 'c') return 0; if(!get_next_double(&value, &line)) return 0; c = source->channels; do { if(!(*c)) { struct qp_channel *new_chan; new_chan = qp_channel_create(QP_CHANNEL_FORM_SERIES, QP_TYPE_DOUBLE); ASSERT(new_chan); ASSERT(new_chan->form == QP_CHANNEL_FORM_SERIES); ASSERT(new_chan->value_type == QP_TYPE_DOUBLE); ASSERT(new_chan->series.arrays); ++source->num_channels; source->channels = (struct qp_channel **) qp_realloc(source->channels, (source->num_channels+1)*sizeof(struct qp_channel*)); source->channels[source->num_channels-1] = new_chan; source->channels[source->num_channels] = NULL; c = source->channels + source->num_channels-1; if(source->num_values) /* we have other channels with data */ { ASSERT(source->num_channels > 1); /* We pad the top of this channel with blank * values to make it have the same number * of values as the other channels. */ struct qp_channel *first_chan; size_t len; /* get the first channel without moving * the list pointer. */ first_chan = *(source->channels); ASSERT(first_chan); len = qp_channel_series_length(first_chan) - 1; while(len--) /* put len blank values in the begining */ qp_channel_series_double_append(new_chan, NAN); } } qp_channel_series_double_append(*c, value); ++c; } while(get_next_double(&value, &line)); /* If there are any more channels with no values from * this line than put the value DOUBLE_NAN in those * channels. */ while(*c) qp_channel_series_double_append(*(c++), NAN); ++(source->num_values); return 1; /* got data */ } quickplot-0.10.6/screenshot_small.png0000644000175000017500000006532012244565775014634 00000000000000‰PNG  IHDR«;.´ÎbKGDÿÿÿ ½§“ oFFs75adCm pHYsbb•FiùIDATxÚí]@ÇÕÞÝkô×Þ;êÕ’e˱ã8Íqâ'vœò'±ã$¶åªÞ+ê @ Pï Hõ.!HHÔ,˽üßÌÜ-G?à²Íèi™›òæÍ{óÞÔånTŸ:u={Óšó§OËÊÞð`ö=`}a:™¹žÃ‡sáÏË;˜••qð`ÎáÇrr²à9r$oss"oáAxNÎþýû3¨' ñ‘³²2óòHšÛ¡C‡rrs9’‡NBº½Êß?¸~ýêÍ›•••åUU4ÇîÝ;JKK®\),))¾víJQÑe® °dÛ¼=¹IÇr÷–9ŠFÛw€¶bX2ÊÞ²eCJJâš5+7nL_±"eãÆuË–%§¥­Z¿>-1qazúšääÄÙ±c˪UË×­[³vmêòå)[·nÂÏÕ«WnØŽ¼Ý¶mSB‰¿lYÒÞ½;‘|Ïž_½zņ i4ÿu?xM™ÙÝÿžÀèÚö]¾|±¦¦²ªªüæÍgÏž3æÃiÓ&mÞ¼áÆ²?ÿùå_þòçgΜäΪ¸°&+ÿBÎÑã…äddìÚŸ¹oÿþ½=`]€‚§¥­NJZ{úÈøaÕ(%L¨j ‘rss6oÞpâÄ‘«W/_ºtžIä¥GŽZ³&o‹Š 0+.¾ WVFÄæÊ•Â;¶ìܹíôéã—/_Äà»°ð³Û#ôí (ý5Qb´2yzà{ &]rõܹ“ÆXEEù%˜‰ÌX,))DHAÁˆ ÆZ²·ÐNw]¾|¡°ð"ü,*$AvˆŒ„0 MÏš*ß,ä2)(8o „Ä’æ‡`3?R!¼In €*bâi‡eˆŠ°ÌY¥h¶—Zʇ¡$â#ŠÌA€-õ<[ÉŠ%¤ˆ]¸xñÌ¥Kçzà‡ùùgÏŸ?ÉÕÖÞ,%ã-¢^Lƒ­bøaÈ•—_gbsõ*¶":3Q †˜øÉÆÊl¬†Ÿx²îH{ãF™™Ö"³´ bš‰ uYSS ù¦9\aùÓ´d²~„³§˜-"WV–7ÒJUUåx2üiï€"H8Šaè"øÅá¾YåL‰# ñ©ð¶²² Ὣ(~Ú3]c9#­¦Óg±™šºÁ»pá4­5é­zàû lƒŒ© LCðâñã‡aìݾ]Ãæsñ3A\¸Y<öª««jiè†paUU›'¤¶æUtÞHY½u«£5xÀ…‡d 6ExAÁE Ì‚Áy á/ž3§U¨ÖFÅ![ vîÜ)DF>"äûöMø¡Xòòs` A…} þ®©¹$ .a‹P¶§N‡ ÕÖ’in<‘‘/\8sæÌI¼E½ÎŸ?}òäQ$,6Z]Rª¶ ðÊèvR)¡~@øŠL©›Œ~Â^³ªª²¬¬ŒÕ«W._¾tÉ’„eË’W®\¶hÑ‚S§Ž%''&$,\¸pþìÙ3·mÛ f»ÄØ“Íâ-ÓTdÊ~âÄñ‰‰‹’’¯X±,1q1x==}õöí[00[»vUZÚêÔÔeˆƒ·°²æÏÏÈØ“ž¾v̘22vC*Äéc*«WÅâ $àc` @ªÄÄ…ëÖ­]²„ÌdB„ÛÑ£y.âçâÅ ÞÿÝ¥K“P.„„©5– Óu Œ/^xìXª¼eËÆôô5Èâ4kÖŒqãF?6>~öüùsÑãœ>}"5uù‚s—/OÙ·o7ü(eÁ‚y[·nd4aËzÔ\<r·k¨Ùßi ëTT“ˆJææÍ pɼyñÓ¦M~÷ÝQ“&Më@ i={v&%%‚;7lHƒJ9x0ûÈ‘C_1ëNÌ„­³ä¡³¾ñÆë&ŒEVð°Ü3$ 0jÔ[ï½÷ ]µj-ÙÙàÑÑ£?@|x 6Ìö£æYMÅl³²æÎ ùÇsæÌécÇŽ~ûí7¡OÀåë×§A P¼sæÌzë­ÿ?~„™…ly€ªVbÔ¡ã@rÄ™4iüÌ™ÓiOž<¶n]„ÒøÁï!Oˆ2ªññ³ ®ÈùwÞþðÃ^ý_›6­‡ŽÍË;›{&„Êœ8=ð½QS]1Ín%ƒ®zýºµ”“eaÈC(8æ§FdQ]2f]¾iäjMu0ÄoïÞ]Ð9ùùç0Ò`’†'4Œ($9{ö¸<[æB’°yQP)’ÐT7u åå%tÚ ü„S©&ÂíÛ7¯]›ŠÌ™ø¡P”­‚W µÇfþASAã>|ˆI-¨•\Ì6”PÃø:°Êχò)“£ú° ÓÒVÁ6f=ιˆWÅÅ—`š2¢u{c÷ÀC*¨t¥Ph{6¯…ŸDŠÊg“vp8 òÃfÏØ':'v1ñŠ¥ºxñ4ž42§G‹äɲ½ZRx ãö‹ùùg/]:{ñâ@aሀN'^ºxñ,Þ²ç¥KçÒ3 àGnùùgÄ4æy¼EVðSà‘ž´R.žÀ™7ÉáÊ…pBÀŠŠ.²™„ˆž†e] Èœc¥0TÙ\ ¡$çÎ; B™Û=ð½=4Æ hû‹Ncœpú̉S§Oœ!mÊÜU£&¤Œ›¹rrüª5ë¶nܺsnÂÚS'UÞ([½:uÑ¢ùË–%'%%¼ýö›cÇŽ†ÇŽ­99™Éɉ0ÞŽÎ^˜œ6oIúÌ…kg/^ûΤ¥ïO^6mÞj„@ïÍOZ—¾q˱#J®Õoïí>¨_¶î^xÐ0_Äÿ“¢óh)u˜§O;|äpΡÜãÇ;vd×¾œ¬œC§OƒÕwìØÑœƒ óïß¿s÷n-ŒÀ»wëàgùàÁ½{÷êèhuÝ­jäƒaXÎÁÜ£G mföÁÝûrNž< ?àþÍ={ö$]™­±joß¶0fûàÎò¬««FþwîÔvEÃͺºªnEÔ¨¥ËñÕÝM Ò"à Ö:ÝDŠ @£ã™TT”r55U›6o„Q—¶vžkV§¦§­J[›ºzYN]³&uÍš•k×®^·.-==×À³aC: -m5ý¹fݺµtõv9´ÙÚµ©kh>idIw[–¬]³jÕª©©+öîݽ{÷ÎÍ›7lÞ¼±UØ5¸eË& b¶6lݺƒ½mÛ¶lÚdõÌÛÆ¶m[F÷!°qË–7®ß³g' [IL6±邿nW‹l”ë:’ÃÖ­› 6ˆ¦òõõå¢Óëõž–ÄT(]‡F`` D"y˜oê$ihhh÷â§TªÔjuwcÁ ‚н8€%€FgrX·n5ªä%“I%qâÁèCÚv¦$¢§ÞÏ~J¥R„ 8ooïÖ³¢%îîî+ Ko—sttŒŽŽvvv¦eI»¢ˆ¶*H ½zõzø¥‹çOÄDönq666±±qÎÎN’în‘ØØX Óäp …|Ó¦t&TÁLF»º`ýPPP„ žç[ŠÉ^¹ººQëâÀr¶³³‹ŠŠ‚hµŽF×9V¨““S\\\wáÀ™Z¦ „ªÑ€“ÉdàæG¡Ebbb€L’Ã!áÆT¨˜¾{˜Be0,©aWsÝ.TÌ¡ ÁI݈+Båçç×]D`ìnvpèf¡b&L„Š9°«Q¨¾¦z¤…ê!6hP‰Ž U·kª¡ê¸kQ¨è8Y¢ º¾e{„Jt=BÕA÷ˆ O àÑ×þñeþšÇœ(Æ]K¡]PuÐ=ÊBÅ D5Ùiåýç"^S=¾Úß5–(«®lß¡]PuÐ=êBÅqá¯+cÞ×À£{ÊyèRº|×#TÅõUÝ#+TL¢ìÔ²þ³ôPP‚””¡òˆ³ãLòÖ®G¨D×#Tt¬P1u¤éÜw†#+^FÂôÏ8˜CðÄÏ."HP‰®G¨:è]¡¢ê(ôï^Á¯ýS‚œ„Èœ$C–øØxH»ndÕ#T¢ëªºF;*Ú¬áÃÙQ!$Dá"í3UçÕמ„H‰îâ%|äTþ¿q'!ÖVVâú}÷ •¸£¢G¨D¡²ÊŽŠrp9g¢ïCÀ;00P¯×[ßÅÅ¥‹DÝÖÖ622ÒÁÁAÄÊN#0× w¥Å™ÚÔk€C¿:® „Š9 €&슜-t¬î>>>ySuS‡Þ*ÂÞÞ¾{Ñ@‹tFS]7nLcÛ”‚Øo¡¡ã­í˜ÜB¨t:]›‘9*T µÕÑà¨¦Šˆˆ`BE±â=úÚõ›MD]"£ÈHËN-´ÄàlÃQõeuÇ„ÊúùZìDM¹âLÝm·8¹\Ûé^R d:–„hÆ4®ººòé§Ÿ£ƒÉ‚ƒƒCÌ\hhh˜õr ‡V2dÈÀÛÌœÅg+¢Á2Doôøãƒ¡CCBÃ#ÂBýÇ}ýÔ̸@UhxL+<ßœ3|LT*,<:̺ˆ¸¸¸#F°šZ½š– ÀZÍ1xð`´øCFÀÜý@ ÃÝB ±P 4€L’Ãܱc ¹M©ÿ~žžžƒAoæðSim§R©ðÞ(Þ’ø@ƒ%±ºCíúöík¬£J©V©‡ÅþX­tW©4&lÕJOWeгÚLJ¨Ô*DSZ 0`À€®¨ …Ž‘¬c¸Ñ€Óh4ýû÷ï ®k—@C«Õv,9è¹eËz2¦ò÷'ƒT Ñ„ìÀÊ0PI(Á®0[ýýý‘¹%1Ù°µ+ªÁ¶±±1þ¶áú/Ô vÍÄl¹Ø‰jÏ¡6íÉÞR 3»¨Ž–;uÝ‹Ì'v}‹t“@ƒïÄL 1ÿªªn°CŠ'H›ÚäP³­e¶¢½FkÉ–Ü’t@SñzÕb’ökª.â÷¡ê «*o¢©äÎ’s½ ϸ°·`¾'·ö›e”7<ÝÜ]¥².ª¡É~äo«ÎxÒ¾—ýÈÍ"zf¯ëeFj/ÄÓ>žàÿ‚»sMÈ«žÏì V¦¢(iÌ+- oÒKÁ î•ð†ÿŠ;ÿ¤£ñ ŠÐ¸ðJ¬]üh‰P¡ÐwUÂb½0J)h)³u£ôU]£]êžý†,!û8éðƒDØ C’}ûNÕÛkÈ(ËÉÎY -ÈKxëN»A¨¢cÈN3™«ðØ2?;%b«MÉ0ŒzS5pž·ÂUʶ±Ë%#f@^÷#çÇWûG¿­á Ϲ<³?ØÁ›Ô¨·4+T¢üÉOòžwáêÌÿÆ•Ÿ¦–y jSs &`¬ï)åìÛycMëBÅú³ já¿^r~ɇhidÆÒ­ëz„ªƒÎLSyCHb?Ô˜¬)ùÕ“ë½áâipwPÖ/±7íé;ìˆPÅEÛÉíÝ{Ûö›a€Î´X¦è7Ieë!o +9:=8$ÙǶገ¹P1õ–s51ïÇäGBÁÜÒcž~vüLÊô’¶ŒÀ¦BÅDÈEÂÍÑ }íy®‰ä0.™¤~îb©>´ÄõU*¥ô3Áýæk¹V|.þ⻊¹÷]äT\“i4ÖòŽ>ò¾“õƒùôÒÆþWgû@¯ÐèèƒþæFËëÚŠ³}ºqc4/yˆ?9s¡2]ÙaxÒ±ã#ÖÛ@&ǨøT$Z7– oŠÿ’›ð/A0 ®‡ñÛRo‰‡D¤}g]PuÐ ”ǵv>OÏèðgWÎb¡2Æ8ŒÁGn t¡3lúg…»ôG»‚‚_öt P¿ä9rk`+»Šld¶¡‘ƒ¦x bödWל<¼8@Ór¦QG…ªWl ~ÙÐÅî¿xðïªx çZr,íÏœùTµ¹¡P1Áþ™ Ÿ`[ãlŠ+?V-ð¦Ttß7¡zȻԽ=ý^Ü1Ä1¸µ¥¡f·)1^ô~Îeh aM±¿gSæ‚_%Œ1AUw¾ÚÏÆ³¹ ƈq%òË~Í ’º5XºíR'µ†$ùÊ]èÊ5Û\œ#cãØÛgœÈ@…áÛtXZƒœ›¢ÆN-9Fg*T,Z”-¿Ý_iËó-k9ì&á¦k…~èCKœéS:õWñ³6*fhDHphXxèÃq!¡ýþdJL­÷?ņ¾º×F¿4¬?pð   ³ZY‘¡!êˆ9ÑÚ7‚½|CÙ…?ÍE õ ‹ìÝwv¬nUoïáQaêÀ ÑEAòçcC7„9 ôÓù†Ft†áááÆ ƒéeE‚wÀ ¹êXò°°ð;6¡¶ÌWj/RãöV¾¶#VkÃÙÑkU°%ÇÚGÎsÿôf8sQ/¹ûÿKI°“rNŽ]xò—ÍÈ °'ÛÛåM¦éYÿ¡”¾æÂÙé|‚ýý:¶:&Î.¾§þé)p lïì[þ¶"ÕxëÜ¥ÞpJÍxˆ¯­|µ:Ï6nó¡oºy5Vå¤m½Wä­uò—R=ò¿ª¸1Z s”<¶ÊW;È5ÄîäæÄu¥P!_¶ÍÜKÊMÕ£µ„ý¼9ö¨e'ˆ»ú8=£q¢Aâ'o¸ÛˆúúÚñI>R°¿¯o@çŽÓ³œãu³ÎÄÛ~¾]ëT3µÇwÅâo—~ €i{•"fªWìÈ0•³®õõVk Ûáj¯—?¶Â×ÿ×nN~6On þ›‡Œ³‰éå`ß…«"âN@9—lÞV·ü¸Û ˜çí@¬g—®*Æs?uæÇk¨1!ÆÑõ¨eÞB¤- ÷³ðä/O/”š}CÀCÊ%„‰ÒT_ ­š— •¸èØÛŽäÐ`k']—U—.þ²Í{º.£Ý1Õ©õmœ´ÞŒ Ü¢lûÍЊ÷Ž¥_µ³·‹ŠŒê¢õ{Á¤ àù‡§0_Gr&sEb#ôž õþ)æ9»:wõÅ/l)yž^xŒ²  -Ç_Áí ÐúÅßöeÚ\­ážtâgë¶p,˜EyKÚ‚ X.Tp¿qåè…YZa´Š·¬³_þ;(T”À‘ÿVþÝUïâëã÷P¿OÅvµË%l“;ù`¶]W •˜×KnÂB½ðoO>ÜÆhñ&LÿàúwrGWk*_9·Ü[€v‚?ÆŽ[ê-Œ¤; e‚EwT°æ“Ú †§]Ȇf®.f’£ gï_v7«²)‚›” ²i€•¹³D¨XèpG²‹Ê 'Fõ\ðwëîúŽ #‘ÜEÒ†Ás¨­¯ÆßÇÿaôM<-•4ý’bÉ[ý):Ö7)x46ì½h[cD±{f;­4#œâ0À²åcãºV¨D¬b¨½7M+,Ò #šS°äâ¦uåü€ùÞO¦Oõ7^éÁ7_£ÀÍÓ PYœIc;Üß=ùY:¢[ƨ‡æÎü[(Tvz‰Á$×ržì¦ì`¹zÄ„Šoã öÊ=ÆnÀLoNÎyûtÃçIyÓd ǵC¨Äj¡9]%¤Ëg×O4"³cN;ò+¼%CìëÏ|5¸•…-µòó¼Ášv2û¸^].Tœ U¥” ðÌï±à-*:.úŸªÿ”•z˜Óˆuð4—ñVÆ­ô–@BÀÙó[ý%¯yò)úEW#L&‡~Ú*–ókžÂÿy¢e¼q؆žk¾^à¾OBe~ֵŹÂÍ|Ð+1£Èx&$<øüæo³N¬Ð3Nü$0E+`p2U#°+"Ìgu™D ´ç—éj”fò5­ô¦×>å¤àìâz? ¡âš\ÀdNçÖ„ŠÍ^p‘îÏ™ÖEzOÒ~ìb¬dÇx½¿=Ÿâ-™¡R Â`ûµc—Øp ···.TÌŒ´8~öf׳ò1¾ µéìFäGF¨L•óêíÀ¦³šá bã)´ÀÛ%„˜ Á!ß ¡bÌ>õ¥0]Kl 6?þ¬‘œáŽÆTâQÜÎFm­¬Õ0¾ŒxMô779oûo¨mlÇZ Tè{×úü‚̬HèøÐ%Ìfè2zP@h­!Ê´–+1{%ccüû„j]¨˜øýÞÿ‡'o>Ncå£EÞUÖOov2„P™FJètÏñ¾ÂOûd3WR2ú¨†: ZlG=š_§oäX+êåÜ*á-¥‘wÄi½0²&ó?¥ÐËΘ6Ö–Oó~ašåkÅ1¡Ò=éÜg†ÆÁÙ!:2–0î£yí3yˇ¯ñ—Ø F¢ƒ|Ücé5-p¨¨ͤ›&ĹÙZr¥Œ¸ðЊP19UAó€æîŠÂ ƒXgI§¦¡’(ø^㴽ǑKX=úØ?±)Ð9¨áñAQàúÍÔû>ïÊð~ô…Š1A?{Xÿ’\Y¢¨0½„&|Õƒ‡)8VÍ¿¯04h_?åÕZÕ(»É$ýæj=ƒ\£B£Y¡bþš2â rÚZ0»ËÓðœKŸ©úúÀf3ol‚]ÕoéU,ðqtLŒCs-Â8ý×Xµ`/4W Ontû“{}n&Ew «µú1Ç!K|8Ó2”jˆãðÕþ¼ÙJ‹ænûä¦@H ñj°P‰]ÝŸ=øDƒqºéÒŠ8 ¡–qCøçœyzU¦ÅƒQrõš¢ý¥.Â/Š{ˆæ_cL,ÐTÃVù9ø(i[/éàDy‡´“ ¥”h¦êÁ ™,6&ÆÉ‘XÕ¨Áäd´ZÀȶiiìgˆ ¹îFÖ‰ ¡¢„8Ï[;’Üï%Èyv¯X¯ Ú¨7ÉÉ ãý˜4Ëa+üt?"–!;bøÈ oêßV hBOú£¥»Sšî°üî@Öø†ç_áմе"T¬ít#Îk| 5R„>“u>?såZUV-9‰i^=—/µèÀÇÁѱ6öŽF¼L1™ëz¦Vhåa{SY¿TÐaRt³ù§p—[é×à^.Þx‡„k8ŸJi'¤á4h!M íø’b·ã]ùqjí{sGS5·òÑŠP1Q%âÕß^ÄÙŸŸ»Âªç:$Tœ‰Ú/¹ñé¾Â¯\ø{IGzNóV<ëd9‰é" üʸ+¥Y:7s8ò£”<ßžÞ­))ºM¨Xšöž¤r¦ÎL3ÂéG»ƒìèeèR;aø*÷;Ö²P±†‰°åÐ#zË££®slxH|À°¿ôe3l]YZ=ÓôãzM…Š¡§äðØR²Á¿qnlTd3p¾7{Û±K>…‡;òozñ¿v—Œˆs³OÔòÓu¶ Ʀ[Ÿpä§kÉ’qK¦+\/ç&©Û¾–£Eu³PÑN¦×X­ŽÚ~|“ɘ÷4#·ù<çÚ–¾×¸úƒ¬P±Ö{LÔ÷Y[ézé–+H«¥ÿ±óiA\G™ÒÒ²ØjµkÍÑ×ts­`óBE/ß–Ú 5oÕmòÕV8øe„ŽÒ«>™D'¥æßµdªFð¡ÃT˜| ôB»ÖE´þáÁÿÖµƒÍ×y¡"—ù4ºM©»ÔéE° ¸½VÖô•hô£ ü½‡9ñ½iw©³&æÀWö°â‚Ö½«í“«BxyW–Gs¶UÉ-ðf—"êž®ï E¡2¿§„™s~/¸ö›¦';'ZR<ò7Ï ?yˆ7àwÌIØmÒ2Y\L´‹#ÛÃDî?›§^qç§jxv_oë]>³ÃýÄÐ0tâ»$V¼M)„ý¶èÖ:ƒ‡QÓÐ%~2;I3wÎÆ8ÆÚJêïKbw÷@†}||øV/Íit›’ËÙÞÞ´cw÷HèÅ@öþµä 'r‘üa]æ£àíÿ°i„îYr[¨Ìú¥’º ¼ÂU:|E@è_É^Ï^öOnR?F§—$<3O QÆ$h/ ¯p‘Kñ×=I£I›AŒzÿÄ5n´¶Q+wÀšÓÛ”i‹($D“ÆÚ /{ƒˆ”ÑÛšÚÊ„næŸqâ R ½ ´}´"%°n@¦ý¤6»MéÆòlû÷û­kÐ?]Ûè:Zè.üýýU*•…Ýß5#x›ÐÐPóÃÛj 7YÉYõþ€¶ÀIGþsPßEô&¥®ÃQâE¾£ ú— +Î9V6x¥^ælö-ƒA'^p@“øþÖ%r¬'ßÖÕFn½múÌRËܬ`¼B¼#""Øas®£š›áñG'n¶gsáááÙ\NnSª®&·)ÑàCBÚr¡!š‘ £¼ì‡ß­Dm ÛoðàÁýúõk³ ß’hÍ–Ö*j‘‘‘Æ ƒXhˆ_hø_½ÆEjT!‘!mÁZ.**zøc?·=&rd`°!44Òˆ}(p ò€ !#CXHh`XpLÀ϶ÆÑ£HXxl¨¯[àO’ú¨ ‹ @¹?+,4Hýã _ìê;82È?ˆ\>Õ,…Aß ¨¾O'Çô~>,ÈÞ)R€•‡ÎZÄNŸíª}DHˆ>84y@@b }h€¿!¸xì6% Ó^ü}‘pÇŽÍä6¥!C{yyùûûéõúÖ/‘Ñé´:½V«Ò=ü˜Aí¡m×%@è¡£úôéÔÙÏÖã³ žÚ{'Ž^G¯LÒPl[¸ûÊyàÀèJÈ:^§O qî£ñPê ú‡rµ«{`P@ÿèA¡/èžIV:j ~:½7AZé¢Vºª|C ¾a¥«šÔG×Î4Z½¯ÎÓVýøÔˆþøi”ZA‡@4Ÿ^£Wé”?ËŠ êç«ÕÁGš^£õ 6<³*:ôyÊQ£÷i¹TVoÐy9hî÷F0<óN8hKô¶h­ŒÑqµv*íŸÔ6›b=ûø\Õo]ÛÊîíb·)y{{·»LêÐx›Ä j 9º¸¸´¡Û¨Nµó•ôš¢¶ñêàðV«-º:²ÍÛ”Z@˜¾­5¡å¡™íìŒ×@†H¸ñJc‡é`¢o–:}fi^qÃÝ¢m#ßó0_7x©Îï%—Μ`œfÏ\¢·÷n†úg,ѱU6°:/®ù‰}ïé¤uø6›—šHÞ?u‰åÑv䶆ô0DóÏ*n‚[¬äØW,¤ZhtfzŒÜ¦TUE¦ÔÁ»3ww÷Öo»•È ×ùÿÚ=ú5ülG‰åŽ™ªP²ì›¿m ^Á[t¢¢Í˜õùÓ¹qw)?^#™­—üÃKp•ð’ærfS)ÞV ?rb·‡?<DZô&w©;ùÚ _éñºÊû'.½?ÔXò²—«ÌÆC6"= ð÷dú§=3¬¥‚ÿìÕkŒNj+°í…õŽ.‹áUÄkD~BЯú“OlIùa+üülxLcð­žM£;zËÍóq &£S¡]3 xí3Gg‰;O^6«þ#a®^â,á¥mMu°îÄÄÄt`¢‚9™Ìxí³qŠÍ³µ.…Æc ÿQ¿âÑñ“wå”:[¬ðrK Â*Á[N>¤9NÝüñ5Ó:™R·ø$įÃ}SÇñ6%*Ù¾ŠØ÷4qïk‚_öT°/wQ5b¯—?±!€ì¾³œàôÔdi@¼A5”®Å5YhBS+Ü%#·9øËôjCp4¹û1èeÏ>Séíq–Qƒ '’¨‡9¶½æœùeVq¼iµêoä[*‚¬­•vÚÁº_ýhÛÐâ‹ñq£5Ú'›,ûZàš [ünæ#Hí_üe§ÞW ï©êÑš§عFL„ʙ.þ>å$¼E¯:zø{Zë¯(k²µ†íÿ’Ð=° BÿæÅYŒ¢ñÐþp§>St2Çæ­Öv¾?s±Ç'0,ÀƒÓ{?ïüÄÆ9zu‹­M¶¬ö¯°zuò3ç]ñ)ö=U«þàÖâ.'ã Z¨‹“cLŒ5-ÝQÁéØg²Î³aÕN U+”k¯P1Džwá'j`:R²=‰½íȉ]®É;*Ú„¨$#:ÛÏvЙôœ¡¦€AœÌï …ßÆCJN°Û[Ln1ê-•ñsͲ;]Á‡ø…ý×ó—™½žY=(ÉÀ¾”׎ÏÓÆñˆ³ë?Û píÔ¸ª‹¾OÅú' —â-DÛCÌhP_W)=„jï­xhÛ”˜Ià è?KïÄÎùvZSEØð3´Â»Jž}Æ­þR«öÃ)Ù I&’9äJ¾r¾Ñ~0&TN´ 'i$†núÖD3—i6U)oèÿÝ8 3Ö(NþŠ ½]ÃlEû¢¹¨Ær#~ì×çÏÁ2g ×Þ6¥»Ù—Wƒ›9Jg¹ëº¾±þ4Æ–ßå/ o‚#O÷aÌÖ ½% 4ÜsjGßè8^ÚÁ"í*Šö bTÈD…ÙÇ„*0(Èϛկ\…~’þvܯ\ø•>Æã€Fy°X¨ÒqvܾI°¢>D¤2ÿ§gããkäëôQQ¶)7I+é–ÇYvC­i÷êcË}-ù>‹àýœKï ¦ÑQËy³1¨| ¾\û{IÎ4ÌŽýPkø‰‹ˆm\—~I‘5ïH'~µ¯ÐßžìÓ%£ò…åw”BŠ7L–¬ŸŒ›eÏ ÷p•up˜Õ¦ö  þ•[øëÊŽ‘5aXP ‹V"ã6ûI¼M*•\bžråÊ"¡bûBÕ2r©Ý€&_}f¡Ò‘£æ4líìzEGIìžu$óò‡oùQgéµÏT–Î7xö¥VwkŸF$‰­ÐkœÖð¬ ×Ö¹ V®¯Ÿ¯@¯}f»«õ?vé5^kù`¬©ëêÏ“²¦P©ä_uç!NsuÂKî¼½Ù5œÂþýÞ‹tR9ßþ-.UE{5-ð{ò}µ L™Pùy{{'¨¹(vê“îÚè…ã+¼<%¦©˜Ö…ŠçŒý Hó„c3ÃP†êï*…a 6/CSÅFEq6oxrCI:6ßjÕvlÛ5ªæq £gmˆòi­ oÜ¢í†,ñ‘Ò[%ÚÖæ6Ôòí"—(Ü$§û³/¯vÌ5ý@ˆ†µÚ…!žù¹ ÿgþgÞÑÄ1ìx¸;;¹GözÃKÎ>¶ ã-/ž-TÒÓˆPaõ9ûG3ÆX¶,@Îd ¶Ë‘õŽSù$÷ÒþÒ¡¾ž¦ì¹áä€'[/âÚ*©éLá(%ùšG³è°°Ÿ:óÿ¢ xŒ×ÑÎ.("ÊÓÞñ7ÎGÑMzÊL¨ÚpA§@›a+ü$r¾™3åæD–òÿV†¿F?,Ò– æ[>¤h¹cÓ½' ˆq‡$Ë\Sukzoœx#…™Rr”Ëj8v홥9SþóÞ3ëÒ6²¡6""\.W´®©˜šr ±é3UÏÖL:@;f‰¼ªRŒÕ@Éímlxú•UOOOòÍç¿^üÝj§¡bÔQÊøé!¢É¬Žè˜=ÒËŽèzvît±·S‡E=åaÿšJ®Iår¹‡‡0±±±{h*‹-5¢¯a{;ð)ìííÒôã`2G z4¯þ´/o¹GÃp÷±•~ W)oÉÌLSlh‹+PÆ:Kv´0!w‹±¶Ê³d+FsŽ\ü M…Š£ÑÑ"îîî`xA¬Esfà0h0X0­SÅÅD 2y?7»…zÞÁÎÎÅÅÅÞÖ¦uÏn¿´ñ’ŒLÚ}tWQQ:dÈ`•JÕúçV™±§äÐÛô˜öZÏ”¿y Ç­õ òrç¥rµ’ô¦`#²™ƒV˃ÞÒ›<ÝZ*¸?»óÿç!HZ>”Æ¢yJÉßìf´Btü"¢ÞÓÛ>opçä¶¶ 9,RFãææ~êÒkåÍ*ð“Z­fý Cƒm㸆³‚ÐþÆ-ör!i³#%ãÒÓ/]û²{Ž,0%D¡B¹¨µR©û¢EØ–ËÀÀ@0´E5¡èõ›©†\[¹fÓTc01ô~²¨:–”•¿?Ø2)È÷©¢£e …½Rý_¥ð’ÖÁÙ' $À_Úê$;³_u{G»6i54UY¿~}Ñ%´¾àeœSú™KôÛäÔFl?JgánLÿPgA!—iÔjêÐCƒ›ÑœŒ—a­¦;! T²æ„Š‰Š¿‚ØŠ>¦Ëb[Äœ>_óäŸNb‹@ »‘½cæû;„yy(œ]]ÑlàiƒÁRtuû‰Ž™è8Ô”@]›——¨Ñh¦ÑRµ¸ÀÛV%c«LÍÒeø?ro‘)! ú5 `憀A®,ý´!¥²½VþÄÆº<Ò^¹bBNýѹ¢¡®Ã[,w¼ÙÉ_;0ƒRæî´ÐG¡s´÷Ðhl[Q9Ô" G$'iÞ|ÆåÜÚµ©h»F½­zÙ³$cYkÂx7nHH ›Î i!òu•p3´Â`;Nêì Û¬¹Z…óš§`ÉUoLüŸvâßTòlˆA…Êö~¡ïè‰Ñ%yø&g阊3™<ýž:ðdI·‘"b3oîqvÃRýê)Þf®ÖS-Ñð¬Ëˆu2z~·]LÒÕ³’‚ •\fDý?žüódïPk—ɰ-§\¨Ý_æiSB›˜P±mJ­Ù<Ìdò”®ðèMguÛ©©ÈÎ+ˆRúªçéèãÝâÞ?–ñãŽüdçìâÊ71bØÌ¸VF&ÊÙµs­óñ–9ù–aiNÂI.àç0Ò±¾Änqí*Í5#œúÍÐKíÙYó·ä9h‘·Ïω¦µpÅÉšBeô™¬±lwâÚswÅ#%T@† ÃG~ŒZ°kõX:«fxÉsãx¯^R>y…SêÆÙ'Åà™=Öžq£éS.܃ÔCàƒ|[*qëÃh%÷W_7IsB÷²ÿg‹o$eY¼éE&R%T¼Ãlø¤@;g…¼M™ìR׮ϓ²ù©ƒÐ–žt¯ÿ>Ãòˆ%SÛvTÈšBe¯X4À„mz²pÞâQ*Æè»&h„þM–@Í’Ñ©/9ÿÌDí‹?uÁï[×µC¨¼úÛ÷FéÛÓ·3Ç(`±^ˆ¡p¡ÁmìRgÐE Qn[©ù#f†Ûp‹ ä²K %Æ[AÈ]"ŒåÆimÞìÂْݦÝgýµû›¿Ì  ú“Gø¿”LŒ2i‹ ˆ÷ö~ÎÅHtËœu…ŠcrE‘ û—×3!Ζng{Ô„Š3õ×/¸òh(Z¸S• \=ÂmŸYèmço#å%›·´GSüÞ=âߪv]#. ¤ú"Û„‰TZpôƒ­SýÒÛmq„*1ÉO¾ -°ï©YÞ'³îc°ùzÉTÿ–ÆÎíÜ}MÈ\{…ʸýÒ_ÑwšÞNc¼¯•B- œïm§nù×f3´¶PqT„Øl˜îGÎ#·:˜.EkÕ=‚BÅnh‚ ž T4sŽ§Æ‚œãþþ¼ËOg`ÙÈMÛ”,S¡/Œ¥ö}¾í Sžkl€NÑ ¡ꢷä˜íRov„U¤N®WÊ ^¼Í1'i„?ЛFÚ5íÍS¹Bú¤“ð¤çlgÙBÅ›)¶÷S:UPæ¼âÊÈÄŽ‡D¼¡ MÉ·sÖ…ÍNYW¨hõŒL¢yÜé Œ¯ÈUmÈÕ£#Tl‘ÈEäÏî†|“Í®Ì ÷ç¸5cTaÿVñdRYfª€€€6‹”Øñ}gi‚,ÙmÑZnŽŠûkÃ9j§Ñh,ÉÄÉÙ Mñ¸ ·PͽåÎýÈŽx&yYáŒ†ÌÆ&2<\rmèÐw"Üì=é=.íCÃÝÝ‚ …Ù¤Pz(õÚç¶EûTy9«Ô@¯¹fgkb Z¤]Ô UШÜí½<œ¼Ú[÷¦¤0¶ÈÀAõ² RéUJ[/Íô·ßi\Uªžq•ZµƒûªÞ¿[¦Š1¨ÝȽAäâÕÓOÿ&YDDDuááá¢'44”ü ïý“È¯Š „Ñ$¾§qè32œDÖ…ý¡Oĺ~ |lþ®wx*Ìß?4LÆR„›22dHÿþýÍ jê©cž¨ˆð°0Ï 0· 0Mp˜éM§ØhøðáPô­£ÑuŽ üñà€VÔ…ïÿbæ€_îèÝç ÿ`ošI;«ÂZdu]AŠp´oXÿÿ ùÙª¾¡¾‘½"ÂÁ áá‘Q…~)ÚÛ"È*Ð;¸ÿs±½ŸŒöSEDGP6ëª1 Æ2"‘aaQOz¯õò ‹Š6eŽ’"#'…úŽ~FÙwE¯˜P‚NdT$¹¢¬²²\Ü¡ Ýgooïéé }‚~Ë|oêG¶‘ï([Ñ›6÷’7ÃëßÖ*:•e—iZñÆ‚FN*•‚™Zß™õ€ÒîLöA¹E´lÍé©ëºjJ¹>³Õú_µÑšèÖ;Ð"îCäƒVèúÌWinn±u´h5ûj”÷‹†ÛKÜ8nž §{Ö)z|}Ë4«ªÈµÏ¥ƒÙ}klØêïïÉÖÖ–\²#qjýžÇ`7ÞNlzØÒzCm…EÞÒwÕOr‰Y>¡«½ÆûkÄ[lØÍÒí½öYàùöÝ$ÔÖ¥9|£kŸ%¸¨sh8;;ÇÅŵNŠ–³àÅ#x:F!VwÖܼéîbëÖTB/ˆv´¹)8ð·ž‚Dp´óŒµgà r_4-W¼MÉBj ¡ l½äOn òêåèíðÜ¡p¿çÝ û)ÚÑ ´Âd´¤ìåè QÈ9»˜¸…BÄA ƒã©–ó+ü¤a¶ä‡eûI:é0¯ù«Wô?•ˆ ³‘¯}6ŸýCŒ:p?ó£ 74Å×9ˆŽƒÍ P7ÜO0?v26°¬å¯ >²_ýèŠ",q˜ýkL(iZ“wÁ”zsHÒíÑ}íŸL²Ø§ÏdÝÀY†ÇWúÏ\Ò·MÏSµîج}Ø?¼Ø!–ÿˆ4§=~bá(ò9 ýgëÍð’dˆ|Ùá+“Êš‹H¾R·H/°e‹§øx ·úLÒ©‡³oòR‰x›RH·)É]%C“|)™C4GÖV ·ÍÖ aôi’6w õUC×y¡ê¤{8BÅ™VØlÜ¥ÎA6¶*™­Ræ÷‚Û3YÁn‘ìvO©3±é7KïFwKèÉ¡°yõ™B÷'ÌÒˆùôž ˜÷Ô¶^2G?ùOsÃ‡Ž¢k£³¾ëg.|²7¹ú.ÕGÐI8©»ô±_zé ”'o¼£¢ª²"´åÅ_F 凾3ôt$ù‰>Â]ʽà§$¿wãmMÇßÛ¬EP5r?¡"® ›Fü[÷¡†mßl—P1¶t´é;]o§%Ã0v8’^:àòO1Ns‰9Ÿí$@üÈÿÒƒl£½§íóÙ½4O4s½–Èáq¶ü㎼3È3])gªŠÊ ÿ `R¯æ„ŠE ÿ·2Š*Y™À=á@>Æžh>T !¦;z-ÜÙÐ#TÜK¨¸úÌäƒÖ´Ø›m¹+Ú!TŒ-ý~íõ¶Z<Ý̤ˆ|7hýátÞ$oôþ]râ7móåÉ –°Ei‰´P gÃÙx¼ïvÁ:kCÝÑ Í‘ÿQÑ‹eÙøÖ(TuUÑ¡DS)š*ZüÐÙç>öž7F-ÌÖ ?it¸ßb×#TÜN¨Ì‹¦ìÖk‚–íWÄp¾=šŠDˆýPãÿ›×¶1)r ³}jG½ŽN$¶“½FÞk¼vàoÞtÅ+ÔÅÃ)Hð{ñ„E›Ýeo<£K­ÖÇ–ù÷ fBõñÍŠ¥CCèðP"o4Ç@;;;!t·ÁKºF'üÍ£þ½Œo÷þî¡jä~ÈBÅ´þçÞ“t;^"H-*¶ÝIj/ôŸmP fœ[ŸÝîäÿ;÷§÷¹G“ý6žR—[¯þ~¿p û›Wô(uØÿy œcˆûP+±áÅ ?X¡Žt›’|XªŸjhË7P\#m‡,ñQª¿¡¶øFŽƒ¹qZ"ïæû¾%t¸¼¯ÃK ‹•’Ÿ;Z´2¿×{„ª¡û! »ˆSb# ^ìíaÛ+&Ö2¡¢"äÙÇÊÄÞ4 j<#ÞP Mòí3E×wš®ï}ÿ†˜·Ô¿u÷{Á-äUO¯¾ö& 4 Ùû#ᥞýíG¬#»©ÑØ*i½'ê|Ÿw·5òfcªrÐo¹µòWÝ%çñhÊÁÿôš0VK§¥'æz„ª‘ûA •iZ°¡äããÍ>oM>dì§úɺ˜^¦?µ¥&t„ÏÏwÅ ôAODð¯'&°ÑMu¥äò¡Ó™{23÷dçdfegædgÌÎÌÊܹgwÜcÙ™ômfæÞýû÷feá¹/+ ÀŒŒÝH‹pxÄ8æáÙÙ™ûöíBâ³hìÀíؽO̪eØ•|öïßCqÛÓ:°8ÈùСl<-Leu`…æädææfƒ,6 ÌLÒ"‡e™*&„™{äfäžÚè@vNNFë-BÞ·''/#÷Ä~°%i„M-’³ÍÊÙ›±{σ'Jr˜µOÆž=Gò³ŽœÏæ GÞÒT.œæ®^)úâÁßR÷å—_1Ï7ß|Ã<ß"àëo}wëÖͺºê[·,D®©©lW’®€ÚZ‚F÷âÒÕÖVÕÖv´ jkªj*«jë,k‘ÛÕµ7«nVVݺ}ó–µ[°cÀsûÎÍšêªê땤,Àí›Õ•Õå•@£)¶¹q£”ÜP[Z~ýðáÃ_ýuVVV||ü±cÇ.\¸°fÍš];wíÚ½ëÄÉçÎß±cÇòåËW­Z•™¹¿°°0 -sÿÑ£Ç ‡Ÿþù¥K—²sçNtþk×®EÌëׯçååmذ!#j$kÏž=¹¹yx{âĉM›6"ŸÍ›·¤§¯+))ùê+’òù²×l`½ûâ‹/çãï_½ZxåÊeö´³¤¤Èòø] îšѽ¤¸ZRXr 8XÚ"$þõ.AØÔ"¦Ì¯’'p3G^ÅÏÒ¢+Í£Zxýú®¢âúµk%ëׯ¯ªªÊËË=uêTZZÚ¶mÛRRR–-[¶›º­[·&%%=zöìÙ«W¯>zôèvêöíÛ‘¨­­…´¤¦®\¸páÒ¥K!Q̃Br `[¶lINN†¢µnÝ:xðÉ'Ÿ|úò½ÿñíÛw1~ûömDû”:ÔÀÎ섃hUV–¢"••eP¾=Ð]à1ð\ÇÅ'1ÿŠŠ.WWW@pªjnÖÔÀ¼Æà¤P[[cıðF¯jŒ©jšKe°:UU7 /]¾|±°0ÿ»À¼¨ˆ<} O¾Éƒ‹â«|³˜ßÕº·  àÂ¥Kç Î㙟?‹Š.‰çÏŸ†F ·uÛÆ´uë—-KßšžºbÅÒ¤¤„”äÄää„dò!¡¡?!%%‘=),aá4Ð-øÅ´‰¦´$¹éÙqXº4yÙ²döüCdÇsùòxV¬ Ï•+—á¹ti<Ë—“·©©ËSSW BV®„ :¯hdò‘¿‹ø®›’’”–¶zÓ¦uéék6lHß´iý–-áÙºuÓÆëðÜ·o׎í›ÇŽÏ•–]ÎØtjï¢âË ?¸oïžì¬ :cþ]‚ýû¿«••±yó´ÍÞ½»÷ìÙ¹ož»Ðlð¨gWFÆn$gûö-»wïØ¹sž]»¶ïÝ»sÇŽ­H˜A§w»¿FßK@3íÝ»ëôé·nݼu # ŠÚÚjÈØÄ‰ÒÓ×Þ¼Y‰Ô9rpÜÄiܹ3Õ9óv]ÜwðСê£G<¸?7÷@nnN<ÈË;pàÀ~XëÖ­]ºtIRÒâÅ‹ç/^yÊ˯—–•”•;‘»UWSVVrùòÅëׯJJН¼¼äúõbÔ ?Ïž=UYYŠN±¼ü\€í~ð`6"CëÑ>)OÄ/..@o ¢ >òDd¶&Ûí+tß! äb#kÙ éùó§˜Dò´E˯_¿jŠóÈp¾xñ,†T©⧸IoÁŽçÎ>qâê…Ÿ”ÓÀ‘×Nž< îB¯È§OŸ¸v­øðáCPt7oV &8ë8 +ðªûj×ÍÑ.ׯŽ;‰»u«Ò¿aÃ:Œ´fÍš>cÆÔ„„…0ñçÌ™µlYÊœ93gÏž±tiò´iSfΜÃä¨QoŽ7zÙ²ä ÆÂ¬ÄHzÁ‚x„O:iîÜÙii«1˜Féé«QˆÕ#W¼xæÌqtmè¶Ðñ1+ ÛkE¢ L–/Oyÿýw.$Ó-ÄOš4áÈ‘C#aÄñ!Á«V-§-X0oÑ¢àºääÄ%KàIM]¾mÛf Z¼4yòÄE‹æ§¤`è¸ RPŽêþÊ6+T¥D¨&ruuD¨22ö._N–;/^¸pá| šÇ»xñÔ?1qñŒÓ0>†¨`T uèPNNN&B@µ£Gó pË–'Ž_º4iúô©E¶öý††‘»Ú àºjÈ]¾À„ªÛkal»wï8~üpfæ^È $OpÈŽ[gÍšÿ¹s§ !iikUÀuññ³ÁK'`ëÖÍPS÷ƒ gÏž †œ$fÉÐÂz SýZUXx‘»¥Vá °5:®±!8à<é´J<Ð9¥Ô d&"ì:°ó£ã¸té<ã7ÀéÓÇ ¿>Ú;©íwõZIÑT¨á¡Cû;xäÈÀÑ£â?q"À±c‡ŽÏEúŠÄÉËË>|8á,&üôÕ¡cÇr‚È,&"°·‡hrL@òÌËË¡ñ; $C’ä'öÓÙ6¦Úå˜ÕåæÐB8°z±ÀΔ›»ÿìÙã—.;yòòl¡Ì)̱>A(>Ùbƒææf1$)2¶aü`⃔©’à ÀÞâ'R¡¾§NË˃vÊcÌÇB"Ÿ4õˆlÓ0Dd¶†ñ íùó§AÞ;·£F{÷î:p ËŠc-fÁ‚?ÓÓ×@TŽ9´sçVŒóò`š*( ƒÛF3Ô -þè£[“¦P¡B¿NfÙ;4Ð!ë]x)}É’Å¢þóãÇyã×ß|ó¿ë×§ÕÔT‚ÿÚ•3ë9PxÀÄ Ì9¦Nô׿¾:yòÄýë 3Óa¯[ˆ’uuÕsçÎ^¸pþ;µóçǃ¥€À¸qc i£F½9ḟS§N~íµ“ñãÇ?~„ö¯V˜µò¨ìíÛ5K—&Íœ9 ñÇŽ ˜6mò{ïaX« ¹Mš4t¾xñš2>~ÖôéSQÐèÑïÓ|,ª”…œséÒñÓÒV¿õÖÿ¦L™šOŸ>åÊ•:ÔoãX…5fee¢Y¡£Pwß•˜¸è½÷Þ5ê-ôJ·nÝlÄKl4H4*È"zqyĬᯘ~^i^¿œÂd”-~±gC¸&úÍß2A¢9’{æÌ‰ãǃ^è!Ä Í“·ðó΂_ïß¿}ÿþO>ùèòå‹çÏF¥ŠŠ.]).ÀÏ;wë<¸‡·`26­""Ü 4Á„z2ôÏÅÈý%›ûMÀ[ø %œN:7Æ÷¡ Π‚@H2œ;Fug†O3qØDP†èb¡ÀÁî(ôñhtj¦¶Qëû['ëÔ‘?Úîüù3ð\¸p6?ÿüD]Ÿ:uœ™ÁmÖ«Ì8ÛÙÙë›PXx …\DΜ9 ÈÏ?Wj\øº&Fn¥ †y+1-.¾ JAíÐ-‚cÁ¥lm£Q¶l®îþ}hª™D¨¨Á}ƒ5[Åg3 éËhx­s©¸Áz¤§}.@-6<ÄÎÿœ§O¼=8¦·ä'›ˆö=X“e%&=¦Ü.зÆtIô<0‡L†\±rYêÊ¥Ó׬O_“ž¶zý:ãsMêòÔ•Ë–-KFCùìÃÊt*æ¼ .°£2ôYnæ¿ ¢‘Ÿù_*))Ï>!&~¢Ë¤½]3»!NèÃðDÎæué P6´kÑ €>hº.OðÐ@m²üÖ¢RlÅ–5"~2ú4 @æêÕ–-Ê¢0öÅȪU$óiq—JéFÊéÏò7OÂXOS0+¤û.¶YÖõëÐá—Å™ 26}#" "ð0Ò±‰M¢ÝºU‹'¢!‡ºº<ño?úè.ÍçÍçžì'ò¹wï."à‰T¼y³úóÏ?[²$ÑÞÎÎÖÖFfcÃId€Ôø”)ììírùSO™pÀóÁƒ?ýôÁÇßn÷ï@þ@Œ>?f5Bà'ŸÀŸÅ ðÉ'ˆñÍçËÀЃÇD;÷îÝA*VeäÀ’wh• ­ÐеµÕ”†m$…)ao™Î˜’㤷nÕY°h£qÑÊ(ˆV䣃9¹èÏX+³ºS²Ü¥œp‹Ýf¥™šOEÈ‘4G¡¦R@Á»b>ðP¶aUc5ªß²‚nWUU .´Õ͚þcÊibü:VH:v¬–Q¯iqµuµŸ}zâää• ¨Ð‹£¿gŠïĉ#»wo§ÐbÓrÁ•ŠŠk°m¶lÙˆq!:KvØöܹ“ Ç·ß~{ãFeUUUÓ³îׯ—~õÕWÕÕ7‘DáãÉQ{xΟ?ª|óÍ755µâ-NÌ¡5Güi~ä*™0ûG÷Åì-†gœ@>®dÿ­’ÌÖI&i%“µ’)ZÉl½äî‚«‚\1<|ÄãÀöÞ½*+ ªùùù99€,ñÊÊʺꨨuaQE&zÊoÞ¬9w¦tòu Ì Eò#GŽTTT”••!,/¯ÚÈ¡¢âFqñxŽh¨>ÑPç/”Wa•«£>ýô¨>°maa‘U2lÅ¡WF}ýõ׌Ph4eqÕøVe´i5bܼ Ê€, !èlyA¥¥èÙ«À ¬k?}útQQÑMêú]kÕ¾¶¶Ž^qïÂ…‹@LXRr Þéû¾ž0q:4ÕEðÒÖ­›Ö­[ƒ‘À¬YÓ'L÷Áï}øáû ããg'''b\øþûïbô¿iÓ: Ô&Ož˜¸ðÍ7ÿ éBÇÎÍÍݽ{÷üùó·nݲtéÒ”””%K–$$‰‰‰ QvvöþýûñD“ìØ±cóæÍ«V­B*ÐkΜ9ÉÉÉH›šºrÑ¢EàÔŒŒ}ëׯ߰aÒnÚ´éĉË—/Ÿ;7~ÅŠ‹éŽ;v õ½m dHJ^a'Ÿª—%øÈžv‘è•\¢–“§¿ä/ž’5Á¶²~óôÈr2Ï{cÛÖm_~ùEVÖþÔÔÔtêÞzë­„„„Õ«WÏš5kÚ´i+W®Ü¶mÛ„ ¨i"j„srrNž<‰â -ð áܹs§L™’––©›Ž:x™ìÛ·h¯}׬ùôÓOÑl`P<:4á7è_a)äåå&%%ž”䜎åÙRAÌÁDq¨#„½š$ÚºuëÌ™3Ñhš´´µð£ÑÁ‘{÷î…$¬\¹”)Μ9ÄX>m•ø Fõ7n”#yVV²·dff¢-ÀhntÁ¨&iëÎVó¶eM¶qãäNÃÀ „RÀŸ(Â2„›Ô8ש`ÈAG¥¥­†²‚8¬]»jýú´M›ÖO›6eÒ¤ñ ÌKO_³lY ÆÜ‡DL<ñ3))ñäÉ£°€1r8NÝ©S§Àà6rònÿ~Ã>2™™¤¡aòòòP¥³gÏ‚ÛЙíÛ·pøðaüܲe ¬À³gÏìÙC®pBH…¸›7oÊÈÈØ¾Hã¼Û½v1º…¯¾þê›¯È 2'W'Nô>á$~¨ˆoœ—ì· .ýWO”U\ƒNݵ Ý9P^*‹ºíÛ·#gˆüèk= ÉA¡À=0zßoɃu` H&âð“½2]þTfºÿ©œž´©0E#!bæ,‰ÙI$’É­[7åœ6e"`Ò¤ “§N˜2câ”éõ0iòX°“ÆI]¹ì†Ù/sè¾ÇRÓ¬Œñ)†°';ÌcBµ\D‰E`ó¢,Ä4GZ_;6ej:Ôq@læ—Tf"Q—2ÿ™zl™DlG¶§Aœ7_YVi 6˜7À3R¸å­å¬iÄ©ìF5²çfÚ´úøþ¶ø{±´ô*t"]e#’umm[4ëÆÎ±˜0Y]"ç©è‘Õ¶:dâq𒲓’ù©§€†•øÉ¦bÉÊ}K34fež'=YDÒÒS±ä>ÑË—É<ØÞ=;ÿøÇ—^zé÷|ùøÝï^üåo¿eÏç‹ð?½òÒ^ú=DI(ž—Ù&NÓ嬅 %Z:A€…³˜,²þ…bókqYnIä|…6iÂB+ÞKO"• sTœfXÐ5·Æ¢Ž—Ø7;Ūc"kA±M hÿËÎ,‰„›»­]f›k1”0§­‰\Ɔ°Ö´0²Àó"1YÕÄÖïLÎïÞ©©ŸR¯©©B¾°Ô!KìT/"±Cšì´i]FåâÎø ÝÉéÓÇð“M|Kïµ43IÉ€ï vCç—_~öÙgßšì@¦/?ûìSf¼Ñ6|'sL™ÒÛgÅkh¿¦Ù}E“ãÏ—bΟ~J¦,œWoè9p.OrÎOpyŠsTÿ¦ÿ€¾h¿/¿$wÇþ90úŒäHÇÒt9+HüIñÿ!ì2]VæGrV)ñ†Ð/¿üŠMNâ%C’Ö ~vOõt| ÑÅ“!f•<9šáçÀ™®—Ü¢Õ$A¬iX«ÑüÌÌúùš…0"Ðê|ZǽE: (£Íñ¥ÿ×"GÑr¿±J5‘'X½¤¤Ø áVt‡é‰$Ÿþ9¸rÂ$:¥±9~üðš5©yy³³332v/[–<~|^Þýû÷žœ7/þÀ¬´´ÕˆPPpŽÓ¯ÎËËŸæÂåË—1ZÅ@ðüy˜‹ù»wïÆèCyŒ 1Ä­­­E ˆiié×®]ÃÐp×®Ý×>|¸¸ø F÷ïß?w­Y³cúœœœ”””3gNÃ|óÚµkïÞ½ÛyÃý[:Q¡oaáeqæÃ|”hU÷ ›R§SJ÷Ð^(13s?ª³sçNP¦¸¸xß¾½Û·oG+_¿~ýÔ©Sx.]º! )LúÆÂA ›RG)t+ÔFCƒt`'ýÒ¥üo­4†PÁÈ***BÛ¡>ÂæýÀ½bŸÞZ}Mjú•Q¨PÌöí[Ùì߇¾ÿþûïŽ?vòä‰ãÇùàƒwGþ`ìØÑÿýï»wïØ¼ycJJRJÊ’©S'¿þúkû÷ï»z•Ø@(33cÙ²e ,˜4iRBBÂüùógΜ1nÜ8ðVeeåŽ; ;wî¸yóæºuë¶mÛŠvÚ´iÓ7æÍ›‡È‹/†gÊ”)¥¥¥¨ÛŠ+8kÖL04}Μ9Ó§OÇ“EÞ¼y3˜­E4à×_‚i{–ÇMQ?™𼇋Lf#•Ê% d¶RG¢ÿ‡~}—(ÿšü|E)LêŠuëÒoݪƒ@¼—/_ŽGµé´~*_´h!„ œBñ¨" ˜ŽÝ¯.§.99}$m&Xµ*˜ÏŸ?ñ‘óêÕ«!±AÝQÈ'DŽõ½8^œR¿‡®áÈ‘ÃIIIðÎçÙŠƒasïÞõë׃×óòòÖ¬Y––¶uëÖ¹sç‚\tudS|||RÒP"N…0 gq€!ºpó úV*E÷^‘Y{ð2ÜJ:,´›©gÍÝÉê|cšRgß @û‚iQØ~t01¨)Ôz§ÔÙâ/;›uü8zßÃ/žcØ®\¹,5uùÑ£y/‚¤' .€Äd7.O:Óñܹ“åå¥uu· X>þøAI Ìý+wîÜ… BÇ ö½y³R\XXÈ”ÐEçúñÇWTÜÀ[ RYY…žžl‘ ñÑ <0.´_]]’ÔÔÔ\¿^úÑG±p$,,,‚BcýÃ×ôߺܥnÉÚ˜ÿ“r/¼ÿtYEÉÝ;w!Èí>Ýì€ÒQnmm]$ë¿Äó6]º‡+/¯@8ĆÍ_×ÔÔ^»vž‚‚Ëèت1’—SïÅðTUU£.0¯\¹ õ[PP€Z û€}hõ‹# ˆÈb• [qtJP ¶¶¢¡v¨ÎíÛwªªª@H5•UV†vquõÍÏ?ÿD¼²¼ zü§bƒ&¾q£M†Fq—ˆ+xðàµjR^~È£½Pt‹¬YÑ@hÇNgO5•8À6P±Q&›÷ËÏ?ËF«t7×eº‰+Ÿmš¢g]È$Á™3'*+ËaIÓ!ʧ0Äð°ŸxÀ¢™?ÂÍ_1 üLLõ1P?á‹/„³">ùäÁ§Ÿ>@û!dù’eÁþÁp!!x5…°°Ð   ~úëò²kb>æ˜|þ¹èùÌ„ÿgæ8„£Dö¥³Êš!iþ9ÂBh ±8¤ê| ŠÝ½{›îݼ‡L;ak€a BqbÍšC ùܼ]Dª"䲤 DcSꌅ6=ã¨O¬R#T].ôzKÍj!ÂÍÂýûcŒ?qòLŽmC¤³ILXóÅm‹lǪi×c¾(â&Bˆ"ÛÍd~´Ñì,c‘xˆÍtfñŠÙ«"ú³Èü›id‹ÀÞ69ßf<„Ç€ý¸^tñÒÙ δdwvq>z)0 zó—æe5|Ö¿eIþOV©ú˜â©;S­ÍzÓÊÖãÜI`;;] l^JlS}‹ÌO¦ši5£[‘iK±E@O<\cT5osα ˆg…X]Ø$0-·¸]7Í–šÊµ“§Ìf‡ Ùê…Ró]ýæ7›µ´ó¿c±¬ìÜM2Ýß:TVU–w;¶Öªò÷¯ ït¥ÊËɆà>ª›d~žªÃççºÃòdC¾ñS|-€±OênT{àû ìN›z¡êÌÉßG,9á×íHöÀ÷Ø>¾>ª5Õ÷A¨z ºkª¡êè$ôUô€•¡G¨z ¬ =BÕ=`eèªè+Ã÷sJ½z Á$TtJýòå‹ì+ =_‘ê°šnS¢7ÔB¨fsðÑ;*J;|¸ºò@;;_Úí˜ô@# ×TˆYeË>x@Ó—––à‚ŠŠ ØGš{àÑ’’bÝŽI˜ÙõÆ>Ì[XHö—\„jnV°]êÇÉÎΠw7øÈü :Ы;Ø%Øùô¢ŽxàkšœœŒ½{wìß¿gÏž‡eŸ8q4;;³´´ˆhªââËZ³&•}!Æd2ÇWe ?‘ ~¬àûŽ0kÝÕ§*,€bvé ½¥Û‘ùBÞ ß%bRV’““¹wß®¬¬Œ]»¶C¢ÌIK_SQ~u4UEE)»åýêÕËâyöív¸…}:€ÝõW^Î&:¾PfüúøÙ%ôìZö•öÖJéwͺ“"€òìKªà vÊ¡¼üJy ¸¨ð|qQþ•âKÅÅùW¯TT€….ß½S9}f<—˜¸hÞ¼ÙóçÏ™3gfRÒâ¹sgÇÇÏœ2eâÌ™Sããg%$,Ä« â§M›D¿³4fâÄq&Œý*2n܇|ð‹ª%&.\²d1û:xJÊ’3¦¾óΛï¾ûÖ;ït'nÇá ï¾ûö¨Qÿ›0aÌ’%‹K—&.Z4oÜ„i§ÌÂÀiòÔ9S¦Í™Ì`êlX}&Ïš>sî¯÷ÿ€ c #B3B3B1", ", c #9A9A97", "< c #90908D", "1 c #92928F", "2 c #90908D", "3 c #9B9B98", "4 c #A39B96", "5 c #B8A399", "6 c #9C9894", "7 c #ADACAB", "8 c #CDCDCC", "9 c gray100", "0 c gray100", "q c gray100", "w c gray100", "e c gray100", "r c gray49", "t c #191818", "y c #071305", "u c #020402", "i c #010101", "p c #151415", "a c #35160B", "s c #5D260F", "d c #200F06", "f c #4F5050", "g c #C3C3C3", "h c gray100", "j c gray100", "k c gray100", "l c gray100", "z c gray100", "x c #7DC67D", "c c #20B706", "v c #21930D", "b c #213243", "n c #01479A", "m c #064C9F", "M c #2C3D62", "N c #572919", "B c #3B9C03", "V c #4EC94F", "C c #C3C3C3", "Z c gray100", "A c gray100", "S c gray100", "D c gray100", "F c gray100", "G c #95B281", "H c #8C570F", "J c #36C800", "K c #195B8A", "L c #02305D", "P c #173C6C", "I c #1853A0", "U c #017248", "Y c #06A601", "T c #4E994F", "R c #C3C3C3", "E c gray100", "W c gray100", "Q c gray100", "! c gray100", "~ c gray100", "^ c #878381", "/ c #39471D", "( c #108030", ") c #1ACA18", "_ c #532406", "` c #462F25", "' c #637E52", "] c #309C8D", "[ c #3D7031", "{ c #6C6C6C", "} c #C6C6C4", "| c #C8C8C5", " . c #D0CFCB", ".. c #D1D1CD", "X. c #D0D0CD", "o. c #CECECA", "O. c #838883", "+. c #2C4F2C", "@. c #275195", "#. c #237C17", "$. c #578408", "%. c #93624E", "&. c #D4D3D0", "*. c #D8D8D4", "=. c #D9D9D5", "-. c #DCDCD8", ";. c #D7D7D3", ":. c #DFDEDB", ">. c #E0E2DE", ",. c #E0E2DF", "<. c #E4E4DF", "1. c #DFDFDB", "2. c #7D9BBF", "3. c #0155B4", "4. c #182C4D", "5. c #302F0A", "6. c #3FAE03", "7. c #3DE130", "8. c #828281", "9. c #696967", "0. c #5A5A58", "q. c #5A5A59", "w. c #5B5B5A", "e. c #656565", "r. c #82695F", "t. c #947062", "y. c #5F5D5B", "u. c #9F9F9E", "i. c #869E9B", "p. c #24465C", "a. c #1F1C1A", "s. c #63301F", "d. c #8E2D19", "f. c #648249", "g. c #4E554E", "h. c #1C2A1B", "j. c #0A1E08", "k. c #040506", "l. c #05090D", "z. c #1D1D20", "x. c #471F10", "c. c #612B13", "v. c #0A0F04", "b. c #7E827E", "n. c #9BA29B", "m. c #616361", "M. c #525353", "N. c #5E5652", "B. c #7F6157", "V. c #7F7A78", "C. c #4EE74E", "Z. c #41BD00", "A. c #537612", "S. c #10478A", "D. c #0058C0", "F. c #0058C0", "G. c #223B63", "H. c #60440C", "J. c #0CF200", "K. c #7DD87D", "L. c #C3C3C3", "P. c #C3C3C3", "I. c #C3C3C3", "U. c #C3C3C3", "Y. c #C3C3C3", "T. c #C3C3C3", "R. c #818657", "E. c #657212", "W. c #29C807", "Q. c #0E4F79", "!. c #0B1B31", "~. c #363949", "^. c #115497", "/. c #00AC40", "(. c #094E01", "). c #7D947E", "_. c gray100", "`. c gray100", "'. c gray100", "]. c gray100", "[. c gray100", "{. c #C3C3C3", "}. c #5A5A59", "|. c #325136", " X c #078959", ".X c #35C900", "XX c #34300F", "oX c #5D3F1F", "OX c #2F7032", "+X c #0ABE34", "@X c #083B55", "#X c #7D8C9E", "$X c gray100", "%X c gray100", "&X c gray100", "*X c gray100", "=X c gray100", "-X c #C3C3C3", ";X c #54666B", ":X c #1E5A6B", ">X c #454460", ",X c #158405", " , < 1 2 3 4 5 6 7 8 9 0 q w e ", "r t y u i p a s d f g h j k l z ", "x c v b n m M N B V C Z A S D F ", "G H J K L P I U Y T R E W Q ! ~ ", "^ / ( ) _ ` ' ] [ { } | ...X.o.", "O.+.@.#.$.%.&.*.=.-.;.:.>.,.<.1.", "2.3.4.5.6.7.8.9.0.q.w.e.r.t.y.u.", "i.p.a.s.d.f.g.h.j.k.l.z.x.c.v.b.", "n.m.M.N.B.V.C.Z.A.S.D.F.G.H.J.K.", "L.P.I.U.Y.T.R.E.W.Q.!.~.^./.(.).", "_.`.'.].[.{.}.|. X.XXXoXOX+X@X#X", "$X%X&X*X=X-X;X:X>X,X. */ /* Quickplot is turning out to have so many command * line options that we are automating the coding and * documenting of them using this C code. * This code is not compiled into Quickplot. The * executable from this code is used to generate code * that goes into Quickplot. * We will try to make this the only place with these * argument option strings are listed, so that we can * change them in one place, or better yet, not change * them. * * One negative to this method is that many other source * files depend on this one file and so when you edit * this one file many other files will need to be * recompiled. Reminds me of using the QT moc * preprocessor and why I do not like QT. This is not * that bad. */ #include #include #include #include #include #include "config.h" #include "debug.h" #ifdef DMALLOC # include "dmalloc.h" #endif struct qp_option { /* 0 = do not call function 1 or 2 = call function 2 = function will exit */ int pass[2]; /* pass[0] == 1st pass pass[1] == 2nd pass */ char *long_op; /* initialization code is generated based this string */ char *short_op; char *arg; /* if arg == "[STRING]" then it is optional */ char *description; /* you can put @CONFIG_STUFF@ in this string */ /* Set these two to make code that initializes and declares a * struct qp_app variable. */ char *op_init_value; /* like "0" for app->op_my_long_option = 0; */ char *op_type; /* like "int" for int op_my_long_option; in the struct qp_app */ }; /* description special sequences that make HTML markup * * "**" = start list
    * "##" =
  • * "&&" = end list
* * " " = "  " * * "--*" = "--*" where --* is a long_op * * "::" = "" and will not add '\n' until @@ * "@@" = "" */ /* int tri values are auto = -1 on or yes = 1 no or off = 0 */ static struct qp_option options[] = { /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "", 0, "FILE", "read data from file FILE. If FILE is - (dash) then " "standard input will be read. This is the same as " "the ::--file@@ option. See also ::--pipe@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--about", "-a", 0, "display introductory information about Quickplot in a " "browser and exit", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--auto-scale", "-A", 0, "automatically select the X and Y scales for graphs " "containing more than one plot. This is the default. " "See also ::--same-x-scale@@, ::--same-y-scale@@, " "::--same-scale@@ ::--different-scale@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--background-color", "-C", "RGBA", "set the color of the graph background. RGBA may be any " "string that GTK+ can parse into a RGB or RGBA color. " "For examples ::--background-color='rgba(0,0,255,0.5)'@@ " "will make translucent blue, and ::-C '#050'@@ will make " "a dark green.", 0, "struct " "qp_colora" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--border", "-b", 0, "add a border to main window. This is the default. See " "also ::--no-border@@.", "TRUE", "gboolean" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--buttons", 0, 0, "show the button bar in the main window. This is the " "default. See also ::--no-buttons@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--cairo-draw", "-c", 0, "draw graphs using the Cairo API. Cairo drawing may be " "slower, but you get translucent colors and " "anti-aliasing in all aspects of the graph and in saved " "image files. See also ::--x11-draw@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--default-graph", "-D", 0, "create the default graph for the current file and turn " "default graphing for future files read. " "If you give a ::--graph@@ or ::--graph-file@@ " "after this option you will generate an additional " "graph. A default graph will be made each " "time this option is encountered, so this can be used to " "control when, in the sequence of command line options, " "graphs are made. See also ::--no-default-graph@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--different-scale", "-d", 0, "graphs with more than one plot will have different " "scales if the extreme values in each plot are not all " "the same. See also ::--same-scale@@, ::--same-x-scale@@ " "and ::--same-y-scale@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--file", "-f", "FILE", "read data from file FILE. If FILE is - (dash) then " "standard input will be read. See also ::--pipe@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--fullscreen", "-F", 0, "make the main window fullscreen. See also " "::--no-fullscreen@@ and ::--maximize@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--gaps", 0, 0, "interpret NAN, -NAN, INF, -INF, and double overflow " "numbers as a gap in the plot, and don't draw a " "connecting line to adjacent non-gap points. " "This is the default. See also ::--no-gaps@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--geometry", 0, "GEO", "specify the position and size of the main window. To " "set the geometry back to the default just set GEO to " "NONE. Example ::--geometry=1000x300-0+30@@", 0, "cairo_rec" "tangle_in" "t_t" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--graph", "-g", "LIST", "make a graph with plots ::LIST@@. " "The ::LIST@@ is of the form ::\"x0 y0 x1 y1 x2 " "y2 ...\"@@. For example: ::--graph \"0 1 3 4\"@@ will " "make two plots in a graph. It will plot channel 1 vs " "channel 0 and channel 4 vs channel 3 in the same graph. " " Data channels are numbered, starting at 0, in the " "order that they are created as files are read. A " "separate graph tab will be created for each ::--graph@@ " "option given. This ::--graph@@ option must be after " "the file loading options that load the channels that it " "lists to plot. See also ::--graph-file@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--graph-file", "-G", "LIST", "make a graph with plots ::LIST@@. " "The ::LIST@@ is of the form ::\"x0 y0 x1 y1 x2 " "y2 ...\"@@. Example: ::--graph-file \"0 1 3 4\"@@ will " "make two plots in a graph. It will plot channel 1 vs " "channel 0 and channel 4 vs channel 3 in the same graph. " " A separate graph tab will be created for each " "::--graph-file@@ option given. This is like the " "::--graph@@ option except that the channel numbers " "start at zero for the last file read. " "They are relative channel numbers. So channel numbers " "for ::---graph-file@@ may be negative to refer to " "channels that came from files before the last file. " "This is handy if you load a lots of files and lose count " "of the number of channels loaded in each file.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid", 0, 0, "draw a grid with the graph. This is the default. See " "also ::--no-grid@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid-font", "-T", "FONT", "set the font used to in the grid label numbers. " "Example: ::--grid-font='Sans Bold 12'@@. The default " "grid font is \"Sans 10\".", "qp_strdu" "p(\"Sans" " 10\")", "char *" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--grid-line-color", 0, "RGBA", "set the graph grid lines color. RGBA may be any string " "that GTK+ can parse into a RGB or RGBA color. For " "example ::--grid_line_color='rgba(255,0,0,0.5)'@@ will " "make a translucent red.", 0, "struct " "qp_colora" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid-line-width", "-W", "PIXELS", "set the width of the grid lines if there are any", "4", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid-numbers", 0, 0, "show grid numbers. This is the default. The grid must " "be showing to show grid numbers too. See also " "::--no-grid-numbers@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--grid-text-color", 0, "RGBA", "set the graph grid text color. RGBA may be any string " "that GTK+ can parse into a RGB or RGBA color. For " "example ::--grid_text_color='rgba(0,255,0,0.5)'@@ will " "make translucent green.", 0, "struct " "qp_colora" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid-x-space", "-X", "PIXELS", "set the maximum x space between vertical grid lines. " "The minimum will be about half this. This distance " "varies as the scale changes due to zooming. This " "distance cannot be fixed due to the way Quickplot " "scales your graphs and always picks reasonable grid " "line spacing. See also ::--grid-x-space@@.", "220", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--grid-y-space", "-Y", "PIXELS", "set the maximum y space between horizontal grid lines. " "See also ::--grid-x-space@@ above.", "190", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--gtk-version", 0, 0, "print the version of GTK+ that Quickplot was built with " "and then exit", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--gui", 0, 0, "show the menu bar, button bar, tabs bar, and the status " "bar. This is the default. See also ::--no-gui@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--help", "-h", 0, "display help in a browser and exit", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--label-separator", "-p", "STR", "specifies the label separator string STR if labels are " "read in from the top of a text data plot file. The " "default value of ::STR@@ is ::\" \"@@ (a single space). " " See option: ::--labels@@.", "qp_strdup" "(\" \")", "char *" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--labels", "-L", 0, "read labels from the first line of a text file that " "is not skipped. See also: ::--skip-lines@@, " "::--label-separator@@ and ::--no-labels@@.", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--libsndfile-version", 0, 0, "print the version of libsndfile that Quickplot was " "built with and then exit", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--line-width", "-I", "PIXELS", "specify the plot line widths in pixels. May be set to " "AUTO to let Quickplot select the line width based on " "the plot point density. AUTO is the default.", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--linear-channel", "-l", "[OPTS]", "::OPTS@@ are ::START|[STEP]@@. " "This option prepends a linear series channel to the " "file being read. ** ## ::START@@ " "set the first value in the sequence to ::START@@. The " "default ::START@@ value is ::0@@. ## ::STEP@@ " "set the sequence step size to ::STEP@@. " "The default ::STEP@@ is 1. && " "There must be a ::START@@ before ::STEP@@. " "For example: ::--linear-channel='100 0.2'@@ will make " "a linear channel that starts at 100 and steps 0.2. " "Sound files will always have a " "linear channel that contains the time prepended. Using " "this option with a sound file would prepend an " "additional channel. Any file loaded that contains just " "a single channel will automatically have a channel " "prepended. Using this option with a single channel file " "will not prepend an additional channel, but will let you " "set the start and step values for that prepended " "channel. See also ::--no-linear-channel@@.", "NULL", "struct " "qp_channe" "l *" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--lines", "-j", "Y|N|A", " ** ## ::Y@@ yes show lines. ## ::N@@ no don't show lines. " "Same as ::--no-lines@@. ## ::A@@ auto, be smart about " "it. This is the default. &&", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,0}, "--local-menubars", 0, 0, "disable that darn Ubuntu Unity globel menu bar. This " "will do nothing if not running with Unity.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--maximize", "-m", 0, "maximize the main window. See also ::--no-maximize@@ " "and ::--fullscreen@@.", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--menubar", 0, 0, "show the menu bar. This is the default. See also " "::--no-menubar@@. This will do nothing if not running " "with the Ubuntu Unity window manager.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--new-window", "-w", 0, "make a new main window for each graph", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-border", "-B", 0, "display graphs main windows with no borders", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-buttons", 0, 0, "hide the button bar in the main window. See also " "::--buttons@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-default-graph", "-U", 0, "stop making the default graph for each file loaded. See " "also ::--default-graph@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-fullscreen", 0, 0, "don't make the main window fullscreen. This is the " "default. See also ::--fullscreen@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-gaps", "-J", 0, "draw a line across NAN (-NAN, INF, -INF and overflow " "double) values if there are finite values on both " "sides. See also ::--gaps@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-grid", "-H", 0, "don't draw graph grid lines in the graph. See also " "::--grid@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-grid-numbers", 0, 0, "don't show grid numbers. See also ::--grid-numbers@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-gui", "-z", 0, "don't show the menu bar, button bar, tabs bar, and " "status bar. See also ::--gui@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-labels", "-Q", 0, "don't read channel labels from the file. This is " "the default. See also ::--labels@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-linear-channel", "-k", 0, "turn off adding a linear channel for up coming files. " "See also ::--linear-channel@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-lines", "-i", 0, "plot without drawing lines in the graph. See also " "--lines.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-maximize", 0, 0, "don't maximize the main window. This is the default. " "See also ::--maximize@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-menubar", "-M", 0, "don't display the menu bar in the main window. See " "also ::--menubar@@. This will do nothing if not " "running with the Ubuntu Unity window manager.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-new-window", "-Z", 0, "don't make a new main window for the graph. This is " "the default. See also ::--new-window@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,0}, "--no-pipe", "-N", 0, "don't read data in from standard input even if there is " "input to read. See also ::--pipe@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-points", "-o", 0, "plot without drawing points in the graph. See also " "--points.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,0}, "--no-readline", 0, 0, "don't use GNU readline with the Quickplot command " "shell if you run with the ::--shell@@ option. This " "will disable the use of line editing, shell " "history, and tab command completion. This " "option has no effect if Quickplot is not built with " "GNU readline.", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-shape", 0, 0, "turn off the use of the X11 shape extension. See also " "::--shape@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-statusbar", 0, 0, "hide the status bar in the main window. See also " "::--statusbar@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--no-tabs", 0, 0, "don't show the graph tabs in the main window. See also " "::--tabs@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--number-of-plots", "-n", "NUM", "set the default maximum number of plots for each graph " "to NUM", 0, "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--pipe", "-P", 0, "read graph data from standard input. By default " "Quickplot " "looks for data from standard input and stops looking if " "no data is found in some short amount of time. This " "option will cause Quickplot to wait for standard input " "indefinitely. If you would like to type data in from " "the terminal use ::--pipe@@. This option is the same " "as ::--file=-@@.", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--point-size", "-O", "PIXELS", "start Quickplot using plot point size ::PIXELS@@ wide " "in pixels. This may be set to ::AUTO@@ to have " "quickplot automatically set the point size depending on " "the point density that is in graph. ::AUTO@@ is the " "default.", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--points", 0, 0, "show points in the plots in the graph. This is the " "default.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--print-about", 0, 0, "prints the About document to standard output andthen " "exits. Use option ::--about@@ to display an HTML " "version of the Quickplot About information.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--print-help", 0, 0, "prints this Help document as ASCII text to standard " "output and then exits. Use option ::--help@@ for " "displaying an HTML version of this help.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,1}, "--read-pipe-here", "-R", 0, "this is a place holder that tells Quickplot when to " "read the data from standard input. This is intended to " "give the option of telling Quickplot when to read " "standard input when Quickplot automatically determines " "whether to read standard input or not. See options " "::--file@@, ::--pipe@@ and ::--no-pipe@@.", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--same-scale", "-s", 0, "plot all plots in the same graph scale. See also " "::--different-scale@@, ::--same-x-scale@@ and " "::--same-y-scale@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--same-x-scale", "-x", "Y|N|A", "use in place of ::--same-scale@@ or ::--auto-scale@@ " "for finer control over how the x values of the plots " "are scaled when you have more than one plot on a graph " "** ## ::Y@@ yes same x scale ## ::N@@ no different x " "scales ## ::A@@ auto, be smart about it. This is the " "default. && See also ::--same-y-scale@@.", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--same-y-scale", "-y", "Y|N|A", "use in place of ::--same-scale@@ or ::--auto-scale@@ " "for finer control over how the x values of the plots " "are scaled when you have more than one plot on a graph " "** ## ::Y@@ yes same y scale ## ::N@@ no different y " "scales ## ::A@@ auto, be smart about it. This is the " "default. && See also ::--same-x-scale@@. ", "-1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--shape", 0, 0, "make graphs see through. It " "uses the X11 shape extension which was made famous by " "xeyes. The X11 shape extension may be a little flashy " "on some systems. Try using ::--shape@@ with the " "::--no-gui@@, ::--no-grid@@, and ::--no-border@@ " "options to make a floating graph on your display. " "The use of the X11 shape extension is a property of the " "main window, not each graph tab. This option may not " "work well with fullscreen view. This will slow down " "graph drawing considerably. You can toggle this on and " "off with the ::x@@ key. See option ::--no-shape@@.", "0", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--shell", "-e", 0, "run a Quickplot command shell that reads commands from " "standard input and writes out to standard output. The " "default is no shell and standard input will be read as " "graph data. If Quickplot is reading standard input for " "plot data Quickplot will read shell commands " "from the controlling terminal (/dev/tty) after all the " "standard input has been read. " "You may use ::--no-pipe@@ to stop standard " "input from being read as graph data. The shell can do " "most all the things that command-line options can do and " "a lot more. Run an interactive shell with ::quickplot " "--shell@@ and use the help and tab completion to see how " "it works. You can also connect a Quickplot command " "shell to a running Quickplot program with the program " "::quickplot_shell@@.", "NULL", "struct " "qp_shell" " *" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--signal", 0, "PID", "signal SIGUSR1 to process PID after Quickplot is " "running.", "0", "pid_t" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,0}, "--silent", 0, 0, "don't spew even on error. The ::--silent@@ option will " "override the effect of the ::--verbose@@ option.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--skip-lines", "-S", "NUM", "skip the first ::NUM@@ lines when reading the file. " "This applies of all types of files that quickplot can " "read. Set ::NUM@@ to zero to stop skipping lines.", /* TODO: make skip list not just n lines */ "0", "size_t" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--statusbar", 0, 0, "show the status bar below the graph. This is the " "default. See also ::--no-statusbar@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--tabs", 0, 0, "show the graph tabs. This is the default. See also " "::--no-tabs@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {1,0}, "--verbose", "-v", 0, "spew more to standard output. See also ::--silent@@.", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {2,0}, "--version", "-V", 0, "print the Quickplot version number and then exit " "returning 0 exit status", 0, 0 }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,1}, "--x11-draw", "-q", 0, "draw points and lines using the X11 API. This is the " "default. Drawing may be much faster than with Cairo, " "but there will be no translucent colors and no " "anti-aliasing in the drawing of the plot lines and " "points. There will be translucent colors and " "anti-aliasing in the background and grid. Also, saved " "images will not have translucent colors like they do with " "the Cairo draw mode. You can " "start drawing with X11 and switch to drawing with Cairo " "when you want to save an image. Use the ::r@@ key or " "the View menu to switch back and forth between drawing " "with X11 and Cairo. See also ::--cairo-draw@@.", "1", "int" }, /*------------------------------------------------------------------------------------------------------------------------------------*/ { {0,0}, 0, 0, 0, 0, 0, 0 } }; /* the length of the array of options */ static size_t length = 0; /* the sorted array of options */ static struct qp_option **opt; static inline void *Malloc(size_t s) { void *p; errno = 0; p = malloc(s); if(!p) { printf("malloc(%zu)\n", s); perror("malloc()"); while(1) sleep(100); } return p; } static const char *prefix[2] = { "parse_1st_", "parse_2nd_" }; static char *func = NULL; static inline char *get_func(const char *prefix, const char *str) { char *s; if(!str || !str[0]) str = "File"; if(func) free(func); s = (char *) str; while(*s == '-') ++s; func = Malloc(strlen(prefix) + strlen(s) + 1); sprintf(func, "%s%s", prefix, s); s = func; while(*s) { if(*s == '-') *s = '_'; ++s; } return func; } static int not_short_op_switch_case(struct qp_option *op, int pass) { if(pass == 1 && op->pass[0] == 2) /* We do not need to parse options that would * exit in the 1st pass */ return 1; return ( (op->arg && op->arg[0] != '[') || !op->short_op || (strlen(op->short_op) != 2) ); } static void print_arg_parsing_code(int p) { size_t i; int got_one = 0; int got_two = 0; printf( "{\n" " int i = 1;\n" "\n" " while(i < argc)\n" " {\n" " char *s;\n" "\n" ); for(i=1;ipass[p] || opt[i]->arg) continue; func = get_func(prefix[p], opt[i]->long_op); printf(" %sif(!strcmp(\"%s\", argv[i]))\n" " {\n" " %s();\n%s" " }\n", (got_one)?"else ":"", opt[i]->long_op, func, (opt[i]->pass[p] == 1)?" ++i;\n":""); ++got_one; } for(i=1;iarg) continue; func = get_func(prefix[p], opt[i]->long_op); printf( " %sif((s = get_opt(",(got_one)?"else ":""); if(opt[i]->short_op) printf("\"%s\"", opt[i]->short_op); else printf("NULL"); printf(",\"%s\", argc, argv, &i)))\n" " {\n", opt[i]->long_op); if(opt[i]->pass[p]) printf( " %s(s, argc, argv, &i);\n", func); else printf( " /* do nothing this pass */\n"); printf( " }\n"); if(opt[i]->arg[0] == '[') { /* again for case with no optional argument */ printf( " %sif(!strcmp(\"%s\",argv[i])", (got_one)?"else ":"", opt[i]->long_op); if(opt[i]->short_op) printf(" || !strcmp(\"%s\",argv[i])", opt[i]->short_op); printf( ")\n" " {\n" " /* this is to caught it when there is no optional arg */\n" ); if(opt[i]->pass[p]) printf( " %s(NULL, argc, argv, &i);\n", func); else printf( " /* do nothing this pass */\n" ); printf( " ++i;\n" " }\n"); } ++got_one; } for(i=1;iarg && !opt[i]->pass[p] && (p == 0 || opt[i]->pass[0] != 2)) { printf(" %sif(!strcmp(\"%s\", argv[i])\n", (got_one)?"else ":"", opt[i]->long_op); ++got_one; ++got_two; break; } } for(++i;iarg && !opt[i]->pass[p] && (p == 0 || opt[i]->pass[0] != 2)) { printf(" || !strcmp(\"%s\", argv[i])\n", opt[i]->long_op); continue; } } if(got_two) printf( " )\n" " {\n" " /* do nothing this pass */\n" " ++i;\n" " }\n"); got_two = 0; for(i=1;ipass[p]) continue; printf( " case '%c':\n", opt[i]->short_op[1]); func = get_func(prefix[p], opt[i]->long_op); if(!opt[i]->arg) printf(" %s();\n", func); else printf(" %s(NULL, argc, argv, &i);\n", func); printf( " break;\n"); } /* reuse dummy flag */ got_two = 0; for(i=1;ipass[p]) continue; printf( " case '%c':\n", opt[i]->short_op[1]); got_two = 1; } if(got_two) printf( " /* do nothing this pass */\n" " break;\n"); printf(" }\n" "\n" " ++i;\n" "\n" " }\n" ); } printf(" %s\n" " {\n" " /* option FILE */\n", (got_one)?"else":""); if(opt[0]->pass[p]) printf(" %s(argv[i]);\n", get_func(prefix[p], opt[0]->long_op)); else printf(" /* do nothing this pass */\n"); printf( " ++i;\n"); printf( " }\n" " }\n" "\n" "}\n" "\n"); } static void print_argument_parsing_code(void) { char *s, *shorts; size_t shorts_len; int i; /* Get a string with all the short options char * with out a arg. */ s = (shorts = Malloc(length)); for(i=1;ishort_op && (!opt[i]->arg || opt[i]->arg[0] == '[') && strlen(opt[i]->short_op) == 2 && opt[i]->short_op[0] == '-' ) { *s = (opt[i]->short_op)[1]; ++s; } } *s = '\0'; shorts_len = strlen(shorts); printf("\n" "static inline\n" "int is_all_short_no_arg_options(const char *str)\n" "{\n" " const char *shorts = \"%s\";\n" " const size_t shorts_len = %zu;\n" " size_t i;\n" "\n" " if(!str || !*str)\n" " return 0; /* none */\n" "\n" " while(*str)\n" " {\n" " for(i=0;ipass[p]) printf("static inline\n" "void %s(const char *file)\n" "{\n" "\n" "}\n" "\n", get_func(prefix[p], opt[0]->long_op)); for(i=1;ipass[p] || opt[i]->arg) continue; func = get_func(prefix[p], opt[i]->long_op); printf("static inline\n" "void %s(void)\n" "{\n" "\n" "}\n" "\n", func); } printf("\n"); for(i=1;ipass[p] || !opt[i]->arg) continue; func = get_func(prefix[p], opt[i]->long_op); printf("static inline\n" "void %s(char *arg, int argc, char **argv, int *i)\n" "{\n" "\n" "}\n" "\n", func); } printf("\n"); } static void print_1st_pass_functions(void) { print_pass_functions(0); } static void print_2nd_pass_functions(void) { print_pass_functions(1); } static void print_app_ops_declare_code() { int i; for(i=1;iop_type) continue; printf("%s %s;\n", opt[i]->op_type, get_func("op_", opt[i]->long_op)); } } static void print_app_ops_init_code() { int i; for(i=1;iop_init_value) continue; printf(" app->%s = %s;\n", get_func("op_", opt[i]->long_op), opt[i]->op_init_value); } } static int get_string_len(char *str) { if(!str) return 1; { size_t len; char *s; len = strlen(str); for(s=str;*s;++s) if(*s == '"') ++len; return len; } } /* adds space to the end to make the size you print be n */ /* returns the number of chars printed not including '\0' */ static int Nprintf(int n, const char *format, ...) { va_list ap; char *fmt, *str; int i, j, len; j = strlen(format); len = n + j + 1; fmt = Malloc(len + 1); str = Malloc(len + 1); strcpy(fmt, format); for(i=j;i len/2 ; --i) if(str[i-1] == ' ') break; if(i == len/2) i = len - add_comma; printf("\""); slen -= i; Nprintf(i, "%s", str); str += i; printf("\"\n"); Nprintf(start, " "); } } static void print_tidy_struct(void) { int i; int count[7] = {0,0,0,0,0,0,0}; printf("static\n" "struct qp_option options[] =\n" "{\n"); for(i=0;ilong_op) + 4; if(len > count[1]) count[1] = len; len = get_string_len(opt[i]->short_op) + 4; if(len > count[2]) count[2] = len; len = get_string_len(opt[i]->arg) + 4; if(len > count[3]) count[3] = len; len = get_string_len(opt[i]->op_init_value) + 4; if(len > count[5]) count[5] = len; len = get_string_len(opt[i]->op_type) + 4; if(len > count[6]) count[6] = len; } for(i=1;i<7;i++) if(count[i] > 26) count[i] = 26; if(count[3] > 15) count[3] = 15; if(count[5] > 12) count[5] = 12; if(count[6] > 12) count[6] = 12; count[0] = strlen("{ {1,1}, "); count[4] = 60; /* change the counts to absolute distance */ for(i=1;i<7;i++) count[i] += count[i-1]; printf("/*"); for(i=0;ilong_op); s[1] = fix_quotes(opt[i]->short_op); s[2] = fix_quotes(opt[i]->arg); s[3] = fix_quotes(opt[i]->description); s[4] = fix_quotes(opt[i]->op_init_value); s[5] = fix_quotes(opt[i]->op_type); Nprintf(count[0], "{ {%d,%d},", opt[i]->pass[0], opt[i]->pass[1]); for(j=0;j<6;++j) { kick_it_print(s[j], count[j], count[j+1] - count[j], (j!=5)?1:0); if(s[j]) free(s[j]); } printf("},\n/*"); for(j=0;j * if the str have a --long-opt in it. * Or returns 0 is none is found. */ int check_print_long_option_link(const char *str, size_t skip_i) { size_t i; for(i=1;ilong_op); if(!strncmp(opt[i]->long_op, str, len_opt) && len_str >= len_opt + 2 && ( (str[len_opt] == '@' && str[len_opt+1] == '@') || str[len_opt] == ' ' || str[len_opt] == '=' ) ) return printf("", get_func("op_", opt[i]->long_op)); } return 0; } static void print_text2html(const char *str, size_t opt_i) { char *s, *t; int w_count = 0; if(!str || !(*str) || !*(str +1)) { printf("%s\n", str); return; } s = (char *) str; t = s + 1; while(*s && *t) { if(*s == '*' && *t == '*') // \n"); s += 2; while(*s == ' ') ++s; t = s + 1; w_count = 0; continue; } if(w_count > 50 && *s == ' ') { putchar('\n'); w_count = 0; } else { ++w_count; putchar(*s); } ++t; ++s; } if(*s) putchar(*s); putchar('\n'); } static inline void put_man_char(char c) { if(c == '-') putchar('\\'); putchar(c); } static inline int check_for_span_man(char **str, int *w_count, char *last_char) { char *s = *str; if(!(*s) || !(*(s+1))) return 0; if(*s == ':' && *(s+1) == ':') // { s += 2; if(*last_char != '\n') /* This is what last_char was for: * to see if we need a '\n' printed here. */ putchar('\n'); while(isspace(*s)) ++s; *w_count = 0; printf("\\fB"); while(*s && !(*s == '@' && *(s+1) == '@')) // { put_man_char(*s); *last_char = *s; ++(*w_count); ++s; } if(*s == '@' && *(s+1) == '@') s +=2; printf("\\fR"); *str = s; return 1; } return 0; } static void print_text2man(char *str) { char *s; int w_count = 0; char last_char = '\n'; if(!str || !(*str) || !*(str+1)) { printf("%s\n", str); return; } s = str; while(*s && *(s+1)) { if(check_for_span_man(&s, &w_count, &last_char)) // continue; if(*s == '*' && *(s+1) == '*') //
    { s += 2; while(isspace(*s)) ++s; while(*s && !(*s == '&' && *(s+1) == '&')) //
{ if(*s == '#' && *(s+1) == '#') //
  • { if(last_char != '\n') putchar('\n'); printf(".sp\n"); s += 2; while(isspace(*s)) ++s; last_char = '\n'; } else if(check_for_span_man(&s, &w_count, &last_char)) // continue; else { put_man_char(*s); last_char = *s; ++s; } } if(*s == '&' && *(s+1) == '&') s += 2; if(last_char != '\n') putchar('\n'); last_char = '\n'; w_count = 0; continue; } if(w_count > 60 && isspace(*s)) { putchar('\n'); while(isspace(*s)) ++s; last_char = '\n'; w_count = 0; continue; } if(w_count == 0 && isspace(*s)) { while(isspace(*s)) ++s; continue; } put_man_char(*s); last_char = *s; ++w_count; ++s; } if(*s) { putchar(*s); last_char = *s; } if(last_char != '\n') putchar('\n'); } static inline char *remove_dashes(char *str) { char *s = str; while(*s == '-') ++s; return s; } static void print_man_page_options(void) { int i; printf(".SH OPTIONS\n.PP\n"); printf(".TP\n\\fBFILE\\fR\n"); print_text2man(opt[0]->description); for(i=1; iarg) snprintf(arg, 128, " \\fB%s\\fR", opt[i]->arg); else arg[0] = '\0'; if(opt[i]->short_op && strlen(opt[i]->short_op) == 2) printf(".TP\n\\fB\\-\\-%s\\fR%s or \\fB\\-%s\\fR%s\n", remove_dashes(opt[i]->long_op), arg, remove_dashes(opt[i]->short_op), arg); else printf(".TP\n\\fB\\-\\-%s\\fR%s\n", remove_dashes(opt[i]->long_op), arg); print_text2man(opt[i]->description); } } static void print_html_options_table(void) { int i; char class[2] = { 'a', 'b' }; printf( "\n" ); printf( " \n" " \n" " \n" " \n" " \n" " \n" "\n", "font-size:50%;" ); for(i=0;i\n", class[i%2]); printf( " \n", i?"":"FILE", get_func("op_", opt[i]->long_op), opt[i]->long_op); printf( " \n", opt[i]->short_op?opt[i]->short_op:""); printf( " \n", opt[i]->arg?opt[i]->arg:""); printf( " \n"); printf( " \n"); } printf("
    long optionshortargdescription
    \n" " %s\n" " \n" " %s\n" " \n" " %s\n" " \n"); print_text2html(opt[i]->description, i); printf( "
    \n"); } int main(int argc, char **argv) { { ssize_t n = 2; if(argc > 1) n = strlen(argv[1]); if(argc < 2 || argc > 3 || n != 2 || argv[1][0] != '-' || (argv[1][1] != 't' && argv[1][1] != 'l' && argv[1][1] != 'h' && argv[1][1] != 'a' && argv[1][1] != '1' && argv[1][1] != '2' && argv[1][1] != 'i' && argv[1][1] != 'I' && argv[1][1] != 'T' && argv[1][1] != 'p' && argv[1][1] != 's' && argv[1][1] != 'm') ) { printf("Usage: %s [ -a | -h | -i | -I | -l | -p | -t | -1 | -2 ]\n" "\n" " Generate HTML and C code that is" " related to Quickplot command line options\n" " Returns 0 on success and 1 on error.\n" "\n" " -a print C code for argument parsing\n" " -h print C code for OPTIONS help text\n" " -i print C code for app->op_ initialization\n" " -I print C code for declaring app\n" " -l print html options list\n" " -m print OPTIONS part of man page\n" " -p print the options\n" " -s print the short options sorted\n" " -t print html options table\n" " -T print C code of the big qp_options array\n" " -1 print 1st pass parsing C code template\n" " -2 print 2nd pass parsing C code template\n" "\n", argv[0]); return 1; } } { int err = 0; /* make an array that we can sort */ struct qp_option *o; /* Test that the options do not have duplicates */ for(o=(struct qp_option *)options;o->long_op;++o) { struct qp_option *oc; for(oc=(o+1);oc->long_op;++oc) { if(!strcmp(oc->long_op, o->long_op)) { printf("There are at least two long options: %s\n", o->long_op); err = 1; } if(oc->short_op && o->short_op && !strcmp(oc->short_op, o->short_op)) { printf("There are at least two short options: %s\n", o->short_op); printf("one for: %s\n", o->long_op); printf("one for: %s\n", oc->long_op); err = 1; } } ++length; } if(err) return 1; } { /* sort the array */ ssize_t i, end; opt = Malloc(sizeof(*opt)*length); /* sort the options in order of long option */ for(i=0;i= 0) { for(i=0;ilong_op, opt[i+1]->long_op) > 0) { struct qp_option *o; o = opt[i]; opt[i] = opt[i+1]; opt[i+1] = o; } } --end; } } #if 0 if(argv[1][1] == 'a') { size_t i; printf("---- OLD SORT -----\n"); for(i=0;ilong_op); } #endif if(opt[0]->long_op[0]) { printf("FILE is not the first option listed\n"); return 1; } if(argv[1][1] == 'p') { size_t i; for(i=0;ilong_op, opt[i]->short_op, opt[i]->arg); return 0; } if(argv[1][1] == 'm') { printf(".\\\" This OPTIONS part of this file was generated by running: " "%s %s\n", argv[0], argv[1]); print_man_page_options(); return 0; } if(argv[1][1] == 's') { int i, L = 1, end; char *shorts, *s; for(i=0;ishort_op; if(o) { if(strlen(o) == 2 && o[0] == '-') L += 1; else L += strlen(o); } } s = (shorts = Malloc(L)); for(i=0;ishort_op; if(o) { int l; l = strlen(o); if(l == 2 && o[0] == '-') { *s = o[1]; ++s; } else { snprintf(s, l+1, "%s", o); s += l; } } } *s = '\0'; /* bubble sort for this small list */ end = L - 2; while(end >= 0) { for(i=0;i shorts[i+1]) { char c; c = shorts[i]; shorts[i] = shorts[i+1]; shorts[i+1] = c; } } --end; } printf("%s\n", shorts); return 0; } if(argv[1][1] == 'T') { print_tidy_struct(); return 0; } if(argv[1][1] == 'I') { printf("/* This file was auto-generated by running: `%s %s' */\n", argv[0], argv[1]); print_app_ops_declare_code(); return 0; } if(argv[1][1] == 'i') { printf("/* This file was auto-generated by running: `%s %s' */\n", argv[0], argv[1]); print_app_ops_init_code(); return 0; } if(argv[1][1] == 'a') { printf("/* This file was auto-generated by running: `%s %s' */\n", argv[0], argv[1]); print_argument_parsing_code(); return 0; } if(argv[1][1] == 'h') { print_help_text(); return 0; } if(argv[1][1] == 'l') { print_html_options_list(); return 0; } if(argv[1][1] == 't') { printf("\n", argv[0], argv[1]); print_html_options_table(); return 0; } if(argv[1][1] == '1') { printf("/* This file was auto-generated by running: `%s %s' */\n", argv[0], argv[1]); print_1st_pass_functions(); return 0; } if(argv[1][1] == '2') { printf("/* This file was auto-generated by running: `%s %s' */\n", argv[0], argv[1]); print_2nd_pass_functions(); return 0; } return 0; } quickplot-0.10.6/config.h.in0000644000175000017500000000555212245423265012571 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* The default font used when drawing the numbers on the grid */ #undef DEFAULT_GRID_FONT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have a readline compatible library */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `powl' function. */ #undef HAVE_POWL /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_H /* Define if your readline library has \`add_history' */ #undef HAVE_READLINE_HISTORY /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Quickplot Library version number */ #undef LIB_VERSION /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* The default maximum number of plot per file */ #undef NUMBER_OF_PLOTS /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If QP_DEBUG is defined we add extra debug code to quickplot and libquickplot. */ #undef QP_DEBUG /* Factor switch plot values may differ to be on the same scale when auto scale is selected */ #undef SCALE_FACTOR /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION